User:Eml5526.s11.team5/sub4

= 4.1 Use F2={1,sinx,sin2x....} basis functions. Do,it for angle=90 =

Given: initial physical parameters

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

$$ \omega = ]0,1[ \quad $$ $$
 * style="width:95%" |
 * style="width:95%" |
 *  $$ \displaystyle (Eq. 4.1.1)
 * }


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

$$ a_2 = 2 \quad $$ $$
 * style="width:95%" |
 * style="width:95%" |
 *  $$ \displaystyle (Eq. 4.1.2)
 * }


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

$$ f = 3 \quad $$ $$
 * style="width:95%" |
 * style="width:95%" |
 *  $$ \displaystyle (Eq. 4.1.3)
 * }


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

$$ \frac{\partial{u}}{\partial{t}}(x,t) = 0 $$ $$
 * style="width:95%" |
 * style="width:95%" |
 *  $$ \displaystyle (Eq. 4.1.4)
 * }


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

$$ \Gamma_g = 1 \quad $$, $$ g = 0 \quad $$ $$
 * style="width:95%" |
 * style="width:95%" |
 *  $$ \displaystyle
 * }


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

$$ u(x=1) = 0 \quad $$ $$
 * style="width:95%" |
 * style="width:95%" |
 *  $$ \displaystyle (Eq. 4.1.5)
 * }


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

$$ \Gamma_h = 0 \quad $$, $$ h = 4 \quad $$ $$
 * style="width:95%" |
 * style="width:95%" |
 *  $$ \displaystyle
 * }


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


 * style="width:95%" |
 * style="width:95%" |

$$ -\frac{du^h}{dx}(0) = 4 \quad $$ $$
 *  $$ \displaystyle (Eq. 4.1.6)
 * }

Find: Approximation of Solution and its Comparision with theExact
Find approximate solution $$ u^n \quad $$ and compare it to exact one

Consider base function $$ b_j(x), j = 0, 1, 2, 3,... n \quad $$

<span id="(1)">
 * {| style="width:100%" border="0"

$$ b_j(x) = [1, sin(x), sin (2x), sin(3x), .... ]\quad $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.7)
 * }

(1) Let $$ n = 2 \Rightarrow ndof = n+1 = 3 \quad $$

Generate variables considered for $$ n = 2 \quad $$ case

(2) Find 2 eqs that enforce b.c.'s for $$ u^h(x) = \sum_{j -0}^{n} d_j b_j(x) $$

(3) Find 1 more eq. to solve for $$ \underline{d} = d_j (j = 0, 1, 2) $$ by projecting the residue $$ \underline{p}(u^h) $$ on a basis function $$ b_k(x) \quad $$ with $$ k = 0, 1, 2 \quad $$. The additional equation must be lineally independent from the above 2 equations in part (2).

(4) Display 3 equations in matrix form

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \mathbf{K}\mathbf{d} = \mathbf{F} $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.8)
 * }

Observe if $$ \underline{K} $$ is symmetric

(5) Solve for $$ \underline{d} \quad $$

(6) Construct $$ u_n^k(x) $$ and plot $$ u_n^k(x) $$ vs. $$ ux) $$

(7) Repeat steps (1) to (6) for


 * (7.1) $$ n = 4 \quad $$
 * (7.2) $$ n = 6 \quad $$

(8) Compute $$ u_n^h (x = 0.5) \quad $$ for $$ n = 2, 4, 6 \quad $$

error

<span id="(1)">
 * {| style="width:100%" border="0"

$$ e_n(0.5) = u_n(0.5) - u_n^h(0.5) \quad $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle (Eq. 2.3.9)
 * }

Plot $$ e_n(0.5) \quad $$ vs. $$ n \quad $$

(1). Basis functions for n=2
For $$ n = 2 \quad $$

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \underline{b} =
 * style="width:95%" |
 * style="width:95%" |

\begin{bmatrix} b_0     & b_1 & b_2 \end{bmatrix}

$$ $$
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.10)
 * }

From base function expression $$ b_j(x) = [1, sin(x), sin(2x), ...] \quad $$

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \underline{b} =
 * style="width:95%" |
 * style="width:95%" |

\begin{bmatrix} 1     & sin(x) & sin(2x) \end{bmatrix}

$$ $$
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.11)
 * }

Unknown function

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \underline{d} =
 * style="width:95%" |
 * style="width:95%" |

\begin{bmatrix} d_0     & d_1 & d_2 \end{bmatrix} $$ $$
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.12)
 * }

Approximate solution

(2). Use of Boundary Conditions
at B.C. $$ u(1) = 0 \quad $$

<span id="(1)">
 * {| style="width:100%" border="0"

$$ u^h = \sum_{i=0}^{n=2} d_ib_i $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.13)
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ u^h(x) = d_01 + d_1sin(x) + d_2sin(2x) \quad $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.14)
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ u^h(1) = 0 = d_0 + d_1sin(x) + d_2sin(2x) =
 * style="width:95%" |
 * style="width:95%" |

\begin{bmatrix} 1     & sin(x) & sin(2x) \end{bmatrix}

\begin{bmatrix} d_0     \\ d_1 \\ d_2 \end{bmatrix} $$ $$
 * <p style="text-align:right"> $$ \displaystyle
 * }

