Development of Code For 1D FEA
Development of Code For 1D FEA
3
3) Boundary Conditions:-
They are used to either form force vectors (natural or Neumann boundary
conditions) or to specify the value of the unknown field on a boundary (essential or
Dirichlet boundary conditions). The dimension of this mesh will be one order less that
the spacial dimension of the problem.
where NI(x) are the finite element shape functions, dI are the nodal unknowns
for the node I which may be scalar or vector quantities (if uh(x) is a scalar or
vector) and ‘nn’ is the number of nodes in the discretization.
For scalar fields the location of the nodal unknowns in d is most obviously as
follows
dI = d(I)
But for vector fields the location of the nodal unknown dIi, where ‘I’ refers to
the node number and ‘I’ refers to the component of the vector nodal
unknown dI, there is some ambiguity.
Hence, we define a mapping from the node number and the vector
component to the index of the nodal unknown vector d,
f : {I,i} -> n
where f is the mapping, I is the node number, i is the component and n is the
index in d. So the location of unknown uIi in d is as follows
uIi = df(I:i)
Note:- Which ever mapping is chosen the stiffness matrix and force vectors
should have the same structure
5) Computation of Finite Element Operators:-
The heart of the finite element program is the computation of finite
element operators.
The global operators are evaluated by looping over the elements in the
discretization, integrating the operator over the element and then to scatter
the local element operator into the global operator. This procedure is written
mathematically with the Assembly operator A,
A) Quadrature:- (the process of determining area)
The integration of an element operator is performed with an appropriate
quadrature rule which depends on the element and the function being
integrated. In general a quadrature rule is as follows,
where f() is the function to be integrated, q are the quadrature points and
Wq the quadrature weights. The function quadrature generates a vector of
quadrature points and a vector of quadrature weights for a quadrature rule.
The syntax of this function is as follows
B) Operator ‘Scattering’:-
Once the element operator is computed it needs to be scattered into the
global operator. The scattering is dependent on the element connectivity and the
dof mapping chosen.
6) Enforcement of Essential Boundary Condition:-
The final issue before solving the linear algebraic system of finite element
equations is the enforcement of the essential boundary conditions. Typically
this involves modifying the system, Kd = f. So that the essential boundary
condition dn = d’n is satisfied while retaining the original finite element
equations on the unconstrained dofs.
The solution for the values at the nodes for some partial
differential equations can be obtained by solving a linear
system of equations involving the inversion of (sometimes
sparse) matrices.