# CCX on Android Devices

Today smart phones have revolutionized Engineering Computations. Computer Aided Engineering (CAE) is now more easy and accessible with help of android tablets and phones.

CalculiX CrunchiX Solver – ccx is one of the most powerful Multiphysics GNU Finite Element Solver. This post is about how to compile and run gnu ccx on android. The code tested on HTC Incredible S and Android version 2.3.3.

If you are familiar with ccx or you can execute abaqus inp files using ccx, then, this script is helpful to you. Following steps show how to compile and run ccx on android.

## 1. Install Prerequisite Apps in Android:

### a. Required android apps:

1. GNURoot Wheezy by Corbin Champion
2. GNURoot by Corbin Champion
3. Free disk space on sdcard (better to have more than 6GB) and internal memory (better to have more than 500MB).

1. make
2. gfortran
3. gcc
4. wget
5. sed
6. bzip2

## 2. Compiling ccx:

1. Open GNUROOT
2. Launch rootfs as fake root
$wget http://enggprog.com/Downloads/Projects/calculix/cxbuild4mob Or you can use tar files of cxbuild4mob. Untar and use it. Do not forget to go through readme file inside tar folder. Link of tar file is: http://enggprog.com/Downloads/Projects/calculix/cxbuild4mob.tar.gz 4. Make script executable and then run it. Estimate downloading and compilation time for ccx is about 3 hours. $chmod +x cxbuild4mob
$./cxbuild4mob ## 3. How to use ccx on Android: 1. Open GNURoot Fig. 1: GNURoot 2. Check Launch as Fake Root option then press Launch Rootfs button. Fig 2: Rootfs with Fake Root option checked 3. Change current directory to folder where inp file exists. Verify by ls command and then run it under ccx. Fig 3: Verify inp file. 4. Check for errors in ccx log. Fig. 4: Output Log of ccx. 5. Verify output files. Fig. 5: Output files of ccx ## 4. References: # Highlighting Syntax in gedit for CalculiX CrunchiX inp file for Enhanced Readability CalculiX is a free software nonlinear three-dimensional finite element program for structural applications. Following steps results in syntax highlight of inp file in gedit: 1. Add .xml in ~/.local/share/mime/packages named ccx.xml with following content:  <mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> <mime-type type="text/x-inp"> <comment>CalculiX CrunchiX inp files</comment> <glob pattern="*.inp"/> </mime-type> </mime-info> 2. Update mime-database as: $ cd ./local/share
$update-mime-database mime  3. Add ccx.lang file in /usr/share/gtksourceview-3.0/language-specs or in path resulting from following command: $ locate gtksourceview | grep /c.lang


The content of ccx.lang is:

