Presentation is loading. Please wait.

Presentation is loading. Please wait.

AceGen and AceFEM packages

Similar presentations


Presentation on theme: "AceGen and AceFEM packages"— Presentation transcript:

1 AceGen and AceFEM packages
by Jože Korelc

2 First release of the packages scheduled for November 2006
Contents AceGen general code generator targeted to deal with expression growth problems AceFEM finite element environment new element oriented technology multi-filed and multi-physics problems First release of the packages scheduled for November 2006

3 Simultaneous optimizations of expressions:
AceGen - highlights Simultaneous optimizations of expressions: vector of auxiliary variables Original matrix (input for code generator): internal data base AceGen user Mathematica heuristic procedures random signatures of expressions Result is simplified matrix, expressed with the new auxiliary variables

4 Simultaneous generation of control structures:
AceGen - highlights Simultaneous generation of control structures: "If" construct "Do" construct fictive variable $V[i,3] $V[i,1] $V[i,2]

5 Automatic differentiation technique (AD):
AceGen - highlights Automatic differentiation technique (AD): 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 that consistently extends current code rather than produce a new one the results of all previous uses of AD are accounted for when AD is used several times inside the same subroutine exceptions handling mechanisms

6 Multi-language code generation with AceGen:
AceGen - highlights Multi-language code generation with AceGen: 2. Symbolic description in AceGen 1. Mathematical description 3. Automatically generated code "Mathematica" "Matlab" void Test(double v[501], double u1[3],double *x, double *L,double g[3]) { v[6]=*x/*L; v[7]=1e0 - v[6]; v[8]=v[6]*v[7]; v[12]=2e0*(u[0]*v[6] + u[1]*v[7]+ u[2]*v[8]); g[0]=v[12]*v[6]; g[1]=v[12]*v[7]; g[2]=v[12]*v[8]; }; "C++" "Fortran" Test[]:=Module[{}, $VV[6]=x$$/L$$; $VV[7]=1 - $VV[6]; $VV[8]=$VV[6]*$VV[7]; $VV[12]=2*(u$$[1]*$VV[6] + u$$[2]*$VV[7]+u$$[3]*$VV[8]); g$$[1]=$VV[6]*$VV[12]; g$$[2]=$VV[7]*$VV[12]; g$$[3]=$VV[8]*$VV[12]; ] SUBROUTINE Test(v,u1,x,L,g) REAL*8 v(500),u1(3),x,L,g(3) v(6)=x/L v(7)=1d0 - v(6) v(8)=v(6)*v(7) v(12)=2d0*(u(1)*v(6) + - u(2)*v(7) + u(3)*v(8)) g(1)=v(12)*v(6) g(2)=v(12)*v(7) g(3)=v(12)*v(8) END

7 Numerical environments
AceGen - highlights Automatic interface to numerical environments: AceGen - symbolic input - problem formulation - user subroutines - interface code - initialization - numerical integration - … numerical user subroutines C Mathematica FORTRAN MATLAB ELFEN FEAP MathLink AceFEM MATLAB CDriver MDriver ABAQUS …. Numerical environments

8 Multi-environment code generation
AceFEM FEAP #include "sms.h" void SKR(double v[5001],ElementSpec *es,ElementData *ed,NodeS FILE *SMTFile; DLLEXPORT int SMTSetElSpec(ElementSpec *es,int *idata,int ic,in { int intc,nd,i; static int pn[6]={1, 2, 3, 4, 0, 0}; static int dof[4]={5, 5, 5, 5}; static int nsto[4]={0, 0, 0, 0}; static int ndat[4]; ….. 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) …… Suplementary routines /******************* S U B R O U T I N E *****************/ void SSE(double v[5001],ElementSpec *es,ElementData *ed,Node ,NodeData **nd,double *rdata,int *idata,double *p) { int i44,i45,i46,b51,b52,b55,b58; v[35]=-nd[0]->X[0]+nd[1]->X[0]; v[37]=-nd[0]->X[1]+nd[1]->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)); user subroutines

9 AceFEM FEM environment
element 1 .dll file element 2 element ... .m file - data base - evaluation of element quantities - assembly of element contributions - various linear solvers CDriver - Mathematica language - data base in MMA - MMA linear algebra MDriver - input data processing - mesh generation - solution strategies - command language - graphic post-processing General procedures Mathematica C language dynamic link MathLink

10 general finite element environment
AceFEM - highlights general finite element environment multi-physics multi-field problems standard library of elements all elements come with symbolic input ..\Library\EFEM.html element oriented technology takes full advantage of combine symbolic-numeric environment run time debugging element controlled mesh generation element controlled post processing customized engineering applications based on Mathematica

11 AceFEM - highlights: Multi - field problems
induction heating T. Šuštar , C3M - Ljubljana, Slovenia Magnetic Thermal Mechanical

12 AceFEM - highlights: Multi-scale problems
S. Stupkiewicz, IPPT, Warsaw, Poland MICRO - 3D surface roughness MACRO - elastic properties of contact surface MACRO - lubricant flow in contact surface MACRO - thermal properties of contact surface

13 AceFEM - highlights: structural analysis
Sensitivity analysis of single-storey steel building four node shell elements and large displacement truss elements A

14 AceFEM - highlights: Simulation of technological process
J. Lengiewicz, IPPT, Warsaw, Poland Two phase forging

15 AceGen as multi-language code generator
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, …


Download ppt "AceGen and AceFEM packages"

Similar presentations


Ads by Google