Upload
nep4
View
215
Download
0
Embed Size (px)
Citation preview
8/6/2019 General Presentation 2007
1/16
1 J. KORELC, UNIVERSITY OF LJUBLJANA
On-demand numerical code generationand
finite element analysis
AceShareFinite Element FileSharing
AceGenMulti-language, Multi-
environment Numerical CodeGeneration
AceFEMThe Mathematica Finite
Element Environment
8/6/2019 General Presentation 2007
2/16
2 J. KORELC, UNIVERSITY OF LJUBLJANA
AceGenMulti-language, Multi-environment Numerical CodeGeneration
Key features:
simultaneous derivation of expressions, global optimization ofexpressions and generation of program structure
automatic selection of the appropriate intermediate variables forward and backward mode of automatic differentiation technique
multi-language code generation (Fortran/Fortran90, C, Mathematicalanguage, Matlab language),
the generated codes are higly efficient and portable
symbolic derivation of the characteristic quantities needed in numericalprocedures (e.g. gradients, tangent operators, sensitivity vectors, etc.)
automatic interface to general environments (MathLink connection toMathematica, Matlab) and specialized FEM environments
(AceFEM, FEAP, ELFEN, ABAQUS,...)
8/6/2019 General Presentation 2007
3/16
3 J. KORELC, UNIVERSITY OF LJUBLJANA
AceGen - highlights
AceGenAceGen
- symbolic input- problem formulation
- user subroutines
- interface code- initialization- numerical integration
-
C FORTRANMathematica
numericalnumerical user subroutinesuser subroutines
MATLAB
AceFEM
CDriver
FEAPELFEN
MDriver ABAQUS
Numerical environmentsNumerical environments
MATLABMathLink
.
8/6/2019 General Presentation 2007
4/16
4 J. KORELC, UNIVERSITY OF LJUBLJANA
AceGen - highlights
heuristic procedures
random signatures ofexpressions
[ ]K
EIL
EIL
EIL
EIL
EI
L
EI
L
EI
L
EI
LEI
L
EI
L
EI
L
EI
L
EI
L
EI
L
EI
L
EI
L
0
3 2 3 2
2 2
3 2 3 2
2 2
12 6 12 6
6 4 6 2
12 6 12 6
6 2 6 4
=
Original matrix(input for code generator):
AceGen
{ }vEI
L
v L v L=
12
2
2
331 2
vector ofauxiliaryvariables
internaldata base
[ ]K
v v v v
v v vv
v v v v
vv
v v
S
=
1 2 1 2
2 3 23
1 2 1 2
23
2 3
2
2
Result is simplified matrix, expressed with thenew auxiliary variables
Mathematica
Simultaneous optimizations of expressions:
user
8/6/2019 General Presentation 2007
5/16
5 J. KORELC, UNIVERSITY OF LJUBLJANA
AceGen - highlights
"If" construct
"Do" construct
HInitializationL
SMSInitialize@"test", "Language" >
"C++", "Mode" "Optimal"D;
HDefinition of a new subroutineL
SMSModule@"Test",
Real@x$$, f$$, dfdx$$DD;
HNumericsymbolic interfaceL
x SMSReal@x$$D;
HDerivation of the problemL
Cos@xD;
SMSIf@SMSAbs@D > 1010D;
f Sin@2 2D ;
SMSElse@D;
f SMSFreeze@Limit@
Sin@2 2D , 0D, "Dependency",
88, Limit@D@Sin@2 2D , D
Evaluate, 0D
8/6/2019 General Presentation 2007
6/16
6 J. KORELC, UNIVERSITY OF LJUBLJANA
AceGen - highlights
differentiation of the whole program
Reverse mode / Forward mode
Enhancements with respect to the standard AD technique: AD procedure can be initiated at any time and at any point of
derivation of the formulas and as many times as required
AD as code-to-code translator is replaced by the method thatconsistently extends current code rather than produce a new one
the results of all previous uses of AD are accounted for when AD isused several times inside the same subroutine
exceptions handling mechanisms
Automatic differentiation technique (AD):
8/6/2019 General Presentation 2007
7/16
7 J. KORELC, UNIVERSITY OF LJUBLJANA
AceGen - highlights
1. Mathematical description 2. Symbolic description in AceGenSMSInitialize@"test", Language > "C++"D
SMSModule@"Test", 8u1$$@3D, x$$, L$$, g$$@3D
8/6/2019 General Presentation 2007
8/16
8 J. KORELC, UNIVERSITY OF LJUBLJANA
X[1];
v[31]=es->Data[0];
v[32]=es->Data[1];v[33]=es->Data[2];
v[34]=sqrt(Power(v[35],2)+Power(v[37],2));
subroutine elmt10(d,ul,xl,ix,tl,s,p,ndfe,ndme,nste,isw)
implicit none
include 'sms.h'
integer ix(nen),ndme,ndfe,nste,isw,INTEGRATIONCODE
double precision xl(ndme,nen),d(*),ul(ndfe,nen,*)double precision s(nste,nste),p(nste),tl(nen),sxd(24)
double precision sall(33,33),pall(33),du(24),dh(9)
double precision ul0(ndfe,nen),sg(24),sg0(24)
character*50 SELEM,datades(2),postdes(0)
logical DEBUG
parameter (INTEGRATIONCODE=7,DEBUG=.false.,
# SELEM="Hypersolid")
integer i,j,jj,ll,ii,k,kk,i1,i2,i3,hlen,icode
double precision w,v(5409),gpost(64,0),npost(8,0)
integer ipordl(30)
data (ipordl(i),i=1,30)/1,4,3,2,1,2,6,5,1,2,1,5,8,4,1,
& 4,8,7,3,4,3,7,6,2,3,7,8,5,6,7/
1235 format(i3,">",3g17.9)
8/6/2019 General Presentation 2007
9/16
9 J. KORELC, UNIVERSITY OF LJUBLJANA
Key features:
hybrid symbolic-numeric FEM environment
AceFEM combines use of Mathematicas features with externalhandling of intensive computations by compiled modules
customized FEM-based applications in Mathematica.
AceFEM combines use of Mathematicas features with externalhandling of intensive computations by compiled modules
support for web-based FEM throught webMathematica
parallel optimisation throught gridMathematica
build-in structured mesh generation and interface to GID generalpreprocessor
fast sparse solvers, exact sensitivity analysis, etc.
AceFEMThe Mathematica FiniteElement Environment
8/6/2019 General Presentation 2007
10/16
10 J. KORELC, UNIVERSITY OF LJUBLJANA
Key features:
enables browsing and downloading the FE user subroutines fromstandard and third-party on-line libraries
provides mechanism for the formation of the third-party libraries to beposted on the internet
includes symbolic templates for direct and exact sensitivity analysis ofsteady state, transient, coupled and coupled transient problems
available libraries include AceGen templates and user subroutine source
codes for solid, structural, thermal and contact FE for all supportedenvironments (FEAP, ELFEN, AceFEM, AceFEM-MDriver,ABAQUS, )
AceShare is ideal medium for the dissemination and verification ofnew numerical methods
AceShareFinite Element FileSharing
8/6/2019 General Presentation 2007
11/16
11 J. KORELC, UNIVERSITY OF LJUBLJANA
AceFEM FEM environment
AceFEM
- input data processing- mesh generation- solution strategies- command language- graphic post-processing
General proceduresGeneral procedures
MathematicaMathematica
element 1.dll file
element 2.dll file
element ....dll file
- data base
- evaluation of element quantities- assembly of element contributions- various linear solvers
CDriverCDriver
C languageC language
dynamic link
MathLink
AceShareAceShare
- FEM file sharing system- download .dll or .m files
element 2.m file
element ....m file
MDriverMDriver
element 1.m file
- Mathematica language- data base in MMA- evaluation of element quantities- assembly of element contributions- MMA linear algebra
8/6/2019 General Presentation 2007
12/16
12 J. KORELC, UNIVERSITY OF LJUBLJANA
AceFEM - highlights: Multi - field problems induction heating
T. utar , C3M - Ljubljana, Slovenia
Magnetic Thermal Mechanical
8/6/2019 General Presentation 2007
13/16
13 J. KORELC, UNIVERSITY OF LJUBLJANA
AceFEM - highlights: Multi-scale problems
MACRO - elastic properties of contact surface
MICRO - 3D surface roughness
MACRO - thermal properties of contact surfaceMACRO - lubricant flow in contact surface
S. Stupkiewicz, IPPT, Warsaw, Poland
8/6/2019 General Presentation 2007
14/16
14 J. KORELC, UNIVERSITY OF LJUBLJANA
AceFEM - highlights: structural analysis Sensitivity analysis of single-storey steel building
four node shell elements and large displacement truss elements
A
0
2
4
6
8
10
12
14
16
18
0 10 20 30 40 50
Roof angle (deg)
Sensitivity
Analitic (elastic)
Finite differeces (elastic)
Analitic (plastic)
Finite differeces (plastic)
8/6/2019 General Presentation 2007
15/16
15 J. KORELC, UNIVERSITY OF LJUBLJANA
AceFEM - highlights: Simulation of technological process
Two phase forging
J. Lengiewicz, IPPT, Warsaw, Poland
8/6/2019 General Presentation 2007
16/16
16 J. KORELC, UNIVERSITY OF LJUBLJANA
Ways to use the system AceGen as multi-language code generator
translates MMA input into efficient C, Fortran, Matab code no calls to external subroutines
AD
AceGen as generator of finite elements for specific environments templates provided for some commercial and research environments finite element environments have large user groups (ABAQUS
several 1000) and companies that make specialized elements
finite elements for specific purpose can be expensive
AceFEM (independent finite element environment)
AceGen + AceFEM complete Finite Element System
commercial linear solver (Intel MKL), meshing,