at B.C $$ \frac{du}{dx}(0) = 4 $$

<span id="(1)">
 * {| style="width:100%" border="0"

$$ (u')^h(x) = \frac{du}{dx} = \sum_{i=0}^{n=2} d_ib_i' $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.15)
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \underline{b}' =
 * style="width:95%" |
 * style="width:95%" |

\begin{bmatrix} 0     & cos(x) & 2cos(2x) \end{bmatrix}

$$ $$
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.16)
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ (u')^h(0) = - 4 = d_00 + d_1cos(x) + 2*d_2cos(2x)) =
 * style="width:95%" |
 * style="width:95%" |

\begin{bmatrix} 0     & cos(x) & 2cos(2x) \end{bmatrix}

\begin{bmatrix} d_0     \\ d_1 \\ d_2 \end{bmatrix} $$ $$
 * <p style="text-align:right"> $$ \displaystyle
 * }

(3).Projection of residual part on the bases
By projecting the residue part of a function on the bases, 3rd equation can be generated:

From the definition of elastodynamics case of ODE function $$ P_u(x) \quad $$

Rewriting $$ Eq. 4.1.7 \ $$

<span id="(1)">
 * {| style="width:100%" border="0"

$$ b_j(x) = [1, sin(x), sin(2x)] \quad $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle
 * }

In this, more specific, "self adjoin" case

<span id="(1)">
 * {| style="width:100%" border="0"

$$ P(u^h) :=[a_2u']' + a_0u - g = 0 \quad $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.17)
 * }

noting

$$ g = 0 \Rightarrow \quad $$ no forcing function (steady state)

$$ a_0u = f = 3 \quad $$ (given)

$$ a_2 = 2 \quad $$ (given)

$$ P(u^h) :=[2u']' + 3 = 0 \Rightarrow \quad $$ since $$ u \quad $$ is given as constant 2 (not function of "x")

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |

$$ P(u^h) :=2u + 3 = 0\quad = 2\frac{d^2u}{dx} +3 = 0 $$ $$
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.18)
 * }

From $$ Eq. 4.1.13 \ $$, $$ u^h \quad $$ was defined as

<span id="(1)">
 * {| style="width:100%" border="0"

$$ u^h = \sum_{i=0}^{n=2} d_ib_i = d_0 + d_1sin(x) + d_2sin(2x) $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.19)
 * }

Taking $$ 2^{nd} \quad $$ derivative with respect to "x"

<span id="(1)">
 * {| style="width:100%" border="0"

$$ u^{h} = 0 - d_1sin(x)- 4d_2sin(2x) \quad $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.20)
 * }

Therefore

<span id="(1)">
 * {| style="width:100%" border="0"

$$ P(u^h) := 2(0 - d_1sin(x)- 4d_2sin(2x)) +3 \quad $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.21)
 * }

Afterwords, noting that

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \int_\omega w P(u^h) dx := 0 \Rightarrow w_i = b_i \Rightarrow \int_\omega b_i P(u^h) dx := 0 $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.22)
 * }

which is also noted in $$ 10-4, Eq. (2) \quad $$

and substituting for $$ P(u^h) \quad $$ equation above, we get

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |

$$ \int_\omega b_i ([2(0 - d_1sin(x)- 4d_2sin(2x))] +3 dx) := 0 \quad $$ $$
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.23)
 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |

$$ \int_\omega b_i [2(0 - d_1sin(x)- 4d_2sin(2x))] dx := -3\int_\omega b_i dx \quad $$ $$
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.24)
 * }

recalling that $$ \underline{b} =

\begin{bmatrix} 1 \\ sin(x) \\ sin(2x) \end{bmatrix} $$

and taking any of the equations as the last needed equation, for example $$ b_1 \quad $$, we get

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \int_\omega
 * style="width:95%" |
 * style="width:95%" |

\begin{bmatrix} 1 \\ sin(x) \\ sin(2x) \end{bmatrix}

[2(0 - d_1sin(x)- 4d_2sin(2x))] dx := -3 \int_\omega

\begin{bmatrix} 1 \\ sin(x) \\ sin(2x) \end{bmatrix} dx \quad $$ $$
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.25)
 * }

Doing symbolic integration and evaluating interval on $$ \omega = ]0,1[ \quad $$ we get

The outputs are as follow:

$$ \int_\omega

\begin{bmatrix} 1 \\ sin(x) \\ sin(2x) \end{bmatrix}

[2(0 - d_1cos(x+\phi) - 4d_2cos(2x+\phi))] dx = $$ [ 0,     2 - 2*cos(1),            4 - 4*cos(2)] [ 0,     1 - sin(2)/2, 4*sin(1) - (4*sin(3))/3] [ 0, sin(1) - sin(3)/3,             4 - sin(4)]

$$ -3 \int_\omega

\begin{bmatrix} 1 \\ sin(x) \\ sin(2x) \end{bmatrix} dx \quad = $$

3 3 - 3*cos(1) 3*sin(1)^2



(4)

Assembling the matrix $$ \mathbf{K} \mathbf{d} = \mathbf{F} \quad $$ from 2 B.C. constrains and 1 more equation generated by weighting factor method:

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \begin{bmatrix} 1    & sin(x) & sin(2x) \\ 0     & cos(x) & 2cos(2x) \\ 0   &  2 - 2*cos(1) &  4 - 4*cos(2) \end{bmatrix}
 * style="width:95%" |
 * style="width:95%" |

\begin{bmatrix} d_0     \\ d_1 \\ d_2 \end{bmatrix}

=

\begin{bmatrix} 0\\ 4 \\ 3 \end{bmatrix} $$ $$
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.26)
 * }

