User:Eml5526.s11.team3.ushnish12/Homework 4

For each of the family of basis functions, and for $$\displaystyle{{\Gamma }_{g}}=\{\beta \}$$, find the corresponding basis functions satisfying

{ $$\displaystyle {{b}_{j}}(x), j=0,1,2...n $$ } such that $$\displaystyle {{b}_{0}}(\beta)\ne 0$$   and   $$\displaystyle {{b}_{j}}(\beta)= 0, j = 1,2,3...n $$

$$\displaystyle i> {{F}_{p}}={{x}^{j}}, j=0,1,2...n $$

$$\displaystyle ii> {{F}_{p}}=\cos jx, j=0,1,2...n $$

$$\displaystyle iii> {{F}_{p}}=1,\sin jx, j=1,2...n $$

$$\displaystyle iv> {{F}_{p}}=\cos jx,\sin kx, j=0,1,2...n , k=1,2...n$$

$$\displaystyle v> {{F}_{p}}={{e}^{jx}}, j=0,1,2...n $$

soln
$$\displaystyle i> $$ For the Constraint Breaking Function to be satisfied, we take the basis function for the Polynomial case so that it satisfies the Essential Boundary Condition $$\Gamma _{g}=\left \{ \beta\right \}$$ is -


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

$$\displaystyle
 * style="width:92%; padding:10px; border:2px solid #ff0000" |
 * style="width:92%; padding:10px; border:2px solid #ff0000" |

{{F}_{p}}^{-}={{(x-\beta)}^{j}}, j=0,1,2...n

$$ (Eq )<1>
 * 
 * }

For $$\displaystyle j=0 $$ at  $$\displaystyle x= \beta, {{F}_{p}}^{-} = {(x-\beta)^0} = 1$$

For $$\displaystyle j=1 $$ at  $$\displaystyle x= \beta, {{F}_{p}}^{-} = {(\beta-\beta)^1} = 0$$

For $$\displaystyle j=2 $$ at  $$\displaystyle x= \beta, {{F}_{p}}^{-} = {(\beta-\beta)^2} = 0$$

For $$\displaystyle j=n $$ at  $$\displaystyle x= \beta, {{F}_{p}}^{-} = {(\beta-\beta)^n} = 0$$

Hence the Constraint Breaking Function is satisfied by this polynomial basis function where

$$\displaystyle {{b}_{0}}(\beta)\ne 0$$  and   $$\displaystyle {{b}_{j}}(\beta)= 0, j = 1,2,3...n $$

Now for the given problem, the value of $$\displaystyle \beta =4 $$

The plot of $$\displaystyle {{F}_{p}}$$ and $$\displaystyle{{F}_{p}}^{-} $$ is generated from Matlab.

Matlab Code:

$$\displaystyle ii>$$ While considering the Cosine basis function $$\displaystyle {{F}_{c}}=\cos jx $$, we are unable to find such a transformation for which $$\displaystyle {{b}_{0}}(\beta)= 0$$.

So we make the transformation of
 * {| style="width:100%" border="0"

$$\displaystyle {{b}_{0}}(\beta)= 1, {{F}_{c}}^{-}= \cos (2j-1)\pi x/2\beta, j=1,2...n
 * style="width:92%; padding:10px; border:2px solid #ff0000" |
 * style="width:92%; padding:10px; border:2px solid #ff0000" |

$$ (Eq )<2>
 * 
 * }

For $$\displaystyle j=1 $$ at  $$\displaystyle x= \beta, {{F}_{c}}^{-}= \cos (2-1)\pi \beta/2\beta= \cos \pi/2 = 0$$

For $$\displaystyle j=2 $$ at  $$\displaystyle x= \beta, {{F}_{c}}^{-}= \cos (4-1)\pi \beta/2\beta= \cos 3\pi/2 = 0$$

For $$\displaystyle j=3 $$ at  $$\displaystyle x= \beta, {{F}_{c}}^{-}= \cos (6-1)\pi \beta/2\beta= \cos 5\pi/2 = 0$$

