User:Egm5526.s11.team4.zou/HW4

= Problem 4.1 - Residue Projection for Modified Trigonometric Function Basis =

This problem refers to the previous Problem 2.9 and Problem 3.11

Problem Statement
Given the differential equation in strong form,

Consider the basis

Let, $$\displaystyle n=2,4$$ or $$\displaystyle 6$$ where $$\displaystyle ndof=n+1=3, 5$$ or $$\displaystyle 7$$ where ndof is the number of degrees of freedom and $$\displaystyle d=\left\{ {{d}_{j}};j=0,1,2.....n \right\}$$.


 * 1) Find two equations that enforce boundary conditions for


 * 1) Find $$\displaystyle 1,3$$ or $$\displaystyle 5$$ more equation(s) to solve for $$\displaystyle \mathbf{d}={{({{d}_{j}})}_{n\times 1}}

(j=0,1,2....n)$$by projecting the residue $$\displaystyle P({{u}^{h}}$$)on the basis function$$\displaystyle {{b}_{k}}(x)$$with $$\displaystyle k=1,2,3\cdots \cdots

$$ such that the additional equation is linearly independent from the above equation in part2.


 * 1) Display $$\displaystyle 3/5/7$$ equations in matrix form $$\displaystyle \mathbf{KD=F}$$ Observe the symmetry properities of$$\displaystyle \mathbf{K}$$


 * 1) Solve for $$\displaystyle \mathbf{d}$$


 * 1) Construct $$\displaystyle {{u}^{h}}(x)$$and plot $$\displaystyle {{u}^{h}}(x)$$ versus $$\displaystyle {{u}_{exact}}(x)$$

Exact Solution
With the general solution

After applying boundary conditions

For the case n=2
since $$\displaystyle {{b}_{j}}=\left\{ 1,\sin x,\sin 2x \right\}$$ with $$\displaystyle {{d}_{j}}=\left\{ {{d}_{0}},{{d}_{1}},{{d}_{2}} \right\}$$,

Boundary Conditions:

Additional equation:

For the third condition, we project the residue on the basis function.

Where:

hence,

and

thus the projection is

Putting equation 4.1.6, 4.1.7 and 4.1.11 into matrix form, we can have

Result:



For the case n=4
The approximating solution

Enforcing the boundary conditions:

There still three additional equations which been derived from enforcing the projection of $$\displaystyle P(u)$$ on basis to be zero:

putting equations 4.1.15 to 4.1.20 in matrix form yields:



For the case n=6
The approximating solution

Enforcing the boundary conditions:

There still three additional equations which been derived from enforcing the projection of $$\displaystyle P(u)$$on basis to be zero:

putting equations 4.1.25 to 4.1.31 in matrix form yields:

Thus



Comparison of error
The maximum error for each case is listed below

It is clearly seen that for the cases n=4 and n-6 the errors are negligible.

Problem Statement

 * 1) Download the windows-version of Calculix from its website, and then install it on computer.
 * 2) Run the CalculiX Command: [Start] [Programs] [bConverged][CalculiX] [CalculiX Command]
 * 3) Reproduce the basic examples
 * 4) Write a report

A. The “disc” problem
1. First switch to the directory of working ‘E:\Documents\ccx’.

2. Then input the command ‘cgx –b disc.fbd’, there will appear another command “CalculiX Graphix”.

3. Input the command” pnt [  ]” and then plot all the points with the command ‘plot p all b’. For example, ”PNT py  0.0  1.0 0.0” is used to define a point which is located at (0,1,0). The figure is showed below.



4. Input the command” line    ” and the “gsur '+|-'BLEND| ' '+|-'  '+|-' -> .. (3-5 times)and then plot all the lines and surfaces with command ‘plus’. For example, “LINE L001 P00I P001 p0 4 ” is used to define a arc line which pass through points P00I and P001 and its center point is p0 and radius is 4. The figure is showed below.



5. You can use mouse on the Graphix command to rotate and zoom in or out the figure.

6. Input the command ‘ELTY all QU4’ and ‘mesh all’, and then left-click on the marginal area on the Graphix, then on ’Viewing’ and continue to ‘show all elements with light’ and ‘Toggle Element edges’, as showed in following figures





B. The “cylinder” problem
1. First switch to the directory of working ‘E:\Documents\ccx’.

2. Then input the command ‘cgx –b cylinder.fbd’, there will appear another command “CalculiX Graphix”.

3. Input the command” pnt [  ]” and then plot all the points. Input the command” line    ” and the “gsur '+|-'BLEND| ' '+|-'  '+|-' -> .. (3-5 times)and then plot all the lines and surfaces. The figure is showed below