For "K" matrix:

[ 1.0, 0.8415, 0.9093] [  0,   -1.0,   -2.0] [   0, 0.9194,  5.665]

For "F" matrix:

0  4 3.0

(5)

Solving for $$ \mathbf{d} = \mathbf{K}^{-1} \mathbf{F} \quad $$  we get

d = 4.716 -7.491 1.745

n=2 plot. Convergence can be clearly seen

(6)

Constructed $$ u^h \quad $$ matrix on matlab by using formula $$ u^h = \sum_{i=0}^{n=2} d_ib_i $$

1.745*sin(2.0*x) - 7.491*sin(x) + 4.716

Exact solution:
Given a general expression for 2nd Order ODE

<span id="(1)">
 * {| style="width:100%" border="0"

$$ a_2(x)y + a_1(x)y + a_0(x)y = g(x) \quad $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle (Eq. 2.3.27)
 * }

and taking a more specific case ("Self adjoin") for this specific problem, we have

<span id="(1)">
 * {| style="width:100%" border="0"

$$ [a_2(x)y']' + a_0(x)y = g(x) \quad $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle (Eq. 2.3.17)
 * }

$$ g(x) = 0 \Rightarrow \quad $$ no forcing function (steady state)

$$ a_0(x)y = f(x) = 3 \quad $$ (given)

$$ a_2 = 2 \quad $$ (given)

Therefore $$ Eq. 4.1.17 $$ becomes

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |

$$ [2y']' + 3 = 0 \quad $$ $$
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.28)
 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |

$$ \frac{du}{dx}(\frac{du}{dx}2) + 3 = 0 $$ $$
 * <p style="text-align:right"> $$ \displaystyle
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \int \frac{du}{dx}2 = \int -3 dx $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \frac{du}{dx}2 = -3x + c_1' \Rightarrow \frac{du}{dx} = -1.5x + c_1 $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.29)
 * }

at B.C of $$ -\frac{du}{dx}(0) = 4 \Rightarrow $$

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |

$$ -4 = -1.5(0) + c_1 \Rightarrow c_1 = -4$$ $$
 * <p style="text-align:right"> $$ \displaystyle
 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |

$$ \int {du} = \int (-1.5x - 4) dx $$ $$
 * <p style="text-align:right"> $$ \displaystyle
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ u = \frac{-1.5}{2}x^2 - 4x + c_2 $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.30)
 * }

at B.C of $$ u(1) = 0 \Rightarrow $$

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |

$$ 0 = \frac{-1.5}{2}(1)^2 - 4(1) + c_2 \Rightarrow c_2 = -4.75$$ $$
 * <p style="text-align:right"> $$ \displaystyle
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ u(x) = -0.75x^2 - 4x - 4.75 \quad $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle (Eq. 4.1.31)
 * }

So taken in account the exact solution formula, different plot were generated for different n values (n = 2, 4, 6). We chose the last equations as our weighting equations (note, it seems there is a significant discrepancy in error depending on what kind of equations you choose)

plot of the functions for n = 2, 4, 6

zoomed in view

True vs. approx at n = 2

True vs. approx at n = 4

True vs. approx at n = 6

3. Proof of linear indepedency of Exponential Basis function
The Gram Matrix is defined as:

For this case,

<span id="(1)">
 * {| style="width:100%" border="0"

$$ b_1(x)=1 \quad $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle                                                       (Eq. 4.5.15)
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ b_2(x)= \ e^{x} \quad $$ $$
 * style="width:90%" |
 * style="width:90%" |
 * <p style="text-align:right"> $$ \displaystyle                                                       (Eq. 4.5.16)
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$  b_3(x)= \ e^{2x} \quad $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle                                                       (Eq. 4.5.17)
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Now we need to calculate each element in the $$ \Gamma $$ Matrix: $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Since $$ \int_\Omega b_i(x)b_j(x)\,dx = \int_\Omega b_j(x)b_i(x)\,dx$$,  $$\Gamma_{ij}$$ will be equivalent to $$\Gamma_{ji}$$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle                                                       (Eq. 4.5.18)
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \Gamma_{1,1} = \int_{-2}^{4} 1*1*dx = \left [ x\right ]_{0}^{1} = 1 $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \Gamma_{1,2} = \Gamma_{2,1} = \int_{-2}^{4} 1*e^{x}*dx = \left [ e^{x}\right ]_{-2}^{4} = 54.463 $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \Gamma_{1,3} = \Gamma_{3,1} = \int_{-2}^{4} 1*e^{2x}*dx = \left [ e^{2x}/2 \right ]_{-2}^{4} = 1490.4699 $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \Gamma_{2,2} = \int_{-2}^{4} e^{x}*e^{x}*dx = \left [ e^{2x}/2\right ]_{-2}^{4} = 1490.4699 $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \Gamma_{2,3} = \Gamma_{3,2} = \int_{-2}^{4} e^{x}*e^{2x}*dx = \left [ e^{3x}/3\right ]_{-2}^{4} = 54251.6 $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \Gamma_{3,3} = \int_{-2}^{4} e^{2x}*e^{2x}*dx = \left [ e^{4x}/4 \right ]_{-2}^{4} = 2221527.63 $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle
 * }