< ?xml version="1.0" encoding="UTF-8"?>
<language id="ccx" _name="CalculiX" version="2.0" _section="Sources">
<property name="mimetypes">text/x-inp</property>
<property name="globs">*.inp</property>
<styles>
<style id="comment"           _name="Comment"               map-to="def:comment"></style>
<style id="keyword"           _name="Keyword"               map-to="def:keyword"></style>
<style id="card"              _name="Input Cards"           map-to="def:type"></style>
<style id="element"           _name="Element Library"       map-to="def:constant"></style>
<style id="floating-point"    _name="Floating point number" map-to="def:floating-point"></style>
<style id="decimal"           _name="Decimal number"        map-to="def:decimal"></style>
</styles>
<definitions>
<context id="comment" style-ref="comment">
<start>\*\*</start>
<end>$</end> </context> <!-- http://www.lysator.liu.se/c/ANSI-C-grammar-l.html --> <context id="float" style-ref="floating-point"> <match extended="true"> (?&lt;![\w\.]) ((\.[0-9]+ | [0-9]+\.[0-9]*) ([Ee][+-]?[0-9]*)? | ([0-9]+[Ee][+-]?[0-9]*)) [fFlL]? (?![\w\.]) </match> </context> <context id="decimal" style-ref="decimal"> <match extended="true"> (?&lt;![\w\.]) [0-9]+[uUlL]* (?![\w\.]) </match> </context> <context id="keywords" style-ref="keyword"> <keyword>2D</keyword> <keyword>3D</keyword> <keyword>CIRC</keyword> <keyword>ELSET</keyword> <keyword>MATERIAL</keyword> <keyword>NAME</keyword> <keyword>NSET</keyword> <keyword>OUTPUT</keyword> <keyword>RECT</keyword> <keyword>SECTION FORCES</keyword> <keyword>SECTION</keyword> <keyword>S</keyword> <keyword>TYPE</keyword> <keyword>U</keyword> </context> <context id="elements" style-ref="element"> <keyword>C3D8</keyword> <keyword>F3D8</keyword> <keyword>C3D8R</keyword> <keyword>F3D8R</keyword> <keyword>C3D8I</keyword> <keyword>C3D20</keyword> <keyword>F3D20</keyword> <keyword>C3D20R</keyword> <keyword>F3D20R</keyword> <keyword>C3D20RI</keyword> <keyword>C3D4</keyword> <keyword>F3D4</keyword> <keyword>C3D10</keyword> <keyword>F3D10</keyword> <keyword>C3D6</keyword> <keyword>F3D6</keyword> <keyword>C3D15</keyword> <keyword>F3D15</keyword> <keyword>S3</keyword> <keyword>S4R</keyword> <keyword>S6</keyword> <keyword>S8</keyword> <keyword>S8R</keyword> <keyword>CPS3</keyword> <keyword>CPS4</keyword> <keyword>CPS4R</keyword> <keyword>CPS6</keyword> <keyword>CPS8</keyword> <keyword>CPS8R</keyword> <keyword>CPE3</keyword> <keyword>CPE4</keyword> <keyword>CPE4R</keyword> <keyword>CPE6</keyword> <keyword>CPE8</keyword> <keyword>CPE8R</keyword> <keyword>CAX3</keyword> <keyword>CAX4</keyword> <keyword>CAX4R</keyword> <keyword>CAX6</keyword> <keyword>CAX8</keyword> <keyword>CAX8R</keyword> <keyword>B31</keyword> <keyword>B31R</keyword> <keyword>B32</keyword> <keyword>B32R</keyword> <keyword>D</keyword> <keyword>GAPUNI</keyword> <keyword>DASHPOTA</keyword> <keyword>SPRINGA</keyword> <keyword>DCOUP3D</keyword> </context> <context id="cards" style-ref="card"> <prefix>\*</prefix> <keyword>AMPLITUDE</keyword> <keyword>BEAM SECTION</keyword> <keyword>BOUNDARY</keyword> <keyword>BUCKLE</keyword> <keyword>CFLUX</keyword> <keyword>CHANGE FRICTION</keyword> <keyword>CHANGE MATERIAL</keyword> <keyword>CHANGE PLASTIC</keyword> <keyword>CLOAD</keyword> <keyword>COMPLEX FREQUENCY</keyword> <keyword>CONDUCTIVITY</keyword> <keyword>CONTACT FILE</keyword> <keyword>CONTACT OUTPUT</keyword> <keyword>CONTACT PAIR</keyword> <keyword>CONTACT PRINT</keyword> <keyword>CONTROLS</keyword> <keyword>COUPLED TEMPERATURE-DISPLACEMENT</keyword> <keyword>CREEP</keyword> <keyword>CYCLIC HARDENING</keyword> <keyword>CYCLIC SYMMETRY MODEL</keyword> <keyword>DASHPOT</keyword> <keyword>DEFORMATION PLASTICITY</keyword> <keyword>DENSITY</keyword> <keyword>DEPVAR</keyword> <keyword>DFLUX</keyword> <keyword>DISTRIBUTING COUPLING</keyword> <keyword>DLOAD</keyword> <keyword>DSLOAD</keyword> <keyword>DYNAMIC</keyword> <keyword>ELASTIC</keyword> <keyword>ELEMENT</keyword> <keyword>ELEMENT OUTPUT</keyword> <keyword>EL FILE</keyword> <keyword>EL PRINT</keyword> <keyword>ELSET</keyword> <keyword>END STEP</keyword> <keyword>EQUATION</keyword> <keyword>EXPANSION</keyword> <keyword>FACE PRINT</keyword> <keyword>FILM</keyword> <keyword>FLUID CONSTANTS</keyword> <keyword>FLUID SECTION</keyword> <keyword>FREQUENCY</keyword> <keyword>GAP</keyword> <keyword>GAP CONDUCTANCE</keyword> <keyword>HEADING</keyword> <keyword>HEAT TRANSFER</keyword> <keyword>HYPERELASTIC</keyword> <keyword>HYPERFOAM</keyword> <keyword>INCLUDE</keyword> <keyword>INITIAL CONDITIONS</keyword> <keyword>MATERIAL</keyword> <keyword>MODAL DAMPING</keyword> <keyword>MODAL DYNAMIC</keyword> <keyword>MODAL CHANGE</keyword> <keyword>MPC</keyword> <keyword>NO ANALYSIS</keyword> <keyword>NODAL THICKNESS</keyword> <keyword>NODE FILE</keyword> <keyword>NODE OUTPUT</keyword> <keyword>NODE PRINT</keyword> <keyword>NODE</keyword> <keyword>NORMAL PRINT</keyword> <keyword>NORMAL</keyword> <keyword>NSET</keyword> <keyword>ORIENTATION</keyword> <keyword>PHYSICAL CONSTANTS</keyword> <keyword>PLASTIC</keyword> <keyword>PRE-TENSION SECTION</keyword> <keyword>RADIATE</keyword> <keyword>RESTART</keyword> <keyword>RIGID BODY</keyword> <keyword>SELECT SECTION</keyword> <keyword>SOLID SECTION</keyword> <keyword>SPECIFIC GAS CONSTANT</keyword> <keyword>SPECIFIC HEAT</keyword> <keyword>SPRING</keyword> <keyword>STATIC</keyword> <keyword>STEADY STATE DYNAMICS</keyword> <keyword>STEP</keyword> <keyword>SUBMODEL</keyword> <keyword>SURFACE</keyword> <keyword>SURFACE BEHAVIOR</keyword> <keyword>SURFACE INTERACTION</keyword> <keyword>TEMPERATURE</keyword> <keyword>TIE</keyword> <keyword>TIME POINTS</keyword> <keyword>TRANSFORM</keyword> <keyword>UNCOUPLED TEMPERATURE-DISPLACEMENT</keyword> <keyword>USER MATERIAL</keyword> <keyword>VALUES AT INFINITY</keyword> <keyword>VIEWFACTOR</keyword> <keyword>VISCO</keyword> </context> <!--Main context--> <context id="ccx"> <include> <context ref="gtk-doc:inline-docs-section"></context> <context ref="comment"></context> <context ref="float"></context> <context ref="decimal"></context> <context ref="keywords"></context> <context ref="cards"></context> <context ref="elements"></context> </include> </context> </definitions> </language> 4. Open inp file and select gedit program to open. 5. If you dont like or face problem then revert back the inp files to plain text as: $ gvfs-set-attribute [path_to_your_inp_file]  metadata::gedit-language ''


