06 finite elements catalogs options
DESCRIPTION
options sur FEMTRANSCRIPT
-
Development in Code_Aster
Finite elements catalogs and options
-
High level interface: SUPERVISOR (.comm file)
Several commands need computing on each finite element
Code_Aster
Engine
SU
PE
RV
ISO
RCommand catalogs
Code_Aster
Command file
opxxxx.F90
others
-
command and op - example : COPIER
Copier.capy
COPIER=OPER(nom="COPIER",
op= ,
CONCEPT = SIMP(statut='o',,),
INFO = SIMP(statut='f',
typ='I',
into=(1, 2),
defaut=1, ),
Routine
#include "asterc/getres.h"
#include "asterfort/getvid.h"
!...
call jemarq()
call getres(sd2, typsup, oper)
call getvid(' ', 'CONCEPT', scal=sd1, nbret=iret)
call copisd(typinf, 'G', sd1, sd2) simple copy
call jedema()
end subroutine
Example : (demo001a)
MAIL2= COPIER(
CONCEPT= MAIL[k+1]
)
Butmore sophisticated computations are needed : Stiffness matrix, stress fields, .
-
High level interface: FE supervisor
Used by any FE computation
Code_Aster
Engine
FE
SU
PE
RV
ISO
R
FE catalogs
TExxxx.F90
others
-
General diagram of finite element computing
Commands
Stat_non_line
Calc_champ
Calc_matr
opxxxx.F90 calcul .F90 texxxx.F90
Command
catalog
Command
name =>
n op
get
keywords :
call getvid..
call getvr8
call getvtx
Prepare datas
(fields) and call
calcul
(option)
F.E. catalog
Fe type +
option =>
n te xxxx
CALC_CHAMP
=> op0052
Op0052 Option=SIEQ_ELGA
For each
element in
model
Ex.
read input data
and local fields
call tecach..
compute
option
And store
result in output
field
te0335 : gauss
point equivalent
stress on FE
gener_me3d_3
3D tetra, hexa SIEQ_ELGA => te0335.F90
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 fileMODE_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 MAILLE__ HEXA20
ENTETE__ ELEMENT__ MECA_TETRA4 MAILLE__ TETRA4
ELREFE__ TE4 GAUSS__ RIGI=FPG1 FPG1=FPG1 MASS=FPG4 NOEU=NOEU ARLQ_1=FPG1
FPG_LISTE__ MATER=(RIGI MASS NOEU FPG1)
ELREFE__ TR3 GAUSS__ RIGI=COT3 MASS=COT3 NOEU=NOEU
ENS_NOEUD__ EN1 = 1 2 3 4
First part : elements,
nodes and gauss points
-
Zoom in FE catalog : ex gener_me3d_3.cata
MODE_LOCAL__
DDL_MECA = DEPL_R ELNO__ IDEN__ (DX DY DZ )
NGEOMER = GEOM_R ELNO__ IDEN__ (X Y Z )
ECONTNO = SIEF_R ELNO__ IDEN__ (SIXX SIYY SIZZ SIXY SIXZ SIYZ )
ECONTPG = SIEF_R ELGA__ RIGI (SIXX SIYY SIZZ SIXY SIXZ SIYZ )
2nd part : local
fields on elements
OPTION__
RIGI_MECA 11 IN__ CCAMASS PCAMASS NGEOMER PGEOMER
CMATERC PMATERC ZVARCPG PVARCPR
OUT__ MMATUUR PMATUUR
SIEF_ELGA 22 IN__ DDL_MECA PDEPLAR ZVARCPG PVARCPR
NGEOMER PGEOMER CMATERC PMATERC
OUT__ ECONTPG PCONTRR
SIEF_ELNO 4 IN__ ECONTPG PCONTRR ZVARCPG PVARCPR
OUT__ ECONTNC PSIEFNOC ECONTNO PSIEFNOR
SIEQ_ELGA 335 IN__ ECONTPG PCONTRR
OUT__ ECOEQPG PCONTEQ
3rd part : options of
element computation
-
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
SIEQ_ELGA 335 IN__ ECONTPG PCONTRR
OUT__ ECOEQPG PCONTEQ
Input : 6 cmps of
stresses on each
gauss point
output : 17 cmps
of equivalent
stresses on each
gauss point
ECONTPG= SIEF_R ELGA__ RIGI(SIXX SIYY SIZZ SIXY SIXZ SIYZ )
te0335.F90 makes the work
-
TE routines (Element Terms) texxxx Ex. src/bibfor/te/te0335.F90
SUBROUTINE TE0335(OPTION,NOMTE)
call elrefe_info(fami='RIGI',ndim=ndim1,nno=nno, npg=npg,..)
if (option.eq.'SIEQ_ELGA)then
call tecach('OOO','PCONTRR','L',iret,nval=7,itab=itabin)
icont=itabin(1)
call tecach('OOO','PCONTEQ','E',iret,nval=7,itab=itabou)
iequi = itabou(1)
nbsp = itabou(7)
nbcmp = itabin(2)/itabin(3)
ncmpeq = itabou(2)/itabou(3)
do ipg = 1, npg
do isp = 1, nbsp
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
Get stresses
(input)
Fgequi :
computes
quivalent
stresses
FE infos
Get equiv.
stresses
(output)
-
Element informations : elrefe_infocall 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
-
subroutine tecach(stop,npar,io,iret,nv,itab,)To get informations on local fields (input or output)
MAIN INPUTSSTOP : 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 OUTPUTSiret : 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)
Parameter access : tecach
-
Behaviours laws
Code_Aster
Engine
LC
SU
PE
RV
ISO
R
LC catalogsLCxxxx.F90
others
Native laws
MFRONT
Exterior laws
(UMAT)
-
diagram of behaviour laws computing
op0070.F90 => => calcul .F90
Non-linear option
full_meca,
raph_meca
texxxx.F90
F.E. catalog
Fe type option
Te0100 (2D)
Te0139 (3D)
etc
Ex.
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)
.
gener_me3d_3
3D tetra, hexa, penta
FULL_MECA => te0139.F90
nmcomp.F90
(option, behaviour)
=> redece.F90
(substepping) =>
lc0000.F90
nmcomp (option, taheri)lc0000 => lc0018
Behaviour laws catalog
bibpyt/Comportement/*
Behaviour name =>
nlc, nb int. Var.,
nmcomp (option, mfront)lc0000 => lc0058
-
TE for non-linear options : TE0139 (3D), TE0100(2D) Non-linear options :
(R5.03.01)
call elrefe_info(fami=RIGI, ndim=ndim, nno=nno, )
call jevech('PGEOMER', 'L', igeom)
call jevech('PMATERC', 'L', imate)
call jevech('PCONTMR', 'L', icontm)
call jevech('PDEPLMR', 'L', ideplm)
call 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
if (option.eq.'RAPH_MECA'.or.option(1:9).eq.'FULL_MECA') then
call jevech('PDEPLPR', 'L', ideplp)
call jevech('PVECTUR', 'E', ivectu)
call jevech('PCONTPR', 'E', icontp)
call jevech('PVARIPR', 'E', ivarip)
endif
Input local fields
Output stress and internal
variable fields if required
Output tangent stiffness (if required)
RIGI_MECA_TANG =>
RAPH_MECA =>
FULL_MECA =>
Prediction Ktgt
Stress, int.var
Stress, int.var, actual Ktgt
-
Ex : nmpl3d.F90 / nmpl2d.F90 (small strains)
do kpg=1,npg
call nmgeom
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
Central subroutine for all behaviour laws
Computes derivatives of shape functions and
strains on gauss point kpg of actual FE
Non-linear options : loop on gauss points
-
Behaviour laws catalog
lc0000.F90 : read behaviours catalog and calls specific subroutinesif 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)
src/bibpyt/Comportement/*
ex : visc_taheri.py
loi = LoiComportement(
nom='VISC_TAHERI',
doc=""" elasto-visco-plastic Taheri cyclic behaviour and shakedown effects """
num_lc=18,
nb_vari=9,
nom_vari=('EPSPEQ', 'SIGMAPIC', 'EPSPXX', 'EPSPYY',
'EPSPZZ', 'EPSPXY', 'EPSPXZ', 'EPSPYZ', 'INDIPLAS'),
mc_mater = ('ELAS', 'TAHERI', 'LEMAITRE'),
Number of internal
variables
Names of internal
variables
Number of lc
subroutines
lc0000.F90
-
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 catalogsNew option catalog (in .src/catalo/options)
SIGM_ELEMOPTION__
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.F90subroutine 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