<span id="(1)">

For the value of the determinant, refer http://www.wolframalpha.com

The determinant of the Gram Matrix is not equal to zero.

Therefore,

--Eml5526.s11.team5.srv 03:53, 1 March 2011 (UTC)

Given: physical constraints on elastic bar
<span id="(1)">
 * {| style="width:100%" border="0"

An elastic bar is loaded with a variable distributed spring p(x) along its length as shown in the below figure. The distributed spring imposes an axial force on the bar in proportion to the displacement.
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

L- Length of bar, <span id="(1)">
 * style="width:95%" |
 * style="width:95%" |
 * }
 * {| style="width:100%" border="0"

A(x)- Cross sectional area at x, <span id="(1)">
 * style="width:95%" |
 * style="width:95%" |
 * }
 * {| style="width:100%" border="0"

E(x)- Young's Modulus at x, <span id="(1)">
 * style="width:95%" |
 * style="width:95%" |
 * }
 * {| style="width:100%" border="0"

b(x)- Body force at x <span id="(1)">
 * style="width:95%" |
 * style="width:95%" |
 * }
 * {| style="width:100%" border="0"

Boundary conditions: <span id="(1)">
 * style="width:95%" |
 * style="width:95%" |
 * }
 * {| style="width:100%" border="0"

i) Displacement at x(=0) = 0 <span id="(1)">
 * style="width:95%" |
 * style="width:95%" |
 * }
 * {| style="width:100%" border="0"

ii) Force at x(=L) = $$ \mathbf t $$
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |
 * }

Find: strong and weak forms
<span id="(1)">
 * {| style="width:100%" border="0"

a) Construct the weak form
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

b) Construct the strong form
 * style="width:95%" |
 * style="width:95%" |
 * }

a) Strong Form
<span id="(1)">
 * {| style="width:100%" border="0"

Consider the free body diagram of a differential element for the above problem.
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Balancing the forces acting on the differential element in the X-direction (along the length of the bar):
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$\quad \Sigma F = \sigma (x)A(x)n(x) + \sigma (x+dx)A(x+dx)n(x+dx) + b(x)dx - p(x)dx = 0 $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">$$ \displaystyle (Eq 4.6.1)
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

p(x)dx is the force exerted by the spring on the differential element.
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

b(x)dx is the body force acting on the differential element.
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Substituting n(x)=1, n(x+dx)=-1 and expanding the terms $$\quad \sigma (x+dx), A(x+dx)$$ Using Taylor's Series and neglecting Higher order terms, Eq 4.6.1 transforms into:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \frac {\partial \sigma}{\partial x}dx + b(x)dx - p(x)dx = 0 $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">$$ \displaystyle (Eq 4.6.2)
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

We know that $$ \sigma(x) = E(x)A(x)\frac {\partial u}{\partial x} $$
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Substituting the above relation and cancelling the dx term, Eq 4.6.2 yields the Strong Form:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ P(u) = \frac {\partial }{\partial x} \left[ E(x)A(x) \frac {\partial u}{\partial x} \right]  + b(x) - p(x) = 0 $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">$$ \displaystyle (Eq 4.6.3)
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

The Boundary Conditions for the Strong form are:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

i) Essential Boundary Condition:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \quad u(x=0) = 0 $$
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

ii) Natural Boundary Condition:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ E(x)\frac {\partial u(x=L)}{\partial x} = \mathbf t $$
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

where $$ \mathbf t $$ is the Traction applied.
 * style="width:95%" |
 * style="width:95%" |
 * }