Fig.1: Before Syntax Highlight of CCX input file.

Fig.2: After Syntax Highlight of CCX input file.

# Hosting Video on Your Website and Blog

Nowadays web trend is for free decentralized web services. Instead of centralized video tubes, social network and cloud, web developers and users prefer decentralized and free(dom) web services. This post overviews free video hosting alternatives for web developers and bloggers. It is about encouragement to your own video service right on your website or blog and embedding the video links from websites other the youtube.

There are 04 solutions and you can choose the one which suits you:

1. HTML5 video tag.
2. VideoPress plugin for WordPress site.
3. Mediagoblin.

## 1. HTML5 Video Tag:

If you have a little know how of how html works then you can easily tag video in following steps.

1. Create/Select your video and convert it in ogg format from Online Video Converter website or from firefogg.org.
2. Upload the video in .ogg extension to desired web folder of your website.
3. Use it in video tag.
<video width="320" height="240" src="..//bin/edit/myvideofiles/video.ogv"></video> 

4. For fallback mode, in case of no support for html5 in user’s browser, upload cartado applet to root folder of your website and use following applet tag with your video tag:
<applet archive="http://www.theora.org/cortado.jar" code="com.fluendo.player.Cortado.class" width="352" height="288">
<param name="url" value="http://myserver.com/theora.ogv" />
<param name="framerate" value="29" />
<param name="keepAspect" value="true" />
<param name="video" value="true" />
<param name="audio" value="true" />
<param name="bufferSize" value="100" />
<param name="userId" value="user" />
</applet>

