User:Eml5526.s11.team6.tupsakhare/hwk4

=Problem 4.4=

GIVEN
Referring to figure 4.4.1 given below for a cylindrical circular bar in torsion -



Strong Form -

\displaystyle      \frac{d}\left( {JG\frac{d\phi}} \right) + m = 0 $$    With $$ \displaystyle 0 \leqslant x \leqslant l $$ $$\displaystyle Eq. 4.4.1 $$ Natural Boundary Condition at x = l :

M (x = l ) = $$ \displaystyle \left( {JG\frac{d\phi}} \right)_{}^{x = l} = \overline M =12 $$ $$\displaystyle Eq. 4.4.2 $$ Essential Boundary Condition at x = 0 : $$ \displaystyle \phi \left( {x = 0} \right) = \overline \phi =4 $$ $$\displaystyle Eq. 4.4.3 $$ Where,

m : Distributed moment per unit length M : Torsion Moment $$ \displaystyle \phi $$ : Angle of rotation , G : Shear modulus J : Polar moment of inertia = $$ \frac{\pi C^2}{2} $$ $$\displaystyle Eq. 4.4.4 $$ C : Radius of the cylindrical bar

FIND
a) To construct the weak form for the strong form of the circular torsion bar as given in $$\displaystyle Eq. 4.4.1 $$ b) To assume that m(x) = 0 and to integrate the differential equation given in $$\displaystyle Eq. 4.4.1 $$

c) To find the integration constants using the boundary conditions given in $$ \displaystyle Eq. 4.4.2$$ and $$ \displaystyle Eq. 4.4.3$$,

Developing the weak form
Let us assume a weighting function w (x) such that $$ \displaystyle w (x=0) = 0 $$. The condition is applied on w (x) as w (x) is chosen arbitrarily and needs to vanish at x = 0 where the essential boundary condition is applied.

Hence, now the weak form becomes -

$$ \displaystyle \frac{d}\left( {JG\frac{d\phi}} \right) + m = 0  $$

$$ \displaystyle i.e.$$ $$ \displaystyle \frac{d}\left( {J(x)G(x)\frac{d\phi}} \right) + m(x) = 0 $$ $$\displaystyle Eq. 4.4.5 $$ Note - Here we assume that J, G and m are functions of x and are NOT constants.

Integrating by parts for the first term in $$ \displaystyle Eq. 4.4.5 $$ as per the integration rule -

$$ \displaystyle   \int\limits_a^b {udv = } \left[ {uv} \right]_a^b - \int\limits_a^b {vdu} $$ $$\displaystyle Eq. 4.4.6 $$

and assuming -  $$ \displaystyle \  u = w (x)$$    and  $$ \displaystyle \   v = \left[ {\left( {JG\frac} \right) } \right] $$  ,we get

$$ \displaystyle \left[ {w(x)\left( {JG\frac} \right)} \right]_0^l - \int\limits_0^l {\frac\left( {JG\frac} \right)} dx + \int\limits_0^l {w(x).m} dx = 0 $$

$$ \displaystyle \left[ {w(x)\left( {JG\frac} \right)} \right]_{}^{x = l} - \left[ {w(x)\left( {JG\frac} \right)} \right]_{x = 0}^{} - \int\limits_0^l {\frac\left( {JG\frac} \right)} dx + \int\limits_0^l {w(x).m} dx = 0 $$ $$\displaystyle Eq. 4.4.7 $$ Now as per the choice of the weight function, $$ \displaystyle /w (x= 0) = 0 $$. Hence the second term in the $$ \displaystyle Eq. 4.4.7 $$ vanishes.

Also using $$ \displaystyle Eq. 4.4.2 $$, the first term in $$ \displaystyle Eq. 4.4.7 $$ can be replaced by $$ \displaystyle {\text{w}}\left( l \right).\overline M $$

Hence after applying the sign changes, the weak form of $$ \displaystyle Eq. 4.4.1 $$ becomes -

Integration of the strong form to get the exact solution
We use the general 1-Dimensional Model Data set 1 from Mtg 9 - Page 9-2 The genearal 1-Dimensional Model Data set 1 given above provides us to assume that $$ \displaystyle \ m (x) = 5x $$