For $$\displaystyle j=n $$ at  $$\displaystyle x= \beta, {{F}_{c}}^{-}= \cos (2n-1)\pi \beta/2\beta= \cos (2n-1)\pi/2 = 0$$

Hence the Constraint Breaking Function is satisfied by this Cosine basis function where

$$\displaystyle {{b}_{0}}(\beta)\ne 0$$  and   $$\displaystyle {{b}_{j}}(\beta)= 0, j = 1,2,3...n $$

Now for the given problem, the value of $$\displaystyle \beta =4 $$

The plot of $$\displaystyle {{F}_{c}}$$ and $$\displaystyle{{F}_{c}}^{-} $$ is generated from Matlab.

Matlab Code:

$$\displaystyle iii>$$ While considering the sine basis function $$\displaystyle {{F}_{s}}=\sin jx $$, we have taken the  transformation  $$\displaystyle {{b}_{0}}(\beta)= 1$$.

So we make the transformation for the sin function as of
 * {| style="width:100%" border="0"

$$\displaystyle {{b}_{0}}(\beta)= 1, {{F}_{s}}^{-}= \sin (j\pi x/\beta), j=1,2...n
 * style="width:92%; padding:10px; border:2px solid #ff0000" |
 * style="width:92%; padding:10px; border:2px solid #ff0000" |

$$ (Eq )<3>
 * 
 * }

For $$\displaystyle j=1 $$ at  $$\displaystyle x= \beta, {{F}_{s}}^{-}= \sin 1\pi \beta/\beta= \sin \pi = 0$$

For $$\displaystyle j=2 $$ at  $$\displaystyle x= \beta, {{F}_{s}}^{-}= \sin 2\pi \beta/\beta= \sin 2\pi = 0$$

For $$\displaystyle j=3 $$ at  $$\displaystyle x= \beta, {{F}_{s}}^{-}= \sin 3\pi \beta/\beta= \sin 3\pi = 0$$

For $$\displaystyle j=n $$ at  $$\displaystyle x= \beta, {{F}_{s}}^{-}= \sin n\pi \beta/\beta= \sin n\pi = 0$$

Hence the Constraint Breaking Function is satisfied by this Sine basis function where

$$\displaystyle {{b}_{0}}(\beta)\ne 0$$  and   $$\displaystyle {{b}_{j}}(\beta)= 0, j = 1,2,3...n $$

Now for the given problem, the value of $$\displaystyle \beta =4 $$

The plot of $$\displaystyle {{F}_{s}}$$ and $$\displaystyle{{F}_{s}}^{-} $$ is generated from Matlab.

Matlab Code:

$$\displaystyle iv>$$ While considering the Fourier basis function $$\displaystyle {{F}_{f}}=\cos jx,\sin kx $$, we are unable to find such a transformation for which $$\displaystyle {{b}_{0}}(\beta)= 0$$.

So we make the transformation of


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

$$\displaystyle
 * style="width:92%; padding:10px; border:2px solid #ff0000" |
 * style="width:92%; padding:10px; border:2px solid #ff0000" |

{{b}_{0}}(\beta)= 1, {{F}_{f}}^{-}= \cos (2j-1)\pi x/2\beta, j=1,2...n , \sin (k\pi x/\beta), k=1,2...n

$$ (Eq )<4>
 * 
 * }

For $$\displaystyle j=1 $$ at  $$\displaystyle x= \beta, {{F}_{f}}^{-}= \cos (2-1)\pi \beta/2\beta= \cos \pi/2 = 0$$

For $$\displaystyle k=1 $$ at  $$\displaystyle x= \beta, {{F}_{f}}^{-}= \sin 1\pi \beta/\beta= \sin \pi = 0$$

For $$\displaystyle j=2 $$ at  $$\displaystyle x= \beta, {{F}_{f}}^{-}= \cos (4-1)\pi \beta/2\beta= \cos 3\pi/2 = 0$$

For $$\displaystyle k=2 $$ at  $$\displaystyle x= \beta, {{F}_{f}}^{-}= \sin 2\pi \beta/\beta= \sin 2\pi = 0$$