Today all latest browsers support html5.

5. Detailed steps are found at FLOSS Manual. The link of their website is given below in reference.

## 2. VideoPress plugin for WordPress site:

If you are running wordpress site which is either hosted in premium account or hosted by yourself, you can easily manage your uploaded video using videopress plugin. You can install VideoPress Plugin just like another plugin right from your WP dashboard. VideoPress Quick Start Guide is helpful resource.

## 3. Mediagoblin:

mediagoblin.org is a free software media publishing platform that anyone can run. You can think of it as a decentralized alternative to Flickr, YouTube, SoundCloud, etc. It required dedicated web server.

You can upload and embed links from websites other than youtube like: tune.pk, gobblin.se, vimeo.com, dailymotion.com, veoh.com, metacafe.com, rutube.ru, break.com, and blip.tv.

# Location of Construction Joint

Following points are helpful to provide construction joint in RC Slab, Beam and Raft Foundation:

1. Construction joint shall be provided preferably at a location where stress are zero.
2. Construction joint is provided at one-third or end of support.
3. Also provide key and rebar to transfer shear stress if shear stress is not zero at point of construction joint.
4. Provide construction joints as minimum as possible.
5. Construction joint shall not be left on discretion of contractor. It must be approved by designer.

## Definition:

Construction joints are placed at the end of a day’s work. In slabs, they may be designed to permit movement and/or to transfer load. Often in reinforced concrete a conscious effort is made to clean the joint and bond the next day’s work.[1].

## Explanation:

The number of construction joints in concrete structures should be minimized. If construction joints are necessary to facilitate construction, it is normally aligned perpendicular to the direction of the member. For beams and slabs, construction joints are preferably located at about one-third of the span length. The choice of this location is based on the consideration of low bending moment anticipated with relatively low shear force. However, location of one-third span is not applicable to simply supported beams and slabs because this location is expected to have considerable shear forces and bending moment when subjected to design loads. Sometimes, engineers may tend to select the end supports as locations for construction joints just to simplify construction. [2].

Construction joint is not preferred at midspan. When formwork removed from construction pours (delay in next pouring) and the beam (or slab) has had to cantilever from the previous support to the new construction joint. Also, joints at midspan do not typically work for post-tensioned construction. you need to accommodate anchorages and at approx 1/3 span works best. [3].

You need to provide a joint with key and rebars crossing the joint. In raft footing, at construction joint, shear force may not be minimum/zero. Hence you will have to leave dowels from one pour to another pour to transfer shear. You may calculate area of reinforcement required based on permissible shear stress as 0.45 fy. [4].

You can have your opinion and suggestion in comment box below.

## Reference:

2. A Self Learning Manual – Mastering Different Fields of Civil Engineering Works (VC-Q-A-Method) by Vincent T. H. CHU.
3. eng-tips
4. sefindia.org

1. ACI 302.1, “Guide for Concrete Floor and Slab Construction,” ACI Manual of Concrete Practice.
2. “Slabs on Grade,” ACI Concrete Craftsman Series, American Concrete Institute, Detroit, Mi.
3. “Cracks in Concrete: Causes, Prevention, Repair,” a collection of articles from Concrete Construction Magazine, June, 1973.

# Debian4Engr Series 07: Installation of Blender

Following is one step guide for Installation of Blender in GNU Debian-cut and wheezy:

## Installation:

In GNU Debian, write following command in terminal:

$su$ apt-get install blender

The latest version is available in testing repo and available by default in debian-cut

# Debian4Engr Series 06: Installation of QGIS

Following is guide for installation of QGIS 1.8.0 in GNU Debian-cut and wheezy:

### Update sources.list:

Update Packages for Wheezy for i386 and amd64 are available at:


nano /etc/apt/sources.list
deb http://qgis.org/debian wheezy main
deb-src http://qgis.org/debian wheezy main

