The Problem.
This case study solves a linear structural analysis problem for a
3-D object tracted by nodal loads. The components of the solution
U = (U1,U2,U3) are the
displacements in the x-, y-, and z-directions.
This example was provided with VECFEM version 1.2 and we use it here
with permission. For a
theoretical discussion of the VECFEM implementation of linear structural analaysis,
click here.
Use PDELab to ...
Why use PDELab?
The original VECFEM Package (version 1.2) requires users to write fortran functions to
define the system of PDEs using the variational form.
Users must also write a main driver program which allocates the necessary memory and
calls the appropriate solver routines.
PDELab simplifies the process of specifying a problem to VECFEM by providing
Step 1:When PDELab top level window appears,
select 3-D and
FEM
and click on
New File.
The PDELab 3-D Finite Element Method Session appears.
The Session toolkit is to the right of the Session window.
Step 2: Click on the Framework Editor in the Session toolkit.
Step 3: Choose VECFEM from the Framework menu and
Stress Template from the Equation Form menu.
The Framework Editor allows users to select the framework and form of the
equation for defining the problem.
In this case, selecting the VECFEM stress template tells the symbolic processor that a
linear structural analysis problem will be solved, and the user should provide only the
values for elasticity and Poisson's number which describe the material. The framework
selection also determines the code that will be generated automatically by GenCray to
define the problem for the PDELab-VECFEM interface.
Click on PDE System and
enter the two parameter values in the PDE System editor as shown here. Click on
Done when finished.
Step 4: The template values have been specified, so click on Generate Framework. The Maxima symbolic processor is accessed to check for errors, and the GenCray code generator generates the appropriate PDELab problem specification. Any input errors are printed out in the Maxima window of the Framework Editor.
Step 5: When the input has been successfully processed, select Quit from the File menu. The PDELab language program appears in the Session window. The generated program is shown below. The boundary segment lists an external specification for the domain definition. The PDELab triple lists the vecfem solver with default parameters.
PDELab language `.e' file
OPTIONS.
vecfem
space dimension of system = 3
pdes in system = 3
number of right-hand-sides = 1
EQUATION.
vecfem
BOUNDARY.
external
TRIPLE.
vecfem &
(displacement = .true., nodalforce = .true., &
dirichlet = .true., outflag = .true., order=3, &
method=123, precond=1, symflag = .true., &
optflag=.true., tol = 1.D-7, &
pellpackoutflag=.true., pellpackoutfile='stress.out')
SUBPROGRAM.
real function vfl3d (t, group, comp1, comp2, x1, x2, x, y, z,
. l, lt, ele, nk, dim, u, dudx, ut, dutdx)
integer group, comp1, comp2, x1, x2, l, lt, ele, nk, dim
real t, x, y, z, u(l,nk), dudx(l, nk, dim), ut(lt, nk),
. dutdx(lt, nk, dim)
real data(9,9)
real E, NY
E = 1.93d4
NY = 0.3
c11=E*(1.-NY)/(1+NY)/(1-2*NY)
c22=E*(1.-NY)/(1+NY)/(1-2*NY)
c33=E*(1.-NY)/(1+NY)/(1-2*NY)
c44=E/2./(1+NY)
c55=E/2./(1+NY)
c66=E/2./(1+NY)
c12=E*NY/(1+NY)/(1-2*NY)
c13=E*NY/(1+NY)/(1-2*NY)
c23=E*NY/(1+NY)/(1-2*NY)
c initialize the 9x9 matrix
do 10 i1 = 1, 9
do 20 i2 = 1, 9
data(i1,i2) = 0.0
20 continue
10 continue
data(1,1) = c11
data(1,5) = c12
data(1,9) = c13
data(2,2) = c66
data(2,4) = c66
data(3,3) = c55
data(3,7) = c55
data(4,2) = c66
data(4,4) = c66
data(5,1) = c12
data(5,5) = c22
data(5,9) = c23
data(6,6) = c44
data(6,8) = c44
data(7,3) = c55
data(7,7) = c55
data(8,8) = c44
data(9,1) = c13
data(9,5) = c23
data(9,9) = c33
if ((x1 .eq. 0) .or. (x2 .eq. 0)) then
vfl3d = 0.0
else
vfl3d = data ((comp1-1)*3+x1, (comp2-1)*3+x2)
endif
return
end
END.
Step 6:
We will input the neutral format mesh file generated by the external mesh generator (PATRAN).
Click on the MeshGenerator and identify the
mesh to use for the problem.
Step 7: Click on Save and
the following information is placed in the PDELab session:
mesh.
read neutral from file &
(filename='elbow.ntl', &
i1ndim=3, i3nint=5, i3ntyp=2, &
i1mnpt=352, i1melm=1134, &
edge=2.365844, npatches=2)
You can now close the Mesh Generator by clicking on Quit.
Note that PDELab provides other 3D mesh generators, such as GEOMPACK and QMG, which
generate meshes with tetrahedral and other element types. These mesh generators require
a poly-file description of the surface of the object. Surface patches can also
be established during the domain building process which will be maintained during
mesh generation. The boundary conditions are then applied to the surface patches or to
specific surface nodal points identified by the user. PDELab's 3D Boundary Conditions Tool
supportes the application of boundary conditions to a 3D mesh stored in neutral format or
PDELab format.
Step 8: You can save the PDELab language program to a `.e' file by
clicking on the SaveAs button in the Session toolkit.
A Filename dialog requests a name for your .e file.
A portion of the completed '.e' file
in the PDELab Session is shown here, with the 3D FEM toolkit to the right of the
Session window.
Step 9: We are now ready to enter the ExecuteTool environment, where the
PDELab language program will be processed. A fortran main program will be generated
from the .e file. It will be compiled and linked with the PDELab module libraries and
the standard PDELab I/O libraries. Click on the
ExecuteTool button in the Session toolkit.
Step 10: The PDELab .e file is loaded
automatically.
Click on the Run button
The trace of the process for compiling and linking the PDELab executable appears
in the trace window. When the compiling and
linking process is complete, the executable program is run and the solution and
trance files are generated and placed in your user directory.
Click on Quit to exit the ExecuteTool.
Step 11:
The solution output has been generated during execution.
You should find the output file containing the PDELab format data in the
location specified by the save segment. If no path was specified,
this file is located in the execution directory.
The file contains the solutions U1,
U2, and
U3.
Click on the OutputTool in the Session toolkit.
Select PDELab Solution in the File menu. Select
the output file that was generated by your program when the OutputTool requests the file name.
The Select Solution Box is displayed after the two files are loaded.
The selection box contains the solutions U1,U2 and U3.
|
  Deformation of the body ![]() |
X Displacement![]() |
|
  Y Displacement ![]() |
  Z Displacement /TD>
|