Professional Documents
Culture Documents
1 Fea Cad
1 Fea Cad
In
Computer Aided Design (CAD)
Fourth Year
Mechanical Design & Production Department
Computer Aided Design CAD Dr/Shaimaa Ibrahim Gad
Page 2 of 22
Computer Aided Design CAD Dr/Shaimaa Ibrahim Gad
Based on the CAD one can define elements off computer aided design system off
computer aided design system
Page 3 of 22
Computer Aided Design CAD Dr/Shaimaa Ibrahim Gad
Refer to the next figure the relation between data and algorithm is reversal one.
Algorithm
Algorithm
Data Complexity
Complexity increased
Decreased Data
Simple
Algorithm with Complex
complex and a Algorithm with
lot of Data simple Data
Software is characterized by
Page 4 of 22
Computer Aided Design CAD Dr/Shaimaa Ibrahim Gad
1. analysis
2. algorithm design
3. coding
4. testing
5. documentation
1. Analysis:
2. Algorithm design
Based on the objective or the function of the software, a set of a statement or steps
maybe written and followed a defined procedure. One may use algorithm or a
flowchart.
3. Coding
There are two main types of coding: top-to-down structure and modular structure.
Modular structure is more efficient and easier to handle; correct reading, writing,
development and understand. Some points should be carefully handled in modular
structure boundaries, interface arguments, local variable, and center transfer.
Page 5 of 22
Computer Aided Design CAD Dr/Shaimaa Ibrahim Gad
4. Testing
Testing and debugging go hand in hand. Several types of errors should be tested:
syntax error, logic control error, runtime error and data format error.
5. Documentation
Page 6 of 22
Computer Aided Design CAD Dr/Shaimaa Ibrahim Gad
It's not possible to obtain mathematical analytical solutions for any engineering
problem. An analytical solution is a mathematical expression that gives the value
of the desired unknown quantity at any location in a body, therefore it's valid for
any for infinite not infinite number of locations and the domain of the problem.
Analytical solution can be obtained for simple problems only. For problems
involving complex geometry, materials, and boundary conditions analytics resort
to numerical methods that provide approximate, but acceptable solutions. The
finite element method (FEM) is an efficient numerical tool to solve a wide range of
boundary and initial value problems.
3.2 Preliminary
M
G
∅ሺ𝒙, 𝒚ሻ = 𝑹
𝐹 𝑅
𝑀, 𝐺, 𝐵𝐶𝑠
Page 7 of 22
Computer Aided Design CAD Dr/Shaimaa Ibrahim Gad
Based on the response of the system and the dependency of the parameters of
the problem on this response, the system may be closed or open control unit. When
no effect of the response 𝑹 on the material geometry, boundary conditions, and
input force, the system is called open loop system. Such case is considered when
handling an elastic problem with a small deformation. On the other hand, when the
responses 𝑹 are affect boundary conditions BCs (like contact problems) or
geometry G (like larger deformation problems) or material M (like elastoplastic
constitutive relationship) or the input force F (like load deformation dependency)
the system becomes closed loop system i.e., nonlinear system.
𝐵ሺ𝑥, 𝑦ሻ = 𝐹2 ሺ𝑥, 𝑦ሻ
There are two types of boundary conditions. The first is called essential,
kinematic or Dirichlet. Such type of BCs gives constraints only on the motion
̅ at some locations.
regardless the parameters i.e., ∅ = 0 or ∅ = ∅
The second type of BCs is called natural, kinetic or Newman. Such type of BCs
𝜕∅ 𝜕∅
gives constraints on the motion considering stress or traction, i.e., = 0 or =
𝜕𝑥 𝜕𝑥
𝐴.
These two types of BCs can be collected to present mixed type which is called
Cauchy type.
Page 8 of 22
Computer Aided Design CAD Dr/Shaimaa Ibrahim Gad
̅ = 𝜀ሺ𝑥, 𝑦ሻ
∅−∅ = 𝜀 = 𝑎𝑏𝑠𝑜𝑙𝑢𝑡𝑒 𝑒𝑟𝑟𝑜𝑟
̅ ) = 𝐹1 ሺ𝑥, 𝑦, 𝑀, 𝐺, 𝐵𝐶𝑠ሻ
𝑅(𝑥, 𝑦, ∅ = 𝑒1 ሺ𝑥, 𝑦ሻ → 𝑟𝑒𝑠𝑖𝑑𝑢𝑎𝑙 𝑒𝑟𝑟𝑜𝑟
𝐵ሺ𝑥, 𝑦ሻ − 𝐹2 ሺ𝑥, 𝑦ሻ = 𝑒2 → 𝑟𝑒𝑠𝑖𝑑𝑢𝑎𝑙 𝑒𝑟𝑟𝑜𝑟 𝑜𝑓 𝐵𝐶
In FEM errors 𝜀 , 𝑒1 , 𝑒2 should be maintained minimum.
∅ ∅1
∅2 ∅2
Subdomain ∅3 ∅3
∅ሺ𝑥ሻ
∅4 ∅4
∅5
𝑥
1 2 2 3 3 4 4 5
1 2 3 4 5
Page 9 of 22
Computer Aided Design CAD Dr/Shaimaa Ibrahim Gad
In brief, the basis of the FEM is the representation of the structure or body by an
assemblage of subdomains or finite elements. These elements are interconnected
at joints or nodes. A function or polynomial is used to approximate the continuous
variable or quantify over each element. Such function is called interpolation or
shape function.
Discretization
Node
Element
∅𝑗 𝑖
𝑦
(e)
𝑥 𝑘
j
Considering a loaded elastic body, the potential energy is represented by the sum
of the internal energy stored as results of the deformations and the potential
energy of the external loads.
Page 10 of 22
Computer Aided Design CAD Dr/Shaimaa Ibrahim Gad
1
The total potential energy Π = 𝑘 𝑢2 − 𝐹 𝑢
2
𝜕Π
= 𝑘𝑢 − 𝐹 = 0
𝜕𝑢
Consider a rod, fixed at one end and loaded by an axial force on the other end.
It's required to get the state and other variables associated with this problem.
Page 11 of 22
Computer Aided Design CAD Dr/Shaimaa Ibrahim Gad
In this step the continuum is divided into finite elements. So, we discuss a discrete
model rather than a continuous model. The compatibility is satisfied only at the
nodes which interconnected elements.
1 2 3
𝑭
1 𝑬𝟏 𝑨𝟏 2 𝑬𝟐 𝑨𝟐 3 𝑬𝟑 𝑨𝟑 4
𝐿1 𝐿2 𝐿3
𝑭𝒊 𝑗 𝑭𝒋
𝑖 𝑥
𝒖𝒊 𝒖𝒋
𝐿𝑒
The linear shape function should be consisted of two parts. The first part
represents the rigid body motion. The second part represents the linear variation
of the displacement (constant strain). Also, shape function should satisfy the
boundary conditions, at least the essential type
𝑢ሺ𝑥ሻ = 𝛼1 + 𝛼2 𝑥
Page 12 of 22
Computer Aided Design CAD Dr/Shaimaa Ibrahim Gad
𝑎𝑡 𝑥 = 0 → 𝑢ሺ𝑥 = 0ሻ = 𝑢𝑖 = 𝛼1
𝑎𝑡 𝑥 = 𝐿𝑒 → 𝑢ሺ𝑥 = 𝐿𝑒 ሻ = 𝑢𝑗 = 𝑢𝑖 + 𝛼2 𝐿𝑒
−𝑢𝑖 + 𝑢𝑗
𝛼2 =
𝐿𝑒
−𝑢𝑖 + 𝑢𝑗
𝑢ሺ𝑥ሻ = 𝑢𝑖 + ( )𝑥
𝐿𝑒
𝑥 𝑥
𝑢ሺ𝑥ሻ = (1 − ) 𝑢𝑖 + 𝑢
⏟ 𝐿𝑒 𝐿𝑒 𝑗
⏟
𝑁𝑖 𝑁𝑗
𝑁𝑖 𝑁𝑗
1 1
𝑥 𝑥
𝐿𝑒 𝐿𝑒
➢ The two functions 𝑁𝑖 𝑎𝑛𝑑 𝑁𝑗 are linear and having unity at the corresponding
node, i.e., 𝑁𝑖 = 1 𝑎𝑡 𝑥 = 0 , and 𝑁𝑗 = 1 𝑎𝑡 𝑥 = 𝐿𝑒 .
➢ Also, the summation of these two shape functions at any point equal to 1
∑(𝑁𝑖 + 𝑁𝑗 ) = 1 𝑎𝑡 𝑎𝑛𝑦 0 ≼ 𝑥 ≼ 𝐿𝑒
➢ Further
𝜕𝑁𝑖 𝜕𝑁𝑗
∑( + )=0 𝑎𝑡 𝑎𝑛𝑦 0 ≼ 𝑥 ≼ 𝐿𝑒
𝜕𝑥 𝜕𝑥
Once the shape functions 𝑁𝑖 𝑎𝑛𝑑 𝑁𝑗 are defined, the variation of 𝑢ሺ𝑥ሻ is also
defined within the element (e).
Page 13 of 22
Computer Aided Design CAD Dr/Shaimaa Ibrahim Gad
Π𝑒 = 𝑈𝑒 + 𝑊𝑒
1
𝑈𝑒 = ∫ 𝜀𝑒𝑇 𝜎𝑒 𝑑𝑉 & 𝑊 = −𝑢𝑖 𝐹𝑖
2 𝑉
𝜕𝑢ሺ𝑥ሻ 𝜕 𝑥 𝑥 −𝑢𝑖 + 𝑢𝑗
𝜀𝑒 = = ((1 − ) 𝑢𝑖 + 𝑢𝑗 ) =
𝜕𝑥 𝜕𝑥 𝐿𝑒 𝐿𝑒 𝐿𝑒
𝐸𝑒 (−𝑢𝑖 + 𝑢𝑗 )
𝜎𝑒 = 𝐸𝑒 𝜀𝑒 =
𝐿𝑒
Then
1 −𝑢𝑖 + 𝑢𝑗 −𝑢𝑖 + 𝑢𝑗
𝑈= 𝐴𝑒 ∫ ( ) 𝐸𝑒 ( ) 𝑑𝑥
2 𝐿𝑒 𝐿 𝑒 𝐿 𝑒
𝐸𝑒 𝐴𝑒 𝐿𝑒 −𝑢𝑖 + 𝑢𝑗 2
𝑈= ∫ ( ) 𝑑𝑥
2 0 𝐿𝑒
𝐸𝑒 𝐴𝑒 2
𝑈= (−𝑢𝑖 + 𝑢𝑗 )
2 𝐿𝑒
and
𝑊 = −𝐹𝑖 𝑢𝑖 − 𝐹𝑗 𝑢𝑗
So,
𝐸𝑒 𝐴𝑒 2
Π= (−𝑢𝑖 + 𝑢𝑗 ) − 𝐹𝑖 𝑢𝑖 − 𝐹𝑗 𝑢𝑗 , Quadratic form
2 𝐿𝑒
Page 14 of 22
Computer Aided Design CAD Dr/Shaimaa Ibrahim Gad
For Equilibrium
𝜕Π 𝐸𝑒 𝐴𝑒
= (𝑢𝑖 − 𝑢𝑗 ) − 𝐹𝑖 = 0
𝜕𝑢𝑖 𝐿𝑒
𝜕Π 𝐸𝑒 𝐴𝑒
= (−𝑢𝑖 + 𝑢𝑗 ) − 𝐹𝑗 = 0
𝜕𝑢𝑗 𝐿𝑒
In Matrix form
𝐸𝑒 𝐴𝑒 1 −1 𝑢𝑖 𝐹𝑖
[ ] {𝑢 } = {𝐹 }
⏟𝐿𝑒 −1 1 ⏟ 𝑗 ⏟ 𝑗
𝐸𝑙𝑒𝑚. 𝐸𝑙𝑒𝑚. 𝐸𝑙𝑒𝑚.
𝑆𝑡𝑖𝑓𝑓𝑛𝑒𝑠𝑠 𝐷𝑖𝑠𝑝. 𝐹𝑜𝑟𝑐𝑒
𝑚𝑎𝑡𝑟𝑖𝑥 𝑣𝑒𝑐𝑡𝑜𝑟 𝑣𝑒𝑐𝑡𝑜𝑟
If 𝑢𝑖 = 𝑢𝑗 , then 𝐹𝑖 = 𝐹𝑗
The derived element Eqs. represent equilibrium state for one element, and in turn,
describe the response of only one element. To get the equilibrium Eqs. for the
whole problem, these element Eqs. are collected to form the global equations of
the whole structure.
Refer to the next figure, we write the equilibrium Eqs. for each node, such that:
𝑹 𝑭
1 1 2 2 3 3 4
Page 15 of 22
Computer Aided Design CAD Dr/Shaimaa Ibrahim Gad
𝐹11 = 𝑅
𝐹12 + 𝐹21 = 0
𝐹22 + 𝐹31 = 0
𝐹32 = 𝐹
𝑅 1 −1 𝑢1
{ } = 𝑘1 [ ]{ }
𝐹12 −1 1 𝑢2
𝐹 1 −1 𝑢2
{ 21 } = 𝑘2 [ ]{ }
𝐹22 −1 1 𝑢3
𝐹 1 −1 𝑢3
{ 31 } = 𝑘3 [ ]{ }
𝐹 −1 1 𝑢4
𝑘1 ሺ𝑢1 − 𝑢2 ሻ = 𝑅
𝑘3 ሺ−𝑢3 + 𝑢4 ሻ = 𝐹
The last four equilibrium Eqs. Can be written in matrix form as:
𝑘1 −𝑘1 0 0 𝑢1 −𝑅
−𝑘 𝑘1 + 𝑘2 −𝑘2 0 𝑢
[ 1 ] { 2} = { 0 }
0 −𝑘2 𝑘2 + 𝑘3 −𝑘3 𝑢3 0
0 0 −𝑘3 𝑘3 𝑢4 𝐹
Page 16 of 22
Computer Aided Design CAD Dr/Shaimaa Ibrahim Gad
[𝐾 ]{𝒅} = {𝑭}
In which
➢ [𝐾] → Global stifness Matrix
➢ {𝑑} → Global displacement vector
➢ {𝐹} → Global Force vector
The global stiffness matrix, like element one; is symmetrical, square, singular, but
banded matrix.
The global equilibrium equations are a system of linear Eqs. Solutions of these Eqs.
yields unknown displacement vector {𝒅}. However, the overall stiffness matrix is
singular and can't be solved without considering boundary conditions.
One method to solve the global equilibrium equations is by partition the system
as
𝑘̅ 𝑘̅12 0̅ 𝑅
[ ̅ 11 ] { } = { ̅}
𝑘21 𝑘̅22 𝑢̅ 𝐹
Where,
[𝑘̅11 ] = [𝑘1 ]
[𝑘̅12 ] = [−𝑘1 0 0]
𝑘1 + 𝑘2 −𝑘2 0
[𝑘̅22 ] = [ −𝑘2 𝑘2 + 𝑘 3 −𝑘3 ]
0 −𝑘3 𝑘3
{0̅} = {𝑢1 } , 𝑢1 = 0
{𝑢̅} = {𝑢2 𝑢3 𝑢4 }𝑇
Page 17 of 22
Computer Aided Design CAD Dr/Shaimaa Ibrahim Gad
{𝐹̅ } = {0 0 𝐹 }𝑇
Now:
𝑘̅21 𝑢1 + 𝑘̅22 𝑢̅ = 𝐹
−1
𝑢̅ = 𝑘̅22 (𝐹 − 𝑘̅21 𝑢1 ) → {𝑢̅}
Once the displacement vector {𝒅} is known, one can compute strain, stress and
internal force for each element. Consider element (e)
𝜕𝑢ሺ𝑥ሻ −𝑢𝑖 + 𝑢𝑗
𝜀𝑒 = =
𝜕𝑥 𝐿𝑒
𝐸𝑒
𝜎𝑒 = 𝐸𝑒 𝜀𝑒 = (−𝑢𝑖 + 𝑢𝑗 )
𝐿𝑒
𝐴𝑒 𝐸𝑒
𝑃𝑒 = 𝐴𝑒 𝜎𝑒 = (−𝑢𝑖 + 𝑢𝑗 )
𝐿𝑒
==============================================
The previous six-steps procedure is known as the Stiffness Method this procedure
is not exactly the FEM. In the FEM the problem is expressed by mathematical
operator on the field variables and boundary conditions,
̅)
𝑅(𝑥, 𝑦, ∅ 𝑎𝑛𝑑 𝐵ሺ𝑥, 𝑦ሻ
Page 18 of 22
Computer Aided Design CAD Dr/Shaimaa Ibrahim Gad
For Example:
𝑇ሺ𝑥ሻ
𝒒 𝐹𝑜𝑟𝑐𝑒
A 1 2
Convection
1 2 3
The governing P.D.E. for temperature distribution through the rod is:
𝜕2𝑇
𝑘 2=0
𝜕𝑥
𝜕𝑇
𝑥=𝐿 𝑘 + ℎሺ𝑇 − 𝑇∞ ሻ = 0
𝜕𝑥
Calculus of variation provides an equivalent functional from the problem, such that
Page 19 of 22
Computer Aided Design CAD Dr/Shaimaa Ibrahim Gad
𝑘 𝜕𝑇 2 1
Π = ∫ ( ) 𝑑𝑉 + ∫ 𝑞 𝑇 𝑑𝐴 + ∫ ℎ ሺ𝑇 − 𝑇∞ ሻ2 𝑑𝐴
2 𝜕𝑥 2
𝑉 𝐴 𝐴
𝑻𝒊 𝑻𝒋
𝒒𝒊 𝒒𝒋
𝑘𝑒 𝐴𝑒
𝐿𝑒
𝑇ሺ𝑥ሻ = 𝑁𝑖 𝑇𝑖 + 𝑁𝑗 𝑇𝑗
𝑥
𝑁𝑖 = 1 −
𝐿𝑒
𝑥
𝑁𝑗 =
𝐿𝑒
𝜕𝑇 −𝑇𝑖 + 𝑇𝑗
=
𝜕𝑥 𝐿𝑒
𝜕𝑇
Substituting of 𝑇 & in the functional form yields
𝜕𝑥
𝑘 −𝑇𝑖 + 𝑇𝑗 2 1 2
Π=∫ ( ) 𝑑𝑉 + ∫ 𝑞 (𝑁𝑖 𝑇𝑖 + 𝑁𝑗 𝑇𝑗 ) 𝑑𝐴 + ∫ ℎ (𝑁𝑖 𝑇𝑖 + 𝑁𝑗 𝑇𝑗 − 𝑇∞ ) 𝑑𝐴
2 𝐿𝑒 2
𝑉 𝐴 𝐴
𝑘 −𝑇𝑖 + 𝑇𝑗 2 𝑘 −𝑇𝑖 + 𝑇𝑗 2 𝑘𝑒 𝐴𝑒 2
∫ ( ) 𝑑𝑉 = ∫ ( ) 𝑑𝑉 = (−𝑇𝑖 + 𝑇𝑗 )
2 𝐿𝑒 2 𝐿𝑒 2𝐿𝑒
𝑉 𝑉
∫ 𝑞 (𝑁𝑖 𝑇𝑖 + 𝑁𝑗 𝑇𝑗 ) 𝑑𝐴 = 𝐴 𝑞(𝑁𝑖 𝑇𝑖 + 𝑁𝑗 𝑇𝑗 )
𝐴
1 2 ℎ𝐴𝑒 2
∫ ℎ (𝑁𝑖 𝑇𝑖 + 𝑁𝑗 𝑇𝑗 − 𝑇∞ ) 𝑑𝐴 = (𝑁𝑖 𝑇𝑖 + 𝑁𝑗 𝑇𝑗 − 𝑇∞ )
2 2
𝐴
Page 20 of 22
Computer Aided Design CAD Dr/Shaimaa Ibrahim Gad
𝑘𝑒 𝐴𝑒 2 ℎ𝐴𝑒 2
Π= (−𝑇𝑖 + 𝑇𝑗 ) + 𝐴𝑒 𝑞(𝑁𝑖 𝑇𝑖 + 𝑁𝑗 𝑇𝑗 ) + (𝑁𝑖 𝑇𝑖 + 𝑁𝑗 𝑇𝑗 − 𝑇∞ )
2𝐿𝑒 2
𝜕Π 𝑘𝑒 𝐴𝑒
= (𝑇𝑖 − 𝑇𝑗 ) + 𝑞𝐴𝑒 𝑁𝑖 + ℎ𝐴𝑒 (𝑁𝑖 𝑇𝑖 + 𝑁𝑗 𝑇𝑗 − 𝑇∞ )𝑁𝑖
𝜕𝑇𝑖 𝐿𝑒
𝜕Π 𝑘𝑒 𝐴𝑒
= (−𝑇𝑖 + 𝑇𝑗 ) + 𝑞 𝐴𝑒 𝑁𝑗 + ℎ𝐴𝑒 (𝑁𝑖 𝑇𝑖 + 𝑁𝑗 𝑇𝑗 − 𝑇∞ )𝑁𝑗
𝜕𝑇𝑗 𝐿𝑒
which present the element heat balanced Eqs. considering input heat flux 𝑞 and
heat loss by convection.
𝑁𝑖 = 0 & 𝑁𝑖 𝑁𝑖 = 0 & 𝑁𝑖 𝑁𝑗 = 0
Some of the global heat balanced Eqs. are for I format by assembly consider
𝑘1 = 𝑘2 = 𝑘 & 𝐴1 = 𝐴2 = 𝐴 & 𝐿1 = 𝐿2 = 𝐿
𝑘𝐴 𝑘𝐴
− 0
𝐿 𝐿 𝑇1 −𝑞𝐴
𝑘𝐴 2𝑘𝐴 𝑘𝐴
− − {𝑇2 } = { 0 }
𝐿 𝐿 𝐿 𝑇3 𝐴 ℎ 𝑇∞
𝑘𝐴 𝑘𝐴
[ 0 −
𝐿 𝐿
+ 𝐴ℎ]
[𝑲]{𝑻} = {𝑭}
Assume that;
• 𝑘 = 75𝑊/𝑐𝑚 °𝐶
• ℎ = 10 𝑊/𝑐𝑚2 °𝐶
• 𝐴 = 𝜋 𝑐𝑚2
• 2𝐿 = 7.5 𝑐𝑚
Page 21 of 22
Computer Aided Design CAD Dr/Shaimaa Ibrahim Gad
• 𝑇∞ = 40°𝐶
• 𝑞 = −150 𝑊/𝑐𝑚2
20 −20 0 𝑇1 150𝜋
[−20 40 −20] {𝑇2 } = { 0 }
0 −20 30 𝑇3 400𝜋
Solution gives
𝑇1 = 70 ℃
𝑇2 = 62.5 ℃
𝑇1 = 55 ℃
Page 22 of 22