### Keyring:

To add the the qgis.org repository public key to your apt keyring, type:

gpg --recv-key 997D3880
gpg --export --armor 997D3880 | sudo apt-key add -

### Installation:

sudo apt-get update
sudo apt-get install qgis

If you also want python plugins make sure to install the optional python package:

sudo apt-get install python-qgis

If you want the GRASS plugin make sure to install the optional package:

sudo apt-get install grass
sudo apt-get install qgis-plugin-grass

### Note:

As to date i.e., 30/09/12, qgis-plugin-grass was not installable because it required a package grass641 which is not available in any repo (stable, testing, unstable, experimental) of debian. I have reported the bug to QGIS issue tracking. For now, I upgraded to nightly build of qgis by changing sources.list as:

deb     http://qgis.org/debian-nightly wheezy main
deb-src http://qgis.org/debian-nightly wheezy main


Then followed the steps of installation heading as described above and successfully install all three packages, i.e, qgis, python-qgis and qgis-plugin-grass. QGIS 1.90 – Master was installed successfully.

# Analysis of GFRC in Ansys APDL

Following is link contain APDL code for GFRC. It will be modified for better post processing result and topology optimization.

The preview of above inp file is show below.

This APDL code is available for mentoring. Comment for your suggestions and improvements.

Analysis of GFRC in Ansys APDL

!Ansys APDL for GFRC
!
!!
!=======================================================
!Start of Solution
!=======================================================
!
!***** Author: Engr. Faisal ur Rehman *****
!*** enggprog.com - Engineering Programs ***
!
!
!27-04-12
!
!
!-------
!Goals:
!-------
!What's Achieved: Demo for APDL modeling to analysis to Postprocessing.
!What's Next to be added: Stress Distribution on Cross-section, P Delta plot.
!
!
!=============================================================
!Note: Ignore Warnings. Analysis is non linear. Approx Analysis time is 3 minutes.
!=============================================================
!
!=============================================================
!Start of File
!=============================================================
!

/Title, GFRC - By FR
/PREP7

Length=3048
D=152.4 !152.4panel depth= 6inch
n=7 ! number of triangular openings (Type A in Report) at the bottom of the panel
Tt=12.7 ! 0.5 inch thick top leaf
Tb=12.7 ! 0.5 inch thick bot leaf
Tl=12.7 ! 0.5 inch thick truss leaf
Ll=142.875! 5-5/8 inch truss member length

Lc=25.4/4 ! chamfer length= 0.25 inch

Wt=2*sqrt(Ll**2-(D-Tt-Tb)**2)
theta=abs(atan((D-Tt-Tb)/(0.5*Wt)))
W=(n*Wt)+(2*Tt)+(2*(n-1)*Tl/sin(theta))

! FLAT BASE Isoceles triangle hole
p1x=0.5*Lc/sin(theta/2)
p1y=0
p2x=2*(D-Tt-Tb)/tan(theta)-Lc/2/sin(theta/2)
p2y=0
p3x=2*(D-Tt-Tb)/tan(theta)-Lc*cos(theta)/2/sin(theta/2)
p3y=Lc*sin(theta)/2/sin(theta/2)
p4x=(D-Tt-Tb)/tan(theta)+Lc/2
p4y=(D-Tt-Tb)-Lc*tan(theta)/2
p5x=(D-Tt-Tb)/tan(theta)-Lc/2
p5y=(D-Tt-Tb)-0.5*Lc*tan(theta)
p6x=Lc*cos(theta)/2/sin(theta/2)
p6y=Lc*sin(theta)/2/sin(theta/2)

! First egde triangle hole
p7x=0
p7y=Tl/cos(theta)+0.5*Lc/sin((45*3.141592654/180)-(theta/2))
p8x=0.5*Lc*sin(90*3.141592654/180+theta)/sin(45*3.141592654/180-theta/2)
p8y=Tl/cos(theta)+0.5*Lc*sin(theta)/sin(45*3.141592654/180-theta/2)
p9x=(D-Tt-Tb)/tan(theta)-Tl/sin(theta)-0.5*Lc*cos(theta)/sin(theta/2)
p9y=(D-Tt-Tb)-Lc*sin(theta)/2/sin(theta/2)
p10x=(0.5*Wt)-(Tl/sin(theta))-(0.5*Lc/sin(theta/2))
p10y=(D-Tt-Tb)
p11x=Lc*cos(45*3.141592654/180)
p11y=(D-Tt-Tb)
p12x=0
p12y=(D-Tt-Tb)-Lc*sin(45*3.141592654/180)

