User:Eml5526.s11.team6/hwk4

=Problem 4.1 Solving problem 2.9 for $$ \phi = \frac{\pi}{2}$$ using specific basis function=

Given
Solving a differential equation using Weight Residual Form. The partial differential equation is:


 * {| style="width:100%" border="0"

$$ \frac{\partial}{\partial x}\left(2\frac{\partial u}{\partial x}\right) + 3 = 0 $$
 * $$\displaystyle (Eq.9.1) $$
 * }
 * }

The boundary conditions are:
 * {| style="width:100%" border="0"

$$ u\left(1\right) = 0$$

$$\frac{du}{dx}\left(0\right) = -4 $$ Weighting funtion to be used:
 * }
 * }


 * {| style="width:100%" border="0"

$$ b_{i} = \left \{ 1, \sin\left ( x \right ),\sin\left (  2x \right )... \right \} $$
 * $$\displaystyle (Eq.9.2) $$
 * }
 * }

Which is correction function when $$\phi = \frac{\pi}{2}$$

Find

 * 1 Find an approximate solution of the form $$U^{h}=\sum_{i=0}^{n}d_{i}b_{i}$$ for n=2
 * 2 Find two equations that enforce the boundary conditions
 * 3 Project the weight residues
 * 4 Display the equations in matrix form
 * 5 Solve for $$\displaystyle d $$
 * 6 Construct $$U^{h}$$ and plot $$U^{h}$$ and $$u $$
 * 7 Repeat 9.1 to 9.6 for n = 4 and n = 6

Find an approximate solution with n=2
For n = 2:
 * {| style="width:100%" border="0"

$$ d_{i}=\begin{bmatrix} d0 & d1 & d2 \end{bmatrix} $$
 * $$\displaystyle (Eq.9.3) $$
 * }
 * }

and


 * {| style="width:100%" border="0"

$$ b_{i}=\begin{bmatrix} 1 & \sin  \left ( x\right ) & \sin  \left ( 2x\right ) \end{bmatrix} $$
 * $$\displaystyle (Eq.9.4) $$
 * }
 * }

Therefore:

Find two equations that enforce the boundary conditions
The boundary conditions are:

And

Project the weight residues
In this case changing the function u(x) by the approximated function $$U^{h}$$ in the PDE (Eq.9.1), we found that P(u) is:


 * {| style="width:100%" border="0"

$$ P\left ( U^{h} \right )=2\frac{\partial^2 U^{h}}{\partial x^2}+3=-2\left ( d1\sin \left (x \right ) +4d2\sin \left (2x \right )\right )+3 $$
 * $$\displaystyle (Eq.9.8) $$
 * }
 * }

The equation 9.8 can be written as:


 * {| style="width:100%" border="0"

$$ P\left ( U^{h} \right )= -2\begin{bmatrix}0 & \sin \left (x\right ) & 4\sin \left (2x \right ) \end{bmatrix}\begin{bmatrix} d0\\ d1\\

d2\end{bmatrix}+3 $$
 * $$\displaystyle (Eq.9.9) $$
 * }
 * }

Projecting the residue we have:


 * {| style="width:100%" border="0"

$$ \int_{a}^{b}b(x)P\left ( U^{h} \right )= 0 $$ After substitution of (Eq.9.4) and (Eq.9.9) in (Eq.9.10) the following equation is obtained
 * $$\displaystyle (Eq. 9.10) $$
 * }
 * }

Display the equations in matrix form
Performing the product and then the integration indicated in (Eq.9.11) we have:

The latter equation is clearly of the form $$\displaystyle Kd=F$$. We can observe that K is not symmetric.

Solve for $$ d $$
In (Eq.9.12) we have three equations; but, as we need to enforce the boundary conditions we take the only one of them and solve it together with (Eq.9.6) and (Eq.9.7). From these equations we now have the system:


 * {| style="width:100%" border="0"

$$ \begin{bmatrix} 1 &\sin\left (1 \right )   & \sin\left (2  \right ) \\ 0 &\cos \left (0 \right ) &2\cos \left (0  \right ) \\ 0 & 2\frac{\sin^3\left(1\right)}{3} & 2-\frac{\sin\left(4\right)}{2} \end{bmatrix}\begin{bmatrix} d0\\ d1\\

d2\end{bmatrix}=\begin{bmatrix} 0\\ 4\\

2.12\end{bmatrix}$$
 * $$\displaystyle (Eq.9.13) $$
 * }
 * }

After solving the system in (Eq.9.13) we obtain d:

