Beruflich Dokumente
Kultur Dokumente
A Complete
Axisymmetric
FEM Program
12–1
Chapter 12: A COMPLETE AXISYMMETRIC FEM PROGRAM 12–2
TABLE OF CONTENTS
Page
§12.1. ANALYSIS STAGES 12–3
§12.2. PROBLEM DEFINITION 12–3
§12.2.1. Illustrative Problem . . . . . . . . . . . . . . . 12–4
§12.2.2. Node Coordinates . . . . . . . . . . . . . . . 12–4
§12.2.3. Element Type . . . . . . . . . . . . . . . . . 12–5
§12.2.4. Element Connectivity . . . . . . . . . . . . . . 12–6
§12.2.5. Material Properties . . . . . . . . . . . . . . . 12–6
§12.2.6. Fabrication Properties . . . . . . . . . . . . . . 12–6
§12.2.7. Freedom Tags . . . . . . . . . . . . . . . . . 12–7
§12.2.8. Freedom Values . . . . . . . . . . . . . . . . 12–7
§12.2.9. Element Processing Options . . . . . . . . . . . . 12–7
§12.2.10.Element Body Forces . . . . . . . . . . . . . . 12–8
§12.2.11.Mesh Display . . . . . . . . . . . . . . . . . 12–8
§12.3. PROCESSING 12–9
§12.4. POSTPROCESSING 12–10
§12.4.1. Printing . . . . . . . . . . . . . . . . . . . 12–10
§12.4.2. Displacement Field Contour Plots . . . . . . . . . . 12–10
§12.4.3. Stress Field Contour Plots . . . . . . . . . . . . . 12–11
§12.5. EXAMPLE 1: INTERNALLY PRESSURIZE THICK TUBE 12–14
§12.6. EXAMPLE 2: ROTATING THIN DISK 12–16
§12.7. EXAMPLE 3: CENTRALLY LOADED SS CIRCULAR PLATE 12–20
EXERCISES . . . . . . . . . . . . . . . . . . . . . . 12–24
12–2
12–3 §12.2 PROBLEM DEFINITION
Note that the element data is broken down into four subsets: type, connnectivity, material and
fabrication, each of which has its own data structure. (For axisymmetric solid models, the fabrication
12–3
Chapter 12: A COMPLETE AXISYMMETRIC FEM PROGRAM 12–4
z
2b
2a
TUBE CROSS r
SECTION p
internal pressure p
tube extends indefinitely
along the z axis
data is empty.) The degree of freedom data is broken into two subsets: tag and value. In addition
there are miscellaneous element process options, which are conveniently collected in a separate
data set.
Accordingly, the model-definition input to the axisymmetric stress FEM program consists
of eight data structures, which are called NodeCoordinates, ElemTypes, ElemNodeLists,
ElemMaterial, ElemFabrication, FreedomTags, FreedomValues and ElemOptions
These data sets are described in the following subsections with reference to the problems and
discretization of Figure 12.1–2.
12–4
12–5 §12.2 PROBLEM DEFINITION
z
(b) FEM DISCRETIZATION
lice"
h mi S
;;
;;;;
;;;;
;;
;;;;
"Sala
pr2
2 4
h 2 (1) 4 (2) 6 6
r
;;
;;
1 3 5 5
pr1 1 3
r=a
r = (a+b)/2
r=b
Figure 12.2. A slice of width h is cut from the thick tube of Figure 12.1 and used to
build a 2-element discretization with 4-node quadrilateral ring elements.
Here etyp(e) is the type descriptor of the e-th element, specified as a character string. The
only element available in the axisymmetric program is the 4-node isoparametric quadrilateral ring
element identified as "Quad4". Thus for the example of Figure 12.2:
ElemTypes=Table[{"Quad4"},{2}];
In practice a slightly different form is recommended:
12–5
Chapter 12: A COMPLETE AXISYMMETRIC FEM PROGRAM 12–6
ElemTypes=Table[{"Quad4"},{numele}];
Here numele is the number of elements. This can be extracted as numele=Length[ElemNodeLists],
where ElemNodeLists is defined below.
Element connectivity information specifies how the elements are connected.1 This information is
stored in ElemNodeLists, which is a list of element nodelists:
where eNL(e) denotes the lists of nodes of the element e (given by global node numbers) and Ne is
the total number of elements.
Element boundaries must be traversed counterclockwise but you can start at any corner. Number-
ing elements with midnodes requires more care: first list corners counterclockwise, followed by
midpoints (first midpoint is the one that follows first corner when going counterclockwise). When
elements have an interior node, as in the 9-node biquadratic quadrilateral, that node goes last.
For the mesh of Figure 12.2:
ElemNodeLists= {{1,3,4,2},{3,5,6,4}};
This data can also be constructed by generation modules if the mesh is sufficiently regu-
lar. A companion of GenerateRingNodeCoordinates that generates 4-node quadrilaterals is
GenerateQuad4NodeNumbers, which is invoked as follows:
ElemNodeLists=GenerateQuad4NodeNumbers[2,1];
The first and second argument are the number of elements along r and z, respectively. These must be
exactly the same as the second and third arguments used with GenerateRingNodeCoordinates.
Data structure ElemMaterial lists the elastic modulus E and the Poisson’s ratio ν for each element:
In the frequent case in which all elements have the same E and ν, this list can be easily generated
by a Table instruction. For the mesh of Figure 12.2, assuming E = 1000 and ν = 0:
Em=1000; nu=0;
ElemMaterial=[{Em,nu},{numele}]
in which numele=Length[ElemeNodeLists] is the number of elements (2 there). Again it is
advantageoous to declare the numerical values separately for ease of modification.
1 Some FEM programs call this the “topology data,” which sounds impressive.
12–6
12–7 §12.2 PROBLEM DEFINITION
For axisymmetric solid models, this set is empty and should be set to the empty list:
ElemFabrication = { }; (12.5)
FreedomTags labels each node degree of freedom as to whether the load or the displacement is
specified. The configuration of this list is similar to that of NodeCoordinates:
The tag value is 0 if the force is specified and 1 if the displacement is specified. When there are a
lot of nodes and comparatively few displacement BCs, the quickest way to build this list is to start
from all zeros, and then insert the boundary conditions appropriately.
For the mesh of Figure 12.2, all nodes happen to have the same condition: free to move along r ,
cannot move along z. One Table statement is sufficient:
FreedomTags=Table[{0,1},{6}];
Rather than entering the number of nodes (6) directly, parametrization is recommended:
FreedomTags=Table[{0,1},{numnod}];
where numnod=Length[NodeCoordinates].
This array lists the specified values of the applied node force component if the corresponding tag is
zero, and of the prescribed displacement component if the tag is one. Often most of the list entries
are zero.
For the mesh of Figure 12.2, only two force values are nonzero: the r forces on nodes 1 and 2, dues
to the internal pressure. It is convenient to let the program calculate all values. For a = 4, p = 10
and h = 2:
a=4; p=10;
numnod=Length[NodeCoordinates];
FreedomValues=Table[{0,0},{numnod}];
FreedomValues[[1]]=FreedomValues[[2]]={Kfac*p*a*h/2,0};
Here Kfac is one of the element processing options.
12–7
Chapter 12: A COMPLETE AXISYMMETRIC FEM PROGRAM 12–8
RingSolution[nodcoor_,eletyp_,elenod_,elemat_,elefab_,
elebfor_,eleopt_,doftag_,dofval_]:= Module[{numnod,
u,dis,f,for,sig}, u=f=sig={}; numnod=Length[nodcoor];
u= RingAssemblyAndSolve[nodcoor,eletyp,elenod,elemat,elefab,
elebfor,eleopt,doftag,dofval]; u=Chop[u];
f= RingNodeForces[nodcoor,eletyp,elenod,elemat,elefab,
eleopt,u]; f=Chop[f];
sig= RingNodalStresses[nodcoor,eletyp,elenod,elemat,elefab,
eleopt,u]; sig=Chop[sig];
dis=Table[{u[[2*n-1]],u[[2*n]]},{n,1,numnod}];
for=Table[{f[[2*n-1]],f[[2*n]]},{n,1,numnod}];
Return[{dis,for,sig}];
];
Figure 12.3. Module to carry out the analysis of the axisymmetric problem.
ProcessingOptions={True,rule,Kfac};
The first value requests floating point numerical computations for speed. The second value
is presently ignored. The third value is Kfac=1 if the ring element subtends one radian or
Kfac=N[2*Pi] if the ring element subtends a complete circle of 360◦ = 2π radians.
Plot2DElementsAndNodes[NodeCoordinates,ElemNodeLists,aspect,
title,True,True];
Here aspect is the plot frame aspect ratio (y dimension over x dimension), title is a character
string specifying a plot title, and the last two True argument values specify node labels and element
labels, respectively. Such polots may be seen in the benchmark example sections.
12–8
12–9 §12.3 PROCESSING
RingAssemblyAndSolve[nodcoor_,eletyp_,elenod_,elemat_,elefab_,
elebfor_,eleopt_,doftag_,dofval_]:= Module[{i,j,ii,jj,n,
ne,ns,numer,rule,Kfac,zero=0,one=1,type,Emat,eNL,ncoor,
eftab,Ke, numnod=Length[nodcoor],numele=Length[elenod],
numdof,neldof,supdof,supval,dk,fixed,dfac=0,tag,f,fv,fb,
K,u,modname="RingAssemblyAndSolve: "}, numdof=2*numnod;
{numer,rule,Kfac}=eleopt; If [numer, zero=0.0; one=1.0];
K=Table[zero,{numdof},{numdof}]; u=fb=Table[zero,{numdof}];
For [ne=1,ne<=numele,ne++,
{type}=eletyp[[ne]];
(*If [type!="Trig3"&&type!="Trig6"&&type!="Trig10"&&
type!="Quad4"&&type!="Quad9",*)
If [type!="Quad4", Print[modname,
"Illegal element type,ne=",ne]; Return[Null]];
eNL=elenod[[ne]]; n=Length[eNL];
eftab=Flatten[Table[{2*eNL[[i]]-1,2*eNL[[i]]},{i,n}]];
ncoor=Table[nodcoor[[eNL[[i]]]],{i,n}];
{Em,ν}=elemat[[ne]]; Emat=Em/((1+ν)*(1-2*ν))*
{{1-ν,ν,ν,0},{ν,1-ν,ν,0},{ν,ν,1-ν,0},{0,0,0,1/2-ν}};
(* If [type=="Trig3", Ke=Trig3IsoPRingStiffness[ncoor,
Emat,Kfac,{numer}] ]; *)
If [type=="Quad4", Ke=Quad4IsoPRingStiffness[ncoor,
Emat,Kfac,{numer,2}] ];
(* If [type=="Trig6", Ke=Trig6IsoPRingStiffness[ncoor,
Emat,Kfac,{numer,3}] ]; *)
(* If [type=="Quad9", Ke=Quad9IsoPRingStiffness[ncoor,
Emat,Kfac,{numer,3}] ]; *)
(* If [type=="Trig10",Ke=Trig10IsoPRingStiffness[ncoor,
Emat,Kfac,{numer,3}] ]; *)
Ke=Chop[Ke]; neldof=Length[Ke];
For [i=1,i<=neldof,i++,ii=eftab[[i]];
For [j=i,j<=neldof,j++,jj=eftab[[j]];
K[[jj,ii]]=K[[ii,jj]]+=Ke[[i,j]]
];
];
];
§12.3. PROCESSING
The static solution is carried out by calling module RingSolution shown in Figure 12.5. The
function call is
{NodeDisplacements,NodeForces,NodeStresses}=RingSolution[
NodeCoordinates,ElemTypes,ElemNodeLists,
ElemMaterial,ElemFabrication,ElemBodyForces,
ElemOptions,FreedomTags,FreedomValues];
Module RingSolution assembles the master stiffness matrix, constructs the right hand side,
applies the displacement boundary conditions, and solves for displacements by calling module
RingAssemblyAndSolve. This module is listed in Figures 12.4 and 12.5. As a study of its code
reveals, it can handle several element types but only "Quad4" is presently enabled. The modules
that compute the element stiffness matrices have been studied in previous Chapters.
12–9
Chapter 12: A COMPLETE AXISYMMETRIC FEM PROGRAM 12–10
(*Print["K=",K//MatrixForm]; *)
(*Print["eigs of K=",Chop[Eigenvalues[N[K]]]];*)
If [Length[elebfor]>0,
fb=RingBodyForces[nodcoor,eletyp,elenod,elebfor,eleopt]];
supdof=supval={}; fixed=Table[False,{numdof}];
For [n=1,n<=numnod,n++, For [j=1,j<=2,j++, i=2*(n-1)+j;
dfac=Max[dfac,K[[i,i]]]; tag=doftag[[n,j]];
If [tag>0, fixed[[i]]=True; AppendTo[supdof,i];
AppendTo[supval,dofval[[n,j]]] ]]];
(*Print["supval=",supval]; Print["supdof=",supdof];*)
If [dfac==0 || !numer, dfac=one];
ns=Length[supdof]; fv=Flatten[dofval]; f=fv+fb;
For [k=1, k<=ns, k++, i=supdof[[k]]; dk=supval[[k]];
If [dk==0, Continue[]];
For [j=1, j<=n, j++, If [fixed[[j]],Continue[]];
f[[j]]-=K[[i,j]]*dk;
];
];
For [k=1, k<=ns, k++, i=supdof[[k]]; f[[i]]=dfac*supval[[k]];
For [j=1, j<=numdof, j++, K[[i,j]]=K[[j,i]]=zero];
K[[i,i]]=dfac*one;
];
(*Print["modified K=",K//MatrixForm]; Print["f=",f];
Print["eigs of Kmod=",Eigenvalues[N[K]]];*)
u=LinearSolve[K,f]; u=Chop[u];
Return[u];
];
The computation of the right hand side merges the effect of directly specified node forces and of
body forces specified element by element. To do the latter, module RingBodyForces, which is
listed in Figure 12.6, is used.
Displacement boundary conditions are applied through appropriate modification of the master
stiffness matrix and of the right hand side.
The unknown node displacements u are then obtained through the built in LinearSolve function,
as u=LinearSolve[K,f]. This solution strategy is of course restricted to very small systems, but
it has the advantages of simplicity.
Finally, array sig contains the nodal stresses σr z , σzz , sigmaθ θ σr z at each node, recovered from the
displacement solution. This computation is driven by module MembraneNodeStresses, which
is listed in Figure 12.8. This computation is actually part of the postprocessing stage. It is not
described here since stress recovery is treated in more detail in a subsequent Chapter.
§12.4. POSTPROCESSING
Postprocessing are activities undertaken on return from membraneSoution. They include optional
printout of node displacements, node forces and node stresses, plus contour plots.
§12.4.1. Printing
Figure 12.9 gives a simple script for printing the three arrays returned by RingSolution.
12–10
12–11 §12.4 POSTPROCESSING
RingBodyForces[nodcoor_,eletyp_,elenod_,elebfor_,eleopt_]:=
Module[{numele=Length[elenod],numnod=Length[nodcoor],
numer,rule,ne,eNL,eftab,neldof,i,n,Em,ν,Emat,Kfac,ncoor,
fe,f,modname="RingBodyForces: "},
f=Table[0,{2*numnod}]; fe=Table[0,{8}]; numer=eleopt[[1]];
{numer,rule,Kfac}=eleopt;
For [ne=1,ne<=numele,ne++,
{type}=eletyp[[ne]];
If [type!="Quad4",
Print[modname,"Illegal element type,ne=",ne]; Return[Null]];
eNL=elenod[[ne]]; n=Length[eNL];
eftab=Flatten[Table[{2*eNL[[i]]-1,2*eNL[[i]]},{i,n}]];
ncoor=Table[nodcoor[[eNL[[i]]]],{i,n}];
bfor=elebfor[[ne]];
(* If [type=="Trig3", fe=Trig3IsoPRingBodyForces[ncoor,
Emat,Kfac,{numer},be] ]; *)
If [type=="Quad4", fe=Quad4IsoPRingBodyForces[ncoor,
Emat,Kfac,{numer,2},bfor] ];
(* If [type=="Trig6", fe=Trig6IsoPRingBodyForces[ncoor,
Emat,Kfac,{numer,3},be] ];
If [type=="Quad9", fe=Quad9IsoPRingBodyForces[ncoor,
Emat,Kfac,{numer,3},be] ];
If [type=="Trig10",fe=Trig10IsoPRingBodyForces[ncoor,
Emat,Kfac,{numer,3},be] ]; *)
neldof=Length[Ke];
For [i=1,i<=neldof,i++,ii=eftab[[i]];
f[[ii]]+=fe[[i]]
];
];
Return[f];
];
Figure 12.6. Module to process element body forces into node forces.
12–11
Chapter 12: A COMPLETE AXISYMMETRIC FEM PROGRAM 12–12
RingNodeForces[nodcoor_,eletyp_,elenod_,elemat_,elefab_,
eleopt_,u_]:= Module[{i,j,ii,jj,n,
ne,numer,rule,Kfac,zero=0,one=1,type,Emat,eNL,ncoor,
eftab,Ke, numnod=Length[nodcoor],numele=Length[elenod],
numdof,neldof,f,modname="RingNodeForces: "}, numdof=2*numnod;
{numer,rule,Kfac}=eleopt; If [numer, zero=0.0; one=1.0];
f=Table[zero,{numdof}];
For [ne=1,ne<=numele,ne++,
{type}=eletyp[[ne]];
If [type!="Quad4", Print[modname,
"Illegal element type,ne=",ne]; Return[Null]];
eNL=elenod[[ne]]; n=Length[eNL];
eftab=Flatten[Table[{2*eNL[[i]]-1,2*eNL[[i]]},{i,n}]];
ncoor=Table[nodcoor[[eNL[[i]]]],{i,n}];
{Em,ν}=elemat[[ne]]; Emat=Em/((1+ν)*(1-2*ν))*
{{1-ν,ν,ν,0},{ν,1-ν,ν,0},{ν,ν,1-ν,0},{0,0,0,1/2-ν}};
(* If [type=="Trig3", Ke=Trig3IsoPRingStiffness[ncoor,
Emat,Kfac,{numer}] ]; *)
If [type=="Quad4", Ke=Quad4IsoPRingStiffness[ncoor,
Emat,Kfac,{numer,2}] ];
(* If [type=="Trig6", Ke=Trig6IsoPRingStiffness[ncoor,
Emat,Kfac,{numer,3}] ]; *)
(* If [type=="Quad9", Ke=Quad9IsoPRingStiffness[ncoor,
Emat,Kfac,{numer,3}] ]; *)
(* If [type=="Trig10",Ke=Trig10IsoPRingStiffness[ncoor,
Emat,Kfac,{numer,3}] ]; *)
neldof=Length[Ke];
For [i=1, i<=neldof, i++, ii=eftab[[i]];
For [j=1, j<=neldof, j++, jj=eftab[[j]];
f[[ii]]+=Ke[[i,j]]*u[[jj]]
];
];
]; Return[f];
];
srr=szz=srz=stt=Table[0,{numnod}];
Do[{srr[[n]],szz[[n]],stt[[n]],srz[[n]]}=NodeStresses[[n]],{n,1,numnod}];
srrmax=szzmax=sttmax=srzmax=0;
Do[srrmax=Max[Abs[srr[[n]]],srrmax];
szzmax=Max[Abs[szz[[n]]],szzmax];
sttmax=Max[Abs[stt[[n]]],sttmax];
srzmax=Max[Abs[srz[[n]]],srzmax],{n,1,numnod}];
ContourPlotNodeFuncOver2DMesh[NodeCoordinates,ElemNodeLists,
srr,srrmax,Nsub,aspect,"Nodal stress sig-rr"];
ContourPlotNodeFuncOver2DMesh[NodeCoordinates,ElemNodeLists,
szz,szzmax,Nsub,aspect,"Nodal stress sig-zz"];
ContourPlotNodeFuncOver2DMesh[NodeCoordinates,ElemNodeLists,
stt,sttmax,Nsub,aspect,"Nodal stress sig-\[Theta]\[Theta]"];
ContourPlotNodeFuncOver2DMesh[NodeCoordinates,ElemNodeLists,
12–12
12–13 §12.4 POSTPROCESSING
RingNodalStresses[nodcoor_,eletyp_,elenod_,elemat_,
elefab_,eleopt_,u_]:= Module[{numele=Length[elenod],
numnod=Length[nodcoor],numer,type,ne,eNL,eftab,i,ii,j,k,n,
Em,ν,Emat,Kfac,ncoor,ue,ncount,esig,sige,sig,
modname="RingNodalStresses: "},
ncount=Table[0,{numnod}];
sige= Table[0,{numele}]; sig=Table[{0,0,0,0},{numnod}];
{numer,rule,Kfac}=eleopt;
For [ne=1,ne<=numele,ne++,
{type}=eletyp[[ne]];
eNL=elenod[[ne]]; n=Length[eNL]; ue=Table[0,{2*n}];
eftab=Flatten[Table[{2*eNL[[i]]-1,2*eNL[[i]]},{i,1,n}]];
ncoor=Table[nodcoor[[eNL[[i]]]],{i,n}];
Do [ii=eftab[[i]];ue[[i]]=u[[ii]],{i,1,2*n}];
{Em,ν}=elemat[[ne]];
Emat=Em/((1+ν)*(1-2*ν))*{{1-ν,ν,ν,0},{ν,1-ν,ν,0},
{ν,ν,1-ν,0},{0,0,0,1/2-ν}};
(* If [type=="Trig3", esig=Trig3IsoPRingStresses[ncoor,
Emat,Kfac,{numer},ue] ];*)
If [type=="Quad4", esig=Quad4IsoPRingStresses[ncoor,
Emat,Kfac,{numer,"G"},ue] ];
(* If [type=="Trig6", esig=Trig6IsoPRingStresses[ncoor,
Emat,Kfac,{numer,"G"},ue] ];
If [type=="Quad9", esig=Quad9IsoPRingStresses[ncoor,
Emat,Kfac,{numer,"G"},ue] ];
If [type=="Trig10",esig=Trig10IsoPRingStresses[ncoor,
Emat,Kfac,{numer,"G"},ue] ]; *)
esig=Chop[esig]; sige[[ne]]=esig;
For [i=1,i<=n,i++,k=eNL[[i]]; ncount[[k]]++;
Do[ sig[[k,j]]+=esig[[i,j]],{j,4}] ];
];
For [n=1,n<=numnod,n++,k=ncount[[n]];If [k>1,sig[[n]]/=k]
];
Return[sig];
];
Print["Computed displacements:"];
PrintRingNodeDisplacements[NodeDisplacements];
Print["Node forces including reactions:"];
PrintRingNodeForces[NodeForces];
Print["Averaged nodal stresses:"];
PrintRingNodeStresses[NodeStresses];
12–13
Chapter 12: A COMPLETE AXISYMMETRIC FEM PROGRAM 12–14
2b
z
2a
TUBE CROSS
SECTION
p
z
internal pressure p
"SALAMI SLICE"
2 4 6 8 10
h (1) (2) (3) (4) r
r-forces on nodes 1 3 5 7 9
1 and 2 are Kfac pah/2 r=a
r=b
a 2 (1 + ν)(b2 + r 2 (1 − 2ν))
ur = p . (12.10)
(b2 − a 2 )Er
2 Taken from S. Timoshenko and J. N. Goodier, Theory of Elasticity, McGraw-Hill, 2nd ed., 1951, Chapter 4. The solution
is for a condition of plane strain.
12–14
12–15 §12.5 EXAMPLE 1: INTERNALLY PRESSURIZE THICK TUBE
ClearAll[Em,ν,a,b,h,p,Kfac,Ner,Nez];
Em=1000.; ν=0; Ner=4; Nez=1;
Kfac=1; a=4; b=10; h=1; p=10.0; aspect=h/(b-a);
(* Define FEM model *)
MeshCorners=N[{{a,0},{b,0},{b,h},{a,h}}];
NodeCoordinates=GenerateRingNodeCoordinates[MeshCorners,Ner,Nez];
ElemNodeLists= GenerateQuad4NodeNumbers[Ner,Nez];
numnod=Length[NodeCoordinates]; numele=Length[ElemNodeLists];
ElemTypes=Table[{"Quad4"},{numele}];
ElemMaterial= Table[{Em,ν},{numele}];
ElemFabrication= {}; ElemBodyForces= {};
FreedomValues= Table[{0,0},{numnod}];
FreedomValues[[1]]=FreedomValues[[2]]={Kfac*p*a*h/2,0};
FreedomTags=Table[{0,1},{numnod}];
ElemOptions={True,2,Kfac};
Plot2DElementsAndNodes[NodeCoordinates,ElemNodeLists,aspect,
"Thick ring mesh",True,True];
(* Solve problem and print results *)
{NodeDisplacements,NodeForces,NodeStresses}=RingSolution[
NodeCoordinates,ElemTypes,ElemNodeLists,
ElemMaterial,ElemFabrication,ElemBodyForces,
ElemOptions,FreedomTags,FreedomValues];
Print["Computed displacements:"];
PrintRingNodeDisplacements[NodeDisplacements];
Print["Node forces including reactions:"];
PrintRingNodeForces[NodeForces];
Print["Averaged nodal stresses:"];
PrintRingNodeStresses[NodeStresses];
Figure 12.11. Thick tube under internal pressure: script for running the FEM analysis.
1 2 3 4
1 3 5 7 9
Figure 12.12. Thick tube under internal pressure: computed displacements and stress results.
The numerical results that follow were computed for a = 4, b = 10, h = 2, p = 10, E = 1000
and ν = 0. Figure 12.11 shows the script for running the FEM analysis with 4 and 1 elements
in the radial and longitudinal directions, respectively. Figure 12.12 show the script for graphical
comparison of the FEM results and the exact analytical solution.
The displacements and stress results of the analysis are shown in Figure 12.13. The comparison
with the exact solution is shown in the plots of figure 12.14. It is seen there that the compted
displacements and the hoop stress are satisfactory captured with this extremely coarse mesh. The
12–15
Chapter 12: A COMPLETE AXISYMMETRIC FEM PROGRAM 12–16
urexact[r_]:=p*a^2*(1+ν)*(b^2+r^2*(1-2*ν))/((b^2-a^2)*Em*r);
sigrrexact[r_]:=p*a^2/(b^2-a^2)*(1-b^2/r^2);
sigθθ exact[r_]:=p*a^2/(b^2-a^2)*(1+b^2/r^2);
urlist=Table[{NodeCoordinates[[2*n-1,1]],
NodeDisplacements[[2*n-1,1]]},{n,Ner+1}];
pFEM=ListPlot[urlist,PlotJoined->True,DisplayFunction->Identity];
pexact=Plot[urexact[r],{r,a,b},DisplayFunction->Identity];
Show[Graphics[AbsoluteThickness[2]],pexact,Graphics[RGBColor[1,0,0]],
pFEM,DisplayFunction->$DisplayFunction,
TextStyle->{FontFamily->"Times",FontSize->12},
GridLines->Automatic,Axes->True,PlotRange->All,
PlotLabel->"Radial displacements (black=exact,red=FEM)"];
sigrrlist=Table[{NodeCoordinates[[2*n-1,1]],
NodeStresses[[2*n-1,1]]},{n,Ner+1}];
pFEM=ListPlot[sigrrlist,PlotJoined->True,DisplayFunction->Identity];
pexact=Plot[sigrrexact[r],{r,a,b},DisplayFunction->Identity];
Show[Graphics[AbsoluteThickness[2]],pexact,Graphics[RGBColor[1,0,0]],
pFEM,DisplayFunction->$DisplayFunction,
TextStyle->{FontFamily->"Times",FontSize->12},
GridLines->Automatic,Axes->True,PlotRange->All,
PlotLabel->"Radial stress sigrr (black=exact,red=FEM)"];
sigθθ list=Table[{NodeCoordinates[[2*n-1,1]],
NodeStresses[[2*n-1,3]]},{n,Ner+1}];
pFEM=ListPlot[sigθθ list,PlotJoined->True,DisplayFunction->Identity];
pexact=Plot[sigθθ exact[r],{r,a,b},DisplayFunction->Identity];
Show[Graphics[AbsoluteThickness[2]],pexact,Graphics[RGBColor[1,0,0]],
pFEM,DisplayFunction->$DisplayFunction,
TextStyle->{FontFamily->"Times",FontSize->12},
GridLines->Automatic,Axes->True,PlotRange->All,
PlotLabel->"Hoop stress sigθθ (black=exact,red=FEM)"];
Figure 12.12. Thick tube under internal pressure: script for comparing FEM and exact solution.
0.045 -6 8
0.0425
-8 6
5 6 7 8 9 10
0.0375 -10
5 6 7 8 9 10
Figure 12.14. Thick tube under internal pressure: comparison of FEM with exact solution.
radial stress is correctly matched inside the tube, but the value on the hole edge, which should be
σrr = − p, is not well predicted. To get this stress within engineering accuracy, 16 elements are
required.
If Poisson’s ratio is increased, the FEM results gradually lose accuracy if the number of elements
is kept the same. As ν approaches 12 , (for example, ν = 0.49) the deterioration in stress predictions
accelerates, and absurd results are predicted on the edges. A finer mesh cures the problem inside
the tube but significant loss of accuracy still occurs at r = a.
12–16
12–17 §12.6 EXAMPLE 2: ROTATING THIN DISK
2b
2a
z
DISK CROSS
SECTION
ω
FEM DISCRETIZATION
2 4 6 8 10
h (1) (2) (3) (4) r
1 3 5 7 9
r=a
r=b
3 Taken from S. Timoshenko, Theory of Elasticity. MacGraw-Hill, 4th ed., Chapter 2 19??. The solution is for a condition
of plane stress.
12–17
Chapter 12: A COMPLETE AXISYMMETRIC FEM PROGRAM 12–18
ClearAll[Em,ν,a,b,h,Kfac,ρ,ω,Ner,Nez];
Em=1000.; ν=1/3; Ner=4; Nez=1;
Kfac=1; a=4; b=10; h=1; aspect=h/(b-a); ρ=3.0; ω=0.5;
(* Define FEM model *)
MeshCorners=N[{{a,0},{b,0},{b,h},{a,h}}];
NodeCoordinates=GenerateRingNodeCoordinates[MeshCorners,Ner,Nez];
ElemNodeLists= GenerateQuad4NodeNumbers[Ner,Nez];
numnod=Length[NodeCoordinates]; numele=Length[ElemNodeLists];
ElemTypes=Table[{"Quad4"},{numele}];
ElemMaterial= Table[{Em,ν},{numele}];
ElemFabrication= {};
FreedomTags= Table[{0,0},{numnod}]; FreedomTags[[1]]={0,1};
FreedomValues= Table[{0,0},{numnod}];
ElemBodyForces= Table[{0,0},{numele}];
For [ne=1,ne<=numele,ne++, eNL=ElemNodeLists[[ne]];
ncoor=Table[NodeCoordinates[[eNL[[i]]]],{i,4}];
{{r1,z1},{r2,z2},{r3,z3},{r4,z4}}=ncoor;
ElemBodyForces[[ne]]=ρ*ω^2*{{r1,0},{r2,0},{r3,0},{r4,0}} ];
ElemOptions={True,2,Kfac};
Plot2DElementsAndNodes[NodeCoordinates,ElemNodeLists,aspect,
"Rotating disk mesh",True,True];
(* Solve problem and display results *)
{NodeDisplacements,NodeForces,NodeStresses}=RingSolution[
NodeCoordinates,ElemTypes,ElemNodeLists,
ElemMaterial,ElemFabrication,ElemBodyForces,
ElemOptions,FreedomTags,FreedomValues];
Print["Computed displacements:"];
PrintRingNodeDisplacements[NodeDisplacements];
Print["Node forces including reactions:"];
PrintRingNodeForces[NodeForces];
Print["Averaged nodal stresses:"];
PrintRingNodeStresses[NodeStresses];
Figure 12.16. Rotating thin disk: script for running the FEM analysis.
The numerical results that follow were computed for a = 4, b = 10, h = 1, E = 1000, ν = 1/3,
ρ = 3 and ω = 0.5,
12–18
12–19 §12.6 EXAMPLE 2: ROTATING THIN DISK
urexact[r_]:=((a^2*(3+ν)*(-(r^2*(-1+ν))+b^2*(1+ν))- r^2*(-1+ν)*
(-(r^2*(1+ν))+b^2*(3+ν)))*ρ*ω^2)/(8*Em*r);
sigrrexact[r_]:=ρ*ω^2*(3+ν)/8*(b^2+a^2-a^2*b^2/r^2-r^2);
sigθθ exact[r_]:=ρ*ω^2*(3+ν)/8*(b^2+a^2+a^2*b^2/r^2-(1+3*ν)*r^2/(3+ν));
urlist=Table[{NodeCoordinates[[2*n-1,1]],
NodeDisplacements[[2*n-1,1]]},{n,Ner+1}];
pFEM=ListPlot[urlist,PlotJoined->True,DisplayFunction->Identity];
pexact=Plot[urexact[r],{r,a,b},DisplayFunction->Identity];
Show[Graphics[AbsoluteThickness[2]],pexact,Graphics[RGBColor[1,0,0]],
pFEM,DisplayFunction->$DisplayFunction,
TextStyle->{FontFamily->"Times",FontSize->12},
GridLines->Automatic,Axes->True,PlotRange->All,
PlotLabel->"Radial displacements (black=exact,red=FEM)"];
sigrrlist=Table[{NodeCoordinates[[2*n-1,1]],
NodeStresses[[2*n-1,1]]},{n,Ner+1}];
pFEM=ListPlot[sigrrlist,PlotJoined->True,DisplayFunction->Identity];
pexact=Plot[sigrrexact[r],{r,a,b},DisplayFunction->Identity];
Show[Graphics[AbsoluteThickness[2]],pexact,Graphics[RGBColor[1,0,0]],
pFEM,DisplayFunction->$DisplayFunction,
TextStyle->{FontFamily->"Times",FontSize->12},
GridLines->Automatic,Axes->True,PlotRange->All,
PlotLabel->"Radial stress sigrr (black=exact,red=FEM)"];
sigθθ list=Table[{NodeCoordinates[[2*n-1,1]],
NodeStresses[[2*n-1,3]]},{n,Ner+1}];
pFEM=ListPlot[sigθθ list,PlotJoined->True,DisplayFunction->Identity];
pexact=Plot[sigθθ exact[r],{r,a,b},DisplayFunction->Identity];
Show[Graphics[AbsoluteThickness[2]],pexact,Graphics[RGBColor[1,0,0]],
pFEM,DisplayFunction->$DisplayFunction,
TextStyle->{FontFamily->"Times",FontSize->12},
GridLines->Automatic,Axes->True,PlotRange->All,
PlotLabel->"Hoop stress sigθθ (black=exact,red=FEM)"];
Figure 12.18. Rotating thin disk: script for comparing FEM results with the analytical solution.
Radial displacements Hblack=exact,red=FEML Radial stress sigrr Hblack=exact,red=FEML Hoop stress sigqqHblack=exact,red=FEML
12
0.255
0.25 10 60
0.245 8
50
0.24 6
0.235 4 40
2
5 6 7 8 9 10
0.225
5 6 7 8 9 10
5 6 7 8 9 10
Figure 12.18. Rotating thin disk: comparison of FEM results with exact solution for u r , σrr and σθθ .
Figure 12.16 shows the script for running the FEM analysis with 4 and 1 elements in the radial and
longitudinal directions, respectively. The displacements and stress printed results of the are shown
in Figure 12.17.
Figure 12.18 show the script for graphical comparison of the FEM results and the exact analytical
solution. The comparisons with u r , σrr and σθ θ are shown in the plots of figure 12.19. It is seen there
that the radial displacement and hoop stress variations are satisfactory captured with this extremely
coarse mesh. The radial stress is poorly predicted, specially at the hole edge, which should be
σrr = 0, To get this stress within engineering accuracy, at least 16 elements are required.
12–19
Chapter 12: A COMPLETE AXISYMMETRIC FEM PROGRAM 12–20
2R
z
Plan View
z
Simple Support
;;
1 3 5 7 9 11 13 15
r=R
From Figure 12.17 it can be observed that the model gives nonzero σzz and τr z stresses, which
should be zero in a plane stress model. If ν = 0 the values are much closer to zero.
As in the previous benchmark, as ν approaches 12 , (for example, ν = 0.49) the deterioration in
stress predictions accelerates, and absurd results are predicted. A finer mesh cures the problem
inside the disk but significant loss of accuracy still occurs at the disk free edges.
4 Taken from S. Timoshenko and S. Woinowsky-Krieger, Theory of Plates and Shells, McGraw-Hill, 2nd ed., 1959,
Chapter 2.
12–20
12–21 §12.7 EXAMPLE 3: CENTRALLY LOADED SS CIRCULAR PLATE
ClearAll[Em,ν,R,h,p,Kfac,Ner,Nez,r,z];
Em=1000.; ν=0; Ner=8; Nez=1;
Kfac=2*Pi; R=10; h=1; aspect=h/R; P=10;
(* Define FEM model *)
MeshCorners=N[{{0,-h/2},{R,-h/2},{R,h/2},{0,h/2}}];
NodeCoordinates=GenerateRingNodeCoordinates[MeshCorners,Ner,Nez];
ElemNodeLists= GenerateQuad4NodeNumbers[Ner,Nez];
numnod=Length[NodeCoordinates]; numele=Length[ElemNodeLists];
ElemTypes=Table[{"Quad4"},{numele}];
ElemMaterial= Table[{Em,ν},{numele}];
ElemFabrication= {}; ElemBodyForces= {};
FreedomTags= Table[{0,0},{numnod}];
FreedomTags[[1]]=FreedomTags[[2]]={1,0};
FreedomTags[[numnod-1]]={0,1};
FreedomValues= Table[{0,0},{numnod}];
FreedomValues[[2]]={0,N[-P*Kfac/(2*Pi)]};
ElemOptions={True,2,Kfac};
Plot2DElementsAndNodes[NodeCoordinates,ElemNodeLists,aspect,
"Thin SS circular plate",True,True];
(* Solve problem and display results *)
{NodeDisplacements,NodeForces,NodeStresses}=RingSolution[
NodeCoordinates,ElemTypes,ElemNodeLists,
ElemMaterial,ElemFabrication,ElemBodyForces,
ElemOptions,FreedomTags,FreedomValues];
Print["Computed displacements:"];
PrintRingNodeDisplacements[NodeDisplacements];
Print["Node forces including reactions:"];
PrintRingNodeForces[NodeForces];
Print["Averaged nodal stresses:"];
PrintRingNodeStresses[NodeStresses];
Figure 12.21. Centrally loaded SS circular plate: script for running the FEM analysis.
The stresses at the upper and lower surfaces are σrr = ±12Mrr (h/2)/ h 3 = ±6Mrr / h 2 and
σθθ = ±12Mθ θ (h/2)/ h 3 = ±6Mθ θ / h 2 The transverse displacement is
P 3+ν 2 r
uz = − (a − r ) + 2r log
2 2
. (12.14)
16π D 1 + ν R
12–21
Chapter 12: A COMPLETE AXISYMMETRIC FEM PROGRAM 12–22
12–22
12–23 §12.7 EXAMPLE 3: CENTRALLY LOADED SS CIRCULAR PLATE
Dp=Em*h^3/(12*(1-ν^2)); eps=0.01;
uzexact[r_]:=-P/(16*Pi*Dp)*((3+ν)/(1+ν)*(R^2-r^2)+2*r^2*Log[r/R]);
Print["exact center deflection: ", -P*R^2/(16*Pi*Dp)*(3+ν)/(1+ν)];
Mrrexact[r_]:=P/(4*Pi)*(1+ν)*Log[R/r];
Mθθ exact[r_]:=P/(4*Pi)*((1+ν)*Log[R/r]+1-ν);
sigrrexact[r_,z_]:=-12*Mrrexact[r]*z/h^3;
sigθθ exact[r_,z_]:=-12*Mθθ exact[r]*z/h^3;
uzlist=Table[{NodeCoordinates[[2*n-1,1]],
NodeDisplacements[[2*n-1,2]]},{n,Ner+1}];
pFEM=ListPlot[uzlist,PlotJoined->True,DisplayFunction->Identity];
pexact=Plot[uzexact[r],{r,eps*R,R},DisplayFunction->Identity];
Show[Graphics[AbsoluteThickness[2]],pexact,Graphics[RGBColor[1,0,0]],
pFEM,DisplayFunction->$DisplayFunction,
TextStyle->{FontFamily->"Times",FontSize->12},
GridLines->Automatic,Axes->True,PlotRange->All,
PlotLabel->"Transverse (z) displacements (black=exact,red=FEM)"];
sigrrlist=Table[{NodeCoordinates[[2*n-1,1]],
NodeStresses[[2*n-1,1]]},{n,Ner+1}];
pFEM=ListPlot[sigrrlist,PlotJoined->True,DisplayFunction->Identity];
pexact=Plot[sigrrexact[r,-h/2],{r,eps*R,R},DisplayFunction->Identity];
Show[Graphics[AbsoluteThickness[2]],pexact,Graphics[RGBColor[1,0,0]],
pFEM,DisplayFunction->$DisplayFunction,
TextStyle->{FontFamily->"Times",FontSize->12},
GridLines->Automatic,Axes->True,PlotRange->All,
PlotLabel->"Radial stress sigrr (black=exact,red=FEM)"];
sigθθ list=Table[{NodeCoordinates[[2*n-1,1]],
NodeStresses[[2*n-1,3]]},{n,Ner+1}];
pFEM=ListPlot[sigθθ list,PlotJoined->True,DisplayFunction->Identity];
pexact=Plot[sigθθ exact[r,-h/2],{r,eps*R,R},DisplayFunction->Identity];
Show[Graphics[AbsoluteThickness[2]],pexact,Graphics[RGBColor[1,0,0]],
pFEM,DisplayFunction->$DisplayFunction,
TextStyle->{FontFamily->"Times",FontSize->12},
GridLines->Automatic,Axes->True,PlotRange->All,
PlotLabel->"Hoop stress sigθθ (black=exact,red=FEM)"];
Figure 12.23. Centrally loaded SS circular plate: script for comparing FEM results with the analytical solution.
Transverse HzLdisplacements Hblack=exact,red=FEM) Radial stress sigrr Hblack=exact,red=FEML Hoop stress sigqqHblack=exact,red=FEML
2 4 6 8 10 20 25
-0.1
-0.2 20
15
-0.3
-0.4 10 15
-0.5
-0.6 5 10
-0.7
2 4 6 8 10
2 4 6 8 10
Figure 12.24. Centrally loaded SS circular plate: comparison of FEM results with exact solution for u r , σrr and σθθ .
12–23
Chapter 12: A COMPLETE AXISYMMETRIC FEM PROGRAM 12–24
EXERCISE 12.1
[C:15] This exercise deals with the thick-tube benchmark example discussed in §12.5. The script for this
exercise is in Cells 15A and 15B of the Notebook Quad4.SOR.nb supplied with this Chapter. The cells should
be run sequentially.
(a) Repeat the 4-element analysis using ν = 0.45 and ν = 0.499. Describe what happens to the accuracy of
displacements and stresses when compared with the exact solution.
(b) Can a more refined mesh fix the problems noted in (a)? To check, run 16 elements along the radial
direction and report if things have improved.
EXERCISE 12.2
[C:20] A concrete pile embedded in a soil half-space, as defined in Figure E12.1. This problem is solved using a
very coarse mesh in Cell 18 of the Notebook Quad4.SOR.nb supplied with this Chapter. Repeat the analysis us-
ing a more refined mesh, like that suggested in the figure. Module GenerateGradedRingNodeCoordinates
may be used to generate a graded regular mesh.
The total force applied to pile is P = 500000 lbs (this may be assumed to be uniformly distributed on the
top pile surface, or placed as a point load). Other data: pile modulus E P = 300, 000 psi, soil modulus
E S = E P /50, Poisson’s ratio for pile ν P = 0.1, Poisson’s ratio for soil ν S = 0.40, pile diameter d = 10 in,
pile length L = 250 in, and mesh z-length H = 1.2L. Truncate the mesh at R = 80 in. Neglect all body
forces.
Nodes on the “soil truncation boundary” should be fixed. Points on the z axis r = 0 should be on vertical
rollers except for 1.
The most interesting numerical results are: (i) the top and bottom vertical displacement of the pile, (ii) the
reaction forces at the bottom of the pile, and (iii) the normal stress σzz in the pile.
EXERCISE 12.3
[C:20] The spinning Mother Earth. Model one quadrant of the planet cross section with an axisymmetric finite
element mesh as sketched in Figure E19.3 (note that all elements are 4-node quadrilaterals). The problem is
solved in Cell 19 of the Notebook Quad4.SOR.nb supplied with this Chapter, using a very coarse mesh of
only 4 elements.
Use the Kg-force/m/sec unit system for this problem. The Earth spins with angular velocity ω = 2π rad/24hrs
= (2π/86400) sec−1 about the z axis. The planet radius is R = 6370 Km = 6.37 106 m. For E take 1/3 of the
rigidity of steel, or E = 7 105 Kg/cm2 = 7 109 Kg/m2 as Love (Theory of Elasticity) recommends; Poisson’s
ratio ν = 0.3 (this is my own guess), and mass density ρ = 5.52 times the water density. [Watch out for units:
the centrifugal body force ρω2 r should come up in Kg/m3 .] All gravitational field effects (self weight) are
ignored.
(a) Get the equatorial “bulge” and the polar “flatening” in Km, and the maximum stress in MPa.
(b) Where do the maximum stresses occur?
12–24
12–25 Exercises
;
z
R
d/2
; ;
(b) 9 18 27 36 45 r
z
(a)
;; ;
CONCRETE
P 8 44
PILE
r
;
7 43
; ;
L
L H 6 42
SOIL
;
5 41
AXISYMMETRIC
FEM MODEL
d 4 40
3 39
2 38
1 10 19 28 37
12–25