! Pointed Isoceles triangle hole
p13x=(D-Tt-Tb)/tan(theta)-Lc/2
p13y=Lc*tan(theta)/2
p14x=(D-Tt-Tb)/tan(theta)+Lc/2
p14y=Lc*tan(theta)/2
p15x=2*(D-Tt-Tb)/tan(theta)-Lc*cos(theta)/2/sin(theta/2)
p15y=(D-Tt-Tb)-Lc*sin(theta)/2/sin(theta/2)
p16x=2*(D-Tt-Tb)/tan(theta)-Lc/2/sin(theta/2)
p16y=(D-Tt-Tb)
p17x=0.5*Lc/sin(theta/2)
p17y=(D-Tt-Tb)
p18x=Lc*cos(theta)/2/sin(theta/2)
p18y=(D-Tt-Tb)-Lc*sin(theta)/2/sin(theta/2)

! Outer boundary of DPC panel
K,1,0,0
K,2,W,0
K,3,W,D
K,4,0,D
! Create Area for that
A,1,2,3,4

! Inner first corner hole of DPC panel
Tx=Tt
Ty=Tt
K,5,Tx+p7x,Ty+p7y
K,6,Tx+p8x,Ty+p8y
K,7,Tx+p9x,Ty+p9y
K,8,Tx+p10x,Ty+p10y
K,9,Tx+p11x,Ty+p11y
K,10,Tx+p12x,Ty+p12y

! Create Area for that
A,5,6,7,8,9,10

!Inner first flat base isosceles hole of DPC panel

Tx=Tt
Ty=Tt
K,11,Tx+p1x,Ty+p1y
K,12,Tx+p2x,Ty+p2y
K,13,Tx+p3x,Ty+p3y
K,14,Tx+p4x,Ty+p4y
K,15,Tx+p5x,Ty+p5y
K,16,Tx+p6x,Ty+p6y

! Create Area for that
A,11,12,13,14,15,16

! looping for n number of triangular areas

m=n-1
j=17
*do,i,1,m
Tx=Tt+Wt/2+Tl/sin(theta)+(i-1)*(Wt+2*Tl/sin(theta))
Ty=Tt
K,j,Tx+p13x,Ty+p13y

j1=j+1
K,j1,Tx+p14x,Ty+p14y

j2=j+2
K,j2,Tx+p15x, Ty+p15y

j3=j+3
K,j3,Tx+p16x,Ty+p16y

j4=j+4
K,j4,Tx+p17x,Ty+p17y

j5=j+5
K,j5,Tx+p18x,Ty+p18y

! Create Area, ID # i+3 th for that
A,j,j1,j2,j3,j4,j5

Tx=Tt+2*(Wt/2+Tl/sin(theta))+(i-1)*(Wt+2*Tl/sin(theta))
Ty=Tt

j6=j+6
K,j6,Tx+p1x,Ty+p1y

j7=j+7
K,j7,Tx+p2x,Ty+p2y

j8=j+8
K,j8,Tx+p3x,Ty+p3y

j9=j+9
K,j9,Tx+p4x,Ty+p4y

j10=j+10
K,j10,Tx+p5x,Ty+p5y

j11=j+11
K,j11,Tx+p6x,Ty+p6y

! Create Area, ID # i+4 th for that
A,j6,j7,j8,j9,j10,j11

!for next loop
j=j11+1
*enddo

! Inner last corner hole of DPC panel
Tx=W-Tt
Ty=Tt

j13=j
K,j13,Tx-p7x,Ty+p7y

j14=j+1
K,j14,Tx-p8x,Ty+p8y

j15=j+2
K,j15,Tx-p9x, Ty+p9y

j16=j+3
K,j16,Tx-p10x,Ty+p10y