b) Weak Form
<span id="(1)">
 * {| style="width:100%" border="0"

The weak form by simplifying the following equation
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$\quad \int_{\Omega} W(x)P(u)dx=0 $$
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

i.e., $$ \int_0^L W(x) \left( \frac {\partial }{\partial x} \left[ E(x)A(x) \frac {\partial u}{\partial x} \right]  + b(x) - p(x) \right)dx = 0 $$
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \underbrace{ \int_0^L W(x) \left( \frac {\partial }{\partial x} \left[ E(x)A(x) \frac {\partial u}{\partial x} \right] \right)dx}_{I} + \underbrace{\int_0^L W(x) \left(b(x) - p(x) \right)dx}_{II} = 0 $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">$$ \displaystyle (Eq 4.6.4)
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Term I can be expanded using the chain rule of integration as follows:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$\left[ W(x)E(x)A(x) \frac {\partial u}{\partial x} \right]_0^L - \int_0^L \left( \frac {\partial W(x)}{\partial x} E(x) A(x) \frac {\partial u(x)}{\partial x} \right)dx $$
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$\left[ W(x)E(x)A(x) \frac {\partial u}{\partial x} \right]_L - \left[ W(x)E(x)A(x) \frac {\partial u}{\partial x} \right]_0 - \int_0^L \left( \frac {\partial W(x)}{\partial x} E(x) A(x) \frac {\partial u(x)}{\partial x} \right)dx $$
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Applying the Natural Boundary Condition $$ E(x)\frac {\partial u(x=L)}{\partial x} = \mathbf t $$ and selecting W Such that W(x=0)=0, the above expression becomes:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$\left[ W(L)A(L) \mathbf t \right] - \int_0^L \left( \frac {\partial W(x)}{\partial x} E(x) A(x) \frac {\partial u(x)}{\partial x} \right)dx $$
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Substituting the above expression back into Eq 4.6.4 We get the weak form:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$\left[ W(L)A(L) \mathbf t \right] - \int_0^L \left( \frac {\partial W(x)}{\partial x} E(x) A(x) \frac {\partial u(x)}{\partial x} \right)dx + \int_0^L W(x) \left(b(x) - p(x) \right)dx = 0 $$
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

The Weak Form can be rewritten as follows:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$\int_0^L \left( \frac {\partial W(x)}{\partial x} E(x) A(x) \frac {\partial u(x)}{\partial x} \right)dx = \left[ W(L)A(L) \mathbf t \right] + \int_0^L W(x) \left(b(x) - p(x) \right)dx, \forall W,$$ Such That W(x=0)=0
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Essential Boundary Condition: u(x=0)=0,
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Natural Boundary Condition is Already absorbed into the weak form.
 * style="width:95%" |
 * style="width:95%" |
 * }

--Eml5526.s11.team5.vijay 23:25, 2 March 2011 (UTC)

= 4.7 Calculix Graphics Installation, Basic Examples, & Tutorials=

Given: open source Finite Element code (Calulix)
<span id="(1)">
 * {| style="width:100%" border="0"

Calculix is an open source Finite Element code (with ABAQUS like input) available at http://www.dhondt.de/
 * style="width:95%" |
 * style="width:95%" |
 * }

Find: installation procedures and tutorials
<span id="(1)">
 * {| style="width:100%" border="0"

1) Install CGX
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

2) Read manual and sign up with user group
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

3) Reproduce Basic examples
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

4)Write a report, explaining to novices how to install and run cgx
 * style="width:95%" |
 * style="width:95%" |
 * }

1) Installation
<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |

Calculix Graphics Modules (CGX) was installed successfully.
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Installation procedure for a Windows OS is described below:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Upon visiting http://www.dhondt.de/, you will be redirected to http://www.bconverged.com/download.php for a windows executable, where there is a link 'CalculiX_2_2_win_002.zip' which down loads the required ZIP files.
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

or You can use http://www.bconverged.com/data/content/CalculiX_2_2_win_002.zip to download the ZIP files directly.
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Unzip the above downloaded file and double click on the executable to install calculix (provided by bconverged).
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

After successful installation, You will have access to CalculiX CrunchiX (CCX 2.2), CalculiX GraphiX(CGX 2.2), Help file (which contains manuals for CCX, CGX), test cases and a custom built SciTE, a text editor which is integrated with the other tools.
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |

2) Read manual and sign up with user group
We have gone through the CGX User manual (available in the help file provided with bConverged or at ) and signed up with the user group.
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

The user group can be found at :http://groups.yahoo.com/group/calculix/
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |

3)Examples
We then reproduced the basic examples (disk, cylinder, sphere, sphere_volume, airfoil) with the help of example files downloaded from the following link: http://dhondt.de/cgx_2.2.exa.tar.bz2.
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

The input files required to reproduce each of the following examples are shown below:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |

a) Disc

 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |

b) Cylinder

 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |

c) Sphere

 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |

d) Sphere_Volume

 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |

e) Airfoil

 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |

4)How to install and run cgx
The installation procedure for Calculix Graphics (CGX) has been described in (1).
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

There are two ways in which we can write CGX input files and run them:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

a) Using CalculiX Command window
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

b) Using SciTE, a text editor which is integrated with other tools
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

We will use SciTE to write and run input files. This process involves three steps:
 * style="width:95%" |
 * style="width:95%" |
 * }

Step 1: Open SciTE and create a New file
<span id="(1)">
 * {| style="width:100%" border="0"

i) Open SciTE and create a New file:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

SciTE can be opened as follows: Start> All Programs > bConverged > SciTE A text editor pops up where an input file can be edited or created. A new file can be created by using the command "Ctrl+N" or by selecting "File > New"
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

A text editor pops up where an input file can be edited or created. A new file can be created by using the command "Ctrl+N" or by selecting "File > New"
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |
 * }

Step 2: Type the required commands & save the file (in .fbd format)
<span id="(1)">
 * {| style="width:100%" border="0"

ii) Type the required commands & save the file (in .fbd format): Once a new file has been created we are ready to start writing our input file. Type the commands for geometry creation and mesh generation in the text editor. Few commands required to generate basic shapes are discussed later on. After the required commands are typed in, Save the input file giving it an appropriate name and extension (.fbd) Example: "Sphere.fbd"
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Once a new file has been created we are ready to start writing our input file. Type the commands for geometry creation and mesh generation in the text editor. Few commands required to generate basic shapes are discussed later on. After the required commands are typed in, Save the input file giving it an appropriate name and extension (.fbd) Example: "Sphere.fbd"
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |
 * }