For $$\displaystyle j=3 $$ at  $$\displaystyle x= \beta, {{F}_{f}}^{-}= \cos (6-1)\pi \beta/2\beta= \cos 5\pi/2 = 0$$

For $$\displaystyle k=3 $$ at  $$\displaystyle x= \beta, {{F}_{f}}^{-}= \sin 3\pi \beta/\beta= \sin 3\pi = 0$$

For $$\displaystyle j=n $$ at  $$\displaystyle x= \beta, {{F}_{f}}^{-}= \cos (2n-1)\pi \beta/2\beta= \cos (2n-1)\pi/2 = 0$$

For $$\displaystyle k=n $$ at  $$\displaystyle x= \beta, {{F}_{f}}^{-}= \sin n\pi \beta/\beta= \sin n\pi = 0$$

Hence the Constraint Breaking Function is satisfied by this Fourier basis function where

$$\displaystyle {{b}_{0}}(\beta)\ne 0$$  and   $$\displaystyle {{b}_{j}}(\beta)= 0, j = 1,2,3...n $$

Now for the given problem, the value of $$\displaystyle \beta =4 $$

The plot of $$\displaystyle {{F}_{f}}$$ and $$\displaystyle{{F}_{f}}^{-} $$ is generated from Matlab.

Matlab Code:

$$\displaystyle v>$$ While considering the Exponential basis function $$\displaystyle {{F}_{e}}={{e}^{jx}}$$, we are unable to find such a transformation for which $$\displaystyle {{b}_{0}}(\beta)= 0$$.

So we make the transformation of


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

$$\displaystyle
 * style="width:92%; padding:10px; border:2px solid #ff0000" |
 * style="width:92%; padding:10px; border:2px solid #ff0000" |

{{b}_{0}}(\beta)= 1, {{F}_{e}}^{-}= {{e}^{j(x-\beta)}}-1, j=1,2...n

$$ (Eq )<5>
 * 
 * }

For $$\displaystyle j=1 $$ at  $$\displaystyle x= \beta, {{F}_{e}}^{-}= {{e}^{1(\beta-\beta)}}-1= {e}^0 - 1 = 1-1 = 0$$

For $$\displaystyle j=2 $$ at  $$\displaystyle x= \beta, {{F}_{e}}^{-}= {{e}^{2(\beta-\beta)}}-1= {e}^0 - 1 = 1-1 = 0$$

For $$\displaystyle j=3 $$ at  $$\displaystyle x= \beta,{{F}_{e}}^{-}= {{e}^{3(\beta-\beta)}}-1= {e}^0 - 1 = 1-1 = 0$$

For $$\displaystyle j=n $$ at  $$\displaystyle x= \beta,{{F}_{e}}^{-}= {{e}^{n(\beta-\beta)}}-1= {e}^0 - 1 = 1-1 = 0$$

Hence the Constraint Breaking Function is satisfied by this polynomial basis function where

$$\displaystyle {{b}_{0}}(\beta)\ne 0$$  and   $$\displaystyle {{b}_{j}}(\beta)= 0, j = 1,2,3...n $$

Now for the given problem, the value of $$\displaystyle \beta =4 $$

The plot of $$\displaystyle {{F}_{e}}$$ and $$\displaystyle{{F}_{e}}^{-} $$ is generated from Matlab.

Matlab Code:

2nd epart
F = {$$\displaystyle 1,e^x,e^{2x}$$} = {$$\displaystyle b_{1}(x),b_{2}(x),b_{3}(x)$$} $$\Gamma = \begin{bmatrix} \Gamma_{11}&\Gamma_{12}&\Gamma_{13} \\ \Gamma_{21}&\Gamma_{22}&\Gamma_{23} \\ \Gamma_{31}&\Gamma_{32}&\Gamma_{33} \\ \end{bmatrix}$$

