Acefem
Acefem
Acefem
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
AceFEM<br />
MATHEMATICA FINITE ELEMENT<br />
ENVIRONMENT<br />
J. Korelc<br />
UNIVERSITY OF LJUBLJANA<br />
FACULTY OF CIVIL AND GEODETIC ENGINEERING<br />
2007
2 AceFEM Finite Element Environment<br />
AceFEM Contents<br />
AceFEM Contents .................................................................................................................2<br />
Introduction .............................................................................................................................5<br />
AceFEM Preface ............................................................................................................5<br />
• Acknowledgement<br />
Finite Element Environments ................................................................................6<br />
AceFEM Structure ........................................................................................................7<br />
Standard AceFEM Procedure ..................................................................................9<br />
Bibliography ...................................................................................................................13<br />
Code Verification Methods & Debugging ...................................................................14<br />
Solution Convergence Test .....................................................................................14<br />
Comparison With an Alternative Method ...........................................................19<br />
Interactive Debugging ................................................................................................19<br />
Code Profiling ................................................................................................................24<br />
Round-off Error Test ...................................................................................................26<br />
Reference Guide ....................................................................................................................30<br />
Input Data ........................................................................................................................30<br />
SMTInputData ...........30<br />
Input Data ......32<br />
SMTMesh - structured mesh generation ........36<br />
SMTImportMesh .......42<br />
Selecting Nodes .........43<br />
Selecting Elements ....44<br />
Analysis ............................................................................................................................45<br />
Iterative solution procedure ...45<br />
SMTAnalysis .47<br />
SMTNewtonIteration .48<br />
SMTNextStep 49<br />
SMTStepBack ...........49<br />
SMTConvergence ......50<br />
SMTDump (CDriver specific) ...........51<br />
SMTRestart (CDriver specific) .........54<br />
SMTSensitivity ..........54<br />
SMTStatusReport ......54<br />
SMTSessionTime ......54<br />
SMTErrorCheck ........55<br />
SMTSimulationReport ...........55<br />
Postprocessing .............................................................................................................57<br />
SMTShowMesh .........57<br />
SMTResidual .60<br />
SMTPost ........61<br />
SMTPointValues .......61
AceFEM Finite Element Environment 3<br />
SMTPut (CDriver specific) ...62<br />
SMTGet (CDriver specific) ...65<br />
SMTSave (CDriver specific) .65<br />
SMTMakeAnimation .65<br />
Data Base Manipulations ..........................................................................................66<br />
SMTIData and SMTRData ....66<br />
SMTNodeData ...........66<br />
SMTNodeSpecData ...67<br />
SMTElementData ......67<br />
SMTDomainData ......68<br />
SMTData .......69<br />
SMTFindNodes .........70<br />
SMTFindElements .....70<br />
SMTSetSolver (contributed by Tomaž Šuštar) ..........70<br />
Intel MKL Solver - PARDISO .........71<br />
• ipar1 - Type of matrix • ipar2 - preconditioned CGS • ipar3 -Max number of iterative refinment steps •<br />
ipar4 -Small pivot treshold • ipar5 - Scaling vectors • Examples • References<br />
Input Data Structures .................................................................................................74<br />
Mesh Input Data Structures ...74<br />
Sensitivity Input Data Structures .......77<br />
Utilities ..............................................................................................................................78<br />
SMTScanedDiagramToTable 78<br />
SMTMakeDll 78<br />
Shared Finite Element Libraries .....................................................................................79<br />
AceShare ..........................................................................................................................79<br />
Accessing elements from shared libraries .......................................................79<br />
Unified Element Code .................................................................................................81<br />
Users library ...................................................................................................................82<br />
Simple AceShare library ........82<br />
SMTSetLibrary ..........84<br />
SMTAddToLibrary ...84<br />
SMTLibraryContents .85<br />
Advanced AceShare library ...85<br />
Troubleshooting and New in version ...........................................................................89<br />
AceFEM Troubleshooting .........................................................................................89<br />
New in version ...............................................................................................................89<br />
Examples and Exercises ....................................................................................................89<br />
About AceFEM Examples .........................................................................................89<br />
Problem 1: General Formulation of Transient Coupled Non-linear Systems<br />
...............................................................................................................................................90<br />
Problem 2: Solid, Finite Strain Element for Direct and Sensitivity Analysis<br />
...............................................................................................................................................93<br />
Problem 3: Surface Traction Element for Direct and Sensitivity Analysis<br />
...............................................................................................................................................96<br />
Problem 4: Parameter, Shape and Load Sensitivity Analysis of Multi-Domain Example<br />
...............................................................................................................................................98<br />
Problem 5: Inflating the Tyre ...................................................................................100<br />
Problem 6: Three Dimensional, Elasto-Plastic Element ..............................104
4 AceFEM Finite Element Environment<br />
Problem 7: Axisymmetric, finite strain elasto-plastic element .................111<br />
Problem 8: Cyclic tension test, advanced post-processing , animations<br />
...............................................................................................................................................115<br />
Problem 9: Solid, Finite Strain Element for Dynamic Analysis ................124<br />
Contact problems ..................................................................................................................126<br />
Contributed by Jakub Lengiewicz ........................................................................126<br />
Implementation Notes for Contact Elements ...................................................127<br />
Problem 1: 2D slave node -> line master segment element .....................132<br />
Problem 2: 2D indentation problem .....................................................................134<br />
Problem 3: 2D slave node -> smooth master segment element .............136<br />
Problem 4: 2D snooker simulation .......................................................................140<br />
Problem 5: 3D slave node -> triangle master segment element .............143<br />
Problem 6: 3D slave node -> quadrilateral master segment element ..146<br />
Problem 7: 3D slave node -> quadrilateral master segment + 2 neighboring nodes<br />
element .............................................................................................................................147<br />
Problem 8: 3D slave triangle + 2 neighboring nodes -> triangle master segment<br />
element .............................................................................................................................149<br />
Problem 9: 3D slave triangle -> triangle master segment+ 2 neighboring nodes<br />
element .............................................................................................................................151<br />
Problem 10: 3D contact analysis ...........................................................................154
AceFEM Finite Element Environment 5<br />
Introduction<br />
AceFEM Preface<br />
AceFEM 1.1<br />
‘ Prof. Dr. Jo z Ó e Korelc 2006, 2007<br />
Ravnikova 4, SI - 1000, Ljubljana, Slovenia<br />
E|mail : AceProducts üfgg.uni - lj.si<br />
www.fgg.uni - lj.si ê Symech ê<br />
The AceFEM package is a general finite element environment designed to solve<br />
multi-physics and multi-field problems. The AceFEM package explores advantages<br />
of symbolic capabilities of Mathematica while maintaining numerical efficiency of<br />
commercial finite element environments. The main part of the package includes<br />
procedures that are not numerically intensive, such as processing of the user input<br />
data, mesh generation, control of the solution procedures, graphic post-processing of<br />
the results, etc.. Those procedures are written in Mathematica language and executed<br />
inside Mathematica. The numerical module includes numerically intensive operations,<br />
such as evaluation and assembly of the finite element quantities (tangent<br />
matrix, residual, sensitivity vectors, etc.), solution of the linear system of equations,<br />
contact search procedures, etc.. The numerical module exists as Mathematica package<br />
as well as external program written in C language and is connected with Mathematica<br />
via the MathLink protocol. This unique capability gives the user the opportunity<br />
to solve industrial large-scale problems with several 100000 unknowns and to<br />
use advanced capabilities of Mathematica such as high precision arithmetic, interval<br />
arithmetic, or even symbolic evaluation of FE quantities to analyze various properties<br />
of the numerical procedures on relatively small examples. The AceFEM package
6 AceFEM Finite Element Environment<br />
comes with a large library of finite elements (solid, thermal, contact,... 2D, 3D,...)<br />
including full symbolic input for most of the elements. Additional elements can be<br />
accessed through the AceShare finite element file sharing system. The element oriented<br />
approach enables easy creation of costumized finite element based applications<br />
in Mathematica. In combination with the automatic code generation package Ace-<br />
Gen the AceFem package represents an ideal tool for a rapid development of new<br />
numerical models.<br />
Acknowledgement<br />
The AceFEM environment is, as it is the case with all complex environments, the<br />
result of scientific cooperation with my colleagues and former students. I would like<br />
to thank Tomaž Šuštar, Centre for Computational Continuum Mechanics d.o.o., Vandotova<br />
55, Ljubljana, Slovenia for his work on AceFEM and especially implementation<br />
of various linear solver packages. I am also indebted to my friends Stanislaw<br />
Stupkiewicz and Jakub Lengiewicz, Institute of Fundamental Technological<br />
Research, Swietokrzyska 2, Warszawa, Poland for helpful discussions and implementation<br />
of contact search routines.<br />
Finite Element Environments<br />
Commercial FE systems have incorporated ten to several hundred different element formulations. This of course can<br />
not be done manually without the use of reusable parts of the code (often element shape functions, material models, pre<br />
and post-processing procedures are written as reusable codes). The complexity of advanced numerical software arises<br />
also from other sources which include: necessity for realistic description of physical phenomena involved in industrial<br />
problems, requirements for highly efficient numerical procedures, and the complexity of the data structure. Normally<br />
the complete structure appears inside the FE environment which is typically written in FORTRAN or C language. In<br />
the last decade or so the use of object oriented (OO) approach was considered as the main method of obtaining reusable<br />
and extensible numerical software. However, despite its undoubted success in many areas, the OO approach did not<br />
gain much popularity in the field of finite element methods, and all the main FE systems (ABAQUS, ANSYS, MARC,<br />
etc.) are still written in a standard way. Also most of the research work is still based on a traditional approach. One of<br />
the reasons for this is that only the shift of complexity of data management has been performed by utilizing OO<br />
methods, while the level of abstraction of the problem description remains the same. The symbolic approach can<br />
bypass this drawback of the OO formulation since only the basic functionality is provided at the global level of the<br />
finite element environment which is manually coded, while all the codes at the local level of the finite element are<br />
automatically generated. The AceFEM package has been designed in a way that explores advantages of this new<br />
approach to the design of finite element environments.<br />
The element oriented concept is the basic concept behind the formulation of the AceFEM environment. The idea is to<br />
design a FE environment where code complexity will be shifted out of the finite element environment to a symbolic<br />
module, which will provide all the necessary formulation dependent codes by automatic code generation. The shift<br />
concerns the data structures (organization of environment, nodal and element data) as well as numerical algorithms at<br />
the local element level. The traditional definition of the finite element treats the chosen discretization of the unknown<br />
fields and a chosen variational formulation as the "definition of the finite element", while different material models<br />
then entail only different implementation of the same elements. This approach requires the creation of reusable code for<br />
material description and element description. In the present formulation an element will be identified by its discretization<br />
and material models, so no reusable code is needed at the local level. In principle each element has a separate<br />
source file with the element user subroutines. This is the way how the "element oriented" concept can be fully<br />
exploited in the case of multi-field, multi-physic, and multi-domain problems. Usually it is more convenient to have a
AceFEM Finite Element Environment 7<br />
single complex symbolic description and to generate several separate elements for various tasks, than to make a very<br />
general element which covers several tasks.<br />
AceFEM Structure<br />
General General procedures<br />
procedures<br />
- input data processing<br />
- mesh generation<br />
- solution strategies<br />
- command language<br />
- graphic post-processing<br />
MDriver<br />
MDriver<br />
- Mathematica language<br />
- data base in MMA<br />
- evaluation of element quantities<br />
- assembly of element contributions<br />
- MMA linear algebra<br />
element 1<br />
element 2 .m file<br />
.m file<br />
element element ... ...<br />
.m file<br />
AceFEM<br />
Mathematica Mathematica<br />
C C language<br />
language<br />
-data base<br />
MathLink<br />
- evaluation of element quantities<br />
- assembly of element contributions<br />
- various linear solvers<br />
AceFEM organization scheme<br />
element 1<br />
.dll file<br />
CDriver<br />
CDriver<br />
dynamic link<br />
element ...<br />
.dll file<br />
AceShare<br />
AceShare<br />
element 2<br />
.dll file<br />
- FEM file sharing system<br />
- download .dll or .m files<br />
The AceFEM package is a general finite element environment designed to solve multi-physics and multi-field problems.<br />
The AceFEM package explores advantages of symbolic capabilities of Mathematica while maintaining numerical<br />
efficiency of commercial finite element environment. Tee AceFEM package is designed to solve steady-state or transient<br />
finite element and similar type problems implicitly by means of Newton-Raphson type procedures.<br />
The main part of the package includes procedures that are not numerically intensive such as processing of the user<br />
input data, mesh generation, control of the solution procedures, graphic post-processing of the results, etc.. Those<br />
procedures are written in Mathematica language and executed inside Mathematica. The second part includes numerically<br />
intensive operations such as evaluation and assembly of the finite element quantities (tangent matrix, residual,<br />
sensitivity vectors, etc.), solution of the linear system of equations, contact search procedures, etc.. The numerical<br />
module exists in two versions.<br />
The basic version called CDriver is independent executable written in C language and is connected with Mathematica<br />
via the MathLink protocol. It is designed to solve industrial large-scale problems with several 100000 unknowns. The
8 AceFEM Finite Element Environment<br />
element subroutines are not linked directly with the CDriver but dynamically when they are needed. Consequently,<br />
there are as many dynamically linked library files (dll file) as is the number of different elements. The dll file is created<br />
automatically by the SMTMakeDll function. User can derive and use its own user defined finite elements or it can use<br />
standard elements from the extensive library of standard elements (Accessing elements from shared<br />
libraries).<br />
The alternative version called MDriver is completely written in Mathematica's symbolic language. It has advantage that<br />
we can use advanced capabilities of Mathematica, such as high precision arithmetic, interval arithmetic, or even<br />
symbolic evaluation of FE quantities to analyze various properties of the numerical procedures on relatively small<br />
examples. The MDriver has the same data structures and command language as the CDriver, but due to the limited<br />
functionality and efficiency it should be primary used in element development phase for the problems with less than<br />
100 unknowns. It also does not support advanced post processing, contact searches, etc..<br />
The AceGen package represents suitable environment for debugging and testing of a new finite element before it is<br />
included into the commercial finite element environment. For example, the following tests can be performed directly in<br />
Mathematica:<br />
fl convergence of iterative procedures,<br />
fl different forms of the patch tests,<br />
fl element distortion tests,<br />
fl tests of the element eigenvalues,<br />
fl test of objectivity.<br />
The AceFEM package has laso some basic pre-processing and post-processing functions (SMTMesh, SMTShowMesh).<br />
It can be used for the geometries that can be discretized by the structured meshes of arbitrary shape. For a more complex<br />
geometries the commercial pre/post-processor has to be used. The AceFEM has built-in interface to commercial<br />
pre/post-processor GID developed by International Center for Numerical Methods in Engineering, Edificio C1, Campus<br />
Norte UPC, Gran Capitan, 08034 Barcelona, Spain, http://www.cimne.upc.es.<br />
The AceFEM environment comes with a small build-in library including standard solid, structural, thermal and contact<br />
elements. Additional elements are accessed and automatically downloadable through the AceShare system. The<br />
AceShare system is a finite element file sharing mechanism built in AceFEM that makes AceGen generated finite<br />
element source codes available for other users to download through the Internet. The AceShere system enables:<br />
browsing the on-line FEM libraries; downloading the finite elements from the on-line libraries; formation of the user<br />
defined library that can be posted on the internet to be used by other users of the AceFEM system. The AceShare<br />
system offers for each finite element included in the on-line library: the element home page with basic descriptions,<br />
links, authors data, etc.. , the AceGen template (Mathematica input) for the symbolic description of the element, the<br />
element source codes for all supported finite element environments (FEAP, AceFEM-MDriver, Abaqus, ...), the<br />
element Dynamic Link File (dll) used by AceFEM, an additional documentation and benchmark tests. The files are<br />
stored on and served by personal computers of the users.<br />
The already available AceShare on-line libraries include AceGen templates for the symbolic description of direct and<br />
sensitivity analysis of the most finite element formulations that appear in the description of problems by finite element<br />
method (steady state, transient, coupled and coupled transient problems). This large collection of prepared Mathematica<br />
inputs for a broad range of finite elements can be easily adjusted for users specific problem. The user can use the<br />
Mathematica input file as a template for the introduction of modifications to the available formulation (e.g. modified<br />
material model) or combine several Mathematica input files into one that would create a coupled finite element (e.g. the<br />
AceGen input files for solid and thermal conduction elements can be combined into new AceGen input file that would<br />
create a finite element for thermomechanical analysis).
AceFEM Finite Element Environment 9<br />
Standard AceFEM Procedure<br />
The standard AceFEM procedure is comprised of two major phases:<br />
A) Input data phase<br />
- phase starts with SMTInputData<br />
- mesh input data (Input Data)<br />
- element description (Input Data, the actual element codes have to generated before the analysis by<br />
AceGen code generator)<br />
- sensitivity input data (Sensitivity Input Data Structures)<br />
B) Analysis phase<br />
- phase starts with SMTAnalysis<br />
- solution procedure is executed accordingly to the Mathematica input given by the user (SMTConvergence)<br />
- AceFEM is designed to solve steady-state or transient finite element and related problems implicitly by means<br />
of Newton-Raphson type procedures<br />
- post-processing of the results can be part of the analysis (SMTShowMesh) or done later independently of the<br />
analysis (SMTPut)<br />
Let us consider a simple one element example to illustrate the standard AceFEM procedure. The problem considered is<br />
steady-state heat conduction in a three-dimensional domain. The procedure to generate heat-conduction element that is<br />
used in this example is explained in AceGen manual section Standard FE Procedure. The element dll file<br />
(ExamplesHeatConduction.dll) is also included as a part of installation (in directory $BaseDirectory/Applications/Ace-<br />
FEM/Elements/), thus one does not have to create dll with AceGen in order to run the example.<br />
Here the AceFEM is used to analyze simple one element example.<br />
This loads the AceFEM package, and prepares input data structures and starts input data section<br />
10 AceFEM Finite Element Environment<br />
Here the element, the node coordinates and the boundary conditions of the problem depicted below (see Mesh Input Data )<br />
1<br />
5<br />
φ 1 =0.1<br />
8<br />
4<br />
6<br />
φ 4 =1.1<br />
2<br />
3<br />
φ 2 =0.2<br />
7<br />
q 7 =5.5<br />
φ 3 =0.3<br />
SMTAddElement@"A", 88−0.5, 0, −0.5
AceFEM Finite Element Environment 11<br />
During the analysis we have all the time full access to all environment, nodal and element data. They can be accessed and changed<br />
with the data manipulation commands (see Data Base Manipulations). This gives to AceFEM flexibility that is not shared<br />
by other FE environments.<br />
Here additional step is made, however instead of increasing time or multiplier, the temperature in node 3 is set to 1.5.<br />
SMTNextStep@0, 0D;<br />
SMTNodeData@3, "Bp", 81.5
12 AceFEM Finite Element Environment<br />
Here the SMTShowMesh function displays three-dimensional contour plot of the current temperature distribution. Additional<br />
examples how to post-process the results can be found in Solution Convergence Test.<br />
SMTShowMesh@"BoundaryConditions" → True,<br />
"Marks" → True, "Field" → SMTPost@1, "at"D, "Contour" → TrueD<br />
1<br />
5<br />
8<br />
4<br />
1<br />
6<br />
2<br />
3<br />
7<br />
0.184e1<br />
0.159e1<br />
0.134e1<br />
0.109e1<br />
0.848<br />
0.599<br />
0.349<br />
Max.<br />
0.2096e1<br />
Min.<br />
0.1<br />
AceFEM
AceFEM Finite Element Environment 13<br />
Bibliography<br />
WRIGGERS, Peter, KRSTULOVIC-OPARA, Lovre, KORELC, Jože.(2001), Smooth C1-interpolations for twodimensional<br />
frictional contact problems. Int. j. numer. methods eng., 2001, vol. 51, issue 12, str. 1469-1495<br />
KRSTULOVIC-OPARA, Lovre, WRIGGERS, Peter, KORELC, Jože. (2002), A C1-continuous formulation for 3D<br />
finite deformation frictional contact. Comput. mech., vol. 29, issue 1, 27-42<br />
STUPKIEWICZ, Stanislaw, KORELC, Jože, DUTKO, Martin, RODIC, Tomaž. (2002), Shape sensitivity analysis of<br />
large deformation frictional contact problems. Comput. methods appl. mech. eng., 2002, vol. 191, issue 33, 3555-3581<br />
BRANK, Boštjan, KORELC, Jože, IBRAHIMBEGOVIC, Adnan. (2002), Nonlinear shell problem formulation<br />
accounting for through-the-tickness stretching and its finite element implementation. Comput. struct.. vol. 80, n. 9/10,<br />
699-717<br />
BRANK, Boštjan, KORELC, Jože, IBRAHIMBEGOVIC, Adnan. (2003),Dynamic and time-stepping schemes for<br />
elastic shells undergoing finite rotations. Comput. struct., vol. 81, issue 12, 1193-1210<br />
STADLER, Michael, HOLZAPFEL, Gerhard A., KORELC, Jože. (2003) Cn continuous modelling of smooth contact<br />
surfaces using NURBS and application to 2D problems. Int. j. numer. methods eng., 2177-2203<br />
KUNC, Robert, PREBIL, Ivan, RODIC, Tomaž, KORELC, Jože. (2002),Low cycle elastoplastic properties of normalised<br />
and tempered 42CrMo4 steel. Mater. sci. technol., Vol. 18, 1363-1368.<br />
Bialas M, Majerus P, Herzog R, Mroz Z, Numerical simulation of segmentation cracking in thermal barrier coatings by<br />
means of cohesive zone elements, MATERIALS SCIENCE AND ENGINEERING A-STRUCTURAL MATERIALS<br />
PROPERTIES MICROSTRUCTURE AND PROCESSING 412 (1-2): 241-251 Sp. Iss. SI, DEC 5 2005<br />
Maciejewski G, Kret S, Ruterana P, Piezoelectric field around threading dislocation in GaN determined on the basis of<br />
high-resolution transmission electron microscopy image , JOURNAL OF MICROSCOPY-OXFORD 223: 212-215<br />
Part 3 SEP 2006<br />
Wisniewski K, Turska E, Enhanced Allman quadrilateral for finite drilling rotations, COMPUTER METHODS IN<br />
APPLIED MECHANICS AND ENGINEERING 195 (44-47): 6086-6109 2006<br />
Maciejewski G, Stupkiewicz S, Petryk H, Elastic micro-strain energy at the austenite-twinned martensite interface,<br />
ARCHIVES OF MECHANICS 57 (4): 277-297 2005<br />
Stupkiewicz S, The effect of stacking fault energy on the formation of stress-induced internally faulted martensite<br />
plates, EUROPEAN JOURNAL OF MECHANICS A-SOLIDS 23 (1): 107-126 JAN-FEB 2004
14 AceFEM Finite Element Environment<br />
Code Verification Methods &<br />
Debugging<br />
Solution Convergence Test<br />
The domain of the problem is [-.0.5,0.5]×[-0.5,0.5]×[0,1] cube. On all sides, apart from the upper surface, the constant<br />
temperature f=0 is prescribed. The upper surface is isolated so that there is no heat flow over the boundary ( q=0).<br />
There exists a constant heat source Q=1 inside the cube. The thermal conductivity of the material is temperature<br />
dependent as follows:<br />
k = 1. + 0.1 f+0.5 f 2 .<br />
The task is to calculate the temperature distribution inside the cube. First the example with the mesh 10×10×10 is tested<br />
in order to assess convergence properties of the Newton-Raphson iterative procedure for large meshes. The procedure<br />
to generate heat-conduction element that is used in this example is explained in AceGen manual section Standard<br />
FE Procedure
AceFEM Finite Element Environment 15<br />
The SMTMesh function generates nodes and elements for a cube discretized by the 10×10×10 mesh. The mesh and the boundary<br />
conditions are also depicted.<br />
16 AceFEM Finite Element Environment<br />
Here the problem is analyzed and the contour plot of the temperature distribution is depicted.<br />
SMTNextStep@0, 1D;<br />
While@SMTConvergence@10^−12, 10D, SMTNewtonIteration@D; SMTStatusReport@D;D;<br />
SMTShowMesh@"Field" −> SMTPost@1D, "Mesh" → False, "Contour" → TrueD<br />
Tê∆T=0.ê0. λê∆λ=1.ê1. ˛∆a˛ê˛Ψ˛=<br />
0.039126ê0.000961769 IterêTotal=1ê1 Status=0ê8<<br />
Tê∆T=0.ê0. λê∆λ=1.ê1. ˛∆a˛ê˛Ψ˛=<br />
0.000117723ê3.304 × 10 −6 IterêTotal=2ê2 Status=0ê8<<br />
Tê∆T=0.ê0. λê∆λ=1.ê1. ˛∆a˛ê˛Ψ˛=<br />
2.01035 × 10 −9 ê9.4527 × 10 −11 IterêTotal=3ê3 Status=0ê8<<br />
Tê∆T=0.ê0. λê∆λ=1.ê1. ˛∆a˛ê˛Ψ˛=<br />
2.92722 × 10 −18 ê6.9136 × 10 −19 IterêTotal=4ê4 Status=0ê8<<br />
0.630e-1<br />
0.540e-1<br />
0.450e-1<br />
0.360e-1<br />
0.270e-1<br />
0.180e-1<br />
0.901e-2<br />
Max.<br />
0.7209e-1<br />
Min.<br />
0<br />
AceFEM<br />
Various views on the results can be obtained by the "Zoom" option.<br />
SMTShowMesh@"Field" −> SMTPost@1D, "Mesh" → False,<br />
"Contour" → True, "Zoom" → H"Z"
AceFEM Finite Element Environment 17<br />
SMTShowMesh@"Field" −> SMTPost@1D, "Zoom" → H"X"^2+ "Y"^2+ "Z"^2 ≤ .3 &L D<br />
AceFEM is fully incorporated into Mathematica so that the various built-in Mathematica's functions can be used for the analysis of<br />
the results. One should observe that Mathematica's built-in functions operate mostly on regular domains, while SMTShowMesh<br />
displays results for an arbitrary mesh.<br />
Here the ListContourPlot3D is used to get surfaces with constant temperature.<br />
ListContourPlot3D@Transpose@Partition@Partition@SMTPost@1D, 11D, 11D, 83, 2, 1 FalseD
18 AceFEM Finite Element Environment<br />
In order to assess the convergence properties the problem is analyzed with the set of meshes from 2×2×2 to 20×20×20. The<br />
solution at the center of the cube (0.,0.,0.5) is observed.<br />
s = Table@<br />
SMTInputData@D;<br />
SMTAddDomain@"cube", "ExamplesHeatConduction", 81., .1, .5, 1.
AceFEM Finite Element Environment 19<br />
More about the convergence properties of the element can be observed form the Log[characteristic mesh size]/Log[error] plot.<br />
The solution obtained with the 20×20×20 mesh is assumed to be a converged solution. For a finite element method it is characteristic<br />
that the dependence between the characteristic mesh size and the error in a logarithmic scale is linear.<br />
ListLinePlot@Map@Log@8 1 ê � @@1DD, Abs@s@@−1, 2DD − � @@2DDD AutomaticD<br />
æ<br />
æ<br />
æ<br />
-4<br />
-5<br />
-6<br />
-7<br />
-8 æ<br />
-9<br />
æ<br />
æ<br />
æ<br />
-2.0 -1.5 -1.0<br />
Comparison With an Alternative Method<br />
In the previous section the convergence of the solution with the mesh refinement was tested. However the rapid<br />
convergence is not the proof that the converge solution is indeed the right solution of the problem. To test this, we need<br />
to analyze the problem with an alternative method or to choose the problem with the known analytical solution.<br />
An example Problem Description is given in the AceGen manual where various alternative methods to solve the<br />
presented problem are described and compared.<br />
Interactive Debugging<br />
The procedures described in the section User Interface of the AceGen manual can be used within AceFEM as<br />
well. For the interactive debugging procedures, the code has to be generated in "Debug" mode. By default compiler<br />
compiles the code generated in "Debug" mode with the compiler options for debugging. For a large scale problems this<br />
my represent a drawback. Compiler can be forced to produce optimized program also for the code generated in "Debug"<br />
mode with the SMTAnalysis option "OptimizeDll"->True.<br />
This example requires AceGen package.<br />
æ<br />
æ
20 AceFEM Finite Element Environment<br />
Here the code is generated in "Debug" mode. The break point with the identification "k" is inserted.<br />
"AceFEM", "Mode" −> "Debug"D;<br />
SMSTemplate@"SMSTopology" → "H1", "SMSDOFGlobal" → 1, "SMSSymmetricTangent" → FalseD;<br />
SMSStandardModule@"Tangent and residual"D;<br />
Xi £ Array@ SMSReal@nd$$@� ,"X", 1DD &, 8D;<br />
Yi £ Array@ SMSReal@nd$$@� ,"X", 2DD &, 8D;<br />
Zi £ Array@ SMSReal@nd$$@� ,"X", 3DD &, 8D;<br />
φi £ Array@SMSReal@nd$$@� ,"at", 1DD &, 8D;<br />
SMSGroupDataNames = 8"Conductivity parameter k0", "Conductivity parameter k1",<br />
"Conductivity parameter k2", "Heat source"
AceFEM Finite Element Environment 21<br />
@7D File created :<br />
DebugHeatConduction.c Size : 45 272<br />
The SMTMesh function generates nodes and elements for a cube discretized by the 10×10×10 mesh.<br />
The data and the definitions associalted with the derivation of the element are reloaded from the automatically generated file<br />
DebugHeatConduction.dbg. See also SMSLoadSession.<br />
"DebugHeatConduction"D;<br />
SMTAddDomain@"cube", "DebugHeatConduction", 81., .1, .5, 1.
22 AceFEM Finite Element Environment<br />
The break points can be used also to trace the values of arbitrary variables during the analysis. Here the value of the conductivity k<br />
in the 6-th integration point of the 512-th element is traced during the Newton-Raphson iterative procedure.<br />
allk = 8
AceFEM Finite Element Environment 23<br />
ListLinePlot@allk êê Flatten, PlotRange −> AllD<br />
10<br />
8<br />
6<br />
4<br />
5 10 15 20 25<br />
The sparsity structure of the resulting tangent matrix can be graphically displayed by the ArrayPlot function.<br />
MatrixPlot@SMTData@"TangentMatrix"DD<br />
1<br />
20<br />
40<br />
60<br />
80<br />
1 20 40 60 80<br />
1 20 40 60 80<br />
1<br />
20<br />
40<br />
60<br />
80
24 AceFEM Finite Element Environment<br />
Code Profiling<br />
Code profiling is typically used to understand exactly where an application is spending its execution time.The SMTSimulationReport<br />
produce report identifying the percentage of time spent in specific tasks. However, by default you<br />
only see performance information at the global level rather than at the specific element level. For this additional user<br />
defined environment variables has to be defined.<br />
This example requires AceGen package.<br />
Here the code for the steady state heat conduction problem is generated. Two additional user defined environment variables are<br />
defined where the results of the code profiling will be stored. The real type environment variable "EvaluationTime" will store the<br />
total time spent for the evaluation of the element tangent matrix and residual during the analysis. The integer type environment<br />
variable "NoEvaluations" will count the number of evaluations.<br />
"AceFEM"D;<br />
SMSTemplate@"SMSTopology" → "H1", "SMSDOFGlobal" → 1<br />
,"SMSSymmetricTangent" → False<br />
,"SMSIDataNames" → 8"NoEvaluations"<<br />
,"SMSRDataNames" → 8"EvaluationTime"
AceFEM Finite Element Environment 25<br />
Mark the end time of the evaluation and add the difference to the user defined real type environment variable "EvaluationTime".<br />
Increase also the value of the integer type environment variable "NoEvaluations".<br />
SMSExport@SMSTime@D − time, rdata$$@"EvaluationTime"D, "AddIn" → TrueD;<br />
SMSExport@SMSInteger@idata$$@"NoEvaluations"DD + 1, idata$$@"NoEvaluations"DD;<br />
SMSWrite@D;<br />
Method : SKR 236 formulae, 4433 sub−expressions<br />
@15D File created :<br />
ProfileHeatConduction.c Size : 15 136<br />
Here is presented an input for the analysis and the results of code profiling for a cube discretized by the 20×20×20 mesh.<br />
26 AceFEM Finite Element Environment<br />
Round-off Error Test<br />
With the MDriver version of the numerically intensive operations the advantages of the Mathematica's high precision<br />
arithmetic, interval arithmetic, or even symbolic evaluation can be used. In this section the number of significant digits<br />
lost due to the round-off error is calculated.<br />
In the previous section the C language code for the steady state heat conduction problem was generated. Due to the<br />
arbitrary precision arithmetic required, the C code can not be used any more and Mathematica code has to be generated.<br />
This example requires AceGen package.<br />
Here the Mathematica code for MDriver is generated.<br />
"AceFEM−MDriver"D;<br />
SMSTemplate@"SMSTopology" → "H1", "SMSDOFGlobal" → 1, "SMSSymmetricTangent" → FalseD;<br />
SMSStandardModule@"Tangent and residual"D;<br />
Xi £ Array@ SMSReal@nd$$@� ,"X", 1DD &, 8D;<br />
Yi £ Array@ SMSReal@nd$$@� ,"X", 2DD &, 8D;<br />
Zi £ Array@ SMSReal@nd$$@� ,"X", 3DD &, 8D;<br />
φi £ Array@SMSReal@nd$$@� ,"at", 1DD &, 8D;<br />
SMSGroupDataNames = 8"Conductivity parameter k0", "Conductivity parameter k1",<br />
"Conductivity parameter k2", "Heat source"
AceFEM Finite Element Environment 27<br />
linear problem and only one iteration is needed to solve the problem. This is important due to the rather slow high<br />
precision arithmetic operations in Mathematica. The task is to evaluate the number of significant digits lost when the<br />
sphere is discretized with the 1000 hexahedra thermal conductivity elements.<br />
This starts symbolic MDriver with all the numerical constants set to have 40 digit precision, thus during the analysis the 40 digit<br />
precision real numbers are used.<br />
28 AceFEM Finite Element Environment<br />
The numerical precision of the machine precision numbers is always 16. The number of significant digits lost can be obtained by<br />
comparing the results with the high precision results.<br />
SMTNodeData@100, "at"D êêInputForm<br />
{0.00430996637335456}<br />
Let us see some more methods how the results can be post-processed.<br />
SMTShowMesh@"Field" −> SMTPost@1D, "BoundaryConditions" → TrueD
AceFEM Finite Element Environment 29<br />
Here the temperature distribution along the central diagonal of the sphere is depicted.<br />
ListLinePlot@8Table@ξ, 8ξ, −0.69, 0.69, .01
30 AceFEM Finite Element Environment<br />
Reference Guide<br />
Input Data<br />
SMTInputData<br />
Initialize the input data phase.<br />
SMTInputData@D erase data base from the previous AceFEM session Hif anyL<br />
initialize input data arrays and load the numerical module<br />
The SMTInputData is the first command of every AceFEM session. See also: Standard AceFEM Procedure.<br />
option description default value<br />
"LoadSession" "session_name" fl the data and definitions associated with<br />
the derivation of the element "session_name" are reloaded<br />
from the automatically generated file. The session name,<br />
the element source file name and the element<br />
name has to be the same for the proper runtime<br />
debugging. See also SMSLoadSession.<br />
"NumericalModule" choose numerical module:<br />
"CDriver" fl C language<br />
"MDriver" fl Mathematica language<br />
"Precision" start the MDriver numerical module with the<br />
numerical precision set to n Hit has no effect on CDriverL<br />
"Console" start the CDriver module as console application<br />
and connect it with the Mathematica through<br />
MathLink protocol Hit has no effect on MDriverL<br />
Options for the SMTInputData function.<br />
False<br />
"CDriver"<br />
$MachinePrecision<br />
False
AceFEM Finite Element Environment 31<br />
The CDriver numerical module is an executable and connected with the Mathematica through the MathLink protocol. The CDriver<br />
can be started in a separate window with the option "Console"->True. The option can be useful during the debugging.
32 AceFEM Finite Element Environment<br />
Input Data<br />
SMTAddDomain@dID, etype, 8d1,d2,…,dndata
AceFEM Finite Element Environment 33<br />
opt description default<br />
"Source" specification of the location of<br />
element' s source code Hsee table belowL<br />
"IntegrationCode" numerical integration code<br />
intcode Jsee Numerical integration N<br />
"AdditionalData" additional data common<br />
for all the elements within a<br />
particular domain He.g. flow curveL<br />
Options for domain input data.<br />
Several data sets can be added at the same time as well. For example:<br />
- SMTAddElement[{{"A",{1,2}},{"A",{2,3}}}] adds 2 elements<br />
Automatic<br />
SMSDefaultIntegrationCode<br />
Hsee SMSTemplate L<br />
- SMTAddEssentialBoundary[{"Find",5,"ALL",2,"D"},0,"FREE",1.5,"FREE"] all the nodes with the coordinates X=5<br />
and Z=2 and node identification "D" have prescribed value of the first and third degree of freedom, while the second<br />
and the fourth degree of freedom remains free.<br />
Example: One element<br />
Here follows the input data for a single element example depicted below.<br />
u 4 =0.021<br />
v 1= -0.12<br />
1<br />
34 AceFEM Finite Element Environment<br />
Here are the element nodes and the domain identification.<br />
SMTAddElement@8"patch", 81, 2, 3, 4
AceFEM Finite Element Environment 35<br />
SMTShowMesh@"BoundaryConditions" → TrueD
36 AceFEM Finite Element Environment<br />
defcurve = 880, 0
AceFEM Finite Element Environment 37<br />
The parameter division is a number of elements of actual mesh in each direction (e.g. 8nx μ ny μ nz ny > nz.<br />
IMPORTANT: The mastermesh points have to be given in counter-clockwise direction.<br />
IMPORTANT : The "InterpolationOrder" is NOT related to the interpolation order of the elements used, the interpolation<br />
order of the elements is defined by the elements topology.<br />
option description default value<br />
"InterpolationOrder" The degree of master mesh interpolation is specified by<br />
the option "InterpolationOrder". By default the thirdorder<br />
Hor less if the number of points in<br />
one direction is less than 4L polynomial<br />
interpolations of coordinates X,Y,Z is used.<br />
"BodyID" body identification string None<br />
"BoundaryDomainID" domain identification Hone or moreL for<br />
the elements additionally generated on the outer<br />
surface of elements generated by SMTMesh<br />
8<<br />
Options for SMTMesh.<br />
Generic example<br />
38 AceFEM Finite Element Environment<br />
1D mesh topology<br />
1<br />
1<br />
L1,C1<br />
2<br />
2<br />
Actual mesh 20*4<br />
Actual mesh + master mesh<br />
3<br />
1<br />
1<br />
L2,C2<br />
2<br />
3<br />
2<br />
4<br />
5
2D mesh topology<br />
T1,P1,T1-1,P1-1<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
9<br />
T1-2,P1-2<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
9<br />
T1-3,P1-3<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
9<br />
T1-4,P1-4<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
9<br />
T2,P2,T2-1,P2-1<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
9<br />
10<br />
11<br />
12<br />
13<br />
14<br />
15<br />
16<br />
17<br />
18<br />
19<br />
20<br />
21<br />
22<br />
23<br />
24<br />
25<br />
T2-2,P2-2<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
9<br />
10<br />
11<br />
12<br />
13<br />
14<br />
15<br />
16<br />
17<br />
18<br />
19<br />
20<br />
21<br />
22<br />
23<br />
24<br />
25<br />
T2-3,P2-3<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
9<br />
10<br />
11<br />
12<br />
13<br />
14<br />
15<br />
16<br />
17<br />
18<br />
19<br />
20<br />
21<br />
22<br />
23<br />
24<br />
25<br />
T2-4,P2-4<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
9<br />
10<br />
11<br />
12<br />
13<br />
14<br />
15<br />
16<br />
17<br />
18<br />
19<br />
20<br />
21<br />
22<br />
23<br />
24<br />
25<br />
Q1»S1<br />
1<br />
2<br />
3<br />
4<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
9<br />
Q2,S2<br />
1<br />
2<br />
3<br />
4<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
9<br />
10<br />
11<br />
12<br />
13<br />
14<br />
15<br />
16<br />
17<br />
18<br />
19<br />
20<br />
21<br />
� �<br />
AceFEM Finite Element Environment 39
40 AceFEM Finite Element Environment<br />
3D mesh topology<br />
O1<br />
div=83,2,2<<br />
H1<br />
div=83,2,2<<br />
O2<br />
div=83,2,2<<br />
H2<br />
div=84,3,2<<br />
SMTMesh@"Solid", "O1", 83, 2<br />
88880, 0, 0
AceFEM Finite Element Environment 41<br />
2D mesh topology with mesh refinement<br />
16<br />
9<br />
11<br />
10<br />
13 14<br />
12<br />
Q1-rf<br />
16<br />
15<br />
18 19<br />
17<br />
21<br />
20<br />
23 24<br />
22<br />
5 6 7 8<br />
1 2 3 4<br />
S1-rf<br />
Q2-rf<br />
17192224272931333638414345475052555762<br />
18<br />
21<br />
26<br />
202325<br />
28<br />
30<br />
32<br />
35<br />
40<br />
343739<br />
42<br />
44<br />
10 11 12 13 14 15<br />
7 8 9<br />
46<br />
49<br />
485153<br />
1 2 3 4 5 6<br />
S2-rf<br />
54<br />
56<br />
61<br />
60<br />
59<br />
58<br />
SMTMesh@"2D", "Q1−rf", 83, 2<<br />
8880, 0
42 AceFEM Finite Element Environment<br />
3D mesh topology with mesh refinement<br />
SMTImportMesh<br />
H1-rf<br />
H2-rf<br />
SMTMesh@"Solid", "H1−rf",<br />
84, 3, 2
AceFEM Finite Element Environment 43<br />
Selecting Nodes<br />
form selected nodes<br />
8in1,in2,…inN< N nodes with the node indeces in1,in2,…inN<br />
Hnote that node index can be changed due to<br />
the "Tie" command after the SMTAnalysis commandL<br />
i_Integer ª 8i<<br />
crit_Function nodes for which test crit@xi,yi,zi,nIDiD yields True<br />
8"Find",X ,Y ,Z,nID< search for node with the coordinates<br />
8X,Y,Z< and node identification nID<br />
8"Find","ALL",Y,Z,nID< search for all nodes with the coordinates yiªY, ziªZ,<br />
arbitrary x coordinate and node identification nID<br />
Hother combinations are also<br />
possible e.g. 8" Find ",X ,"ALL","ALL",nID
44 AceFEM Finite Element Environment<br />
form explanation<br />
8" Find ",X ,nID< sets essential or natural boundary condition for the node<br />
with the coordinates 8X,Y< and node identification nID<br />
8" Find ", crit< nodes for which test crit@xi, nIDiD yields True<br />
Selecting nodes for 1D problems.<br />
Selecting Elements<br />
form selected elements<br />
8ie1,ie2,…ieN< N elements with the element indeces ie1,ie2,…ieN<br />
i_Integer ª 8i<<br />
dID all elements with domain identification dID<br />
crit_Function selection of elements with the nodes<br />
for which test crit@xi,yi,zi,nIDiD yields True<br />
Selecting nodes for 3D problems.<br />
Many functions require as input a list of elements on which certain action is applied. The parameter that is used to<br />
select elements can be a list of element indeces, domain identification or pure function.<br />
The parameter crit is a pure function applied to all nodes of the element in turn. Elements for which all nodes return<br />
True are selected. The standard Mathematica symbols for the formal parameters of the pure function (#1,#2,#3,..) can<br />
be replaced by the strings representing coordinates "X","Y","Z", and the node identification "ID".<br />
Examples: "X"2 &
AceFEM Finite Element Environment 45<br />
Analysis<br />
Iterative solution procedure
46 AceFEM Finite Element Environment<br />
Symbol table:<br />
Bt<br />
è<br />
part of the boundary conditions vector (Bt) where essential boundary conditions are prescribed<br />
Bt part of the boundary conditions vector (Bt) where natural boundary conditions are prescribed<br />
ap, at global variables with unknown value<br />
ap<br />
é , at<br />
é global variables with prescribed value (essential boundary condition)<br />
The following steps are performed at the beginning at of the analysis:<br />
æ data is set to zero<br />
at=ap=ht=hp=0<br />
æ boundary conditions are set to initial boundary conditions (Bi)<br />
Bt=Bp=Bi<br />
The following steps are performed at the beginning of the time or multiplier increment:<br />
æ global variables at the end of previous step are reset to the current values of global variables<br />
ap=at<br />
æ boundary conditions at the end of previous step are reset to the current values of boundary conditions<br />
Bp= Bt<br />
The following steps are performed for each iteration:<br />
æ global vector R and global matrix K are initialized<br />
R=0, K=0<br />
æ boundary conditions are updated as follows:<br />
the current boundary value is calculated as Bt= Bp+Dl dB, where Dl is the multiplier increment<br />
essential boundary conditions are set at<br />
é = Bt<br />
é<br />
natural boundary conditions are added to the global vector R=R+Bt<br />
æ user subroutine "Tangent and residual" is called for each element,<br />
the element tangent matrix Ke is added to the global matrix K=K+Ke,<br />
element residual Ye is taken from the global vector R=R-Ye<br />
æ set of linear equations is solved K Da=R,<br />
æ solution is incremented at:=a+Da.
AceFEM Finite Element Environment 47<br />
Example: constant increment<br />
This is a path following procedure with a constant multiplier increment (the multiplier increment runs from 0 to 1 in 10 steps).<br />
Do@SMTNextStep@1, .1D;<br />
While@SMTConvergence@10^−8, 10D, SMTNewtonIteration@D;D;<br />
, 8i, 1, 10
48 AceFEM Finite Element Environment<br />
option description default value<br />
"Output" output file name Hfor comments, debugging, etc.L False<br />
Hno output fileL<br />
"PostOutput" post-processing data file name Jsee also SMTPut N False<br />
"PostInput" input data can be imported from the previously stored postprocessing<br />
data file Hsee also SMTGet L<br />
"Solver" 0 fl appropriate solver is chosen automatically<br />
solverID fl solver with solver identification number solverID<br />
8solverID,8iparam
AceFEM Finite Element Environment 49<br />
SMTNextStep<br />
SMTNextStep@Dt, DlD reset environment variables to the new time increment Dt ,<br />
boundary conditions multiplier increment to Dl,<br />
upadate time and multiplier,<br />
and make the solution at the end of the previous time step to<br />
be equal to current solution Hapªat, spªst, hpªht, Bp∫BtL<br />
SMTNextStep@Dt, lD ª SMTNextStep@Dt, l@t+DtD-l@tDD<br />
where l is a multiplier function<br />
See also: Iterative solution procedure<br />
Example: Zig-zag load<br />
This is a path following procedure with a zig-zag multiplier increment l as a function of time.<br />
λ@t_D := If@OddQ@Floor@Ht + 1Lê2DD, 1,−1D H2 Floor@Ht + 1Lê2D − tL;<br />
Plot@λ@tD, 8t, 0,10
50 AceFEM Finite Element Environment<br />
SMTConvergence<br />
SMTConvergence@tol, n, type, optionsD check if the convergence conditions<br />
for the iterative procedure have been satisfied<br />
SMTConvergence@D ª SMTConvergence@10^-7,15," Abort "D<br />
type return value description<br />
"Abort" True »»Da t »»>tol , one more iteration is required<br />
none iterative process is aborted in the case of divergence<br />
"Analyze" True »»Da t »»>tol , one more iteration is required<br />
8"Adaptive", m,<br />
Dlmin, Dlmax,lmax<<br />
False »»Da t »»tol , one more iteration is required<br />
9False, Dl, True, »»Da t »»= convergence conditions for the<br />
iterative procedure have been satisfied<br />
8False, 0,<br />
False, "MaxBound"<<br />
8True, Dl,<br />
True, ctype<<br />
8True, 0,<br />
False, "MinBound"<<br />
the value of the boundary conditions<br />
multiplier is larger or equal lmax H»l»¥lmaxL<br />
divergence<br />
the value of the boundary<br />
conditions multiplier increment is less<br />
than prescribed minimum H»Dl»
AceFEM Finite Element Environment 51<br />
option description default value<br />
"Alternate" False fl alternating solution is ignored<br />
"Divergence" fl alternating solution means divergence<br />
True ª "Divergence"<br />
Automatic ª 88Dtmaxê4,Dlmaxê4
52 AceFEM Finite Element Environment<br />
Example: Restarting the AceFEM session<br />
Here we first analyze the give structure up to the load level 500.<br />
AceFEM Finite Element Environment 53<br />
The state of the analysis at the load level 500 is then stored in "dump1" restart files.<br />
SMTDump@"dump1"D;<br />
Old restart files dump1<br />
are replaced by new. See also: SMTDump<br />
Here tha data associated with the state of the AceFEM session at the load level 500 is restored from the "dump1" restart files and<br />
the analysis then continues up to the load level 1000.<br />
54 AceFEM Finite Element Environment<br />
SMTRestart (CDriver specific)<br />
See also: SMTDump<br />
SMTSensitivity<br />
SMTRestart@nameD reads the restart data from the name.rst and name.rsb files and continues the<br />
AceFEM session from the point of the corresponding SMTDump command<br />
SMTSensitivity@D solve the sensitivity problem for all sensitivity parameters<br />
The following steps are performed for all sensitivity parameters:<br />
fl user subroutine "Sensitivity pseudo-load" is called for each element,<br />
fl sensitivity pseudo-load vector is added to the global pseudo-load vector Y,<br />
fl set of linear equations is solved K ∑a<br />
=Y that yields sensitivity of global (nodal) variables<br />
∑fi fl user subroutine "Dependent sensitivity" is called for each element to resolve sensitivity of local (element)<br />
variables<br />
See also Subroutine: "Sensitivity pseudo-load" and "Dependent sensitivity" .<br />
SMTStatusReport<br />
SMTStatusReport@D print out the report of the current status of the system<br />
SMTSolutionReport@exprD print out the report of the current status of<br />
the system tagged by the arbitrary expression expr<br />
This prints out the report of the current status of the system and the current values of all degrees of freedom in node 5.<br />
SMTStatusReport@SMTNodeData@5, "at"DD<br />
SMTSessionTime<br />
SMTSessionTime@D gives the total number of seconds of real time that<br />
have elapsed since the beginning of your AceFEM session
AceFEM Finite Element Environment 55<br />
SMTErrorCheck<br />
SMTErrorCheck@<br />
console, file, report, notebookD<br />
check for error events and print error messages on:<br />
console∫0 fl console driver window Hif openedL<br />
file∫0 fl output file Hif openedL<br />
report∫0 fl report window<br />
notebook∫0 fl current notebook<br />
SMTErrorCheck@D ª SMTErrorCheck@1,1,1,0D<br />
There are two types of environment variables identifying various error events. The environment variable idata$$["ErrorStatus"]<br />
(see table below) identifies the general error status.<br />
Error Description<br />
status<br />
0 no special events were detected during the session<br />
1 warnings were detected during the session,<br />
Hevaluation is still performed in a regular way, time step cutting is recommendedL<br />
2 fatal errors were detected during the session Htime step cutting is necessaryL<br />
3 fatal error Hterminate the processL<br />
Codes for the error status switch.<br />
Additional environment variables "MissingSubroutine", "SubDivergence", "ElementState", "ElementShape" and<br />
"MaterialState" (see Environment Data ) then give more information about the error. Error event variables are set in a<br />
user subroutine. They should be increased by 1 whenever the error condition that sepcifies specific event appears. The<br />
SMTErrorCheck function is used to processs the error events. In the case of error event the error message is produced<br />
and all monitored variables are set back to zero value.<br />
Here is the part of the symbolic input where the error event is reported if the Jacobean of the nonlinear coordinate mapping (J)<br />
becomes negative.<br />
SMSIfAJ ≤ 10 −9 E;<br />
SMSExport@1, idata$$@"ErrorStatus"DD;<br />
SMSExport@SMSInteger@idata$$@"ElementShape"DD + 1, idata$$@"ElementShape"DD;<br />
SMSEndIf@D;<br />
SMTSimulationReport<br />
SMTSimulationReport@D produce report identifying the percentage<br />
of time spent in specific tasks during the analysis<br />
SMTSimulationReport@<br />
idata_names, rdata_names, commentD<br />
print out additional information stored in user<br />
defined integer and real type environment variables<br />
and arbitrary comments Jfor details see Code Profiling N
56 AceFEM Finite Element Environment<br />
option description default value<br />
"Output" a list of output devices:<br />
"Console" fl current notebook<br />
"File" fl current output file Hif definedL<br />
Options for the SMTSimulationReport function.<br />
8"Console","File"
AceFEM Finite Element Environment 57<br />
Postprocessing<br />
SMTShowMesh<br />
SMTShowMesh@optionsD display two- or threedimensional<br />
graphics using options specified and return graphics object<br />
option description default value<br />
"Mesh" display mesh as wire frame True<br />
"Marks" display nodal and element numbers False<br />
"BoundaryConditions<br />
"<br />
mark nodes with the non-zero boundary conditions False<br />
"Zoom" the parameter is used to select nodes<br />
Hit has one of the forms described in section Selecting Nodes ,<br />
only the elements with all nodes selected are depictedL<br />
False<br />
"ZoomNodes" ª "Zoom" False<br />
"ZoomElements" the parameter is used to select elements<br />
Hit has one of the forms described in section Selecting Elements ,<br />
only the selected elements are depictedL<br />
False<br />
"Elements" fill in the element surfaces with the<br />
element surface color or with the contour lines<br />
"Field" the vector of nodal values that defines scalar field<br />
used to calculate element surface color or contour lines<br />
"NodeMarksField" the vector of nodal values that are used<br />
to calculate color for each nodal point mark<br />
"Contour" display contour lines of the<br />
scalar field p defined by the "Field" option<br />
"DeformedMesh" display deformed mesh by adding the vector field u multiplied<br />
by the "Scale" option to the nodal coordinates X IX := X +u M<br />
True<br />
False<br />
False<br />
False<br />
False<br />
"Scale" scaling factor for deformed mesh 1.<br />
"Opacity" graphics directive which specifies that graphical<br />
objects which follow are to be displayed,if possible,<br />
with given opacity Hnumber between 0 and 1L<br />
HNew in Mathematica 6L<br />
False<br />
"RawOutput" insteade of the graphics return raw data as follows:<br />
8<br />
vertex coordinates,<br />
vertex field values,<br />
vertex collors that correspond to vertex values,<br />
legend graphics object,<br />
complete graphics object<br />
<<br />
HNew in Mathematica 6L<br />
False
58 AceFEM Finite Element Environment<br />
"TimeFrequency" the SMTShowMesh command is not executed<br />
if the absolute difference in time for two successive<br />
SMTShowMesh calls is less than "TimeFrequency"<br />
HNew in Mathematica 6L<br />
"MultiplierFrequency<br />
"<br />
the SMTShowMesh command is not executed if<br />
the absolute difference in multiplier for two successive<br />
SMTShowMesh calls is less than "MultiplierFrequency"<br />
HNew in Mathematica 6L<br />
"StepFrequency" the SMTShowMesh command is not executed if the<br />
absolute difference in step number for two successive<br />
SMTShowMesh calls is less than "StepFrequency"<br />
HNew in Mathematica 6L<br />
Options for the SMTShowMesh function.<br />
The nodes with the non-zero essential boundary condition are marked with color points. The nodes with the non-zero<br />
natural boundary condition are marked with arrow for the nodes with two unknowns and with color point otherwise.<br />
Before the analysis the Bp and dB boundary values (see also Input Data) are displayed separately, and during the<br />
analysis only Bt is displayed.<br />
option description default value<br />
"Legend" include legend specifying the<br />
colors and the range of the "Field" values<br />
"Domains" list of the domain identifications<br />
Honly the domains with the domain<br />
identification included in the list are plottedL<br />
"Label" an expression or the list of<br />
expressions to be printed as a label for the plot<br />
"TextStyle" specifies the default style and font<br />
options with which text should be rendered<br />
0<br />
0<br />
0<br />
True<br />
All<br />
None<br />
8FontSizeØ9,<br />
FontFamilyØ"Arial"<<br />
"NodeMarks" mark all the nodes with the circle False<br />
"Show" specifies output device True»False<br />
"NodeTagOffset" position of the node number relative to the node 8.01,.01,.01<<br />
"NodeID" list of the node identifications Honly the nodes with<br />
the node identification included in the list are plottedL<br />
Automatic<br />
"User" user supplied graphic primitives He.g. 8Circle@80,0
AceFEM Finite Element Environment 59<br />
"Show" option description<br />
"Show"ØTrue displays graphics as a new notebook cell<br />
"Show"ØFalse the graphics object is returned, but no display is generated<br />
"Show"Ø"Window" displays graphics in a separate post-processing notebook<br />
"Show"Ø8"Export", file, format, options< ª Export@ file,produced graphics, format, optionsD<br />
export data to a file,<br />
converting it to a specified format Hsee also Export commadL<br />
"Show"Ø8"Animation", keyword, options< creates subdirectory with the name keyword and<br />
exports current graphics as GIF file with the name<br />
frame_number.gif Hframe numbers are counted automatically<br />
and options are the same as for command ExportL<br />
"Show"Ø"Window" » False show options can be combined<br />
H e.g. "Window" » False displays graphics into postprocessing<br />
notebook and retuns graphics objectL<br />
Methods for output device.<br />
"Contour" option description<br />
"Contour"->True display 10 contour lines<br />
"Contour"Øn display n contour lines<br />
"Contour"Ø8min,max,n< display n contour lines taken from the range 8min,max<<br />
Methods for setting up contour lines.<br />
"Legend" option description<br />
"Legend"->True display legend with default number of divisions<br />
"Legend"Øndiv display legend with ndiv divisions<br />
"Legend"Ø"MinMax" display only minimum and maximum values<br />
"Legend"ØFalse no legend<br />
Methods for setting up contour lines.<br />
"Label" option description<br />
"Label"->Automatic display min. and max. nodal value<br />
"Label"ØNone no label<br />
"Label"Øexpression give an overall label for the plot<br />
Methods for setting up plot label.
60 AceFEM Finite Element Environment<br />
"DeformedMesh"<br />
option<br />
"DeformedMesh"Ø<br />
True<br />
" DeformedMesh "Ø<br />
8uX , uY , uZ<<br />
Methods for setting up deformed mesh.<br />
description<br />
Original finite element mesh is deformed as follows<br />
Xnew=X +uX<br />
Ynew=Y +uY<br />
Znew=Z +uZ<br />
where the displacement vectors uX , uY ,<br />
uZ are by default obtained using the SMTPost Hsee SMTPost L<br />
command. If the "DeformedMeshX", "DeformedMeshY" and<br />
"DeformedMeshZ" postprocessing codes are specified by the user then<br />
uX =SMTPost@"DeformedMeshX"D,<br />
uY =SMTPost@"DeformedMeshY"D,<br />
uZ=SMTPost@"DeformedMeshZ"D,<br />
else<br />
uX =SMTPost@1D,<br />
uY =SMTPost@2D,<br />
uZ=SMTPost@3D.<br />
user defined displacement vectors uX , uY , uZ<br />
"Marks" option description<br />
"Marks"->True display nodal and element numbers<br />
ª "Marks"->8"NodeNumber","ElementNumber"<<br />
"Marks"ØFalse no numbers<br />
"Marks"Ø"ElementNumber" display element numbers<br />
"Marks"Ø"NodeNumber" display node numbers<br />
Methods for setting up contour lines.<br />
The SMTShowMesh function is the main postprocessing function for displaying the element mesh, the boundary<br />
conditions and arbitrary postprocessing quantities. The vectors of nodal values p, n, uX , uY , uZ are arbitrary vectors of<br />
NoNodes numbers (see also SMTPost ). Several examples are presented in sections Solution convergence<br />
test, Standard AceFEM Procedure.<br />
SMTResidual<br />
SMTResidual@nodeselectorD evaluate residual HreactionL in nodes defined by<br />
nodeselector Jsee Selecting Nodes N as a sum of all<br />
element residual vectors that contribute to the residulal
AceFEM Finite Element Environment 61<br />
SMTPost<br />
SMTPost@pcode _StringD get a vector composed of the nodal values according to element postprocessing<br />
code pcode HCDriver specificL<br />
SMTPost@<br />
i_Integer, ncode_StringD<br />
SMTPost@i_IntegerD ª SMTPost@i , "at"D<br />
get a vector composed of the i-th componenet of the<br />
nodal quantitie ncode H"at","ap","da","st","sp"L from all nodes<br />
The SMTPost function returns the vector of NoNodes numbers that can be used for postprocessing by the SMTShow-<br />
Mesh function or directly in Mathematica.<br />
The first form of the function can only be used if the element user subroutine for data post-processing has been defined<br />
( s e e<br />
Subroutine: "Postprocessing") The post-processing code pcode can corresponds either to the integration<br />
point or to the nodal point post-processing quantity.<br />
If the pcode code corresponds to the integration point quantity then the integration point values are first mapped to<br />
nodes accordingly to the type of extrapolation as follows:<br />
Type 0: Least square extrapolation from integration points to nodal points is used. The nodal value is additionally<br />
multiplied by the user defined nodal wight factor that is stored in element specification data structure for each node<br />
(es$$["PostNodeWeights",nodenumber]. Default value of the nodal weight factor is 1.<br />
NoIntPoints<br />
Type 1: The integration point value is multiplied by the shape function value fNi = wNi ⁄ j=1 wij fGj i=1,2,…,No-<br />
Nodes where fGj are an integration point values, wij are an integration point weight factors, wNi are the nodal wight<br />
factors and fNi are the values mapped to nodes. Integration point weight factor can be e.g the value of the shape functions<br />
at the integration point and have to be supplied by the user. By default the last NoNodes integration point quantities<br />
are taken for the weight factors.<br />
By default the least square extrapolation is used. The smoothing over the patch of elements is then performed in order<br />
to get nodal values.<br />
There are there postprocessing codes with the predetermined function: "DeformedMeshX","DeformedMeshY" and<br />
"DeformedMeshZ". If the "DeformedMeshX", "DeformedMeshY" and "DeformedMeshZ" postprocessing codes are<br />
specified by the user then SMTShowMesh use the corresponding data to produce deformed version of the original<br />
finite element mesh.<br />
Several examples are presented in sections Solution convergence test, Standard AceFEM<br />
Procedure.<br />
SMTPointValues<br />
SMTPointValues@p, nvD evaluate scalar field defined by<br />
the vector of nodal values nv at point p<br />
SMTPointValuesA<br />
9p1, p 2 ,…=,8nv1, nv2, …,nvN
62 AceFEM Finite Element Environment<br />
sections Solution Convergence Test , Round - off Error Test .<br />
SMTPut (CDriver specific)<br />
SMTPut@pkey,<br />
uservector,optionsD<br />
save all post-processing data together with the additional vector of arbitrary<br />
real numbers uservector to the file specified by the SMTAnalysis<br />
option PostOutput Jsee SMTAnalysis N using the keyword pkey<br />
SMTPut@pkeyD ª SMTPut@pkey,8
AceFEM Finite Element Environment 63<br />
Analysis session<br />
64 AceFEM Finite Element Environment<br />
The SMTGet[] command returns all the keywords and the names of the stored post-processing quantities.<br />
8allkeywords, allpostnames< = SMTGet@D;<br />
allpostnames<br />
allkeywords<br />
8DeformedMeshX, DeformedMeshY, Exx, Exy, Eyx, Eyy, Sxx, Sxy, Syx, Syy, Szz, u, v<<br />
81, 2, 3, 4, 5, 6, 7, 8, 9, 10<<br />
The SMTGet[3] command reads the data stored under keyword 3 (step 3 for this example) back to AceFEM and returns the user<br />
defined vector of real numbers for step 3 (total force for this example).<br />
force = SMTGet@3D<br />
92.83463 × 10 −13 , 46.2459=<br />
Here the post-processing quantitie "Sxx" for the current step is evaluated at the centre of the rectangle<br />
SMTPointValues@8L ê 2, L ê 2
AceFEM Finite Element Environment 65<br />
SMTMakeAnimation<br />
SMTMakeAnimation@keywordD generates a notebook animation<br />
from frames stored by the SMTShowMesh<br />
command under given keyword<br />
Hnew in Matematica 6L<br />
SMTMakeAnimation@keyword,"Flash"D generates a Shockwave Flash animation<br />
from frames stored by the SMTShowMesh<br />
command under given keyword<br />
Hnew in Matematica 6L<br />
SMTMakeAnimation@keyword,"GIF"D generates an animated GIF animation<br />
from frames stored by the SMTShowMesh<br />
command under given keyword<br />
Animation frames are stored into the keyword subdirectory of the current directory. The existing keyword subdirectory<br />
is automatically deleted.<br />
The corresponding SMSShowMesh option is "Show"Ø{"Animation", keyword}. The actual size of the frame can vary<br />
during the animation resulting in non-smooth animation. To prevent this the size of the frames has to be explicitly<br />
prescribed by an additional option "Show"Ø{"Animation", keyword, ImageSize->{wspec, hspec}}. The width and the<br />
height of the animation are specified in printer's points. See also SMSShowMesh and Export.<br />
Data Base Manipulations<br />
SMTIData and SMTRData<br />
SMTIData@ "code"D get the value of the integer type<br />
environment variable with the code code<br />
SMTIData@ "code", valueD set the value of the integer type environment<br />
variable with the code code to be equal value<br />
SMTIData@"All"D get all names and values of integer type environment variables<br />
SMTRData@"code"D get the value of the real type<br />
environment variable with the code code<br />
SMTRData@"code", valueD set the value of the real type environment<br />
variable with the code code to be equal value<br />
SMTRData@"All"D get all names and values of integer type environment variables<br />
Get or set the real or integer type environment variable.<br />
The values of the code parameter are specified in Integer Type Environment Data and Real Type Environment<br />
Data.<br />
This returns the number of nodes.<br />
SMTIData@"NoNodes"D
66 AceFEM Finite Element Environment<br />
SMTNodeData<br />
SMTNodeData@nodeselector, "code"D get the data with the code code for nodes selected by nodeselector<br />
SMTNodeData@<br />
nodeselector, "code", valueD<br />
set the data with the code code for<br />
nodes selected by nodeselector to be equal value<br />
SMTNodeData@"code"D get the data with the code code for all nodes<br />
SMTNodeData@ "code", 8v1,v2,…,vNoNodes
AceFEM Finite Element Environment 67<br />
SMTElementData<br />
SMTElementData@elementselector,codeD get the data with the code code for elements selected by elementselecto<br />
Get or set the element data.<br />
SMTElementData@<br />
elementselector,code,valueD<br />
set the data with the code code for<br />
elements selected by elementselector to be equal value<br />
SMTElementData@"code"D get the data with the code code for all elements<br />
SMTElementData@" Domain "D<br />
SMTElementData@<br />
elementselector, " Domain "D<br />
SMTElementData@" Body "D<br />
SMTElementData@<br />
elementselector, " Body "D<br />
SMTElementData@" Code "D<br />
SMTElementData@<br />
elementselector, " Code "D<br />
get the domain identification dID<br />
for all elements or for the selection of elements<br />
get the body identification b ID for<br />
all elements or for the selection of elements<br />
get the element type etype for all elements or for the selection of elem<br />
SMTElementData@"All"D<br />
SMTElementData@elementselector,"All"D get all names and values of for all elements or for the selection of elem<br />
Get an additional information related to the element that is not a part of the element's data structure.<br />
The values of the code parameter are specified in Element Data . The elementselector can be an element number, a<br />
list of element numbers or a logical expression (see also Selecting Elements ).<br />
This returns a list of nodes for 35-th element.<br />
SMTElementData@35, "Nodes"D<br />
SMTDomainData<br />
SMTDomainData@dID, "code"D get the data with the code code for domain dID<br />
SMTDomainData@dID, "code", valueD set the data with the code code for domain dID to be equal value<br />
SMTDomainData@"code"D get the data with the code code for all domains<br />
SMTDomainData@ dID,"All"D get all names and values of the data for domain dID<br />
SMTDomainData@"DomainID"D get domain identifications dID for all domains<br />
SMTDomainData@i_Integer, "code"D get the data with the code code for i -th domain<br />
SMTDomainData@i_Integer, "code", valueD set the data with the code code for i-th domain to be equal value<br />
Get or set the element specification data.<br />
The values of the code parameter are specified in Domain Specification Data.<br />
This returns material data specified for the domain "solid".<br />
SMTDomainData@"solid", "Data"D
68 AceFEM Finite Element Environment<br />
This sets material data specified for the domain "solid" to new values.<br />
SMTData<br />
SMTDomainDataA"solid", "Data", 9E, ν, σy, …=E<br />
SMTData@gcode _StringD get data accordingly to the code gcode<br />
SMTData@ie, ecode _StringD get element data for the element<br />
with the index ie accordingly to the code ecode<br />
SMTData@...,"File"->TrueD append the result of the SMTData function to the output file<br />
The SMTData function returns data according to the code gcode or ecode and element number ie.The data returned can<br />
be used for postprocessing and debugging.<br />
gcode Description<br />
"MatrixGlobal" global matrix according to the last<br />
completed action Hcommand yields a SparseArrayL<br />
"VectorGlobal" global vector according to the last completed action<br />
"MatrixLocal" contents of the local matrix received from the user subroutine in the<br />
last completed action He.g. last evaluated element tangent matrixL<br />
"VectorLocal" contents of the local vector received from the user subroutine in the<br />
last completed action He.g. last evaluated element residual vectorL<br />
"TangentMatrix" global tangent matrix<br />
Hmatrix is obtained by executing one Newton-Raphson iteration<br />
HSMTNewtonIterationL without solving the linear system of equationsL,<br />
Hcommand yields a SparseArrayL<br />
"Residual" global residual vector Hincludes contribution<br />
from the elements and the natural boundary conditionsL<br />
"DOFNode" for all unknown parameters the<br />
index of the node where the parameter appears<br />
"DOFNodeID" for all unknown parameters the<br />
identification of the node where the parameter appears<br />
"DOFElements" for all unknown parameters the list of elements where the parameter appears<br />
Various global data directly accessible from Mathematica.
AceFEM Finite Element Environment 69<br />
ecode Action Return values<br />
"All" collect all the data associated with the element String<br />
"SKR" call to the "SKR" user subroutine<br />
Hsee SMSStandardModule L<br />
tangent matrix and residual for element ie<br />
"SSE" call to the "SSE" user subroutine<br />
Hsee SMSStandardModule L<br />
sensitivity pseudoload<br />
vector for element ie<br />
"SHI" call to the "SHI" user subroutine True<br />
"SRE" call to the "SKR" user subroutine residual for element ie<br />
"SPP" call to the "SPP" user subroutine get arrays of integration point<br />
and nodal point postprocessing<br />
quontities for element ie<br />
"Usern" call to the user defined<br />
"Usern" user subroutine where n=1,2,…,9<br />
True<br />
Various element data directly accessible from Mathematica.<br />
SMTFindNodes<br />
SMTFindElements<br />
SMTFindNodes@nodeselectorD The parameter nodeselector is used to select nodes. It has<br />
one of the forms described in section Selecting Nodes .<br />
SMTFindElements@elementselectorD The parameter elementselector is used to select elements. It has<br />
one of the forms described in section Selecting Elements .<br />
SMTSetSolver (contributed by Tomaž Šuštar)<br />
SMTSetSolver@solverIDD update all structures related to the<br />
global tangent matrix and number of equations<br />
accordingly to the value of parameter solverID<br />
SMTSetSolver@solverID, iparams,rparamsD initialize solver with solver identification<br />
number solverID and set of integer parameters<br />
iparams and real parameters rparams parameters<br />
SMTSetSolver@D ª SMTSetSolver@0D
70 AceFEM Finite Element Environment<br />
solverID Description<br />
0 appropriate solver is chosen automatically<br />
1 standard LU profile unsymmetric solver<br />
Hno user parameters definedL<br />
2 standard LDL profile symmetric solver<br />
Hno user parameters definedL<br />
3 NOT A PART OF THE STANDARD DISTRIBUTION !!!<br />
SuperLU unsymmetric solver<br />
iparams=8ordering, work_allocation<<br />
rparams=8pivot_tresh, fill<<br />
4 NOT A PART OF THE STANDARD DISTRIBUTION !!!<br />
UMFPACK solver<br />
5 PARDISO solver from INTEL MKL H manual is available at<br />
http:êêwww.intel.comêsoftwareêproductsêmklêdocsêmanuals.htmL<br />
iparams=8ipar1,ipar2,ipar3,ipar4,ipar5<<br />
rparams=8<<br />
parameter Description<br />
ordering 0 fl natural ordering<br />
1 fl minimum degree on structure of A'*A<br />
2 fl minimum degree on structure of A'+A<br />
3 fl approximate minimum degree for unsymmetric matrices<br />
work_allocation 0 fl solver allocates memory automatically<br />
-1 fl The size of memory allocated is approximately:<br />
memory= fill * number of nonzero terms in matrix Hin bytesL<br />
pivot_tresh @0,1D<br />
fiil default value 20<br />
Initialisation parameters for SuperLU unsymmetric solver.<br />
parameter Description Default value<br />
type 1 fl structuraly symetric Hpartial pivotingL<br />
11 fl unsymetric Hfull pivotingL<br />
1<br />
param4 iparam H4L in the manual 0<br />
nstep max numbers of iterative refinement steps 2<br />
pivot perturb the pivot elements smaller than E-pivot 8<br />
Initialisation parameters for PARDISO unsymmetric solver.<br />
Intel MKL Solver - PARDISO<br />
SMTSetSolver[5,{ipar1,ipar2,ipar3,ipar4,ipar5}{}]
AceFEM Finite Element Environment 71<br />
ipar1 - Type of matrix<br />
ipar1: type of matrix<br />
1 ... real and structurally symmetric matrix (partial pivoting)<br />
11 ... real and arbitrary unsymmetric matrix (full pivoting)<br />
Symmetric matrices are not yet supported!<br />
ipar2 - preconditioned CGS<br />
This parameter controls preconditioned CGS for unsymmetric or structural symmetric matrices and Conjugate-Gradients<br />
for symmetric matrices.<br />
parameter has the form<br />
iparm2= 10*L + K<br />
The values K and L have the following meaning<br />
Value K:<br />
Value of K Description<br />
0 The factorization is always computed as required by phase<br />
1 CGS iteration replaces the computation of LU. The preconditioner is LU<br />
that was computed at a previous step (the first step or last step with a<br />
failure) in a sequence of solutions needed for identical sparsity patterns.<br />
2 CG iteration for symmetric matrices replaces the computation of LU.<br />
Value L:<br />
The preconditioner is LU that was computed at a previous step (the first<br />
step or last step with a failure) in a sequence of solutions needed for<br />
identical sparsity patterns.<br />
The value L controls the stopping criterion of the Krylow-Subspace iteration:<br />
ecgs = 10-L is used in the stopping criterion<br />
||dxi|| / ||dx1|| < ĺCGS<br />
with ||dxi|| = ||(LU)-1ri|| and ri is the residuum at iteration i of the preconditioned Krylow-Subspace iteration.<br />
Strategy: A maximum number of 150 iterations is fixed by expecting that the iteration<br />
will converge before consuming half the factorization time. Intermediate convergence<br />
rates and residuum excursions are checked and can terminate the iteration process.<br />
If phase =23, then the factorization for a given A is automatically recomputed in<br />
these cases where the Krylow-Subspace iteration failed, and the corresponding direct<br />
solution is returned. Otherwise the solution from the preconditioned<br />
Krylow-Subspace iteration is returned. Using phase =33 results in an error message<br />
(error =4) if the stopping criteria for the Krylow-Subspace iteration can not be
72 AceFEM Finite Element Environment<br />
reached.<br />
The default is ipar2=0, and other values are only recommended for an advanced<br />
user. ipar2 must be greater or equal to zero.<br />
Examples:<br />
31 LU-preconditioned CGS iteration with a stopping criterion of 10 -3 for<br />
unsymmetric matrices<br />
61 LU-preconditioned CGS iteration with a stopping criterion of 10 -6 for<br />
unsymmetric matrices<br />
62 LU-preconditioned CGS iteration with a stopping criterion of 10 -6 for<br />
symmetric matrices<br />
ipar3 -Max number of iterative refinment steps<br />
On input to the iterative refinement step, ipar3 should be set to the maximum<br />
number of iterative refinement steps that the solver will perform. Iterative refinement<br />
will stop if a satisfactory level of accuracy of the solution in terms of backward error<br />
has been achieved. The solver will not perform more than the absolute value of<br />
ipar3 steps of iterative refinement and will stop the process if a satisfactory level<br />
of accuracy of the solution in terms of backward error has been achieved.<br />
The default value for ipar3 is 0.<br />
Note that if ipar3 < 0, the accumulation of the residuum is using enhanced<br />
precision real and complex data types.<br />
ipar4 -Small pivot treshold<br />
On entry, ipar4 instructs PARDISO how to handle small pivots or zero pivots<br />
for unsymmetric matrices (ipar1 =11 ). For these matrices the solver<br />
uses a complete supernode pivoting approach. When the factorization algorithm<br />
reaches a point where it cannot factorize the supernodes with this pivoting strategy, it<br />
uses a pivoting perturbation strategy. The magnitude of the potential pivot is tested<br />
against a constant threshold of:<br />
ε = 10 −ipar4<br />
Small pivots are therefore perturbed with ε = 10 −ipar4<br />
The default value of ipa4 is 13 and therefore ε = 10 −13
AceFEM Finite Element Environment 73<br />
ipar5 - Scaling vectors<br />
PARDISO uses a maximum weight matching algorithm to permute large elements on<br />
the diagonal and to scale the matrix so that the diagonal elements are equal to 1 and<br />
the absolute value of the off-diagonal entries are less or equal to 1. This method is<br />
only applied to unsymmetric matrices (ipar1 =11) and, by default,<br />
indicated with ipar5=1, this option is always turned on. Otherwise, the scalings<br />
are omitted.<br />
The default value of ipar5 is 1.<br />
Examples<br />
Combination of direct and iterative solver for unsymetric matrix:<br />
SMTSetSolver[5,{11,61,8,13,1},{}]<br />
61 .... stoping criterion 10^-6<br />
References<br />
Intel® Math Kernel Library : Reference Manual<br />
pages: 8-1 ... 8-14<br />
ipar1 ..... see page 8-4,8-6 (mtype)<br />
ipar2 ..... see page 8-9 (iparm(4))<br />
ipar3..... see page 8-11 (iparm(8))<br />
ipar4..... see page 8-11 (iparm(10))<br />
ipar5..... see page 8-11 (iparm(11))<br />
Input Data Structures<br />
Mesh Input Data Structures<br />
input data<br />
SMTNodes node coordinates for all nodes<br />
SMTElements element nodes and domain identification for all elements<br />
SMTDomains description of domains<br />
SMTEssentialBoundary reference values of the essential boundary conditions<br />
SMTNaturalBoundary reference values of the natural boundary conditions<br />
SMTInitialBoundary initial values of boundary conditions Heither essential or naturalL<br />
SMTBodies description of bodies<br />
Basic input data arrays.
74 AceFEM Finite Element Environment<br />
SMTNodes=8node1,node2,…,nodeN<<br />
nodei<br />
8inode,X ,Y ,Z< 3 D node with coordinates 8X,Y,Z<<br />
8inode,X ,Y< 2 D node with coordinates 8X,Y<<br />
8inode,X < 1 D node with coordinates 8X<<br />
Node data for 3D, 2D and 1D problems.<br />
SMTElements=8elem1,elem2,…,elemM <<br />
elementi<br />
8ielem,dID,8inode1,inode2,…
AceFEM Finite Element Environment 75<br />
SMTEssentialBoundary=9pnode 1 ,pnode 2 ,…,pnode P =<br />
pnode i<br />
9nodeselector,v1,v2,…,vNdof = vi - reference value of the essential boundary<br />
condition HsupportL for the i-th unknown in all<br />
nodes that match nodeselecto Jsee Selecting Nodes N<br />
Essential boundary conditions.<br />
SMTNaturalBoundary=8nnode1,nnode2,…,nnodeR<<br />
nnodei<br />
9nodeselector, f1 , f2 ,…, fNdof = fi - reference value of the natural<br />
boundary condition HforceL for i-th unknown in all<br />
nodes that match nodeselector Jsee Selecting Nodes N<br />
Natural boundary conditions.<br />
SMTInitialBoundary=8nnode1,nnode2,…,nnodeR<<br />
nnodei<br />
9nodeselector, f 1 , f 2 ,…, f Ndof = f i - initial boundary condition Hforce or supportL for ith<br />
unknown in all nodes that match<br />
nodeselector Jsee Selecting Nodes N<br />
Initial boundary conditions.<br />
SMTBodies=9bodyspec 1 ,bodyspec 2 ,…,bodyspec R =<br />
bodyspec i<br />
88ielem1,ielem2,...
76 AceFEM Finite Element Environment<br />
The SMTNodes and SMTElements input arrays are automatically generated by the SMTMesh command (see<br />
SMTMesh ).<br />
The element user subroutines can be stored in a file in the Mathematica or C language, or in a dynamic link library.<br />
Dynamic link library file is generated automatically when the problem is run with the C source file as input for the first<br />
time. After that the dll library is regenerated if "dll" file is older than the current C source file.<br />
scode<br />
source_file file with the element source<br />
Hproper extension is obligatory .m, or .cL<br />
Automatic for the standard elements that are part<br />
of the standard library system the driver<br />
automatically finds the source file of the<br />
element according to the element name<br />
executable_file dynamic link library with<br />
the element subroutines Hname.dllL<br />
Specification of the location of element's source code.<br />
Entering the input data structures directly is allowed, but prone to errors. It is advisable to use commands described in<br />
Input Data instead.<br />
Sensitivity Input Data Structures<br />
SMTSensitivityData=9param 1 ,param 2 ,…,param ns =<br />
param i<br />
8sID, value, 8st1,…,stK
AceFEM Finite Element Environment 77<br />
Utilities<br />
SMTScanedDiagramToTable<br />
SMTMakeDll<br />
SMTScanedDiagramToTable@<br />
scaned_points, s0, s1,v0,v1D<br />
transforms a table of points picked with<br />
Mathematica from the bitmap picture into the<br />
table of points in the actual coordinate system,<br />
where s0 and s1 are two points picked from the<br />
picture with the known coordinates v0 and v1<br />
SMTMakeDll@source file, TrueD create dll file H optimised by the compilerL<br />
SMTMakeDll@source file, FalseD create dll file Hwithout additional compiler optimisationL<br />
SMTMakeDll@D create dll file from the last generated AceGen code Hif possibleL<br />
The dll file is created automatically by the SMTMakeDll function if the command line Visual studio C compiler and<br />
linker MinGW C compiler and linker are available. How to set necessary paths is described in the Install.txt file. For<br />
other C compilers, the user should write his own SMTMakeDll function that creates .dll file on a basis of the element<br />
source file, the sms.h header file and the SMSUtility.c file. Files can be found at the Mathematica directory $Base-<br />
Directory/Applications/AceFEM/Include/CDriver/ ).
78 AceFEM Finite Element Environment<br />
Shared Finite Element Libraries<br />
AceShare<br />
The AceFEM environment comes with the build-in library is a part of the installation and contains the element dll files<br />
for the most basic and standard elements. The standard build-in library of the elements is located at directory $Base-<br />
Directory/Applications/AceFEM/Library/.<br />
Additional elements can be accessed through the AceShare system. The AceShare system is a file sharing mechanism<br />
build in AceFEM that allows:<br />
- browsing the on-line FEM libraries<br />
- downloding finite elements from the on-line libraries<br />
- formation of the user defined library that can be posted on the internet to be used by other users of the AceFEM<br />
system<br />
Each on-line library can contain:<br />
fl element dll files,<br />
fl home page file (HTML file with basic descriptions, links, etc..)<br />
fl symbolic input used to generate element,<br />
fl source codes for other environments (FEAP, AceFEM-MDriver, Abaqus, ...)<br />
fl benchmark tests.<br />
Accessing elements from shared libraries<br />
The SMTAnalysis command automatically locates and downloads finite elements from the build-in and on-line<br />
libraries. The required element dll file is located on a base of an unified element code. The libraries can be<br />
selected and searched by the use of the finite element browser. The finite element browser can be used to locate the<br />
element, paste the element code into problems input data, get informations about material constants, available postprocessing<br />
keywords, and also to access element's home page with the links to benchmark tests and source codes.<br />
Selecting the on-line library.<br />
The information about the available on-line libraries is automatically updated once per day and stored in directory
AceFEM Finite Element Environment 79<br />
$BaseDirectory/AceCommon/. The downloding dll files from the on-line libraries are also stored in the same directory<br />
$BaseDirectory/AceCommon/.<br />
Browsing the on-line library.<br />
The library is defined by the unique code (e.g. OL stands for standard AceFEM on-line library). The standard Ace-<br />
FEM On-line library contains large number of finite elements (solid, thermal,... 2D, 3D,...) with full symbolic input for<br />
most of the elements. The number of finite elements included in on-line libraries is a growing daily. Please browse the<br />
available libraries to see if the finite element model for your specific problem is already available or order creation of<br />
specialized elements (www.fgg.uni-lj.si/consulting/).<br />
Example: Accessing elements from shared libraries<br />
80 AceFEM Finite Element Environment<br />
SMTNextStep@1, 100D;<br />
While@<br />
While@step = SMTConvergence@10^−7, 15, 8"Adaptive", 8, .01, 300, 500 "Window"DD;<br />
stepP3T ,<br />
If@stepP1T, SMTStepBack@DD;<br />
SMTNextStep@1, stepP2TD<br />
D<br />
Tê∆T=1.ê1. λê∆λ=100.ê100. ˛∆a˛ê˛Ψ˛=5.27759 × 10 −9<br />
ê7.49332 × 10 −13 IterêTotal=11ê11 Status=0ê8Convergence<<br />
Tê∆T=2.ê1. λê∆λ=195.918ê95.9184 ˛∆a˛ê˛Ψ˛=6.34592 × 10 −13<br />
ê9.10591 × 10 −13 IterêTotal=7ê18 Status=0ê8Convergence<<br />
Tê∆T=3.ê1. λê∆λ=338.817ê142.899 ˛∆a˛ê˛Ψ˛=4.49627 × 10 −8<br />
ê8.52241 × 10 −13 IterêTotal=6ê24 Status=0ê8Convergence<<br />
Tê∆T=4.ê1. λê∆λ=500.ê161.183 ˛∆a˛ê˛Ψ˛=3.36995 × 10 −10<br />
ê8.89986 × 10 −13 IterêTotal=6ê30 Status=0ê8Convergence<<br />
Show@SMTShowMesh@"Show" → False, "BoundaryConditions" → TrueD,<br />
SMTShowMesh@"DeformedMesh" → True, "Mesh" → False, "Field" → "Sxy",<br />
"Contour" → 20, "Show" → False, "Legend" → FalseD, PlotRange → AllD<br />
Unified Element Code<br />
The elements in the libraries are located through unique codes. The code is a string of the form:<br />
"library_code:element_code" .<br />
If the library code is omitted then the first element with the given element_code is selected.<br />
The element code can be further composed form several parts wit predefined meaning.<br />
For example the codes for the elements from the standard on-line AceFEM library (OL) consist of the following parts:
AceFEM Finite Element Environment 81<br />
Description No. of characters Example<br />
Physical problem 2 SE ª Mechanical problems<br />
Physical model 2 PE ª 2 D solid plane strain problems<br />
Topology 2 Q1 ª 2 D Quadrilateral with 4 nodes<br />
Variational<br />
formulation<br />
2 DF ª Full integrated displacement based elements<br />
General model 2 LE ã linear elastic solid<br />
Acronym arbitrary Q1E4<br />
Sub-model arbitrary IsoHooke<br />
Sub-sub-model arbitrary Missess<br />
…<br />
arbitrary<br />
…<br />
Keywords for the standard on-line AceFEM library.<br />
For example the SEPEQ1HRLEPianSumIsoHooke code represents the well-known Pian-Sumihara element derived for<br />
isothropic Hook's material.<br />
Users library<br />
Simple AceShare library<br />
Set up library<br />
82 AceFEM Finite Element Environment<br />
Create element<br />
SMSInitialize@"D3H1TH", "Environment" → "AceFEM"D;<br />
SMSTemplate@"SMSTopology" → "H1",<br />
"SMSDOFGlobal" → 1, "SMSSymmetricTangent" → FalseD;<br />
SMSStandardModule@"Tangent and residual"D;<br />
Xi £ Array@ SMSReal@nd$$@� ,"X", 1DD &, 8D;<br />
Yi £ Array@ SMSReal@nd$$@� ,"X", 2DD &, 8D;<br />
Zi £ Array@ SMSReal@nd$$@� ,"X", 3DD &, 8D;<br />
φi £ Array@SMSReal@nd$$@� ,"at", 1DD &, 8D;<br />
SMSGroupDataNames = 8"Conductivity parameter k0", "Conductivity parameter k1",<br />
"Conductivity parameter k2", "Heat source"
AceFEM Finite Element Environment 83<br />
SMTSetLibrary<br />
Initialize the library.<br />
SMTSetLibrary@pathD sets the path to the users library and initializes the library<br />
option description Default<br />
"Code" two letter code that uniquely identifies the library "UL"<br />
"Title" the short name that describes the contents<br />
of the library He.g. "large strain plasticity models"L<br />
"User Library"<br />
"URL" the internet address where the library will be posted "xxx"<br />
"Keywords" the list of keywords used to create the elements code the keywords used<br />
by the default buildin<br />
library<br />
" Contents " the description of the contents of the library "xxx"<br />
"Contact" the contact address of the corresponding author or institution "xxx"<br />
Options for SMTSetLibrary command.<br />
See also: Simple AceShare library<br />
SMTAddToLibrary<br />
Add elements to the library.<br />
SMTAddToLibraryA9key 2 ,key 2 ,…=E adds the element with the code key 1 key 2 ...<br />
to the current library<br />
The code should be the same as the AceGen session name used to create the element.<br />
option description Default<br />
"Author" 8"name","address"< 8"",""<<br />
"Source" the name of the notebook with the<br />
AceGen source used to create the element<br />
Hthe source notebook can be also automatically created<br />
by the SMSRecreateNotebook@D commandL<br />
""<br />
"Documentation" the name of the notebook with the documentation ""<br />
"Examples" the name of the notebook with the practical examples ""<br />
"DeleteOriginal" delete the original "Source", "Documentation" and<br />
"Examples" notebooks after they are copied to the library<br />
False<br />
Options for SMTAddToLibrary command.<br />
See also: Simple AceShare library
84 AceFEM Finite Element Environment<br />
SMTLibraryContents<br />
See also: Simple AceShare library<br />
Advanced AceShare library<br />
Set up library<br />
AceFEM Finite Element Environment 85<br />
SMTAddToLibrary@keywords<br />
, "DeleteOriginal" → True<br />
,"Source" −> SMSSessionName<br />
,"Documentation" −> SMSSessionName<br />
,"Examples" −> SMSSessionName<br />
,"Author" → 8"J. Korelc", "http:êêwww.fgg.uni−lj.siê∼êjkorelcê"<<br />
D;<br />
Create second element<br />
code = "D3H1THNonlin";<br />
keywords = 8"D3", "H1", "TH", "Nonlin" True,<br />
"Head" → 8Cell@SMSSessionName, "Title"D, Cell@"
86 AceFEM Finite Element Environment<br />
H∗ SMSTagSwitch − only choosen option is included into recreated notebook∗L<br />
SMSTagSwitch@material<br />
,"Lin",<br />
SMSGroupDataNames = 8"Conductivity parameter k0", "Heat source"
AceFEM Finite Element Environment 87<br />
AceFEM example for all elements<br />
SMTInputData@D;<br />
Q = 50;<br />
nn = 5;<br />
SMSTagSwitch@material<br />
,"Lin",<br />
SMTAddDomain@"cube", SMSTagEvaluate@codeD, 80.58, Q
88 AceFEM Finite Element Environment<br />
version<br />
AceFEM Troubleshooting<br />
à General<br />
• If the use of SMSPrint does not produce any printout or the execution does not stops at the break points<br />
(SMSSetBreak) check that:<br />
a) the code was generated in "Debug" mode (SMSInitialize["Mode"->"Debug"]),<br />
b) debug element has been set (SMTIData["DebugElement",element_number])<br />
c) the file is opened for printing (SMTAnalysis["Output"->filename]).<br />
• If the compilation is to slow then restrict compiler optimization with SMSAnalysis["OptimizeDll"->False].<br />
• If the quadratic convergence is not achieved check that:<br />
a) matrix is symmetric or unsymmetrical (by default all elements are assumed to have symmetric tangent matrix,<br />
use SMSTemplate["SMSSymmetricMatrix"->False] to specify unsymmetrical matrix),<br />
b) the tangent matrix is not singular or near singular.<br />
• Check the information given at www.fgg.uni-lj.si/symech/FAQ/.<br />
à Crash of the CDriver module<br />
• Recreate elements in Debug mode (SMSInitialize["Debug"->True]) and run the example again.<br />
• Run CDriver module in console mode (SMTInputData["Console"->True]).<br />
New in version<br />
Examples and Exercises<br />
About AceFEM Examples<br />
The presented examples are meant to illustrate the general symbolic approach to computational problems and the use of<br />
AceGen and AceFEM in the process. They are NOT meant to represent the state of the art solution or formulation of<br />
particular numerical or physical problem.<br />
All the examples come with a full AceGen input used to generate AceFEM source codes and dll files. All dll files are<br />
also included as a part of installation (at directory $BaseDirectory/Applications/AceFEM/Elements/), thus one does<br />
not have to create finite element codes with AceGen in order to run simulations that are part of the examples.<br />
More examples are available at www.fgg.uni-lj.si/symech/examples/ .
AceFEM Finite Element Environment 89<br />
Problem 1: General Formulation of Transient Coupled<br />
Non-linear Systems<br />
In order to make symbolic formulation of continuum problems general and simple we need a clear mathematical<br />
formulation at the highest abstract level possible. A typical procedure for solving coupled transient non-linear problems<br />
with FE method is presented in figure below. The AD mark indicates where the automatic differentiation procedure can<br />
be used. In addition to the large number of global degrees of freedom there can be several types of internal degrees of<br />
freedom. To avoid locking problems mixed variation principles can be employed. This leads to additional degrees of<br />
freedom, defined locally at the element level. They are eliminated by static condensation. The description of complex<br />
physical behavior requires internal variables, defined at every point of the domain (in the discretized case at every<br />
numerical integration point). The associated non-linear equations are solved by the iterative/sub-iterative procedure<br />
using an additional iterative loop for every integration point.<br />
For the derivation of the corresponding formulae for direct and sensitivity analysis of wide range of problems a general<br />
symbolic formulation of transient coupled non-linear systems can be used (more detailed description can be found in P.<br />
Michaleris, D.A. Tortorelli and C.A. Vidal, "Tangent operators and design sensitivity formulations for<br />
transient non-linear coupled problems with applications to elastoplasticity", Int. J. Num. Meth. Engng, 37,<br />
2471-2499, (1994)). The element stiffness matrix, the residual and the sensitivity terms must be evaluated consistently<br />
with the numerical procedures (so called consistent or algorithmic tangent modulus). The development of the<br />
presented structure is required for the reasons of efficiency.<br />
Let a be a vector of global element parameters, Y a set of global equations, b a vector of unknown local parameters, F<br />
a set of local equations, f an arbitrary sensitivity parameter, Da<br />
a sensitivity of global variables with respect to parame-<br />
Df<br />
ter f, Db<br />
Df a sensitivity of local variables with respect to parameter f, Dè Y<br />
an independent sensitivity pseudo-load vector,<br />
Df<br />
D è F<br />
Df<br />
a dependent sensitivity pseudo-load vector, t indicates the current time step , p the previous time step and i is an<br />
iteration counter. Procedures for the direct and the sensitivity analysis of the steady state, transient and transient<br />
coupled non-linear systems are presented in the following tables.
90 AceFEM Finite Element Environment<br />
Global level:<br />
• several millions of d.o.f.<br />
• AD is not usable<br />
• several MB of code<br />
Internal parameters:<br />
•
Direct analysis Sensitivity analysis<br />
t<br />
i<br />
t<br />
i<br />
t<br />
i<br />
t<br />
i<br />
t<br />
i<br />
t<br />
i<br />
t<br />
i<br />
t<br />
i<br />
t<br />
i<br />
t<br />
t<br />
a<br />
a<br />
a<br />
0<br />
Ψ<br />
a<br />
K<br />
a<br />
Ψ<br />
K<br />
0<br />
a<br />
Ψ<br />
Ψ<br />
Ψ<br />
Δ<br />
+<br />
=<br />
=<br />
+<br />
Δ<br />
∂<br />
∂<br />
=<br />
=<br />
+ :<br />
)<br />
(<br />
1<br />
)<br />
(<br />
)<br />
),<br />
(<br />
),<br />
(<br />
(<br />
φ<br />
φ<br />
φ<br />
φ<br />
φ<br />
φ<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
t<br />
p<br />
p<br />
t<br />
t<br />
p<br />
t<br />
t<br />
Ψ<br />
a<br />
a<br />
Ψ<br />
a<br />
K<br />
0<br />
a<br />
a<br />
Ψ<br />
Ψ<br />
+<br />
−<br />
=<br />
=<br />
Direct and sensitivity analysis of transient problems.<br />
Local level- direct analysis Global level-direct analysis<br />
t<br />
j<br />
t<br />
j<br />
t<br />
j<br />
t<br />
i<br />
t<br />
j<br />
t<br />
j<br />
t<br />
j<br />
t<br />
i<br />
t<br />
j<br />
t<br />
t<br />
b<br />
b<br />
b<br />
0<br />
Φ<br />
b<br />
K<br />
b<br />
Φ<br />
K<br />
0<br />
b<br />
Φ<br />
Φ<br />
Φ<br />
Δ<br />
+<br />
=<br />
=<br />
+<br />
Δ<br />
∂<br />
∂<br />
=<br />
=<br />
+ :<br />
)<br />
(<br />
1<br />
t<br />
i<br />
t<br />
i<br />
t<br />
i<br />
t<br />
i<br />
t<br />
i<br />
t<br />
i<br />
t<br />
i<br />
t<br />
i<br />
t<br />
i<br />
t<br />
i<br />
t<br />
i<br />
t<br />
i<br />
t<br />
i<br />
t<br />
i<br />
t<br />
t<br />
i<br />
t<br />
t<br />
t<br />
t<br />
a<br />
a<br />
a<br />
0<br />
Ψ<br />
a<br />
K<br />
a<br />
Ψ<br />
K<br />
a<br />
b<br />
a<br />
Φ<br />
a<br />
b<br />
K<br />
0<br />
a<br />
b<br />
a<br />
Ψ<br />
Ψ<br />
Ψ<br />
Φ<br />
Δ<br />
+<br />
=<br />
=<br />
+<br />
Δ<br />
∂<br />
∂<br />
=<br />
∂<br />
∂<br />
∂<br />
∂<br />
−<br />
=<br />
∂<br />
∂<br />
=<br />
+ :<br />
))<br />
(<br />
,<br />
(<br />
1<br />
Global level-sensitivity analysis Local level-sensitivity analysis<br />
( )<br />
⎟<br />
⎟<br />
⎟<br />
⎟<br />
⎟<br />
⎞<br />
⎟<br />
⎟<br />
⎞<br />
⎜<br />
⎜ +<br />
+<br />
∂<br />
∂<br />
⎜<br />
⎜ +<br />
+<br />
−<br />
=<br />
=<br />
=<br />
−<br />
Φ<br />
φ<br />
φ<br />
φ<br />
φ<br />
φ<br />
φ<br />
φ<br />
φ<br />
φ<br />
φ<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
K<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
p<br />
p<br />
t<br />
p<br />
p<br />
t<br />
t<br />
t<br />
t<br />
t<br />
p<br />
p<br />
t<br />
p<br />
p<br />
t<br />
t<br />
t<br />
t<br />
t<br />
t<br />
p<br />
t<br />
p<br />
t<br />
a<br />
a<br />
Ψ<br />
a<br />
a<br />
Φ<br />
Φ<br />
b<br />
Ψ<br />
Ψ<br />
b<br />
b<br />
Ψ<br />
a<br />
a<br />
Ψ<br />
Ψ<br />
Ψ<br />
a<br />
K<br />
0<br />
b<br />
b<br />
a<br />
a<br />
Ψ<br />
Ψ<br />
1<br />
~<br />
~<br />
~<br />
~<br />
)<br />
,<br />
,<br />
,<br />
,<br />
(<br />
⎟<br />
⎟<br />
⎞<br />
+<br />
+<br />
⎜<br />
⎜ +<br />
−<br />
=<br />
=<br />
=<br />
Φ<br />
φ<br />
φ<br />
φ<br />
φ<br />
φ<br />
φ<br />
φ<br />
φ<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
D<br />
p<br />
p<br />
t<br />
p<br />
p<br />
t<br />
t<br />
t<br />
t<br />
t<br />
t<br />
t<br />
t<br />
t<br />
p<br />
t<br />
p<br />
t<br />
b<br />
b<br />
Φ<br />
a<br />
a<br />
Φ<br />
Φ<br />
a<br />
a<br />
Φ<br />
Φ<br />
Φ<br />
b<br />
K<br />
0<br />
b<br />
b<br />
a<br />
a<br />
Φ<br />
~<br />
~<br />
~<br />
~<br />
)<br />
,<br />
,<br />
,<br />
,<br />
(<br />
Direct and sensitivity analysis of coupled transient problems.<br />
AceFEM Finite Element Environment 91
92 AceFEM Finite Element Environment<br />
Problem 2: Solid, Finite Strain Element for Direct and<br />
Sensitivity Analysis<br />
à Description<br />
Generate two-dimensional, four node finite element for the analysis of the steady state problems in the mechanics of<br />
solids. The element has the following characteristics:<br />
fl quadrilateral topology,<br />
fl 4 node element,<br />
fl isoparametric mapping from the reference to the actual frame,<br />
fl global unknowns are displacements of the nodes,<br />
fl the element should allow arbitrary large displacements and rotations,<br />
fl the problem is defined by the hyperelastic Neo-Hooke type strain energy potential,<br />
P=Ÿ I<br />
W0<br />
l<br />
2 Hdet F - 1L2 +mI Tr@CD-2<br />
- Log@det FDM - u .Q M „ W0,<br />
2<br />
where C = F T F is right Cauchy-Green tensor, F = I +õu is deformation gradient,<br />
u is displacements field, Q is prescribed body force, t is prescribed surface traction,<br />
W0 is the initial domain of the problem and l, m are the first and the second Lame's material constants.<br />
The following user subroutines have to be generated:<br />
fl user subroutine for the direct implicit analysis,<br />
fl user subroutine for the sensitivity analysis with respect to the material constants and<br />
the arbitrary shape parameter,<br />
fl user subroutine for the post-processing that returns the Green-Lagrange strain tensor and<br />
the Cauchy stress tensor.<br />
Y, v, Fy<br />
4<br />
1<br />
X, u, F x<br />
3<br />
2<br />
4<br />
(-1,1)<br />
η<br />
(1,1)<br />
(-1,-1) (1,-1)<br />
1 2<br />
3<br />
ξ
AceFEM Finite Element Environment 93<br />
Solution<br />
94 AceFEM Finite Element Environment<br />
SMSStandardModule@"Postprocessing"D;<br />
SMSDo@IpIndex, 1,SMSInteger@es$$@"id", "NoIntPoints"DDD;<br />
H∗ here the contents of the above cell with the tag Kinematics is included∗L<br />
SMSEvaluateCellsWithTag@"Kinematics", "Session"D;<br />
SMSGPostNames = 8"Exx", "Eyy", "Exy", "Sxx", "Syy", "Sxy" TrueD . Transpose@�D;<br />
SMSExport@Join@Extract@�, 881, 1
AceFEM Finite Element Environment 95<br />
Problem 3: Surface Traction Element for Direct and<br />
Sensitivity Analysis<br />
à Description<br />
In the section Problem 2 a 2D solid element was generated, however the possibility of having prescribed natural<br />
boundary conditions on a surface of the element was not considered. Generate a 2D surface traction element with the<br />
following characteristics:<br />
fl surface is composed of linear segments,<br />
fl traction is constant on the segment and conservative,<br />
fl global unknowns are displacements of nodes,<br />
fl the problem is defined by the surface traction potential<br />
P=-Ÿ u.t „ G0<br />
G0<br />
where u is displacement field, t is prescribed surface traction and G0 is the initial boundary of the problem.<br />
The following user subroutines have to be generated:<br />
fl user subroutine for the direct implicit analysis,<br />
fl user subroutine for the sensitivity analysis with respect to the intensity of the traction<br />
and the arbitrary shape parameter.<br />
à Solution<br />
The value of the prescribed surface traction is multiplied by the value of the current boundary condition multiplier.<br />
Since the change of the geometry effects the surface, the contribution of the surface traction to the sensitivity pseudoload<br />
vector has to be accounted for.
96 AceFEM Finite Element Environment<br />
AceFEM Finite Element Environment 97<br />
Method : SHI 0 formulae, 0 sub−expressions<br />
@2D File created : ExamplesSurfaceLoad.c Size : 6068<br />
Problem 4: Parameter, Shape and Load Sensitivity<br />
Analysis of Multi-Domain Example<br />
à Description<br />
With the use of the elements generated in sections Problem 2 and Problem 3 analyze the following two-domain<br />
example.<br />
5<br />
Ω 1<br />
p 1 =Ε 1<br />
Ε=1000<br />
ν=0.3<br />
10<br />
p 3 = L<br />
Ω 2<br />
p 2 =ν 2<br />
Ε=5000<br />
ν=0.2<br />
t = { 0,<br />
1}<br />
p 4 = t y<br />
The sensitivity of the displacement field u = 8u, v< with respect to the following parameters has to be analyzed:<br />
p1 fl elastic modulus of the first domain E1,<br />
p2 fl Poisson ration of the second domain n2,<br />
p3 fl length L,<br />
p4 fl vertical component of the surface traction ty.
98 AceFEM Finite Element Environment<br />
à Solution<br />
AceFEM Finite Element Environment 99<br />
SMTIData@"SensIndex", 2D;<br />
SMTShowMesh@"DeformedMesh" → True, "Mesh" → False, "Domains" → 8"Ω1", "Ω2" True, "Contour" → 5D<br />
Problem 5: Inflating the Tyre<br />
à Description<br />
0.156e-1<br />
0.128e-1<br />
0.100e-1<br />
0.731e-2<br />
0.454e-2<br />
0.178e-2<br />
-0.98e-3<br />
Max.<br />
0.1837e-1<br />
Min.<br />
-0.374e-2<br />
AceFEM<br />
In the section Problem 3 the surface traction solid element was generated on the assumption of conservative load acting<br />
on the undeformed surface. However, the load such as gas pressure acts perpendicular to the actual deformed surface.<br />
Generate 2D surface traction element with the following characteristics:<br />
fl surface is composed of linear segments,<br />
fl traction is perpendicular to the deformed surface of the domain,<br />
fl global unknowns are displacements of the nodes,<br />
fl contribution of the surface pressure to the virtual work of the problem is defined by<br />
Y=Ÿ G tdu „ G<br />
where du is variation of the displacement field, t is prescribed surface traction and G is the<br />
deformed boundary of the problem.<br />
The following user subroutines have to be generated:<br />
fl user subroutine for the direct implicit analysis.<br />
With the derived code and the element from section Problem 2 analyze the problem of inflating the tyre. Calculate the<br />
shape of the tyre when the pressure inside is 0 and when the pressure is 27.
100 AceFEM Finite Element Environment<br />
R=1<br />
pressure=27<br />
0.2<br />
à Gas pressure element<br />
E=1000<br />
ν=0.45<br />
t=0.1<br />
ρg=5<br />
Due to the surface pressure acting perpendicular to the deformed mesh the surface traction element contributes also to<br />
the global tangent matrix and makes the global tangent unsymmetric.<br />
AceFEM Finite Element Environment 101<br />
à Analysis<br />
102 AceFEM Finite Element Environment<br />
graph = 8
AceFEM Finite Element Environment 103<br />
Problem 6: Three Dimensional, Elasto-Plastic Element<br />
à Description<br />
Generate the three-dimensional, eight node finite element for the analysis of the transient coupled problems in the<br />
mechanics of solids. The element has the following characteristics:<br />
fl hexahedral topology,<br />
fl 8 nodes,<br />
fl isoparametric mapping from the reference to the actual frame,<br />
Z, w, Fz<br />
X, u, F x<br />
1 2<br />
Y, v, F y<br />
fl global unknowns are displacements of the nodes,<br />
5<br />
fl the element should take into account only small strains,<br />
fl surface tractions and body forces are neglected,<br />
8<br />
4<br />
6<br />
3<br />
7<br />
5<br />
1<br />
(1,−1,1)<br />
(1,−1,−1)<br />
8<br />
ζ<br />
6<br />
(−1,−1,1)<br />
(1,1,1)<br />
ξ<br />
4 η<br />
(−1,−1,−1)<br />
2<br />
(1,1,−1)<br />
7<br />
(−1,1,1)<br />
3<br />
(−1,1,−1)<br />
fl the classical Hooke's law for the elastic response and an ideal elasto-plastic material law for the plastic response.<br />
à Three Dimensional, Elasto-Plastic Element<br />
Here the AceGen and the Computational Templates are initialized.<br />
"AceFEM"D;<br />
nstate = 7; nhistory = nstate + 1;<br />
SMSTemplate@"SMSTopology" → "H1", "SMSSymmetricTangent" → True,<br />
"SMSNoTimeStorage" → nhistory es$$@"id", "NoIntPoints"D,<br />
"SMSPostIterationCall" → TrueD;<br />
Here starts the definition of "tangent and residual" user subroutine. The nodal coordinates, the global degrees of freedom and the<br />
material parameters are introduced and connected to the chosen FE environment.<br />
SMSStandardModule@"Tangent and residual"D;<br />
8Xi, Yi, Zi< £ Array@SMSReal@nd$$@�2, "X", �1DD &, 83, 8
104 AceFEM Finite Element Environment<br />
Here all global degrees of freedom are collected in one vector so that the proper degree of freedom ordering is established. For the<br />
generation of the characteristic formulae, the array of all global degrees of freedom �t is introduced.<br />
�t £ SMSArray@8ut, vt, wt< êêTranspose êê FlattenD;<br />
Here the loop over the numerical integration points starts.<br />
SMSDo@IpIndex, 1,SMSInteger@es$$@"id", "NoIntPoints"DDD;<br />
8ξ, η, ζ, wGauss< £ Array@SMSReal@es$$@"IntPoints", � , IpIndexDD &, 4D;<br />
Here the isoparametric shape functions Ni and the isoparametric mapping from the actual (X,Y,Z) to the reference coordinates<br />
(x,h,z) is introduced. The SMSFreeze function is used here in order to enable differentiation with respect to the coordinates X,Y,Z<br />
later on.<br />
8ξi, ηi, ζi< = 88−1, 1, 1, −1, −1, 1, 1, −1
AceFEM Finite Element Environment 105<br />
s = sHeeL<br />
s = s - 1<br />
I tr s<br />
3<br />
� =<br />
3<br />
s : s -sy<br />
2<br />
� = ∑�<br />
∑s , De p =l °<br />
m �<br />
F=9ep - pep -Dep, � =<br />
�ΦΠ@b_, task_D := ModuleB8
106 AceFEM Finite Element Environment<br />
Here the local iterative loop starts. Independent vector of state variables �t is introduced. The trial value for �t is taken to be the<br />
one at the end of the previous time step (�p).<br />
�t • �p;<br />
SMSDo@iter, 1,30,1,�tD;<br />
Here the local system of equations F is evaluated, linearized and one iteration of the local Newton-Raphson procedure is<br />
performed.<br />
�ΦΠ@�t, "Φ"D;<br />
KΦ £ SMSD@Φ, �tD;<br />
LU • SMSLUFactor@KΦD;<br />
∆� £ SMSLUSolve@LU, −ΦD;<br />
�t § �t + ∆�;<br />
Please, consider using SMSSqrt instead of Sqrt.<br />
See also: Expression Optimization<br />
Please, consider using SMSSqrt instead of Sqrt.<br />
See also: Expression Optimization<br />
Forward elimination and back substitution of 7 equations.<br />
Exit the sub-iterative loop if the local equations are satisfied or the convergence was not reached. Consistent linearization of the<br />
global system of equations requires evaluation of the implicit dependencies among the state variables and the components of the<br />
total strain tensor. Implicit dependencies are obtained by definition.<br />
KF ∑�<br />
∑e =-∑F<br />
∑e<br />
ï ∑�<br />
∑e .<br />
The values of the state variables are stored back to the history data of the element.<br />
SMSIf@Sqrt@∆�.∆�D < 1 ê 10^9 D;<br />
δ�ε • SMSLUSolve@LU, −SMSD@Φ, SMSVariables@εD, "Constant" → �tDD;<br />
SMSExport@1000 + SMSAbs@�D, ed$$@"ht", hindex + nstate + 1DD;<br />
SMSExport@�t, Array@ed$$@"ht", hindex + � D &, nstateDD;<br />
SMSBreak@D;<br />
SMSEndIf@D;<br />
SMSIf@iter == "29"D;<br />
SMSExport@81, 2
AceFEM Finite Element Environment 107<br />
Here the system of global equations Y and the global tangent matrix K Y are evaluated and exported to the output parameters of the<br />
user subroutine. One characteristic formula is generated for the arbitrary element of Y and one characteristic formula for the<br />
arbitrary element of K Y.<br />
�ΦΠ@�, "Π"D;<br />
SMSDo@i, 1,24D;<br />
Ψ £ Jd wGauss SMSD@Π, �t, i, "Constant" → �D;<br />
SMSExport@SMSResidualSign Ψ, p$$@iD, "AddIn" → TrueD;<br />
SMSIf@SMSInteger@idata$$@"PostIteration"DD == 1D;<br />
SMSContinue@D;<br />
SMSEndIf@D;<br />
SMSDo@j, 1,24D;<br />
Kt = SMSD@Ψ, �t, jD;<br />
SMSExport@Kt, s$$@i, jD, "AddIn" → TrueD;<br />
SMSEndDo@D;<br />
SMSEndDo@D;<br />
This is the end of the numerical integration loop.<br />
SMSEndDo@D;<br />
Here starts the definition of the "Postprocessing" user subroutine. The values of the plastic strain tensor and the plastic multiplier<br />
are postprocessed.<br />
SMSStandardModule@"Postprocessing"D;<br />
SMSDo@IpIndex, 1,SMSInteger@es$$@"id", "NoIntPoints"DDD;<br />
hindex £ SMSInteger@HIpIndex − 1L nhistoryD;<br />
SMSGPostNames =<br />
8"Exxp", "Eyyp", "Ezzp", "Exyp", "Exzp", "Eyzp", "Plastic mult.", "Switch"
108 AceFEM Finite Element Environment<br />
à Analysis<br />
AceFEM Finite Element Environment 109<br />
GraphicsGrid@ Partition@Map@<br />
SMTShowMesh@"Field" −> � ,"DeformedMesh" → True, "Mesh" → False,<br />
"Legend" −> "MinMax"D &, 8"Plastic∗", "Exxp", "Ezzp", "Exzp"
110 AceFEM Finite Element Environment<br />
Problem 7: Axisymmetric, finite strain elasto-plastic<br />
element<br />
à Description<br />
Generate axisymmetric four node finite element for the analysis of the steady state problems in the mechanics of solids.<br />
The element has the following characteristics:<br />
fl quadrilateral topology,<br />
fl 4 node element,<br />
fl isoparametric mapping from the reference to the actual frame<br />
fl global unknowns are displacements of the nodes,<br />
fl volumetric/deviatoric split<br />
fl Taylor expansion of shape functions<br />
fl J2 finite strain plasticity<br />
fl isothropic hardening of the form: sy =sy0 + K a+IY¶ -sy0MH1 - Exp@-d aDL<br />
The detailed description of the steps is given in Problem 6 The only difference is in kinematical equations and the<br />
definition of the �FP function. The state variables in this case are the components of an inverse plastic right Cauchy<br />
strain tensor -1 Cpl , a plastic multiplier gm and a Lagrange volumetric constrain l<br />
-1<br />
J b = :C 11, -1<br />
pl Cpl<br />
22, -133, -1<br />
Cpl Cpl<br />
12, gm, l>N. The state variables are stored as history dependent real type values per each<br />
integration point of each element (SMSNoTimeStorage). Additionally to the state variables, the component of the<br />
deformation tensor IF1,1, F1,2, F2,1, F2,2, F3,3M are also stored for post-processing as arbitrary real values per element<br />
(SMSNoElementData).<br />
à Solution<br />
AceFEM Finite Element Environment 111<br />
�ΦΠ@b_, task_D := ModuleB8
112 AceFEM Finite Element Environment<br />
Xi £ SMSReal@Array@nd$$@�1, "X", 1D &, 4DD;<br />
Yi £ SMSReal@Array@nd$$@�1, "X", 2D &, 4DD;<br />
ui £ SMSReal@Array@nd$$@�1, "at", 1D &, 4DD;<br />
vi £ SMSReal@Array@nd$$@�1, "at", 2D &, 4DD;<br />
�t £ SMSArray@Flatten@Transpose@8ui, vi
AceFEM Finite Element Environment 113<br />
�ΦΠ@�p, "�"D;<br />
SMSIfB HSMSInteger@idata$$@"Iteration"DD == 1&&switch � 0L»»<br />
SMSInteger@idata$$@"Iteration"DD > 1 && � < 1<br />
F;<br />
8<br />
10<br />
� • �p;<br />
SMSExport@�p, ed$$@"ht", hindex + � D &D;<br />
SMSExport@0, ed$$@"ht", hindex + iswitchDD;<br />
SMSElse@D;<br />
�t • �p;<br />
SMSDo@iter, 1,30,1,�tD;<br />
�ΦΠ@�t, "Φ"D;<br />
KΦ £ SMSD@Φ, �tD;<br />
LU • SMSLUFactor@KΦD;<br />
∆� £ SMSLUSolve@LU, −ΦD;<br />
�t § �t + ∆�;<br />
SMSIf@SMSSqrt@∆�.∆�D < 1 ê 10^9 D;<br />
δ�ε • SMSLUSolve@LU, −SMSD@Φ, SMSVariables@�D, "Constant" → �tDD;<br />
SMSExport@1000 + SMSAbs@�D, ed$$@"ht", hindex + iswitchDD;<br />
SMSExport@�t, ed$$@"ht", hindex + � D &D;<br />
SMSBreak@D;<br />
SMSEndIf@D;<br />
SMSIf@iter == 29D;<br />
SMSExport@81, 2
114 AceFEM Finite Element Environment<br />
SMSStandardModule@"Postprocessing"D;<br />
SMSDo@IpIndex, 1,SMSInteger@es$$@"id", "NoIntPoints"DDD;<br />
H∗ here the contents of the above cell with the tag Data is included∗L<br />
SMSEvaluateCellsWithTag@"Data", "Session"D;<br />
�i £ SMSReal@Array@ed$$@"Data", HIpIndex − 1L nhdata + � D &, nhdataDD;<br />
� £<br />
�iP1T �iP2T 0<br />
�iP3T �iP4T 0 ;<br />
0 0 �iP5T<br />
� £ SMSReal@Array@ed$$@"ht", hindex + � D &, nstateDD;<br />
�ΦΠ@�, "�"D;<br />
Cauchy = τ ê Det@�D;<br />
GreenLagrange = 1 ê 2 HTranspose@�D.� − IdentityMatrix@3DL;<br />
PlasticDeformation = 2 ê 3 �P5T;<br />
SMSGPostNames = 8"Sxx", "Sxy", "Sxz", "Syx", "Syy", "Syz", "Szx", "Szy", "Szz",<br />
"Exx", "Exy", "Exz", "Eyx", "Eyy",<br />
"Eyz", "Ezx", "Ezy", "Ezz", "Plastic deformation"
AceFEM Finite Element Environment 115<br />
à Analysis Session<br />
116 AceFEM Finite Element Environment<br />
SMTShowMesh@"BoundaryConditions" → TrueD<br />
Here the cyclic loading simulation is performed. Function l(t) defines the load history with l as the load multiplier. The SMTPut<br />
command writes current values of post-processing data into the data base. Current time is used as an keyword that will be used<br />
later to retrive informations from data base. Additonaly the resulting force at the top of the speciment is olso stored into data base.<br />
Clear@λD; λ@t_D := If@OddQ@Floor@Ht + 1Lê2DD, 1,−1D H2 Floor@Ht + 1Lê2D − tL ;
AceFEM Finite Element Environment 117<br />
Plot@λ@tD, 8t, 0,10
118 AceFEM Finite Element Environment<br />
SMTSimulationReport@D;<br />
No. of nodes 506<br />
No. of elements 450<br />
No. of equations 944<br />
Data memory HKBytesL 376<br />
Solver memory HKBytesL 206<br />
No. of steps 115<br />
No. of steps back 23<br />
Step efficiency H%L 83.3333<br />
Total no. of iterations 864<br />
Average iterationsêstep 6.26087<br />
Total time HsL 129.957<br />
Total solver time HsL 9.083<br />
Total solver time H%L 6.98923<br />
Total element time HsL 40.341<br />
Total element time H%L 31.0418<br />
Average timeêiteration HsL 0.150413<br />
Average solver time HsL 0.0105127<br />
Average element time HsL 0.000103758<br />
USER−IData<br />
USER−RData<br />
à Postprocessing Session<br />
Here the new, independent session starts by reading input data from previously stored post-processing data base file.<br />
"cyclic"D;<br />
The SMTGet[] command returns all keywords and the names of stored post-processing quantities.<br />
8allkeys, allpost< = SMTGet@D;<br />
allpost<br />
allkeys êê Length<br />
8DeformedMeshX, DeformedMeshY, Exx, Exy, Exz, Eyx, Eyy, Eyz, Ezx, Ezy,<br />
Ezz, Plastic deformation, Sxx, Sxy, Sxz, Syx, Syy, Syz, Szx, Szy, Szz<<br />
97
AceFEM Finite Element Environment 119<br />
The SMTGet[key] command reads the information storder under the keyword allkeys[[10]].<br />
force = SMTGet@allkeys@@10DDD<br />
allkeys@@10DD<br />
SMTShowMesh@"BoundaryConditions" → True, "DeformedMesh" → True,<br />
"Field" −> "Plastic deformation", "Marks" → False, "Contour" → TrueD<br />
8−0.242828<<br />
1.07279<br />
0.279<br />
0.239<br />
0.199<br />
0.159<br />
0.119<br />
0.799e-1<br />
0.399e-1<br />
Plastic deformation<br />
Max.<br />
0.3199<br />
Min.<br />
0<br />
AceFEM
120 AceFEM Finite Element Environment<br />
Here all post-processing quantities are evaluated at point {R,0}. Note that the valu of "R" was stored by the SMTSave command at<br />
the analysis time and restored by the SMTAnalysis["PostInput"->"cyclic"] command.<br />
8Range@allpost êê LengthD, allpost,<br />
SMTPointValues@88R, 0
AceFEM Finite Element Environment 121<br />
Here the evolution of some Iu, v, plastic deformation, syyM postprocessing quantities in point {R/2,L/3} is presented.<br />
ListLinePlot@Map@8� , SMTGet@� D; SMTPointValues@8R ê 2, L ê 3.
122 AceFEM Finite Element Environment<br />
ListLinePlot@Map@8� , SMTGet@� D; SMTPointValues@8R ê 2, L ê 3.
AceFEM Finite Element Environment 123<br />
The sequence of pictures is here transformed into the animated pldef.gif file, with the delay of 20/100 of seconds between frames<br />
and running in an infinite loop.<br />
SMTMakeAnimation@"pldef", "GIF", "Slow" → True, "Loop" → TrueD<br />
0<br />
GIFMake by Samiel − samiel@fastlane.net<br />
Revision 2.0 − Freeware!<br />
gifmake @tmp.lst −n:pldef.gif −s<br />
Run@"explorer pldef.gif"D;<br />
Please follow the link to the animation<br />
galery www.fgg.uni − lj.si ê symech ê Animations ê .<br />
Problem 9: Solid, Finite Strain Element for Dynamic<br />
Analysis<br />
See also 2D snooker simulation .<br />
124 AceFEM Finite Element Environment<br />
Kinematics, b:6.9<br />
H∗ this is notebook cell with the tag Hypersolid−definitions ∗L<br />
Xi £ SMSReal@Array@nd$$@�1, "X", 1D &, 4DD;<br />
Yi £ SMSReal@Array@nd$$@�1, "X", 2D &, 4DD;<br />
ui £ SMSReal@Array@nd$$@�1, "at", 1D &, 4DD;<br />
vi £ SMSReal@Array@nd$$@�1, "at", 2D &, 4DD;<br />
uiP £ SMSReal@Array@nd$$@�1, "ap", 1D &, 4DD;<br />
viP £ SMSReal@Array@nd$$@�1, "ap", 2D &, 4DD;<br />
SMSGroupDataNames = 8"Elastic modulus", "Poisson ratio", "Thickness of the element",<br />
"Volume load X", "Volume load Y", "Density", "Newmark alpha", "Newmark delta"
AceFEM Finite Element Environment 125<br />
SMSStandardModule@"Postprocessing"D;<br />
SMSDo@IpIndex, 1,SMSInteger@es$$@"id", "NoIntPoints"DDD;<br />
H∗ here the contents of the above cell with the tag Kinematics is included∗L<br />
SMSEvaluateCellsWithTag@"Kinematics", "Session"D;<br />
SMSGPostNames = 8"Exx", "Eyy", "Exy", "Sxx", "Syy", "Sxy" TrueD . Transpose@�D;<br />
SMSExport@Join@Extract@�, 881, 1
126 AceFEM Finite Element Environment<br />
Implementation Notes for Contact Elements<br />
The contact support in AceGen is based on a particular scheme, which will be presented below. The basic part of the<br />
scheme is an element. We use the special kind of elements in AceGen (a contact elements) to formulate the contact<br />
laws. We make a distinction there in the contact elements for slave and master part. The slave part is defined directly as<br />
the system covers the bodies surfaces with contact elements. The master part is a group of special kind of nodes<br />
(Node Specification Data) which are considered as empty slots where another nodes are placed during the<br />
evaluation (due to a global search routine).<br />
Such an element must provide additional information required for global search routine purposes:<br />
- contact type for slave and master part separately (see table below) put into SMSCharSwitch array in SMSTemplate<br />
procedure<br />
- information, that the element should be considered as contact element -- "ContactElement" string put into<br />
SMSCharSwitch array<br />
- SMSStandardModule["Nodal information"] describing the actual and previous positions of all integration<br />
points (slave nodes)<br />
SMSTemplate@ ....,<br />
"SMSCharSwitch"->8slave part contact type, master part contact type,"ContactElement"
AceFEM Finite Element Environment 127<br />
segment<br />
nodes<br />
slave part master part<br />
neighboring<br />
nodes<br />
for 1 st slave<br />
integration point<br />
segment<br />
nodes<br />
neighboring<br />
nodes<br />
"D" "D -D"<br />
Nodes position in the contact element (general grouping scheme.)<br />
8type of slave, type of master< Detailed numbering scheme<br />
8" CTD2 N1 "," CT NULL "<<br />
8" CT D2 N1 "," CTD2 L1 "<<br />
8" CTD2 L1 "," CTD2 L1 "<<br />
1<br />
3<br />
6<br />
1<br />
5<br />
2<br />
2<br />
4<br />
1<br />
3
128 AceFEM Finite Element Environment<br />
8" CTD2 L1DN1 ",<br />
" CTD2 N1DN1 "<<br />
8" CTD2 L1DN1 ",<br />
" CTD2 L1DN1 "<<br />
8" CTD3 V1 "," CTD3 P1 "<<br />
10<br />
12<br />
4<br />
9<br />
8<br />
6 2 1 5<br />
4 3<br />
8<br />
7<br />
2<br />
11<br />
10<br />
6<br />
1<br />
7<br />
4 3<br />
1<br />
3<br />
2
AceFEM Finite Element Environment 129<br />
8" CTD3 V1DN3 "," CTD3 S1 "<<br />
8" CTD3 V1DN4 ",<br />
" CTD3 S1DN2 "<<br />
4<br />
5<br />
3<br />
4<br />
8<br />
15<br />
5<br />
16<br />
1<br />
1<br />
14<br />
Position of nodes in the contact element (detailed numbering scheme for choosen examples.)<br />
3<br />
7<br />
2<br />
8<br />
9<br />
2<br />
6<br />
13<br />
17<br />
7<br />
6<br />
12<br />
10<br />
After definition of the contact element we may proceed with the analysis. In particular contact system, there are several<br />
bodies which may come into the contact. Each of them has its own boundary (boundaries) where the contact elements<br />
must be placed. We need to apply some extra parameters to SMTMesh procedure to specify the body name to which<br />
the mesh belongs and the list of domains (contact domains in our case) which will be used to cover the surface of the<br />
body.<br />
Note, that the BodyID's in the contact system shouldn't be chosen randomly. The lexicographical order of BodyID's is<br />
used by the global search routine (in master-slave approach): for each surface node taken from particular body it<br />
searches for the closest segment on the surface of bodies which ID's are "greater". So slave bodies have "lower" ID's<br />
than master bodies.<br />
After SMTAnalysis[] one may need to provide some additional coefficients for global search routine purpose. We<br />
setup them as Environment Data:
130 AceFEM Finite Element Environment<br />
Default form Description Default value<br />
rdata$$@<br />
"ContactSearchTolerance"D<br />
Additional environmental data for contact search purposes.<br />
contact search tolerance for global search routine. 0.001 SMTRData@<br />
"XYZRange"D<br />
Then, calling the SMTNewtonIteration[] procedure, the global search routine is executed to search for contact pairs<br />
and, eventually, update the information in elements' dummy slots.<br />
NOTE: it is important to cover with contact elements also the body, which is "master" to all the others. Such an elements<br />
are needed to calculate the actual positions of nodes (integration points) on the surface of this body. It is enough<br />
to have only "Nodal information" subroutine defined there. In this case we may set the master part contact type as<br />
"CTNULL".<br />
Function name Description<br />
SMTContactData@D prints out the actual contact state Hnode->segment mappingL<br />
SMTContactSearch@D manually runs the global contact search routine<br />
Contact related functions.
AceFEM Finite Element Environment 131<br />
Problem 1: 2D slave node -> line master segment<br />
element<br />
Description<br />
Generate the node-to-segment element for analysis of the 2-D frictionless contact problems. The element has the<br />
following characteristics:<br />
fl 3 node element: one slave node + two dummy nodes (for linear master segment)<br />
fl global unknowns are displacements of the nodes,<br />
fl the element should allow arbitrary large displacements,<br />
fl the impenetrability condition is regularized with penalty method and formulated as energy potential:<br />
P=: ⁄ N 1<br />
i=1 2 e gN 2 for<br />
0 for gN § 0<br />
gN > 0<br />
where e is penalty parameter, and gN is normal gap (at the point of orthogonal projection of slave point on<br />
master boundary). N is a number of nodes on slave contact surface.<br />
gN<br />
n1<br />
n2 n3<br />
slave<br />
The following user subroutines have to be generated:<br />
fl user subroutine for specification of nodal positions,<br />
fl user subroutine for the direct implicit analysis,<br />
mas
132 AceFEM Finite Element Environment<br />
Solution<br />
AceFEM Finite Element Environment 133<br />
SMSEndDo@D;<br />
SMSEndIf@D;<br />
SMSWrite@D;<br />
Postprocessing of the integration point quantities is<br />
suspended for the element. See also: SMSReferenceNodes<br />
Default integration code is set to<br />
21 . See also: SMSDefaultIntegrationCode<br />
Method : PAN 3 formulae, 60 sub−expressions<br />
Method : SKR 63 formulae, 894 sub−expressions<br />
@3D File created : ExamplesCTD2N1L1Pen.c Size : 6634<br />
Problem 2: 2D indentation problem<br />
Description<br />
Use the contact element from Problem 1:2D slave node→line master segment element and hypersolid<br />
element from Problem 2 to analyse the simple 2D indentation problem: small elastic box pressed down into<br />
large elastic box.<br />
F
134 AceFEM Finite Element Environment<br />
Solution<br />
AceFEM Finite Element Environment 135<br />
Problem 3: 2D slave node -> smooth master segment<br />
element<br />
Description<br />
Generate the node-to-segment smooth element for analysis of the 2-D contact problems (Coulomb friction, augmented<br />
Lagrange multipliers method). The element has the following characteristics:<br />
fl 8 node element: one slave node + two dummy slave nodes (referential area) + four master nodes (3rd order<br />
Bezier curve) + lagrange multipliers node,<br />
fl global unknowns are displacements of the nodes + lagrange multipliers,<br />
fl the element should allow arbitrary large displacements,<br />
fl the impenetrability condition is regularized with augmented lagrange multipliers method and formulated as<br />
energy potential (for each node on slave contact surface):<br />
where:<br />
and<br />
and<br />
P=PN +PT<br />
PN =: 1<br />
2 r J < gN +lN >- 2 -lN 2 M for<br />
0 for<br />
PT =: 1<br />
2 r J < gT +lT >- 2 -lT 2 M for<br />
x for<br />
< x >- = :<br />
0 for<br />
x § 0<br />
x > 0<br />
0 for<br />
gN § 0<br />
gN > 0<br />
gT § 0<br />
gT > 0<br />
and r is regularisation parameter, gN is normal gap (at the point of orthogonal projection of slave point on<br />
master boundary), gT is tangential slip.<br />
lN and lT are lagrange multipliers and have a meaning of normal and tangential nominal pressure<br />
respectively.<br />
The following user subroutines have to be generated:<br />
fl user subroutine for specification of nodal positions,<br />
fl user subroutine for the direct implicit analysis,
136 AceFEM Finite Element Environment<br />
Solution<br />
AceFEM Finite Element Environment 137<br />
SMSDo@j, 1,2D;<br />
jj £ SMSInteger@SMSPart@index, 10+ jDD;<br />
dRdaNC £ SMSD@ RNC, 8λN, λT
138 AceFEM Finite Element Environment<br />
b £ SMSReal@bD;<br />
H∗ Remember to define "b" before using this tag! ∗L<br />
8ξ, gN< £ b;<br />
localSearch;<br />
dHda £ SMSD@H, basicVarsD;<br />
dbda £ −dHdbInv.dHda;<br />
SMSDefineDerivative@b, basicVars, dbdaD;<br />
H∗ Augmented multipliers and friction cone radius ∗L<br />
H∗ ∆ξ£ξ−ξP; ∗L<br />
∆ξ £ SMSD@ ξ, basicVars D.HbasicVars − basicVarsPL;<br />
λNaug £ λN + ρ gN;<br />
λTaug £ λT + ρ∆ξ;<br />
SMSIf@SMSInteger@idata$$@"Iteration"DD � 1D;<br />
8stateN, stateT< • Array@SMSInteger@ed$$@"hp", � + 2DD &, 2D;<br />
SMSElse@D;<br />
8stateN, stateT< § SMSInteger@80, 0
AceFEM Finite Element Environment 139<br />
SMSEndIf@D;<br />
SMSWrite@D;<br />
Postprocessing of the integration point quantities is<br />
suspended for the element. See also: SMSReferenceNodes<br />
Method : PAN 1 formulae, 62 sub−expressions<br />
Method : SKR 1506 formulae, 17 607 sub−expressions<br />
@118D File created :<br />
ExamplesCTD2N1DN2L1DN1AL.c Size : 59 461<br />
Problem 4: 2D snooker simulation<br />
à Description<br />
Use the contact element from Problem 3: 2D slave node -> smooth master segment element<br />
and hypersolid dynamic element from<br />
Problem 9: Solid, Finite Strain Element for Dynamic Analysis and analyze the single<br />
snooker shoot.
140 AceFEM Finite Element Environment
AceFEM Finite Element Environment 141<br />
à Analysis<br />
142 AceFEM Finite Element Environment<br />
"User" → 8Line@88bx, by
AceFEM Finite Element Environment 143<br />
n £ τn ê SMSSqrt@τn.τnD;<br />
H £ xP + gN n − xS;<br />
dHdb £ SMSD@H, bD;<br />
dHdbInv £ SMSInverse@dHdbD<br />
L;<br />
b • SMSReal@80, 0, 0
144 AceFEM Finite Element Environment<br />
@15D File created : ExamplesCTD3V1P1.c Size : 19 168
AceFEM Finite Element Environment 145<br />
Problem 6: 3D slave node -> quadrilateral master<br />
segment element<br />
146 AceFEM Finite Element Environment<br />
SMSEndIf@D;<br />
SMSEndDo@bD;<br />
b £ SMSReal@bD;<br />
H∗ Remember to define "b" before using this tag! ∗L<br />
8ξ, η, gN< £ b;<br />
localSearch;<br />
dHda £ SMSD@H, basicVarsD;<br />
dbda £ −dHdbInv.dHda;<br />
SMSDefineDerivative@b, basicVars, dbdaD;<br />
SMSIf@gN ≤ 0D;<br />
Π • 1<br />
2 ρ gN2 ;<br />
SMSElse@D;<br />
Π § 0;<br />
SMSEndIf@ΠD;<br />
SMSDo@i, 1,15D;<br />
H∗ Residual ∗L<br />
Ri £ SMSD@Π, basicVars, iD;<br />
SMSExport@SMSResidualSign Ri, p$$@iDD;<br />
SMSDo@ j, i, 15D;<br />
dRidaj £ SMSD@Ri, basicVars, jD;<br />
SMSExport@ dRidaj, s$$@i, jD D;<br />
SMSEndDo@D;<br />
SMSEndDo@D;<br />
SMSEndIf@D;<br />
SMSWrite@D;<br />
Postprocessing of the integration point quantities is<br />
suspended for the element. See also: SMSReferenceNodes<br />
Default integration code is set to<br />
3 . See also: SMSDefaultIntegrationCode<br />
Method : PAN 1 formulae, 92 sub−expressions<br />
Method : SKR 438 formulae, 7911 sub−expressions<br />
@29D File created : ExamplesCTD3V1S1.c Size : 29 695<br />
Problem 7: 3D slave node -> quadrilateral master<br />
segment + 2 neighboring nodes element<br />
Neighboring nodes are not used in the element.<br />
AceFEM Finite Element Environment 147<br />
"SMSSegments" → 88
148 AceFEM Finite Element Environment<br />
localSearch;<br />
dHda £ SMSD@H, basicVarsD;<br />
dbda £ −dHdbInv.dHda;<br />
SMSDefineDerivative@b, basicVars, dbdaD;<br />
SMSIf@gN ≤ 0D;<br />
Π • 1<br />
2 ρ gN2 ;<br />
SMSElse@D;<br />
Π § 0;<br />
SMSEndIf@ΠD;<br />
SMSDo@i, 1,15D;<br />
H∗ Residual ∗L<br />
Ri £ SMSD@Π, basicVars, iD;<br />
SMSExport@SMSResidualSign Ri, p$$@iDD;<br />
SMSDo@ j, i, 15D;<br />
dRidaj £ SMSD@Ri, basicVars, jD;<br />
SMSExport@ dRidaj, s$$@i, jD D;<br />
SMSEndDo@D;<br />
SMSEndDo@D;<br />
SMSEndIf@D;<br />
SMSWrite@D;<br />
Postprocessing of the integration point quantities is<br />
suspended for the element. See also: SMSReferenceNodes<br />
Default integration code is set to<br />
3 . See also: SMSDefaultIntegrationCode<br />
Method : PAN 1 formulae, 92 sub−expressions<br />
Method : SKR 438 formulae, 7911 sub−expressions<br />
@29D File created :<br />
ExamplesCTD3V1S1DN2.c Size : 29 942<br />
Problem 8: 3D slave triangle + 2 neighboring nodes -><br />
triangle master segment element<br />
Neighboring nodes are not used in the element.<br />
AceFEM Finite Element Environment 149<br />
"SMSSymmetricTangent" → TrueD;<br />
SMSStandardModule@"Nodal information"D;<br />
For@i = 1, i ≤ 3, i++,<br />
x £ Array@ SMSReal@nd$$@i, "X", � DD &, 3D + Array@ SMSReal@nd$$@i, "at", � DD &, 3D;<br />
xP £ Array@ SMSReal@nd$$@i, "X", � DD &, 3D + Array@ SMSReal@nd$$@i, "ap", � DD &, 3D;<br />
SMSExport@Flatten@8x, xP
150 AceFEM Finite Element Environment<br />
b £ SMSReal@bD;<br />
H∗ Remember to define "b" before using this tag! ∗L<br />
8ξ, η, gN< £ b;<br />
localSearch;<br />
dHda £ SMSD@H, localBasicD;<br />
dbda £ −dHdbInv.dHda;<br />
SMSDefineDerivative@b, localBasic, dbdaD;<br />
SMSIf@gN ≤ 0D;<br />
Π • 1<br />
2 ρ gN2 ;<br />
SMSElse@D;<br />
Π § 0;<br />
SMSEndIf@ΠD;<br />
SMSDo@i, 1, Length@localBasicDD;<br />
H∗ Residual ∗L<br />
Ri £ SMSD@Π, localBasic, iD;<br />
ii £ SMSInteger@SMSPart@localIndex, iDD;<br />
SMSExport@SMSResidualSign Ri, p$$@iiD, "AddIn" → TrueD;<br />
SMSDo@ j, i, Length@localBasicDD;<br />
dRidaj £ SMSD@Ri, localBasic, jD;<br />
jj £ SMSInteger@SMSPart@localIndex, jDD;<br />
SMSExport@ dRidaj, s$$@ii, jjD ,"AddIn" → TrueD;<br />
SMSEndDo@D;<br />
SMSEndDo@D;<br />
SMSEndIf@D<br />
F;<br />
SMSWrite@D;<br />
Postprocessing of the integration point quantities is<br />
suspended for the element. See also: SMSReferenceNodes<br />
Default integration code is set to<br />
17 . See also: SMSDefaultIntegrationCode<br />
Method : PAN 3 formulae, 276 sub−expressions<br />
Method : SKR 821 formulae, 14 193 sub−expressions<br />
@60D File created :<br />
ExamplesCTD3P1DN2P1.c Size : 53 730<br />
Problem 9: 3D slave triangle -> triangle master<br />
segment+ 2 neighboring nodes element<br />
Neighboring nodes are not used in the element.<br />
AceFEM Finite Element Environment 151<br />
"8Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null<br />
,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null
152 AceFEM Finite Element Environment<br />
localSearch;<br />
∆b £ −dHdbInv.H;<br />
b § b + ∆b;<br />
SMSIf@Sqrt@∆b.∆bD < 1 ê 10^12 »» iter == 29D;<br />
SMSBreak@D;<br />
SMSEndIf@D;<br />
SMSEndDo@bD;<br />
b £ SMSReal@bD;<br />
8ξ, η, gN< £ b; H∗ Remember to define "b" before using this tag! ∗L<br />
localSearch;<br />
dHda £ SMSD@H, localBasicD;<br />
dbda £ −dHdbInv.dHda;<br />
SMSDefineDerivative@b, localBasic, dbdaD;<br />
SMSIf@gN ≤ 0D;<br />
Π • 1<br />
2 ρ gN2 ;<br />
SMSElse@D;<br />
Π § 0;<br />
SMSEndIf@ΠD;<br />
SMSDo@i, 1, Length@localBasicDD;<br />
Ri £ SMSD@Π, localBasic, iD;<br />
H∗ Residual ∗L<br />
ii £ SMSInteger@SMSPart@localIndex, iDD;<br />
SMSExport@SMSResidualSign Ri, p$$@iiD, "AddIn" → TrueD;<br />
SMSDo@j, i, Length@localBasicDD;<br />
dRidaj £ SMSD@Ri, localBasic, jD;<br />
jj £ SMSInteger@SMSPart@localIndex, jDD;<br />
SMSExport@dRidaj, s$$@ii, jjD, "AddIn" → TrueD;<br />
SMSEndDo@D;<br />
SMSEndDo@D;<br />
SMSEndIf@D;<br />
F;<br />
SMSWrite@D;<br />
Postprocessing of the integration point quantities is<br />
suspended for the element. See also: SMSReferenceNodes<br />
Default integration code is set to<br />
17 . See also: SMSDefaultIntegrationCode<br />
Method : PAN 3 formulae, 276 sub−expressions<br />
Method : SKR 821 formulae, 14 193 sub−expressions<br />
@64D File created :<br />
ExamplesCTD3P1P1DN2.c Size : 54 278<br />
Problem 10: 3D contact analysis<br />
The use quadrilateral 3D contact element to analyze the 3D indentation problem: small elastic box pressed down into<br />
large elastic box.
AceFEM Finite Element Environment 153<br />
Simulation<br />