Hence the strong form given in $$ \displaystyle Eq. 4.4.1 $$ converts to the following -

1 . $$ \displaystyle \frac{d}\left( {JG\frac} \right)+ 5x=0 $$

With  $$ \displaystyle\ 0 \leqslant x \leqslant l   $$ $$\displaystyle Eq. 4.4.9 $$ Integrating $$ \displaystyle Eq. 4.4.9 $$ with respect to x, in the limits 0 to l, we get, with constant C involved as  -

$$ \displaystyle 1.\left[ {\left( {JG\frac} \right)} \right]_0^1 + \left[ { {\frac} } \right]_0^1 = C $$

$$ \displaystyle \left[ {\left( {JG\frac} \right)} \right]_{}^{x = 1} - \left[ {\left( {JG\frac} \right)} \right]_{x = 0}^{} + \left[ { {\frac} } \right] = C $$

$$ \displaystyle \overline M - \left[ {\left( {JG\frac} \right)} \right]_{x = 0}^{} + \left[ { {\frac} } \right] = C $$ $$\displaystyle Eq. 4.4.10 $$ Now as per data set 1 as explained above, $$\overline M = 12 $$ and $$ \displaystyle \ JG = 2+3x $$

Since $$\Phi$$ is constant at x=0,$$\left(\frac{d\phi}{dx}\right)_{x=0}^{} = 0 $$

With x=0 we get JG =2. Substituting, we get

Integrating step 2 of above $$ \displaystyle Eq. 4.4.10 $$ again with respect to x using integration by parts as given in $$ \displaystyle Eq. 4.4.6 $$ with constant D involved, we get -

$$ \displaystyle \int \left( {JG\frac} \right)dx + \int \left[\frac {5x^2}{2} \right] = \int \left[ {C} \right] + D $$ $$ \displaystyle \left[ {JG\phi } \right]_0^1 - \int\limits_0^1 {\frac{d}} (JG).\phi dx + \left[ \frac{5x^3}{6} \right]_0^1 = \left[ Cx \right]_0^1 + D $$ $$ \displaystyle \left[ {JG\phi } \right]_{}^1 - \left[ {JG\phi } \right]_0^{} - \int\limits_0^1 {\frac{d}{dx} JG.\phi }dx + \left(\frac{5}{6}\right) - \left(C\right) = D $$

Now using $$ \displaystyle Eq. 4.4.3 $$ with $$ \displaystyle \phi \left( {x = 0} \right) = \overline \phi=4$$ and $$ \displaystyle JG = 2+3x $$ ,we can update above equation as - $$ \displaystyle \left[ {\phi } \right]_{}^1\left[2+3\right] - 8   - \int\limits_0^1 {3\phi}dx + \left(\frac{5}{6}\right) - \left(C\right) = D $$ $$\displaystyle Eq. 4.4.12 $$

$$ \displaystyle \left[ {\phi } \right]_{}^l\left[5\right] - 8   - 3\left[ {\phi } \right]_{}^1 + \left(\frac{5}{6}\right) - \left(C\right) = D $$ Where, C is given by $$\displaystyle Eq. 4.4.11 $$

$$ \displaystyle \left[ {\phi } \right]_{}^l\left[2\right] - 8  + \left(\frac{5}{6}\right)-{12+ 2 \left( \frac{d\phi }{dx} \right)_{x = 0}^{} - \left[ { {\frac} } \right]}  = D $$

The integration constants
Thus, the integration constants as derived in b) are as follows -

=Problem 4.7=

Given
Introduction to Calculix - A non-linear Finite Element Analysis Code

Calculix is an open source Finite Element Analysis code with the authors acknowledging that naming conventions and input style formats for CalculiX are based on those used by ABAQUS, a proprietary and commercial, general purpose finite element code but the results obtained from CalculiX are in no way connected to ABAQUS.

Website for informational and software download (Linux executable) purposes - http://dhondt.de/ Website for informational and software download (Windows executable) purposes - www.bconverged.com/calculix

Calculix in all has 2 major modules, namely- 1. CGX ( Calculix Graphics Module ) - This program is designed to generate and display finite elements (FE) and results coming from CalculiX CrunchiX (ccx).The Concept and File Format sections give some background on functionality and mesher capabilities. The Getting Started section describes how to run the verification examples you should have obtained along with the code of the program.