Step 3: Pre Process the input file (.fbd)
<span id="(1)">
 * {| style="width:100%" border="0"

iii) Pre Process the input file (.fbd): The .fbd file created using the above steps can be PreProcessed by hitting the "F10" key or by selecting "Tools > PreProcess"
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

The .fbd file created using the above steps can be PreProcessed by hitting the "F10" key or by selecting "Tools > PreProcess"
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Generally the Plot window which pops up upon PreProcessing hides the mesh and shows only the wire frame geometry. To View the meshed part do the following:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Menu > Viewing > Show All Elements With Light
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Menu > Viewing > Toggle Element Edges
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

(Note: Menu is displayed by clicking on the input file name below the Plot)
 * style="width:95%" |
 * style="width:95%" |
 * }

PNT
<span id="(1)">
 * {| style="width:100%" border="0"

This keyword is used to define or redefine a point.
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Syntax:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

'pnt' <name(char<9)>|'!' [<x> <y> <z>]|[  ]|[<P1> <P2>  ]|[<setname(containing nodes)>]
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Examples:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

pnt p1 11 1.2 34
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Creates point "p1" with coordinates (11,1.2,34)
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

pnt ! 11 1.2 34
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

The name is chosen automatically with coordinates (11,1.2,34).
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

pnt ! L1 0.25 3
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

To create 3 points on a line "L1" with 0.25 spacing
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

pnt ! P1 P2 0.25 3
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

To create 3 points between P1, P2 with spacing 0.25
 * style="width:95%" |
 * style="width:95%" |
 * }

LINE
<span id="(1)">
 * {| style="width:100%" border="0"

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.
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Syntax:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

'line' <name(char<9)>|'!' <p1> <p2> <cp|seq> &lt;div&gt;
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Examples:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

line l1 p1 p2 4
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

To create a line "l1" by the points p1 and p2 divided into 4 segments.
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

line ! p1 p2 cp 4
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

To create a arc line joining points "p1", "p2" with "cp" as center.
 * style="width:95%" |
 * style="width:95%" |
 * }

GSUR
<span id="(1)">
 * {| style="width:100%" border="0"

This keyword is used to define or redefine a surface in the most basic way. 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.
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Syntax:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

'gsur' <name(char<9)>|'!' '+|-' 'BLEND| ' '+|-' <line|lcmb> '+|-' -> <line|lcmb> .. (3-5 times)
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Example:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

gsur S004 + BLEND - L002 + L00E + L006 - L00C
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

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 Coons or a NURBS surface is referenced. Use a + or - in front of the lines or lcmbs to indicate the orientation.
 * style="width:95%" |
 * style="width:95%" |
 * }

GBOD
<span id="(1)">
 * {| style="width:100%" border="0"

This keyword is used to define or redefine a body in the most basic way. Each body must have five to seven surfaces to be mesh-able. However, the number of recommended surfaces is six. The first two surfaces should be the top and the bottom surfaces.
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Syntax:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

'gbod' <name(char<9)>|'!' 'NORM' '+|-' '+|-' ->.. ( 5-7 surfaces )
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Example:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

gbod B001 NORM - S001 + S002 - S005 - S004 - S003 - S006
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

will create a body B001. The keyword NORM is a necessary placeholder for future functionallity but has no actual meaning. Next, follow the surfaces with a sign + or - in front that indicates the orientation of each surface.
 * style="width:95%" |
 * style="width:95%" |
 * }

SETA
<span id="(1)">
 * {| style="width:100%" border="0"

This keyword is used to create or redefine a 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
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Syntax:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

'seta' '!'|'n'|'e'|'p'|'l'|'c'|'s'|'b'|'S'|'L'|'se' <name ..> | ['n'|'e' '-' ]
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Example:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

seta dummy p p1 p2
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

This create a set "dummy" and will add the points p1 and p2 to the set.
 * style="width:95%" |
 * style="width:95%" |
 * }

ELTY
<span id="(1)">
 * {| style="width:100%" border="0"

This keyword is used to assign a specific element type to a set of entities.
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

The element name is composed of the following parts:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

I) The leading two letters define the shape (be: beam, tr: triangle, qu: quadrangle, he: hexahedra),
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

II) The number of nodes
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

III) 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.
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Syntax:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

'elty' [ ] ['be2'|'be3'|'tr3'|'tr3u'|'tr6'|'qu4'|->'qu8'|'he8'|'he8f'||'he8i'|'he8r'|'he20'|'he20r']
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Examples:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

elty
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

will print only the sets with assigned elements. Multiple definitions are possible. For example,
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

elty all
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

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.
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

elty all he20
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

assigns 20 node brick-elements to all bodies in the set all.
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

elty part1 he8
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

redefines that definition for all bodies in the set part1.
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

elty part2 qu8
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

assigns 8 node shell elements to all surfaces in set part2.
 * style="width:95%" |
 * style="width:95%" |
 * }