$$\;\Gamma_{ij}=\int_{\Omega}b_{i}(x)b_{j}(x)dx$$ $$\Gamma_{11} =  = \int_{-2}^{4}1 dx = 6$$ $$\Gamma_{12} = \Gamma_{21}= = \int_{-2}^{4}e^x dx =54.4628 $$ $$\Gamma_{13} = \Gamma_{31}= = \int_{-2}^{4}e^{2x} dx =1490.47 $$ $$\Gamma_{22} =  = \int_{-2}^{4} e^{2x} dx = 1490.47$$ $$\Gamma_{23} = \Gamma_{32}= = \int_{-2}^{4}e^{3x} dx =54251.6 $$ $$\Gamma_{33} =  = \int_{-2}^{4}e^{4x} dx =2.2215*10^6 $$

$$\Gamma = \begin{bmatrix} 6 &54.4628&1490.47 \\ 54.4628&1490.47&54251.6  \\ 1490.47&54251.6&2.2215*10^6  \\ \end{bmatrix}$$


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

$$\displaystyle
 * style="width:92%; padding:10px; border:2px solid #ff0000" |
 * style="width:92%; padding:10px; border:2px solid #ff0000" |

\Gamma = \begin{bmatrix} 6 &54.4628&1490.47 \\ 54.4628&1490.47&54251.6  \\ 1490.47&54251.6&2.2215*10^6  \\ \end{bmatrix}

$$ (Eq )<6>
 * 
 * }

The determinant of the matrix is given by:-


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

$$\displaystyle
 * style="width:92%; padding:10px; border:2px solid #ff0000" |
 * style="width:92%; padding:10px; border:2px solid #ff0000" |

Det \begin{bmatrix} 6 &54.4628&1490.47 \\ 54.4628&1490.47&54251.6  \\ 1490.47&54251.6&2.2215*10^6  \\ \end{bmatrix} =1.13603*10^9

$$ (Eq )<7>
 * 
 * }

Hence we can say that the function $$\displaystyle e^{jx} $$ is independent on $$\displaystyle \Omega $$

b. Generating a cylinder

The CGX commands used for the generation of a disc are- PNT, LINE, GSUR, ELTY, MESH and plus.

The commands are the same used to generate a disc and are explained above.-

c. Generating a sphere

The CGX commands used for the generation of a sphere are- PNT, LINE, GSUR, ELTY, MESH.

The commands are the same used to generate a disc and are explained above.-

d. Generating a sphere-volume

The CGX commands used for the generation of a sphere are- PNT, LINE, GSUR, ELTY, MESH and GBOD.

The commands are the same used to generate a disc and are explained above except GBOD.-

i> GBOD- This command 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. The syntax to print a point with co-ordinates is


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

$$\displaystyle
 * style="width:95%" |
 * style="width:95%" |

'gbod' |'!' 'NORM' '+|-' '+|-' -> .. ( 5-7 surfaces )

$$
 * }

An example is


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

$$\displaystyle
 * style="width:92%; padding:10px; border:2px solid #ff0000" |
 * style="width:92%; padding:10px; border:2px solid #ff0000" |

GBOD \quad B001 \quad NORM \quad - \quad S001 \quad + \quad S002 \quad - \quad S005 \quad - \quad S004 \quad - \quad S003\quad -\quad  S006

$$
 * }

This command will create a body with name B001. NORM is a necessary placeholder which may be used for functionality in the future. The surfaces are followed with a + or - sign in front which in an indiacation of the orientation of each surface.

vi> plus- This command is used to display the entities of an additional set on the Calculix Graphics page. The syntax of plus is


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

$$\displaystyle
 * style="width:95%" |
 * style="width:95%" |

'plus' ['n'|'e'|'f'|'p'|'l'|'s'|'b'|'S'|'L']['a'|'d'|'p'|'q'|'v'] -> 'w'|'k'|'r'|'g'|'b'|'y'|'m'|'i'

$$
 * }

, where Nodes =n, Elements =e, Faces =f, Points =p, Lines =l, Surfaces =s, Bodies =b, Nurb Surfaces =S and Nurb Lines =L and White =w, Black =k, Red =r, Green =g, Blue =b, Yellow =y, Magenta =m

An example is


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

$$\displaystyle
 * style="width:92%; padding:10px; border:2px solid #ff0000" |
 * style="width:92%; padding:10px; border:2px solid #ff0000" |

plus \quad ea\quad all

$$
 * }

This command will display the whole image on the Calculix graphics window.