2. CCX (Calculix CrunchiX (Solver) Module) - This is a theoretical section giving some background on the analysis types, elements, materials etc. Then, an overview is given of all the available keywords in alphabetical order, followed by detailed instructions on the format of the input deck. If CalculiX does not run because your input deck has problems, this is the section to look at. The last section contains a description of the verification examples you should have obtained along with the code of the program. If you try to solve a new kind of problem you haven't dealt with in the past, check this section for examples. You can also use this section to check whether you installed CalculiX correctly (if you do so with the compare script and if you experience problems with some of the examples, please check the comments at the start of the corresponding input deck). Finally, the User's Manual ends with some references used while writing the code.

Find
a) Installation of the Calculix Graphics Module and to explain the installation process for layman(CGX) b) To access the CGX manual c) To sign up with used group for asking the queries,if any and to gain access to the archives where we can access the email conversation from various users,a source of possible learning d) To reproduce the basic inbuilt examples from CGX data base installed on your machine, with a detailed report, about entities such as - 1. Dics 2. Cylinder 3. Sphere 4. Sphere Volume 5. Airofoil The report shall include explanation to all the CGX commands used to generate above example geometries along with their meshes using screen-shots of the useful explanatory steps.

For Linux
For a naiver Linux user now using Windows, we strongly recommend using Ubuntu as your linux operating system which can be easily downloaded and installed at Ubuntu

To install Calculix for Linux, start by downloading the source code and examples available at http://dhondt.de/cgx_2.2.all.tar.bz2. Right now you need open a terminal by selecting that from Applications as in the following picture.



Before installation, you should check openGL on your system by typing the following words in your terminal:

find /usr/* -name libGL* -print

And the following results show that you have the openGL-library which is needed.

/usr/lib/mesa/libGL.so.1 /usr/lib/mesa/libGL.so.1.2 /usr/lib/libGLU.so.1 /usr/lib/libGLU.so.1.3.070701

Another thing you need is c++ complier since we have to compile the source code. You can check where is your c++ complier by typing

which c++

If you don't have these essential things, please typing the following to download and install them

sudo apt-get install linux-kernel-headers sudo apt-get install build-essential

Then we start to install cgx.

1.Unpack the file cgx_2.2.all.tar.bz2 in "/usr/local". An easy way is first exacting the compressed file using your right mouse menu and then copy to the destination.

2.Then enter the folder where the source code located by typing

cd /usr/local/CalculiX/cgx_2.2/src/

3.Run "make" as a root and copy the binary "cgx" to "/usr/local/bin/cgx" with

cp cgx /usr/local/bin/cgx

4.Run "latex cgx" in "/usr/local/CalculiX/cgx_2.2/doc" for three times and then run "latex2html cgx".

5.Now your CalculiX has been installed and please enjoy

6.In order to check the installation, type

cgx -b dummy.fbd

and you can see a window appear on your screen as following.



Note:

1.If you are counting any problems for being unable to find any *.h, you can type the following to ensure that you have install all the essential libraries before building the source codes

sudo apt-get install build-essential libsdl1.2debian libsdl1.2-dev libgl1-mesa-dev libglu1-mesa-dev libsdl-image1.2 libsdl-image1.2-dev

For Windows
To install CalculiX for Windows, start by downloading the executable file available at http://www.bconverged.com/download.php.

Before installing CalculiX, we recommend that you create a folder that you will want to use as your workspace for CalculiX files.

Access the zip file, CalculiX_2_2_win_002.zip, and run the executable CalculiX_2_2_win_002.exe. Review the license agreement and select "I agree" when you are prompted to as shown below.



The next screen will ask you to select the directory to which Calculix will be installed. You may use the default directory or click "Browse" to select the directory of your choosing. Once you have the desired directory in the "destination folder" field (1) click the "next" button (2) to continue.



You will now be shown a prompt which allows you to choose which components and/or extensions of the program you wished to have installed. It is recommended to use the default settings unless you are an advanced user. Click "Install" to begin the installation.



When the installation begins you will be asked to specify a folder or directory to use as your workspace. Choose the folder you created prior to starting the installation on the file tree and click "OK"



CalculiX will now begin installing onto your computer. When completed you will be presented with the screen below. Specify if you'd like to view the help file by checking or un-checking the corresponding box and then click "Finish" to complete the installation process.



Congratulations !! You have completed installing CalculiX on your Windows based computer.

Access to CGX manual
To locate the user manual after installation of the software, begin by clicking on the windows start button. All programs will open and select the folder bConverge. This folder will open with all of the calculix programs listed, however to access the manual double-click on the help icon inside of the bConverged folder. This action will open a new window containing several folders. Expand the Calculix folder and then the CGX folder. This will bring you to the Calculix User's Manual -Calculix GraphiX, Version 2.2- as shown below.



To navigate through the manual any of the blue links in the initial index will take the user to that section of the the manual as shown in the above picture. Pressing ctrl+f will allow the user to find a particular word within the manual as well. At the top of the manual, there are four buttons Next, Up, Previous, and Contents as shown below. The function of these buttons is presented below.



Next: Flips to the next page of the manual. Up: Returns to the previously viewed screen before a link was clicked. Previous: Flips to the previous page of the manual. Contents: Takes the user to the index of links of all contents in the manual.

Additional help while Getting Started- The Calculix User Group
Student can join the yahoo user group dedicated to the forums related to knowledge sharing about Calculix. In the very friendly environment of these forums, the student can present their difficulties and queries and can get benefited by the knowledge of many other Calculix users. Student will be given a choice of joining this user group while in some final steps of the software installation. Even if the student misses to join it at the time of installation, he/she can join the group later using help on Calculix or from Calculix website online. With the help of this user group, the student will be able to have access to the email archives of the group members which at times can become useful to answer at least some of the queries or for informational purposes.

Reproducing the basic inbuilt examples from CGX- A report
Here we present the steps, codes, explanation to all the CGX commands used in the codes to generate the sample inbuilt example geometries in CGX database after installation, along with their meshes using screen-shots of the useful explanatory steps. Please refer to the CGX manual (as explained in the above section) for more details.

Figure
Following figure 4.7.1 shows the geometry and the mesh generated by CGX for a disc in four 90 degree segments-



Geometry generation code
Following figure 4.7.2 shows the code to generate the geometry and the mesh by CGX for the disc in Figure 4.7.1. Explanation of the commands used is given in the succeeding subsection.

Explanation of the commands used
This subsection provides the explanation of the CGX commands used in Figure 4.7.2

PNT
The format for entering a point in CGX is as follows -

'pnt' |'!' [  ]|

[  ]|

[  ]|

[<setname(containing nodes)>]

This keyword is used to define or redefine a point. There are four possibilities to define a point.

To define a point just with coordinates:

pnt p1 11 1.2 34

or,

pnt ! 11 1.2 34

where the name is chosen automatically.

It is also possible to create points on a line or in the direction from P1 to P2 by defining a spacing (ratio) and number-of-points:

pnt ! L1 0.25 3

or

pnt ! P1 P2 0.25 3

This will create 3 new points at the positions 0.25, 0.5 and 0.75 times the length of the line or the distance from P1 to P2.

And it is also possible to create points on the positions of existing nodes. The command

pnt ! set

will create new points on the positions of the nodes included in the specified set.

Usually when points are defined interactive the command qpnt is used. Please refer to the CGX manual for its details

LINE
The format for entering a Line is as follows-

'line' <name(char<9)>|'!' <p1> <p2> <cp|seq>

This keyword is used to define or redefine a line. A line depends on points.

A line can only be defined if the necessary points are already defined. There are three different types of lines available.

The straight line -

line l1 p1 p2 4

is defined by: its name l1 (the name could have up to 8 characters), by the points p1 and p2 and optionally by the division.

The arc

line ! p1 p2 cp 4

needs a center point cp. The radius changes linear from p1 to p2 if the center-point cp is excentric. The name is chosen automatically (triggered by the character !).

The spline

line l1 p1 p2 seq 4

needs a so called sequential-set, seq (use the command seqa to define such a set). This set seq stores the spline points between the end-points in the right order. The spline function is described in [14]. Usually, a line is defined interactively with qlin.

GSUR
The format for entering a surface is as follows-

'gsur' <name(char<9)>|'!' '+|-' 'BLEND| ' '+|-' <line|lcmb> '+|-' -> <line|lcmb> .. (3-5 times)

This keyword is used to define or redefine a surface in the most basic way (see also qsur). Each surface must have three to five lines or combined lines (see lcmb) to be mesh-able. However, the recommend amount of edges is four. For example,

gsur S004 + BLEND - L002 + L00E + L006 - L00C

will create the surface S004 with a mathematically positive orientation indicated by the + sign after the surface name.

The keyword BLEND indicates that the interior of the surface will be defined according to reference [12] given as- S. A. Coons, 'Surfaces for computer-aided design of space forms'. Project MAC, MIT (1964). Revised to MAC-TR-41 (1967) or a NURBS surface is referenced.

Use a + or - in front of the lines or lcmbs to indicate the orientation. These signs will be corrected automatically if necessary. If automatic name generation is desired, then use ! instead of a name.

ELTY
The format used to assign a specific element type to a set of entities and generating the mesh, is as follows-

'elty' [ ] ['be2'|'be3'|'tr3'|'tr3u'|'tr6'|'qu4'|-> 'qu8'|'he8'|'he8f'||'he8i'|'he8r'|'he20'|'he20r']

This keyword is used to assign a specific element type to a set of entities (see section Element Types in the appendix). The element name is composed of the following parts: The leading two letters define the shape (be: beam, tr: triangle, qu: quadrangle, he: hexahedra), then the number of nodes and at last an attribute describing the mathematical formulation or other features (u: unstructured mesh, r: reduced integration, i: incompatible modes, f: fluid element for ccx). If the element type is omitted, the assignment is deleted. If all parameters are omitted, the actual assignments are posted:

elty

will print only the sets with assigned elements. Multiple definitions are possible. For example,

elty all

deletes all element definitions. If the geometry was already meshed, the mesh will NOT be deleted. If the mesh command is executed again after new assignments has taken place, additional elements will be created.

elty all he20

assigns 20 node brick-elements to all bodies in the set all.

elty part1 he8 <p? redefines that definition for all bodies in the set part1.

elty part2 qu8

assigns 8 node shell elements to all surfaces in set part2.

Figure
Following figure 4.7.3 shows the geometry and the mesh generated by CGX for a cylinder in four 90 degree segments-



Geometry generation code
Following figure 4.7.4 shows the code to generate the geometry and the mesh by CGX for the cylinder in Figure 4.7.3.

Explanation of the commands used is given in the succeeding subsection.

Explanation of the commands used
Please refer to the 'Disc' section above for explanation of all the following CGX commands used to build the geometry and mesh of the cylinder Following commands are used to generate the geometry and mesh of the cylinder in figure 4.7.3 -

' PNT  For entering a point - (refer to the 'Disc' subsection above for explanation)

' LINE  For entering a Line - (refer to the 'Disc' subsection above for explanation)

' GSUR  For entering a surface - (refer to the 'Disc' subsection above for explanation)

' ELTY  To assign a specific element type to a set of entities and generating the mesh - (refer to the 'Disc' subsection above for explanation)

Figure
Following figure 4.7.5 shows the geometry and the mesh generated by CGX for a sphere created from 32 blended surfaces.-



Geometry generation code
Following code was used to generate the geometry by the CGX for the sphere in Figure 4.7.5.

Explanation of the commands used is given in the succeeding subsection.

Explanation of the commands used
Please refer to the 'Disc' section above for explanation of all the following CGX commands used to build the geometry and mesh of the sphere Following commands are used to generate the geometry and mesh of the sphere in figure 4.7.5 -

' PNT  For entering a point - (refer to the 'Disc' subsection above for explanation)

' LINE  For entering a Line - (refer to the 'Disc' subsection above for explanation)

' GSUR  For entering a surface - (refer to the 'Disc' subsection above for explanation)

' ELTY  To assign a specific element type to a set of entities and generating the mesh - (refer to the 'Disc' subsection above for explanation)

Figure
Following figure 4.7.8 shows the geometry and the mesh generated by CGX for a sphere volume segment



Geometry generation code
Following figure 4.7.9 shows the code to generate the geometry and the mesh by CGX for the cylinder in Figure 4.7.8.

Explanation of the commands used is given in the succeeding subsection.

Explanation of the commands used
Please refer to the 'Disc' section above for explanation of all the following CGX commands used to build the geometry and mesh of the cylinder Following commands are used to generate the geometry and mesh of the cylinder in figure 4.7.3 -

' PNT  For entering a point - (refer to the 'Disc' subsection above for explanation)

' LINE  For entering a Line - (refer to the 'Disc' subsection above for explanation)

' GSUR  For entering a surface - (refer to the 'Disc' subsection above for explanation)

' ELTY  To assign a specific element type to a set of entities and generating the mesh - (refer to the 'Disc' subsection above for explanation)

Figure
Following figure 4.7.9 and figure 4.7.10 show the geometry and the mesh generated by CGX for an airfoil using many 4 nodes element-





Geometry generation code
Following codes show how to generate the geometry and the mesh by CGX for the cylinder in Figure 4.7.l3.

Explanation of the commands used is given in the succeeding subsection.

Explanation of the commands used
Please refer to the 'Disc' section above for explanation of all the following CGX commands used to build the geometry and mesh of the airfoil

Following commands are used to generate the geometry and mesh of the airfoil in figure 4.7.9

' PNT 

For entering a point - (refer to the 'Disc' subsection above for explanation)

' LINE 

For entering a Line - (refer to the 'Disc' subsection above for explanation)

' GSUR 

For entering a surface - (refer to the 'Disc' subsection above for explanation)

' ELTY 

To assign a specific element type to a set of entities and generating the mesh - (refer to the 'Disc' subsection above for explanation)

' SEQA 

'seqa' ['pnt' .. <=>]|              ['afte'|'befo'  .. <=>]|              ['end' .. <=>]

This keyword is used to create or redefine a set marked as a sequential set. This set is used to define splines (see line, with the command qlin such a set is automatically created). To begin such a set type for example:

SEQA Q003 PNT P004 P005 P006 P00M P00N

Because of the parameter PNT the program will create or overwrite the set Q003. The command will continue in the next line if the sign = is found:

SEQA Q003 PNT P004 P005 P006 = P007 P008 P009

The parameter AFTE will insert additional points after the first specified point. The parameter BEFO will insert additional points before the first specified point and the parameter END will add additional points to a sequential set.

' LCMB 

'lcmb' <name(char<9)>|'!' ['+|-' '+|-' '+|-' -> ..(up to 14 lines)]| ['ADD' '+|-' '+|-' -> '+|-' ..(up to 14 lines)]

This keyword is used to define, extend or redefine a combined line (lcmb). Combined lines are necessary if the edge of a surface should be made of more than one line. Usually the user does not create lcmb's directly. They are created automatically during the process of defining a surface with the command qsur. There is no limitation to the number of lines in a combined line. However with one command, not more than 14 lines can be specified at a time. To specify more than that or to extend an existing lcmb a modify command has to follow. For example,

lcmb U260 + U249 - U248 - U247 - U243 - U237 - U236 - U231 - U219

defines the lcmb U260 with 8 lines and their orientation in the lcmb. The following command

lcmb U260 ADD - U218 - U217

extends the lcmb U260 by two additional lines.

' SETA 

'seta' '!'|'n'|'e'|'p'|'l'|'c'|'s'|'b'|'S'|'L'|'se' <name ..> | ['n'|'e' '-' ]

This keyword is used to create or redefine a set (see also qadd). All entities like points or bodies and so on must be stored at least in one set to be reachable. The set all is created automatically at startup and will be open (see seto) all the time unless explicitly closed (see setc). To add points to the set dummy type:

seta dummy p p1 p2

This will add the points p1 and p2 to the set. The following entities are known:

Nodes n, Elements e, Faces f, Points p, Lines l, Surfaces s, Bodies b, Nurb Surfaces S, Nurb Lines L and names of other sets se. If other sets are added then the contents are NOT automatically added. Please use also comp do to add the contents.

The program will automatically determine the type of the entities if not specified, but then the names must be unique. More than one name can be specified. A minus sign between two names specifies a range of names with steps of steps.

With the '!' key instead of a setname the program generates automatic sets with system defined setnames and stores entities in it. The only case were this can be used is to separate independent meshes stored in the basic set. The single independent meshes are then referenced by new setnames:

seta ! all