j17=j+4
K,j17,Tx-p11x,Ty+p11y

j18=j+5
K,j18,Tx-p12x,Ty+p12y

! Create Area, ID # i+1 th for that
A,j13,j14,j15,j16,j17,j18

!
!================================================================
!End of Dimension Data Calc.
!================================================================
!

!
!================================================================
!Preprocessing
!================================================================
!

! subtract triangles from rectangle
ASBA, 1, ALL

!Copy areas to 3
!AGEN, ITIME, NA1, NA2, NINC, DX, DY, DZ, KINC, NOELEM, IMOVE
AGEN, 3, ALL,,,,,Length/3

!extrude to volume
!VEXT, NA1, NA2, NINC, DX, DY, DZ, RX, RY, RZ
VEXT,17,,,,,Length/3
VEXT,1,,,,,Length/3
VEXT,2,,,,,Length/3

!glue together all vols
VGLUE,1,2,3

! Define Element Type
ET,1,SOLID65 !concrete solid 65

! Define Material Properties
MP,EX,1,2.37e9 ! mp,Young's modulus,material number,value
MP,PRXY,1,0.24 ! mp,Poisson's ratio,materialnumber,value
MP,DENS,1,2.3e3 ! mp,mass density,material number,value

TB,CONCR,1 !non linear properties

!TBDATA,startlocation,ft,fc,fu(tensile),,fu(compressive)
!(startloc = 3 means first data = 3rd row i.e ft)
TBDATA,3,7.8e6,2.2e7,2.64e7,3.81e7,3.19e7,3.795e7

!meshing
ESIZE,100 !global size of mesh
MSHKEY,0
MSHAPE,1,3D
VMESH,ALL !create Volume mesh of vol

FINISH ! Finish pre-processing

!
!============================================================
!Finished Pre-processing
!============================================================
!

!
!============================================================
!Start of Solution
!============================================================
!

/SOLU ! Enter the solution processor
ANTYPE,0 ! Analysis type,static
! Define Displacement Constraints on Lines (dl command)

!Supports
DL,1,,ALL,0 !Fixed
DL,659,,UX,0 !UX and UY for 659 is for hinge
DL,659,,UY,0

DL,285,,UY,-30
DL,473,,UY,-30

!NSUB,10,50,5
SOLVE ! Solve the problem
FINISH ! Finish the solution processor
SAVE ! Save your work to the database

!
!=========================================================
!End of Solution.
!=========================================================
!

!
!==========================================================
!Start of Postprocessing.
!==========================================================
!

/post1 ! Enter the general post processor

!/WIND,ALL,OFF
!/WIND,1,LTOP
!/WIND,2,RTOP
!/WIND,3,LBOT
!/WIND,4,RBOT
!GPLOT
!/GCMD,1, PLDISP,2 ! Plot the deformed and undeformed edge
!/GCMD,2, PLNSOL,U,SUM,0,1 ! Plot the deflection USUM
!/GCMD,3, PLNSOL,S,EQV,0,1 ! Plot the equivalent stress
!/GCMD,4, PLNSOL,EPTO,EQV,0,1 ! Plot the equivalent strain
!/CONT,2,10,0,,0.0036 ! Set contour ranges
!/CONT,3,10,0,,8
!/CONT,4,10,0,,0.05e-3
!/FOC,ALL,-0.340000,,,1 ! Focus point

!my post process plot
/WIND,ALL,OFF
/WIND,1,FULL
GPLOT
/GCMD,1, PLDISP,2 ! Plot the deformed and undeformed edge

/replot
PRNSOL,DOF, ! Prints the nodal solutions

!
!==========================================================
!End of Post Processing.
!==========================================================
!

!
!==========================================================
!EOF
!==========================================================
!

# Classificaiton of Load with respect to Time

## Static:

A static load is time independent. It’s value is constant w.r.t time.

## Dynamic:

A dynamic load is time dependent and for which inertial effects cannot be ignored.

## Quasi-Static/Pseudo-Static:

A quasi-static/pseudo-static load is time dependent but is “slow” enough such that inertial effects can be ignored. Note that a load quasi-static for a given structure (made of some material) may not be quasi-static for another structure (made of a different material).