MESH
<span id="(1)">
 * {| style="width:100%" border="0"

This keyword is used to start the meshing of the model. before using the mesh command, the element types must be defined with the elty command
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Syntax:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

'mesh' ['fast'] ['block'|'lonly'|'nolength'|'noangle'|'length'|'angle']
 * style="width:95%" |
 * style="width:95%" |
 * }

PLUS

 * <span id="(1)">
 * {| style="width:100%" border="0"

This keyword is used to display the entities of an additional set after a plot command was used.
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Syntax:
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

'plus' ['n'|'e'|'f'|'p'|'l'|'s'|'b'|'S'|'L']&['a'|'d'|'p'|'q'|'v'] -> 'w'|'k'|'r'|'g'|'b'|'y'|'m'|'i'
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Now, Let us review how the above discussed commands are used to crate a Disk.
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

i) Initially Points are created by typing the point name followed by their coordinates. A screen shot of the created points is shown below along with the commands
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

ii) We now have all the points required to create the disk.
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Arc lines join points on circumference that are adjacent to each other (As shown below)
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

Straight lines join the circumferential points to the center of the circle (as shown below)
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

iii) After all the lines have been created, we create surfaces and this is what the geometry looks like before it is meshed.
 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"


 * style="width:95%" |
 * style="width:95%" |
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

The Disk after it has been meshed is shown in (3)
 * style="width:95%" |
 * style="width:95%" |
 * }

Given: Fish and Belytschko P74, problem 3.4 (Dynamics added)
<span id="(1)">
 * {| style="width:100%" border="0"

The strong form is given by: $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \frac{d}{dx} \left (AE \frac{du}{dx} \right ) +2x=0 on 1 < x < 3 $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle (Eq. 3.9.1)
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \sigma (1)= \left (E \frac{du}{dx} \right )_{x=1}=0.1 $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle (Eq. 3.9.2)
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ u(3)=0.001 \quad$$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle (Eq. 3.9.3)
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

The weak form of this strong form is given by: $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$ \int\limits_{1}^{3}\frac{dw}{dx} AE \frac{du}{dx} dx= -0.1(wA)_{x=1}+ \int\limits_{1}^{3} 2xw dx ~\forall w ~  with ~ w(3)=0 $$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle (Eq. 3.9.4)
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

With $$A=1, E=2, \bar{m}=3$$ $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

With trial and weighted functions of the form: $$
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right"> $$ \displaystyle
 * }

<span id="(1)">
 * {| style="width:100%" border="0"

$$u^h(x)=\alpha_0+\alpha_1(x-3)+\alpha_2(x-3)^2+\alpha_3(x-3)^3 \quad$$
 * style="width:95%" |
 * style="width:95%" |

$$w^h(x)=\Beta_0+\Beta_1(x-3)+\Beta_2(x-3)^2+\Beta_3(x-3)^3 \quad $$

$$
 * <p style="text-align:right"> $$ \displaystyle
 * }

Find: Find Mass matrix & Force matrix
<span id="(1)">
 * {| style="width:100%" border="0"

Given $$ u^h(x=3,t)=g(t)=sin(2t) \quad $$
 * style="width:95%" |
 * style="width:95%" |

1) Mass matrix $$\tilde\mathbf$$

2)The force matrix $$\mathbf{F(t)}$$ $$
 * <p style="text-align:right"> $$ \displaystyle
 * }

Solution
The mass matrix is given as:
 * $$\tilde\mathbf=

\begin{bmatrix} \mathbf{M_{EE}} & \mathbf{M_{EF}}    \\ \mathbf{M_{FE}} & \mathbf{M_{FF}} \end{bmatrix}$$

Where $$\mathbf{M_{EE}}$$ is a 1x1 matrix given by:
 * $$\mathbf{M_{EE}}=\left [ M_{00} \right]$$
 * $$M_{00}=\tilde{m}(b_0,b_0)=\int_{1}^{3} b_0 \bar{m}b_0dx$$

Evaluating $$\tilde{m}(b_0,b_0)\quad$$ yields:
 * $$\tilde{m}(b_0,b_0)=\int_{1}^{3} 1* 3*1dx$$
 * $$\tilde{m}(b_0,b_0)=6 \quad$$

So we have:
 * $$\mathbf{M_{EE}}=6 \quad$$

The $$ \mathbf{M_{EF}} $$ matrix is 1Xn and is given by:
 * $$\mathbf{M_{EF}}=\left [ M_{0j};j=1,2,3 \right]$$
 * $$M_{0j}=\tilde{m}(b_0,b_j)=\int_{1}^{3} b_0 \bar{m}b_jdx$$

This gives:
 * $$\tilde{m}(b_0,b_1)=\int_{1}^{3} 1* 3*(x-3)dx=-6$$
 * $$\tilde{m}(b_0,b_2)=\int_{1}^{3} 1* 3*(x-3)^2dx=8$$
 * $$\tilde{m}(b_0,b_3)=\int_{1}^{3} 1* 3*(x-3)^3dx=-12$$

This gives us: $$ \mathbf{M_{EF}}=\begin{bmatrix}-6 & 8 & 12\end{bmatrix} \quad $$