Construct $$U^{h}$$ and plot $$U^{h}$$ and $$u$$
Replacing d in (Eq.9.5) we obtain the approximated solution:


 * {| style="width:100%" border="0"

$$ U^{h}=-4.65-7.34\sin \left (x \right )+1.67\sin \left ( 2x \right ) $$
 * $$\displaystyle (Eq.9.14) $$
 * }
 * }

On the other hand, the exact solution of the PDE (Eq.9.1) with the given boundary condition is:


 * {| style="width:100%" border="0"

$$ u\left ( x \right )=-\frac{3}{4}x^{2}-4x+\frac{19}{4} $$
 * $$\displaystyle (Eq.9.15) $$
 * }
 * }

In Fig.9.1 we show the exact and the approximated solution.



Plot the graph for $$ u\left(x\right)$$ and $$u^h\left(x\right)$$
Using following generalized code for any value of n, we get plots for n=4 and n=6



The error at x=0.5 is plotted for different values of n



Note:From the plot it is clear that error increases with increase in value of n for x=0.5

=Problem 4.2 "Obtain the weak form for the equations of heat conduction"=

Given
The equations of heat conduction

with the boundary conditions and The condition on the right is a convection condition.

Find
The weak form for the equations of heat conduction.

Solution
If we choose an arbitrary function w(x) and multiply the governing equation (4.2.1) and the convection boundary condition (4.2.3), we have

Do integrate by parts with equation (4.2.4), we have

$$ \left. {w\left( x \right)Ak\frac} \right|_0^{10} - \int_0^{10} {\fracAk\frac} dx + \int_0^{10} s dx = 0 $$

Then use the natural boundary condition (4.2.5), we have

where the weighting function satisfy

Therefore the weak form for the equations of heat conduction is to find T such that satisfy (4.2.2) and (4.2.6) with the constrain that satisfy (4.2.7).

=Problem 4.3 Finding weak form for heat conduction problem=

Given
Given the strong form for the heat conduction problem in a circular plane:

with the essential boundary conditions and natural boundary condition

where R is the total radius of the plate, s is the heat source per unit length along the plate radius. T is the temperature and k is the conductivity. Assume that k, s and R are given.

Find
a. Construct the weak form for the above strong form.

b. Use quadratic trial (candidate) solution of the form $$T= \alpha_0+\alpha_1 r+\alpha_2 r^2$$ and weight function of the same form to obtain a solution of the weak form.

c. Solve the differential equation with the boundary conditions and show that the temperature distribution along the radius is given by

Solution
a.

Introducing the arbitrary weighted function
Weak form can be found as follows, with weighted function

Now, multiply eq. 4.3.1 by $$ \displaystyle w $$ and integrate between 0 to R.

Use integration by parts for the first term in eq. 4.3.6

Using eq. (4.3.3) and eq. (4.3.5), we get

Put eq. (4.3.8) in eq. (4.3.7), we get the weak form as follows

b.

Finding solution of the weak form using quadratic trial solution
Now, consider the trial solution

By given essential boundary condition eq. (4.3.2) and by natural boundary condition eq. (4.3.3) Therefore, we get Put this eq. (4.3.14) in eq. (4.3.10), we get Hence, By eq. (4.3.2) and eq. (4.3.16) we get,

Taking arbitrary function $$ \displaystyle w $$ such that $$\displaystyle \beta_1=0$$, by comparing with eq. (4.3.15) Put this in weak form eq. (4.3.9), we get Integrating, factoring out $$\beta_0,\beta_2 $$ and rearranging the terms gives As the above must hold for arbitrary weight functions, it must hold for arbitrary $$\displaystyle\beta_0 $$ and $$\displaystyle\beta_2 $$. Therefore, the coefficients of $$\displaystyle\beta_0 $$ and $$\displaystyle\beta_2 $$ must vanish, which gives the following algebraic equation in $$\displaystyle\alpha_0 $$ and $$\displaystyle\alpha_2 $$: Solving above, second row gives Therefore, From eq. (4.3.18)

c.

Proof for the temperature distribution equation
Therefore, the solution is Hence, the solution for the given differential equation is

=Problem 4.4 Developing the weak form for the Torsion Bar=

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) Taking the values given in data set Mtg 9 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 $$ <p style="text-align:right;">$$\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 $$ = $$12 \displaystyle {\text{w}}\left( l \right)$$ and JG=2+3x and m(x)=5x

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   $$ <p style="text-align:right;">$$\displaystyle Eq. 4.4.9 $$

