OptFEM2DP1 Toolbox  V1.2b3
Matlab/Octave Optimized P1-Lagrange Finite Element Method in 2D
 All Files Functions Pages
StiffElasAssemblingP1OptV1.m File Reference

Assembly of the Stiffness Elasticity Matrix by $P_1$-Lagrange finite elements using "OptV1" version (see report). More...

Go to the source code of this file.

Functions

function K = StiffElasAssemblingP1OptV1 (nq, nme, q, me, areas, lambda, mu, Num)
 Assembly of the Stiffness Elasticity Matrix by $P_1$-Lagrange finite elements using "OptV1" version (see report).
 

Detailed Description

Assembly of the Stiffness Elasticity Matrix by $P_1$-Lagrange finite elements using "OptV1" version (see report).

Definition in file StiffElasAssemblingP1OptV1.m.

Function Documentation

function K = StiffElasAssemblingP1OptV1 (   nq,
  nme,
  q,
  me,
  areas,
  lambda,
  mu,
  Num 
)

Assembly of the Stiffness Elasticity Matrix by $P_1$-Lagrange finite elements using "OptV1" version (see report).

The Stiffness Elasticity Matrix is given by

\[\StiffElas_{m,l}=\int_{\DOMH} \Odv^t(\BasisFuncTwoD_m) \Ocv(\BasisFuncTwoD_l)dT, \ \forall (m,l)\in\ENS{1}{2\,\nq}^2,\]

where $\BasisFuncTwoD_m$ are $P_1$-Lagrange vector basis functions. Here $\Ocv=(\Occ_{xx},\Occ_{yy},\Occ_{xy})^t$ and $\Odv=(\Odc_{xx},\Odc_{yy},2\Odc_{xy})^t$ are the elastic stress and strain tensors respectively.

Example
    Th=SquareMesh(10);
    lambda=1; mu=1;
    Num = 0; 
    KK=StiffElasAssemblingP1OptV1(Th.nq,Th.nme,Th.q,Th.me,Th.areas,lambda,mu,Num);
See Also
BuildIkFunc, BuildElemStiffElasMatOptV0Func
Copyright
See License issues
Parameters
nqtotal number of nodes in the mesh, also denoted by $\nq$.
nmetotal number of triangles, also denoted by $\nme$.
qArray of vertices coordinates, $2\times\nq$ array.
${\q}(\il,j)$ is the $\il$-th coordinate of the $j$-th vertex, $\il\in\{1,2\}$ and $j\in\ENS{1}{\nq}$
meConnectivity array, $3\times\nme$ array.
$\me(\jl,k)$ is the storage index of the $\jl$-th vertex of the $k$-th triangle in the array $\q$, $\jl\in\{1,2,3\}$ and $k\in{\ENS{1}{\nme}}$.
areasArray of areas, $1\times\nme$ array. areas(k) is the area of the $k$-th triangle.
lambdathe first Lame coefficient in Hooke's law
muthe second Lame coefficient in Hooke's law
Num
  • 0 global alternate numbering with local alternate numbering (classical method),
  • 1 global block numbering with local alternate numbering,
  • 2 global alternate numbering with local block numbering,
  • 3 global block numbering with local block numbering.
Return values
K$2\nq\times 2\nq$ stiffness elasticity sparse matrix

Definition at line 17 of file StiffElasAssemblingP1OptV1.m.