4. Use the command “seta |'n'|'e'|'p'|'l'|'c'|'s'|'b'|'S'|'L'|'se' <name ..> ['n'|'e' <name” to define some sets to be used in further loading operations. For example, “SETA p1 p p1” is to define a set of points which contains point p1.

5. You can use mouse on the Graphix command to rotate and zoom in or out the figure.

6. Input the command ‘ELTY all QU4’ and ‘mesh all’, and then left-click on the marginal area on the Graphix, then on ’Viewing’ and continue to ‘show all elements with light’ and ‘Toggle Element edges’, as showed in following figure.



C. The “sphere” problem
1. First switch to the directory of working ‘E:\Documents\ccx’

2. Then input the command ‘cgx –b sphere.fbd’, there will appear another command “CalculiX Graphix”.

3. Input the command” pnt [<x> <y> <z>]” and then plot all the points with the command ‘plot p all b’. For example, ”PNT py  0.0  1.0 0.0” is used to define a point which is located at (0,1,0). The figure is showed below.



4. Input the command” line <p1> <p2> <cp|seq> ” and the “gsur '+|-'BLEND| ' '+|-' <line|lcmb> '+|-' -><line|lcmb> .. (3-5 times)and then plot all the lines and surfaces with command ‘plus’. For example, “LINE L001 P00I P001 p0 104 ” is used to define a arc line which pass through points P00I and P001 and its center point is p0 and radius is 104. The figure is showed below.



5. Input the command ‘ELTY all QU4’ and ‘mesh all’, and then left-click on the marginal area on the Graphix, then on ’Viewing’ and continue to ‘show all elements with light’ and ‘Toggle Element edges’, as showed in following figure.



D. The “sphere-volume” problem
1. First switch to the directory of working ‘E:\Documents\ccx’

2. Then input the command ‘cgx –b sphere-volu.fbd’, there will appear another command “CalculiX Graphix”.

3. Input the command” pnt [<x> <y> <z>]” and then plot all the points. Input the command” line <p1> <p2> <cp|seq> ” and the “gsur '+|-'BLEND| ' '+|-' <line|lcmb> '+|-' -><line|lcmb> .. (3-5 times)and then plot all the lines and surfaces. The figure is showed below



4. Input the command” gbod 'NORM' '+|-' '+|-' ->( 5-7 surfaces )” to define a volume. For example, “GBOD B001 NORM + A006 - A003 - A004 + A002 + A001” is to define a volume which consists of these above areas.

5. Input the command ‘ELTY all he20’ and ‘mesh all’, and then left-click on the marginal area on the Graphix, then on ’Viewing’ and continue to ‘show all elements with light’ and ‘Toggle Element edges’, as showed in following figure.



E. The “airfoil” problem
1. First switch to the directory of working ‘E:\Documents\ccx’

2. Then input the command ‘cgx –b airfoil.fbd’, there will appear another command “CalculiX Graphix”.

3. Input the command” pnt [<x> <y> <z>]” and then plot all the points with the command ‘plot p all b’. For example, ” PNT P05D     0.00118       -5.37045        0.00000” is used to define a point which is located at (0.00118,-5.37045,0.00000). The figure is showed below.



4. Input the command ”seqa ['pnt' .. <=>]|['afte'|'befo' .. <=>]|['end' .. <=>]” to define a sequential set. For example, “SEQA S005 pnt  P010 P00C P00A P01C” is used to define a sequential point set which pass through points P010 P00C P00A P01C sequentially.

5. Input the command ”lcmb ['+|-' '+|-' '+|-' ->  ..(up to 14 lines)]| ['ADD' '+|-' '+|-' -> '+|-' ..(up to 14 lines)]” to combine lines. For example, “ LCMB C001 + L015 + L01X + L01Y + L016” is used to combine the lines of C001, L015 + L01X + L01Y, L016.

6. Input the command” line <p1> <p2> <cp|seq> ” and the “gsur '+|-'BLEND| ' '+|-' <line|lcmb> '+|-' -><line|lcmb> .. (3-5 times)and then plot all the lines and surfaces with command ‘plus’. For example, “LINE L001 P00I P001 p0 104 ” is used to define a arc line which pass through points P00I and P001 and its center point is p0 and radius is 104. The figure is showed below.



7. Input the command ‘ELTY all QU4’ and ‘mesh all’, and then left-click on the marginal area on the Graphix, then on ’Viewing’ and continue to ‘show all elements with light’ and ‘Toggle Element edges’, as showed in following figure.





=Problem 4.8 Finding Mass Matrix in weak form=

Given:
The strong form:

and

with:

Find
the mass matrix $$\displaystyle \tilde{M}$$

Solution:
Form the strong form, we can easily obtain the weak form: Find $$\displaystyle U(x)$$ smooth enough and satisfy the essential boundary condition:$$\displaystyle u(x=3)=0.001$$ such that:

since $$\displaystyle {{u}^{h}}(x=3,t)=\sin (2t)$$

Thus:

Consider

So

From the discrete weak form,