Integrating $$ \displaystyle Eq. 4.4.9 $$ with respect to x, substituting JG=2+3x,we get, -

$$ \displaystyle 1.\left[ {\left( {(2+3x)\frac} \right)} \right] =- \left[ { {\frac} } \right] + C $$

$$ \displaystyle \left[ {\left( {\frac} \right)} \right] =- \left[ { {\frac} } \right] +\frac{C}{2+3x} $$

From the boundary conditions,

$$\left[ {\left( {\frac} \right)} \right]_{x=1}^{}=\frac{12}{5}$$
 * <p style="text-align:right;">$$\displaystyle (Eq. 4.4.10) $$

$$\frac{12}{5}=\frac{-5}{2(5)}+\frac{C}{5} $$

Rearranging and 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( {\frac} \right)dx = \int \frac{\frac{29}{2}- \left[\frac {5x^2}{2} \right]}{2+3x} $$

$$ \displaystyle \left[ {\phi } \right] = \frac{29}{2}\int\frac{1}{2+3x} - \frac{5}{2}\int\frac{x^2}{2+3x} + D $$

$$ \displaystyle \left[ {\phi } \right]= \frac{29}{2} \frac{log(2+3x)}{3}-\frac{5}{2}\frac{8log(2+3x)+9x^2-12x}{54}+D $$

Now using $$ \displaystyle Eq. 4.4.3 $$ with $$ \displaystyle \phi \left( {x = 0} \right) = \overline \phi=4$$ ,we can update above equation as -

$$ \displaystyle D= 4 + \frac{5}{2}*\frac{8log(2)}{54}-\frac{29}{2}\frac{log(2)}{3}$$ <p style="text-align:right;">$$\displaystyle Eq. 4.4.12 $$

Substituting the values

$$\phi=\frac{29}{6}log(2+3x)-\frac{5}{2}\left[\frac{4}{27}log(2+3x)-\frac{x^2}{6}-\frac{2x}{9}\right]+0.91 $$

=Problem 4.5 Modifying Basis Functions Using Constraint Breaking Solutions (CBS)=

Given
Refer to lecture slide [[media:Fe1.s11.mtg21.djvu|21-1]] for problem assignment. For $$\Gamma_g=\left [ \beta \right ]$$, and each of the following basis function families:

Find
1) Find the corresponding family $$ \overline{F}_{I}=\left [ \overline{b}_{j} \right ] $$ satisfying CBS, i.e.,

Choose $$ \left [ b_{i}(x), \; i=0,1,2,... \right ] $$ such that $$ b_{0}(\beta)\neq 0 $$ and $$ b_{i}(\beta)=0 \quad\text{for}\quad \; i=1,2,...,n $$

Let $$ \Omega = ] \; \alpha, \beta \; [ \; = \; ] -2,4 \; \; [ $$

2) Given that $$ \overline{b}_{0}(x)=constant; \quad\text{plot}\quad b_{j} \quad\text{and}\quad \overline{b}_{j} \quad\text{for}\quad j=1,2,3 $$

3) Show $$ \left [ e^{jx}, \; j=0,1,2,... \right ] $$ is linearly independent on $$ \Omega $$.

Find corresponding family of basis functions that satisfy the CBS
1) Find corresponding family of basis functions that satisfy the CBS Given that $$ \Gamma_{g} = \left [ x= \beta \right ] $$

Polynomial Basis
Shift the set of basis functions (Eq. 4.5.1) so that they cross the x-axis at the point $$ x=\beta \; $$

Therefore,

Cosine
Shift the set of basis functions (Eq. 4.5.2) so that they cross the x-axis at the point $$ x=\beta \; $$

Therefore,

Sine Basis
Shift the set of basis functions (Eq. 4.5.3) so that they cross the x-axis at the point $$ x=\beta \; $$

Therefore,

Fourier Basis
In order to shift the set of basis functions (Eq. 4.5.4) so that they cross the x-axis at the point $$ x=\beta \; $$, we must employ the same tactics used for the Sine and Cosine basis functions.

Therefore,

Exponential Basis
Shift the set of basis functions (Eq. 4.5.5) so that they cross the x-axis at the point $$ x=\beta \; $$. This involves not only shifting the functions across the x-axis, but the functions must also be shifted in the negative y-direction because ordinarily the function does not cross the x-axis.

Therefore,