## Quasi-Dynamic/Pseudo-Dynamic:

In pseudo-dynamic loading, inertia and damping properties are simulated while stiffness properties are acquired from the structure. It is displacement based load given to structure in pseudodynamic (PSD) test. The pseudodynamic (PSD) test method is a displacement-based experimental technique that is used to simulate the seismic response of structures. PSD utilizes feedback signals from a test structure in a numerical integration algorithm to sequentially solve the equations of motion to determine command displacements. The command displacements are imposed on a test structure using hydraulic actuators.

# Debian4Engr Series: 05 Document writing using LaTeX

LaTeX is a high-quality typesetting system; it includes features designed for the production of technical and scientific documentation. LaTeX is the de facto standard for the communication and publication of scientific documents. One of great benefit of LaTeX is that it can be converted easily to postscript, pdf or html. There is excellent collection documentation and books on LaTeX website which can be helpful to get started with LaTeX.

Following packages are required to work with LaTeX in Debian:

1. texlive – the base TEX/LATEX setup.
2. emacs (with auctex) – a Linux editor that integrates tightly with LATEX through the add-on AucTeX package.
3. ghostscript – a PostScript preview program.
4. xpdf and acrobat – a PDF preview program.
5. imagemagick – a free program for converting bitmap images.
6. gimp – a free photoshop look-a-like.
7. inkscape – a free illustrator/corel draw look-a-like.

Following is a simple getting started tex file that should be save with name of hello.tex using emacs or gedit.

\documentclass{article}
\begin{document}
A \textbf{bold \textit{Hello \LaTeX}} to start!
\end{document}

Above file can be compile either directly from emacs or from terminal by following command:

$pdflatex hello.tex The result will be a pdf file with following writing: A bold Hello LaTeX to start! ## Creating CV, Technical Reports and Presentation: You can write your entire technical report, thesis or CV in LaTeX. You can also use Beamer class (latet-beamer) to create Powerpoint like presentation in LaTeX. ## Converting odt to LaTeX: Libre documents can be converted to LaTeX using w2l command from terminal. This feature will requires installation of libreoffice-writer2latex and writer2latex. $ apt-get install libreoffice-writer2latex writer2latex

Then executing w2l will convert odt to LaTeX file.

$w2l your-document.odt ## Converting LaTeX to odt: tex4ht package is required for this conversion: $ apt-get install tex4ht

To convert document, use oolatex command:

$/usr/share/tex4ht/oolatex your-file.tex Another package for LaTeX to odt is pandoc. To install use: $ apt-get install pandoc

To convert, LaTeX to odt, use:

\$ pandoc your-file.tex -o your-file.odt

pandoc can be used to convert tex to other formats.

Both conversion are not giving ditto copy of original tex file. But they are helpful to get required file which need further editing to make it same as original tex file.

# Strong and Weak Form Solution – FEA

Partial Differential Equations – PDE is called “strong form” because the relationship MUST satisfy at every mathematical point in the domain.

A “weak form” means that the relationship (in integral form) is only satisfied in overall sense. In another word, “it is only satisfied in an integral (sum) sense, it is not a requirement that every point in the domain MUST obey”

The strong form of a differential equation is just that: the (partial) differential equation itself. Evaluating the PDE requires being able to get all the associated derivatives. It is satisfied pointwise at every point in a body, and is usually stated as D[u] = 0, where D is some partial differential operator. In this case, I am using u as the displacement. It may be more appropriate to look at, say, Cauchy stress (s) instead of displacement. Then the strong form might be something like D[s,u] = div[s] – ru,tt= 0.

The weak form is obtained by multiplying the PDE by an arbitrary weighting function of (in most cases) the spatial variables, then integrating the result over the domain. One then requires that the result is zero for all choices of such functions. An integration by parts is performed, leading to differentiability requirements on the weighting function, but relaxing, or “weakening” the requirements on the field described by the PDE. Once we start setting requirements on these functions, we “weaken” the form even more, but often provide a basis for expressing the approximate solution.

## Questions:

Q1. Why do we multiply the PDE by the weighting function?

Q2. How do we choose the weighting function?