0% found this document useful (0 votes)
138 views28 pages

06 Finite Elements Catalogs Options

This document discusses finite element modeling in Code_Aster. It describes the high-level structure including the engine, supervisor, catalogs and routines used for finite element computations. It explains how finite element catalogs define element types, options and associated routines. It also describes how behavior laws are implemented through catalogs and specific subroutines. The document provides examples of finite element and behavior law routines to illustrate how local field and stress computations are performed at the element level.

Uploaded by

pirlo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
138 views28 pages

06 Finite Elements Catalogs Options

This document discusses finite element modeling in Code_Aster. It describes the high-level structure including the engine, supervisor, catalogs and routines used for finite element computations. It explains how finite element catalogs define element types, options and associated routines. It also describes how behavior laws are implemented through catalogs and specific subroutines. The document provides examples of finite element and behavior law routines to illustrate how local field and stress computations are performed at the element level.

Uploaded by

pirlo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Development in Code_Aster

Finite elements catalogs and options

Engine

opxxxx.F90

Code_Aster

Code_Aster

SUPERVISOR

others

High level interface: SUPERVISOR (.comm file)

Command file

Command catalogs

Several commands need computing on each finite element

command and op - example : COPIER


Copier.capy

Routine

COPIER=OPER(nom="COPIER",

op=

#include "asterc/getres.h"

CONCEPT = SIMP(statut='o',,),
INFO = SIMP(statut='f',
typ='I',
into=(1, 2),
defaut=1, ),

#include "asterfort/getvid.h"

!...
call jemarq()
call getres(sd2, typsup, oper)
call getvid(' ', 'CONCEPT', scal=sd1, nbret=iret)

Example : (demo001a)
MAIL2= COPIER(
CONCEPT= MAIL[k+1]
)

call copisd(typinf, 'G', sd1, sd2) simple copy


call jedema()

end subroutine

But
more sophisticated computations are needed : Stiffness matrix, stress fields, .

High level interface: FE supervisor

Engine

TExxxx.F90

Code_Aster

FE SUPERVISOR

others

Used by any FE computation

FE catalogs

General diagram of finite element computing


Commands
Stat_non_line
Calc_champ
Calc_matr

Command
catalog
Command
name =>
n op
Ex.

CALC_CHAMP
=> op0052

opxxxx.F90

calcul .F90

get
keywords :
call getvid..
call getvr8
call getvtx
Prepare datas
(fields) and call
calcul
(option)

For each
element in
model

Op0052
Option=SIEQ_ELGA

texxxx.F90

read input data


and local fields
call tecach..

F.E. catalog
compute
Fe type +
option
option =>
And store
n te xxxx
result in output
field
gener_me3d_3
3D tetra, hexa
SIEQ_ELGA =>
te0335.F90

te0335 : gauss
point equivalent
stress on FE

Behaviours

Finite element catalogs, elementary calculations


FE Catalog cf. [D2.03.01]
Directory : src/catalo/typelem/
FE catalog associated with
model (3D, D_PLAN, 3D_JOINT, DKT,..etc) in AFFE_MODELE

(see ..src/catalo/compelem/phenomene_modelisation__.cata)
And dimension (1,2,3). Ex. in 3D :

gener_me3d_3.cata for volume elements


gener_me3d_2.cata for surface elements

Content : discretization of local fields, element options


ex : stiffness matrix, gravity load, equivalent stresses, etc
Working:

FE catalogs parametrize subroutine CALCUL during loop on


finite elements

What FE catalog is used in a Code_Aster run ?


.mess file
MODE_0 = AFFE_MODELE(MAILLAGE=MAIL, AFFE=_F(GROUP_MA=xxx,
PHENOMENE='MECANIQUE, MODELISATION=('3D', ),), )
.
Modlisation lment fini Type maille Nombre
3D
TETRA4
MECA_TETRA4 13380

then : cd ~/dev/codeaster/src/catalo/typelem$ grep MECA_TETRA4 *


gener_me3d_3.cata:ENTETE__ ELEMENT__ MECA_TETRA4

MAILLE__ TETRA4

Open it !

GENER_ME3D_3
TYPE_GENE__
ENTETE__ ELEMENT__ MECA_HEXA20

ENTETE__ ELEMENT__ MECA_TETRA4


ELREFE__ TE4
GAUSS__
ELREFE__ TR3
ENS_NOEUD__ EN1

MAILLE__ HEXA20

First part : elements,


nodes and gauss points

MAILLE__ TETRA4
RIGI=FPG1 FPG1=FPG1 MASS=FPG4
NOEU=NOEU
FPG_LISTE__ MATER=(RIGI MASS NOEU FPG1)
GAUSS__ RIGI=COT3 MASS=COT3 NOEU=NOEU
=
1 2 3 4

ARLQ_1=FPG1

Zoom in FE catalog : ex gener_me3d_3.cata


MODE_LOCAL__
DDL_MECA = DEPL_R
NGEOMER = GEOM_R
ECONTNO = SIEF_R
ECONTPG = SIEF_R

ELNO__
ELNO__
ELNO__
ELGA__

IDEN__
IDEN__
IDEN__
RIGI

(DX
(X
(SIXX
(SIXX

DY
Y
SIYY
SIYY

2nd part : local


fields
) on elements

DZ
Z
SIZZ SIXY
SIZZ SIXY

)
SIXZ
SIXZ

SIYZ
SIYZ

)
)

3rd part : options of


element computation

OPTION__

RIGI_MECA

11

IN__

CCAMASS
CMATERC
OUT__ MMATUUR

PCAMASS
PMATERC
PMATUUR

NGEOMER
ZVARCPG

PGEOMER
PVARCPR

SIEF_ELGA

22

IN__

ZVARCPG
CMATERC

PVARCPR
PMATERC

SIEF_ELNO

ZVARCPG
ECONTNO

PVARCPR
PSIEFNOR

SIEQ_ELGA

335

PDEPLAR
PGEOMER
PCONTRR
PCONTRR
PSIEFNOC
PCONTRR
PCONTEQ

DDL_MECA
NGEOMER
OUT__ ECONTPG
IN__ ECONTPG
OUT__ ECONTNC
IN__ ECONTPG
OUT__ ECOEQPG

Details on FE option
Ex: option SIEQ_ELGA in 3D
equivalent stresses : von Mises, Tresca, principal stresses
Open : .src/catalo/typelem/gener_me3d_3.cata

ECONTPG= SIEF_R ELGA__ RIGI(SIXX SIYY SIZZ SIXY SIXZ SIYZ )

SIEQ_ELGA 335

IN__
OUT__

ECONTPG
ECOEQPG

PCONTRR

Input : 6 cmps of
stresses on each
gauss point

PCONTEQ

te0335.F90 makes the work

output : 17 cmps
of equivalent
stresses on each
gauss point

TE routines (Element Terms) texxxx


Ex. src/bibfor/te/te0335.F90
SUBROUTINE TE0335(OPTION,NOMTE)

FE infos call elrefe_info(fami='RIGI',ndim=ndim1,nno=nno, npg=npg,..)


if (option.eq.'SIEQ_ELGA)then

Get stresses
(input)

call tecach('OOO','PCONTRR','L',iret,nval=7,itab=itabin)

Get equiv.
stresses
(output)

call tecach('OOO','PCONTEQ','E',iret,nval=7,itab=itabou)

icont=itabin(1)
iequi

= itabou(1)

nbsp

= itabou(7)

nbcmp

= itabin(2)/itabin(3)

ncmpeq = itabou(2)/itabou(3)
do ipg = 1, npg
do isp = 1, nbsp

Fgequi :
computes
quivalent
stresses

idec = icont+(ipg-1)*nbcmp *nbsp+(isp-1)*nbcmp


ideceq = iequi+(ipg-1)*ncmpeq*nbsp+(isp-1)*ncmpeq
call fgequi(zr(idec), 'SIGM_DIR', ndim, zr(ideceq))
enddo
enddo

Element informations : elrefe_info


call elrefe_info(fami='RIGI,ndim=ndim,nno=nno,npg=npg,jpoids=ipoids..)

=> get informations on current element (from reference FE)


in

fami

: gauss points family : RIGI (usual),'MASS',...

out

ndim

: dimension ( number of coordinates)

nno

: total number of nodes of element

nnos

: number of apices of element

npg

: number of gauss points (for fami)

jpoids : pointer in zr for gauss weights


jcoopg : pointer in zr for nodes coordinates
jvf

: pointer in zr for shape functions

jdfde

: pointer in zr for first derivatives of shape functions

jdfd2

: pointer in zr for 2nd derivatives of shape functions

jgano

: pointer in zr for matrix gauss => nodes

Parameter access : tecach


subroutine tecach(stop,npar,io,iret,nv,itab,)
To get informations on local fields (input or output)
MAIN INPUTS
STOP
: kind of error while files access fails
npar
: name of fied (parameter of option) ex: 'PCONTRR
io
: 'L (read=input) or'E (write=output)
nv
: number of values in itab(*) (e.g. 7)
MAIN OUTPUTS
iret
:
0

-> all OK ;

> 0 -> problem

itab(1): pointer of local field (in zr, zc,)


itab(2): total length of local field
itab(3): nb points (gauss or nodes)
Ex: call tecach('OOO', 'PCONTRR', 'L', iret, nval=7, itab=itabin)
icont=itabin(1)
npg= itabin(3)
nbcmp=itabin(2)/itabin(3)

Code_Aster

LCxxxx.F90

Engine

Native laws

LC SUPERVISOR

others

Behaviours laws

LC catalogs

MFRONT

Exterior laws
(UMAT)

diagram of behaviour laws computing


op0070.F90 =>
=> calcul .F90
Non-linear option
full_meca,
raph_meca
F.E. catalog
Fe type option
Te0100 (2D)
Te0139 (3D)
etc
gener_me3d_3
Ex. 3D tetra, hexa, penta
FULL_MECA =>
te0139.F90

texxxx.F90
Read inputs
Loop on gauss pts
nmcomp (laws
integration)
store outputs :
stress,
int. Variables,
tangent
stiffness
te0139 : calls
nmpl3d (small strains)
nmdlog (gdef_log)
nmgr3d (grot_gdep)
.

nmcomp.F90
(option, behaviour)
=> redece.F90
(substepping) =>
lc0000.F90
Behaviour laws catalog
bibpyt/Comportement/*
Behaviour name =>
nlc, nb int. Var.,

nmcomp (option, taheri)


lc0000 => lc0018
nmcomp (option, mfront)
lc0000 => lc0058

TE for non-linear options : TE0139 (3D), TE0100(2D)


Non-linear options :
(R5.03.01)
call
call
call

call
call
call

RIGI_MECA_TANG =>
RAPH_MECA
=>
FULL_MECA
=>

Prediction Ktgt
Stress, int.var
Stress, int.var, actual Ktgt

elrefe_info(fami=RIGI, ndim=ndim, nno=nno, )


jevech('PGEOMER', 'L', igeom)
jevech('PMATERC', 'L', imate)

Input local fields

jevech('PCONTMR', 'L', icontm)


jevech('PDEPLMR', 'L', ideplm)
tecach('OON', 'PVARIMR', 'L', iret, nval=7itab=jtab)

if (option.eq.'RIGI_MECA_'.or.option.eq. 'FULL_MECA') then


call nmtstm(zk16(icompo), imatuu, matsym)
Endif
Output tangent stiffness (if

required)

if (option.eq.'RAPH_MECA'.or.option(1:9).eq.'FULL_MECA') then
call jevech('PDEPLPR', 'L', ideplp)
Output stress and internal
call jevech('PVECTUR', 'E', ivectu)
variable fields if required
call jevech('PCONTPR', 'E', icontp)
call jevech('PVARIPR', 'E', ivarip)
endif

Non-linear options : loop on gauss points


Ex : nmpl3d.F90 / nmpl2d.F90 (small strains)
do kpg=1,npg
call nmgeom

Computes derivatives of shape functions and


strains on gauss point kpg of actual FE

Central subroutine for all behaviour laws

call nmcomp (fami,kpg,&


6,eps,deps,6,sigm,vim(1,kpg),option,&
sigma,vip(1,kpg),36,dsidep,)

Integration of internal forces and/or stiffness on element


enddo
nmcomp => redece.F90 (local substepping) => lc0000.F90

Behaviour laws catalog


ex : visc_taheri.py

src/bibpyt/Comportement/*

Number of lc
subroutines

loi = LoiComportement(
nom='VISC_TAHERI',
doc=""" elasto-visco-plastic Taheri cyclic behaviour and shakedown effects """
num_lc=18,
Number of internal
nb_vari=9,
variables
nom_vari=('EPSPEQ', 'SIGMAPIC', 'EPSPXX', 'EPSPYY',
'EPSPZZ', 'EPSPXY', 'EPSPXZ', 'EPSPYZ', 'INDIPLAS'),
mc_mater = ('ELAS', 'TAHERI', 'LEMAITRE'),
Names of internal

variables

lc0000.F90 : read behaviours catalog and calls specific subroutines

lc0000.F90

if num_lc=17 then
If num_lc=18 then
.
If num_lc=50 then
If num_lc=58 then

call lc0017 (norton-hoff)


call lc0018 (visc_taheri)
..
call lc0050 (umat)
call lc0058 (mfront)

TP4 : add a new finite element option


Purpose : add a new finite element option (SIGM_ELEM)
to compute element mean stresses from SIEF_ELGA
what to do in src :
Modify c_nom_cham_into.capy to introduce SIGM_ELEM as a
new option of CALC_CHAMP command
Modify rscrsd.F90 to store SIGM_ELEM in resu datastrucure
Modify gener_me3d_3.cata to define sigm_elem option (inputs,
ouput)
Add sigm_elem.cata in src/catalo/options
Compute SIGM_ELEM in a te routine (for exemple
te0455.F90)
Test for exemple in SSLV04a,b,c,d

solution : command catalogs


c_nom_cham_into.capy (called by par CALC_CHAMP)
d['CONTRAINTE'] = {
.
"SIGM_NOEU":

( ("lin", "nonlin",),

_(u"Contraintes aux noeuds"), ),


"SIGM_ELEM":

( ("lin", "nonlin",),

_(u"element stresses"), ),

In order to use in command files :


CALC_CHAMP(reuse=RESU,RESULTAT=RESU,CONTRAINTE=('SIGM_ELEM'))

solution : FE catalogs
New option catalog (in .src/catalo/options)
SIGM_ELEM
OPTION__
IN__
PCONTRR SIEF_R 'RESU!SIEF_ELGA!N'
OUT__
PCONTEL SIEF_R ELEM__

gener_me3d_3.cata (in .src/catalo/typelem)


ECONTEL = SIEF_R ELEM__

(SIXX SIYY SIZZ SIXY SIXZ SIYZ

SIGM_ELEM

455 IN__ ECONTPG PCONTRR

OUT__ ECONTEL PCONTEL)

Solution : modif. fortran rscrsd.F90


Usefull to store SIGM_ELEM in datastructure result
diff --git a/bibfor/resu_util/rscrsd.F90 b/bibfor/resu_util/rscrsd.F90
--- a/bibfor/resu_util/rscrsd.F90
+++ b/bibfor/resu_util/rscrsd.F90
@@ -54,7 +54,7 @@
- parameter (ncmec3=34)
+ parameter (ncmec3=35)
@@ -141,7 +141,7 @@
- & 'MODE_STAB'/
+ & 'MODE_STAB',
'SIGM_ELEM' /

Solution : new fortran te0455.F90


subroutine te0455(option, nomte)
#include "jeveux.h"
#include "asterfort/assert.h"
#include "asterfort/tecach.h "
character(len=16) :: nomte, option
integer :: npg,ipg,icmp,iret,nbcmp,itabin(3),itabou(3),icontm,idec,icont

! element field containing gauss point stresses - input


call tecach('OOO', 'PCONTRR', 'L', iret, nval=3, itab=itabin)
! icont : gauss point stresses field pointer
icont = itabin(1)
! npg : number of gauss points
npg = itabin(3)
! nbcmp : number of component of stress
nbcmp = itabin(2)/npg

Solution : new fortran te0455.F90


! element field containing mean stress -output
call tecach('OOO', 'PCONTEL', 'E', iret, nval=3, itab=itabou)
! icontm : element stress field pointer
icontm = itabou(1)
! very simple computing of mean stress
do icmp = 1, nbcmp
!
zr(icontm-1+icmp) : value of component icmp of element stress tensor
zr(icontm-1+icmp)=0.d0
do ipg = 1, npg
idec = icont+(ipg-1)*nbcmp+icmp-1
!
zr(idec) : value of component icmp of stresses at gaus point ipg
zr(icontm-1+icmp) = zr(icontm-1+icmp)+zr(idec)/npg
enddo
enddo
end subroutine

TP4 : sslv04a,b,c,d.comm
IMPR_RESU(FORMAT='MED',RESU=(_F(RESULTAT=RESU),))

SSLV04A : HEXA8, PENTA6

SIEF_ELGA scalar map

SIGM_ELEM

TP4 : SSLV04B : HEXA20-PENTA15

TP4 : SSLV04C : TETRA4

TP4 : SSLV04D : TETRA10

You might also like