Plot Original and CBS Basis Functions Over the Domain
2) (Eq. 4.5.6), (Eq. 4.5.6), (Eq. 4.5.6), (Eq. 4.5.6), and (Eq. 4.5.6) are plotted along the x-domain $$ \Omega = ] \; \alpha, \beta \; [ \; = \; ] -2,4 \; \; [ $$.  These plots are shown in the figures below.

Determine Linear Independence of Exponential Basis Functions Over the Given Domain
3) Show $$ \left [ e^{jx}, \; j=0,1,2,... \right ] $$ is linearly independent on $$ \Omega $$.

Given that

where

and

Given that i=1,3 and j=1,3 (Eq. 4.5.16) takes the following form

The order of $$ b_i \;$$ and $$ b_j \;$$ does not affect the caluclation of (Eq. 4.5.18), therefore (Eq. 4.5.19) is a symmetric matrix. (Eq. 4.5.19) is calculated as follows.

Substituting (Eq. 4.5.20-25) into (Eq. 4.5.19) yields the following Gram matrix.

The determinant of (Eq. 4.5.26) is

$$ det[ \Gamma ] $$ is equal to a non-zero number, therefore, $$ \left [ b_i \right ] $$ is linearly independent.

= Problem 4.6 Derivation of strong and weak form equations for an elastic bar with an applied variable distributed spring.=