$$ \mathbf{M_{FE}}=\mathbf{M_{EF}^T}$$
 * $$ \mathbf{M_{FE}}=\begin{bmatrix}-6 \\ 8 \\ 12\end{bmatrix}$$

The $$ \mathbf{M_{FF}} $$ matrix is nXn and is given by:
 * $$\mathbf{M_{FF}}=\left [ M_{ij};i,j=1,2,3 \right]$$
 * $$M_{ij}=\tilde{m}(b_i,b_j)=\int_{1}^{3} b_i \bar{m}b_jdx$$

This gives:
 * $$\tilde{m}(b_1,b_1)=\int_{1}^{3} (x-3)* 3*(x-3)dx=8$$
 * $$\tilde{m}(b_1,b_2)=\int_{1}^{3} (x-3)* 3*(x-3)^2dx=-12$$
 * $$\tilde{m}(b_1,b_3)=\int_{1}^{3} (x-3)* 3*(x-3)^3dx=\frac{96}{5}$$
 * $$\tilde{m}(b_2,b_1)=\int_{1}^{3} (x-3)^2* 3*(x-3)dx=-12$$
 * $$\tilde{m}(b_2,b_2)=\int_{1}^{3} (x-3)^2* 3*(x-3)^2dx=\frac{96}{5}$$
 * $$\tilde{m}(b_2,b_3)=\int_{1}^{3} (x-3)^2* 3*(x-3)^3dx=-32$$
 * $$\tilde{m}(b_3,b_1)=\int_{1}^{3} (x-3)^3* 3*(x-3)dx=\frac{96}{5}$$
 * $$\tilde{m}(b_3,b_2)=\int_{1}^{3} (x-3)^3* 3*(x-3)^2dx=-32$$
 * $$\tilde{m}(b_3,b_3)=\int_{1}^{3} (x-3)^3* 3*(x-3)^3dx=\frac{384}{7}$$


 * $$ \mathbf{M_{FF}}=\begin{bmatrix}8&-12&\frac{96}{5}\\-12&\frac{96}{5}&-32\\\frac{96}{5}&-32&\frac{384}{7}\end{bmatrix}$$

Assembling the mass matrix yields: $$\tilde\mathbf=\begin{bmatrix}6&-6&8&-12\\-6&8&-12&\frac{96}{5}\\8&-12&\frac{96}{5}&-32\\-12&\frac{96}{5}&-32&\frac{384}{7}\end{bmatrix}$$

The Force matrix is given by:
 * $$\tilde\mathbf=\begin{bmatrix}\mathbf\\\mathbf\end{bmatrix}$$

Where $$\mathbf$$ is a 1x1 matrix given by:
 * $$\mathbf=\left \{ F_0 \right\}$$
 * $$F_0=\tilde{f}(b_0)=Ab_0(1)0.1+\int_{1}^{3}b_0(x)fdx$$

Since $$b_0=0 \quad$$
 * $$\mathbf=\begin{bmatrix}0\end{bmatrix}$$

The matrix $$\mathbf$$ is 1X3 given by:
 * $$\mathbf=\left \{ F_i;i=1,2,3 \right\}$$
 * $$F_i=\tilde{f}(b_i)=Ab_i(1)(-0.1)+\int_{1}^{3}b_i(x)fdx$$

Yielding:
 * $$\tilde{f}(b_1)=A(1-3)(1)(-0.1)+\int_{1}^{3}(x-3)2xdx=-\frac{97}{15}$$
 * $$\tilde{f}(b_1)=A(1-3)^2(1)(-0.1)+\int_{1}^{3}(x-3)^22xdx=\frac{38}{5}$$
 * $$\tilde{f}(b_1)=A(1-3)^3(1)(-0.1)+\int_{1}^{3}(x-3)^23xdx=-\frac{52}{5}$$


 * $$\mathbf=\begin{bmatrix}-\frac{97}{15}\\\frac{38}{5}\\-\frac{52}{5}\end{bmatrix}$$

The force matrix is thus
 * $$\mathbf{\tilde{F}}=\begin{bmatrix}0\\-\frac{97}{15}\\\frac{38}{5}\\-\frac{52}{5}\end{bmatrix}$$

We still need to subtract the inertia force and the force from the stiffness however

The stiffness force is equal to:
 * $$\mathbf{K_{FE}}*g(t)$$

Where $$\mathbf{K_{FE}}$$ is given by:
 * $$\mathbf=\left [ K_{j0};j=1,2,3 \right]$$
 * $$K_{j0}=\tilde{K}(b_j,b_0)=\int_{1}^{3}b_j'AEb_0'dx$$

Since b_0=0, The Force from the stiffness is 0.

The inertia force is equal to:
 * $$\mathbf{M_{FE}}*g(t)$$

Where
 * $$g(t)=-4sin(2t) \quad$$

This yieds the matrix:

$$\begin{bmatrix}24sin(2t)\\-32sin(2t)\\48sin(2t)\end{bmatrix}$$

Subtracting this from $$\mathbf{F_{F}}$$ and reassembling yields the final force matrix:

$$\begin{bmatrix}0\\-\frac{97}{15}-24sin(2t)\\\frac{38}{5}+32sin(2t)\\\frac{52}{5}-48sin(2t)\end{bmatrix}$$