Given
Consider the elastic bar with a variable distributed spring p(x) along its length shown below in Figure 4.6.1. The distributed distributed s[pring imposes an axial force on the bar in proportion to the displacement. The bar is of length l, cross-sectional area A(x), Young's modulus E(x) with body force b(x) and boundary conditions shown in the following figure.



The above problem statement is given in A First Course in Finite Elements FB p74 Problem 3.9.

Find
a. Construct the strong form. b. Construct the weak form.

Solution
The bar must satisfies the following conditions: 1. The bar must be in equilibrium. 2. The bar must satisfy Hooke's Law σ(x)=E(x)ε(x). 3. The displacement field must be compatible. 4. It must satisfy the strain-displacement equation.

The following Figure 4.6.2 shows the internal force balance of a segment of the bar.



a. Strong Form
Performing a force balance on the section in Figure 4.6.2 yields the following differential equation 4.6.1.

Dividing the above equation through by dx to simplify terms yielded the following equation 4.6.2.

Now take the limit as Δx goes to 0. The result is presented below in equation 4.6.3.

By Hooke's Law:

Substituting Eq.4.6.6 into Eq.4.6.5 and then plugging that result into Eq.4.6.4 yielded the following equation.

Substituting Eq.4.6.7 into Eq.4.6.3 yields the final strong for differential equation as follows:

b. Weak Form
For the weak form, we multiply the strong form solution by the weighting function w and integrate the result over the length of the bar 0 to l as shown in the following equation:

Integrating the first term of Eq.4.6.8 by using integration by parts yielded the following equation:

Knowing that: $$A(x)E(x)\frac{du}{dx}=\bar{t}$$ and accounting for the b(x)-p(x) term yielded the following:

The final weak form becomes the following:

=Problem 4.7: Introduction to Calculix=

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' <name(char<9)>|'!' [<x> <y> <z>]|

[  ]|

[<P1> <P2> ]|

[<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

=Problem 4.8 Determining Mass Matrix [M] and Force Matrix [F] for a Dynamic Elastic PDE=

Given
Refer to lecture slide [[media:Fe1.s11.mtg23.djvu|23-4]] for problem assignment. Given the following Strong Form of a dynamic PDE:

where the weak form of (Eq. 4.8.1) is given as

and the following constants have been defined as:

Find
Consider a trial (candidate) solution and weight functions of the form

Find $$ \underline{ \tilde{m} } $$ and $$ F \left ( t \right ) $$

Determining Mass Matrix [M]
Given

and

and also, the order of index i and j does not affect the outcome of $$ \underline{\tilde m} $$ in (Eq. 4.8.6). Therefore, $$ \underline{\tilde m} $$ is a symmetric matrix.

Solving for $$ \underline{\tilde m} $$,

Placing (Eq. 4.8.8-17) into their respective places in the mass matrix, and applying its symmetric properties yields the following mass matrix,

Determining Force Matrix [F]
To determine $$ F \left ( t \right ) $$, we use the following equation for an elastic bar,

The first variable we will solve for is the matrix $$ \underline{K}_{FF} $$, which is found using the following equation,

As with the matrix $$ \underline{\tilde m} $$, the matrix $$ \underline{K}_{FF} $$ is also symmetric. This is because the order of index i and j does not affect the outcome of $$ \underline{K}_{FF} $$ in (Eq. 4.8.20).

Solving for $$ \underline{K}_{FF} $$,

Placing (Eq. 4.8.21-26) into their respective places in the stiffness matrix, and applying its symmetric properties yields the following stiffness matrix,

Next, we will determine the matrix $$ underline{d}_{F} $$. This is done by solving for the constants $$ [\alpha_0,\alpha_1,\alpha_2,\alpha_3] $$ in (Eq. 4.8.4).

First, the weight function must disappear at the essential boundary condition, i.e., $$w(3) = 0$$.

Using this requirement in (Eq. 4.8.5), we have the following equation,

Likewise, to satisfy the essential boundary condition of the strong form, $$u(3) = sin(2t)$$

Next we will evaluate the derivatives of the trial solution and the weight function.

Plugging $$\displaystyle (Eq. 4.8.30)$$, $$\displaystyle (Eq. 4.8.31)$$, and (Eq. 4.8.3) into $$\displaystyle (Eq. 4.8.2)$$,

where

and

(Eq. 4.8.33) and (Eq. 4.3.34) are substituted into (Eq. 4.8.32), and (Eq. 4.8.32) is reduced using Matlab. The code used is provided at the end of this problem. The terms $$ \beta_1, \beta_2, \quad\text{and}\quad \beta_3 $$ from the reduced form of (Eq. 4.8.32) are isolated in the following equation.

Equation $$\displaystyle (Eq. 4.8.35)$$ must hold for any arbitrary weight function $$w(x)$$, so long as it satisfies the homogeneous essential boundary condition. It then also follows that it must also hold for any arbitrary $$\beta_1$$, $$\beta_2$$, and $$\beta_3$$, leading to the following algebraic equation:

Pre-multiplying both sides of $$\displaystyle (Eq. 4.8.36)$$ by the inverse of the coefficient matrix on the left side yields:

We can obtain $$ \underline{d}_{F}'' $$ by taking the second time derivative of (Eq. 4.8.39), i.e.,

The last variable we need to obtain to solve for the force matrix in (Eq. 4.8.19) is $$ \underline{m}_{FF} $$. The subscript "FF" denotes the components that are not associated with the essential boundary condition. As a result, $$ \underline{m}_{FF} $$ is obtained by excluding row i=0 and column j=0 from (Eq. 4.8.18), i.e.,

Finally, (Eq. 4.8.27), (Eq. 4.8.39), (Eq. 4.8.40), and (Eq. 4.8.41) are substituted into (Eq. 4.8.19) in order to determine the force matrix.

Matlab Code
clc; clear all; close all; syms a0 a1 a2 a3 b0 b1 b2 b3 A E x C t real; a0 = sin(2*t); b0 = 0; u = a0 + a1*(x-3) + a2*(x-3)^2 + a3*(x-3)^3; w = b0 + b1*(x-3) + b2*(x-3)^2 + b3*(x-3)^3; dudx = a1 + 2*a2*(x-3) + 3*a3*(x-3)^2; dwdx = b1 + 2*b2*(x-3) + 3*b3*(x-3)^2; int(dwdx*A*E*dudx,x,1,3) + 0.1*A*(-b1*2+b2*4-b3*8) - int(2*x*w,x,1,3) - int(w*2*(-4*sin(2*t)),x,1,3) C = 2*[2,-4,8;-4,32/3,-24;8,-24,288/5] Cinv = C^-1 Cinv*C Cinv*[A/5-20/3+16*sin(2*t);-2*A/5+8-64/3*sin(2*t);4*A/5-56/5+32*sin(2*t)] F = [8,-12,19.2;-12,19.2,-32;19.2,-32,54.8571]*[-32*sin(2*t);-8*sin(2*t);0]+ 2*[2,-4,8;-4,32/3,-24;8,-24,285/5]*[-3.95+8*sin(2*t);-1.5+2*sin(2*t);-0.1667]

=Contributing Members=

Eml5526.s11.team6.gravois 15:51, 2 March 2011 (UTC)

Eml5526.s11.team6.deshpande 15:56, 2 March 2011 (UTC)

Eml5526.s11.team6.tupsakhare 16:06, 2 March 2011 (UTC)

eml5526.s11.team6.lee 16:23, 2 March 2011 (UTC)

Eml5526.s11.team6.vork 16:52, 2 March 2011 (UTC)

Eml5526.s11.team6.kurth 19:10, 2 March 2011 (UTC)

Eml5526.s11.team6.joglekar 01:58, 3 March 2011 (UTC)