Code_Aster
®
Version
7.4
Titrate:
Simple example of use
Date:
26/05/05
Author (S):
Mr. ABBAS, J.M. PROIX, NR. TARDIEU
Key
:
U1.05.00-C
Page
:
1/10
Instruction manual
U1.0- booklet: Introduction to Code_Aster
HT-66/05/004/A
Organization (S):
EDF-R & D/AMA
Instruction manual
U1.0- booklet: Introduction to Code_Aster
Document: U1.05.00
Simple example of use
Summary:
This document describes a very simple example of use of Code_Aster.
One illustrates the controls “impossible to circumvent” on the calculation of a tank (cylinder thin under pressure
hydrostatic) modelized into axisymmetric.
The command file is analyzed, as well as the file of results.
Code_Aster
®
Version
7.4
Titrate:
Simple example of use
Date:
26/05/05
Author (S):
Mr. ABBAS, J.M. PROIX, NR. TARDIEU
Key
:
U1.05.00-C
Page
:
2/10
Instruction manual
U1.0- booklet: Introduction to Code_Aster
HT-66/05/004/A
1
To modelize a mechanical problem with Code_Aster
The problem to be modelized is a thin cylindrical tank (thickness 0.02m, average radius R=1m,
L=4m height) subjected to a pressure interns variable with the height, corresponding to a pressure
hydrostatic.
R=1m
L=4m
Being given symmetries of the geometry and
loading, one chooses a modeling
two-dimensional axisymmetric.
It will thus be enough to represent a vertical section of
this cylinder (in plan X Y)
The two stages to be envisaged are:
·
the creation of the mesh
·
the drafting of the command file
2
Manufacture of the mesh: what to envisage?
support
ldf
lfa
charg
With
B
C
D
y
X
Some is the software of mesh used (GIBI, IDEAS,
GMSH), it is necessary to envisage, as of the creation of the mesh, of
to name the entities which will be used in calculation to affect
elementary characteristics, conditions with
limits, of the loadings, materials…
Indeed, although it is possible to use them directly
numbers of nodes and meshs in the file of
controls, it is preferable to use entities
named. This makes it possible to have a command file
independent of the degree of refinement of the mesh, and
of a possible renumerotation of the nodes or
elements.
In practice, these entities are groups:
·
groups of nodes (possibly containing one
only node, like the points A, B, C, D in
the example),
·
groups of meshs corresponding to
under-fields of the mesh, or many meshs
used to apply the loadings: here by
example, groups of meshs
lfa
,
ldf
contain linear meshs (meshs of
skin) which will be used to apply the pressure.
Code_Aster
®
Version
7.4
Titrate:
Simple example of use
Date:
26/05/05
Author (S):
Mr. ABBAS, J.M. PROIX, NR. TARDIEU
Key
:
U1.05.00-C
Page
:
3/10
Instruction manual
U1.0- booklet: Introduction to Code_Aster
HT-66/05/004/A
3
How to write its command file?
3.1
To start from nothing?
When one wants to modelize a new thermomechanical problem, one does not leave in general
white sheet: it is useful to take as a starting point a command file of a modeling close to that
to treat. How to obtain these files? The sources are varied:
·
the base of the tests of Code_Aster, with its documentation, is often an important aid,
because it covers most of the functionalities of the code (one can find these tests in
the index astest),
·
the formations make it possible to know the whole of the controls thoroughly
paying to types of modelings
: statics linear, thermal, dynamic,
thermo plasticity, post_traitement…
The drafting of this command file will be largely facilitated by using the editor of file of
controls EFICAS.
3.2
Controls with the magnifying glass
We now will detail the controls necessary to the realization of calculation considered.
Command file
Explanations
# TITRATES thin Cylinder under pressure
hydrostatic
The comments are preceded by sign #,
BEGINNING ();
Obligatory control to start…
PRE_GMSH ();
The mesh is with format GMSH
mall = LIRE_MAILLAGE ();
Reading of the mesh in the file of mesh,
and creation of the concept
mall
containing it
mesh with the format Aster
# Redefinition of the groups of nodes and
groups of meshs
mail=DEFI_GROUP (reuse =mail,
Definition of the groups of meshs from
MAILLAGE=mail,
those created in GMSH
CREA_GROUP_MA= (_F (NOM=' APPUI',
GROUP_MA=' GM11',),
_F (NOM=' LDF',
GROUP_MA=' GM13',),
_F (NOM=' LFA',
GROUP_MA=' GM14',),
_F (NOM=' ND_A',
GROUP_MA=' GM1',),
_F (NOM=' ND_B',
GROUP_MA=' GM2',),
_F (NOM=' ND_C',
GROUP_MA=' GM3',),
_F (NOM=' ND_D',
GROUP_MA=' GM4',),
),);
# Definition of the model
A model is a concept containing the types
finite elements useful for calculation
Code_Aster
®
Version
7.4
Titrate:
Simple example of use
Date:
26/05/05
Author (S):
Mr. ABBAS, J.M. PROIX, NR. TARDIEU
Key
:
U1.05.00-C
Page
:
4/10
Instruction manual
U1.0- booklet: Introduction to Code_Aster
HT-66/05/004/A
modl=AFFE_MODELE (MAILLAGE=mail,
Associate all the meshs mesh of
axisymmetric mechanical finite elements
AFFE=_F (TOUT=' OUI',
PHENOMENE=' MECANIQUE', the same control can continue on
MODELISATION=' AXIS',),); several lines
# Definition of material
acier=DEFI_MATERIAU (ELAS=_F (E=210000000000.0, characteristics of each material
constituting the mesh are provided
NU=0.3,),);
Young modulus and Poisson's ratio
chmat=AFFE_MATERIAU (MAILLAGE=mail,
Assignment of material on the mesh
AFFE=_F (TOUT=' OUI',
Here the material is the same one for all the mesh
MATER=acier,),); If not one could affect materials
different on groups from meshs
# Definition of the boundary conditions
The boundary conditions can relate to
nodes, of the groups of nodes, the meshs or
groups of meshs.
clim=AFFE_CHAR_MECA (MODELE=modl,
Here nodes of the group of meshs
SUPPORT
FACE_IMPO=_F (GROUP_MA=' APPUI',
(meshs of edge) are affected
condition:
DY=0,),);
DY
= 0 what means:
“displacement following” no one there
# Definition of the loading: pressure function
of y
The functions are point by point defined
(variation refines between two points per defect)
f_y=DEFI_FONCTION (NOM_PARA=' Y',
Here, the pressure varies between:
VALE= (0.0, 20000.0,
20000 AP for y=0
4.0, 0.0,),);
and 0 for y = L
charg=AFFE_CHAR_MECA_F (MODELE=modl,
Assignment of the pressure (function of y) on
PRES_REP=
_F (GROUP_MA= (“LFA”, “LDF”,),
edge made up of the groups of meshs
LFA
LDF
PRES=f_y,),);
# Resolution
Total ordering of resolution of the problems
statics in thermo linear elasticity
res1=MECA_STATIQUE (MODELE=modl,
CHAM_MATER=chmat,
The material field
EXCIT= (_F (CHARGE=charg,), One defines the loadings
_F (CHARGE=clim,),),);
res1
is the name of the concept result containing
the field of displacements
# Calculation of the stresses
reuse=res1
mean that one “enriches” it
concept
res1=CALC_ELEM (reuse =res1,
res1
: the stress field will be stored
in addition to the field of displacements
RESULTAT=res1,
OPTION=' SIGM_ELNO_DEPL',);
The name
“SIGM_ELNO_DEPL”
mean
“forced calculated with the nodes of each
Code_Aster
®
Version
7.4
Titrate:
Simple example of use
Date:
26/05/05
Author (S):
Mr. ABBAS, J.M. PROIX, NR. TARDIEU
Key
:
U1.05.00-C
Page
:
5/10
Instruction manual
U1.0- booklet: Introduction to Code_Aster
HT-66/05/004/A
element starting from displacements “
# Impression of the results at points A B C D
IMPR_RESU (MODELE=modl,
Impression of the results to the format text
RESU=_F (RESULTAT=res1,
displacements with the nodes
GROUP_MA=' ND_A',),);
corresponding to points A B C D
IMPR_RESU (MODELE=modl,
RESU=_F (RESULTAT=res1,
GROUP_MA=' ND_B',),);
IMPR_RESU (MODELE=modl,
RESU=_F (RESULTAT=res1,
GROUP_MA=' ND_C',),);
IMPR_RESU (MODELE=modl,
RESU=_F (RESULTAT=res1,
GROUP_MA=' ND_D',),);
# Impression of the results
IMPR_RESU (MODELE=modl,
Impression of the results to the format text
RESU=_F (RESULTAT=res1,),);
displacements/forced on all the mesh
# Impression of the results for visualization
with GMSH
DEFI_FICHIER (ACTION=' ASSOCIER',
UNITE=37,)
Definition of the logical unit for file GMSH
IMPR_RESU (MODELE=modl,
FORMAT=' GMSH',
UNITE=37,
RESU=_F (RESULT = RES1,),)
Impression of the results to format GMSH
DEFI_FICHIER (ACTION=' LIBERER',
UNITE=37,)
Closing of the logical unit
END ();
…
Obligatory control to close an execution
Code_Aster
®
Version
7.4
Titrate:
Simple example of use
Date:
26/05/05
Author (S):
Mr. ABBAS, J.M. PROIX, NR. TARDIEU
Key
:
U1.05.00-C
Page
:
6/10
Instruction manual
U1.0- booklet: Introduction to Code_Aster
HT-66/05/004/A
4
What contains the file of results?
=> a heading pointing out the date, the version, the platform used:
-- CODE_ASTER -- VERSION OF DEVELOPMENT 7.04.00 --
COPYRIGHT EDF-R & D 2003
EXECUTION OF: ME-11-JUIN-2003 10:11:32
PLATFORM: CLA1ASTR.CLA.EDF
NB MAX PROC: 1
SYSTEM: OSF1
CPU: ALPHA
--------------------------------------------------------------------------------
ASTER 7.01.07 CONCEPT RES1 CALCULATES THE 11/06/2003 A 10:11:34 OF TYPE EVOL_ELAS
=> Impression of the field of displacements to the nodes of the groups (points) A, B, C, D:
GROUP_MA: ND_A
FIELD WITH THE NODES OF REFERENCE SYMBOL DEPL
SEQUENCE NUMBER: 1 INST: 0.00000E+00
NODE DX DY
N1 4.68143E-06 3.74958E-24
GROUP_MA: ND_B
FIELD WITH THE NODES OF REFERENCE SYMBOL DEPL
SEQUENCE NUMBER: 1 INST: 0.00000E+00
NODE DX DY
N2 4.65280E-06 5.20865E-24
GROUP_MA: ND_C
FIELD WITH THE NODES OF REFERENCE SYMBOL DEPL
SEQUENCE NUMBER: 1 INST: 0.00000E+00
NODE DX DY
N3 1.20218E-06 - 2.63963E-06
GROUP_MA: ND_D
FIELD WITH THE NODES OF REFERENCE SYMBOL DEPL
SEQUENCE NUMBER: 1 INST: 0.00000E+00
NODE DX DY
N4 3.31016E-09 - 2.81696E-06
=> Impression of the stress field
FIELD BY ELEMENT WITH THE NODES OF REFERENCE SYMBOL SIGM_ELNO_DEPL
SEQUENCE NUMBER: 1 INST: 0.00000E+00
M37 SIXX SIYY SIZZ SIXY
N3 - 5.13918E+03 - 1.03624E+04 2.42856E+05 6.82275E+01 => Point C
N54 - 4.40750E+03 - 9.63147E+03 2.44564E+05 - 4.70082E+01
N55 4.14124E+03 1.04408E+04 3.02923E+05 - 6.66820E+01
N24 3.26306E+03 9.56344E+03 3.00873E+05 4.85536E+01
M51 SIXX SIYY SIZZ SIXY
N11 - 3.38160E+03 4.89698E+03 9.41453E+05 2.91041E+04 => Point B
N68 - 2.46101E+03 3.32521E+03 9.46093E+05 2.90567E+04
N10 - 9.31239E+02 9.59144E+03 9.65451E+05 - 3.32524E+04
N2 - 1.90427E+03 1.11108E+04 9.60688E+05 - 3.32050E+04
M111 SIXX SIYY SIZZ SIXY
Code_Aster
®
Version
7.4
Titrate:
Simple example of use
Date:
26/05/05
Author (S):
Mr. ABBAS, J.M. PROIX, NR. TARDIEU
Key
:
U1.05.00-C
Page
:
7/10
Instruction manual
U1.0- booklet: Introduction to Code_Aster
HT-66/05/004/A
N110 - 2.00922E+04 - 1.00398E+04 9.51623E+05 2.92456E+04
N50 - 1.90559E+04 - 1.15088E+04 9.56546E+05 2.92049E+04
N1 - 1.61470E+04 - 4.53210E+03 9.76893E+05 - 3.34251E+04 => Point A
N7 - 1.72353E+04 - 3.11525E+03 9.71848E+05 - 3.33844E+04
M112 SIXX SIYY SIZZ SIXY
N3 3.43073E+03 9.63409E+03 2.51426E+05 5.11140E+01 => Point C
(belongs to several meshs)
N25 - 4.96037E+03 - 1.02898E+04 1.93404E+05 5.97663E+01
N111 - 4.37491E+03 - 9.70470E+03 1.94770E+05 - 5.55617E+01
N54 4.16274E+03 1.03658E+04 2.53134E+05 - 6.42140E+01
=> a table summarizing the controls used and time CPU of each one:
***********************************************************
* ORDER * TO USE * TOTAL SYSTEM * *
***********************************************************
* BEGINNING: 0.02: 0.03: 0.05 *
* PRE_GMSH: 0.02: 0.02: 0.03 *
* LIRE_MAILLAGE: 0.02: 0.00: 0.02 *
* DEFI_GROUP: 0.02: 0.00: 0.02 *
* AFFE_MODELE: 0.02: 0.00: 0.02 *
* DEFI_MATERIAU: 0.07: 0.00: 0.07 *
* AFFE_MATERIAU: 0.00: 0.00: 0.00 *
* AFFE_CHAR_MECA: 0.03: 0.00: 0.03 *
* DEFI_FONCTION: 0.00: 0.00: 0.00 *
* AFFE_CHAR_MECA_F: 0.02: 0.02: 0.03 *
* MECA_STATIQUE: 0.08: 0.03: 0.12 *
* CALC_ELEM: 0.03: 0.00: 0.03 *
* IMPR_RESU: 0.08: 0.02: 0.10 *
* IMPR_RESU: 0.03: 0.02: 0.05 *
* IMPR_RESU: 0.05: 0.00: 0.05 *
* IMPR_RESU: 0.05: 0.00: 0.05 *
* IMPR_RESU: 0.05: 0.00: 0.05 *
* IMPR_RESU: 0.17: 0.20: 0.37 *
* END: 0.00: 0.03: 0.03 *
***********************************************************
* TOTAL_JOB: 0.83: 0.42: 1.25 *
***********************************************************
Code_Aster
®
Version
7.4
Titrate:
Simple example of use
Date:
26/05/05
Author (S):
Mr. ABBAS, J.M. PROIX, NR. TARDIEU
Key
:
U1.05.00-C
Page
:
8/10
Instruction manual
U1.0- booklet: Introduction to Code_Aster
HT-66/05/004/A
5
And other files produced by calculation?
5.1
The file MESSAGE
This file contains the echo of the controls and gives additional information on the execution
of each control:
for example MECA_STATIQUE:
# -----------------------------------------------------------------------
# ORDERS NO: 0011 CONCEPT OF THE TYPE: evol_elas
# ------------- -----------------
res1=MECA_STATIQUE (CHAM_MATER=chmat,
MODELE=modl,
ANGLE=0,
NIVE_COUCHE=' MOY',
NUME_COUCHE=1,
SOLVEUR=_F (NPREC=8,
METHODE=' MULT_FRONT',
STOP_SINGULIER=' OUI',
RENUM=' METIS'),
INFO=1,
PLAN=' MAIL',
INST=0.0,
EXCIT= (_F (CHARGE=charg,
TYPE_CHARGE=' FIXE'),
_F (CHARGE=clim,
TYPE_CHARGE=' FIXE')),
);
--- NUMBERS TOTAL NODES: 138 OF WHICH:
12 NODES “LAGRANGE”
--- NUMBERS TOTAL EQUATIONS: 264
--- A NUMBER OF NONNULL COEFFICIENTS IN THE MATRIX: 2120
--- A NUMBER OF BLOCKS USE FOR STORAGE: 1
5.2
File GMSH
File GMSH (filled by IMPR_RESU, format “GMSH”) contains the data necessary to
visualization.
In the same way for the other files of interface with software of graphic postprocessing (IDEAS,
ENSIGHT)
or software of layout of curves XMGRACE.
5.3
Generation of the mesh with GMSH
One proposes here the file geo allowing the generation of the mesh with GMSH (software free and free).
//////////////////////////////////////////////////////////////
//Mesh of the tank GMSH V1.60
//////////////////////////////////////////////////////////////
//Variable
//Rayon interns tank
Rint = 1;
//Thickness of the wall
ep = 0.02;
//External Radius of the tank
Rext = Rint+ep;
//Height of the tank
H = 4;
Code_Aster
®
Version
7.4
Titrate:
Simple example of use
Date:
26/05/05
Author (S):
Mr. ABBAS, J.M. PROIX, NR. TARDIEU
Key
:
U1.05.00-C
Page
:
9/10
Instruction manual
U1.0- booklet: Introduction to Code_Aster
HT-66/05/004/A
//A Number of elements on the horizontal one
nbelh= 5;
//A Number of elements on the vertical
nbelv= 20;
//Points
Not (1) = {Rint, 0,0,1};
Not (2) = {Rext, 0,0,1};
Not (3) = {Rext, 0.75 * H, 0,1};
Not (4) = {Rext, H, 0,1};
Not (5) = {Rint, H, 0,1};
Not (6) = {Rint, 0.75 * H, 0,1};
//Lines
Line (1) = {1,2};
Line (2) = {2,3};
Line (3) = {3,4};
Line (4) = {4,5};
Line (5) = {5,6};
Line (6) = {6,1};
Line (7) = {6,3};
//Surface regulated for regulated mesh
Line Loop (1) = {- 2, - 1, - 6,7};
Ruled Surfaces (1) = {1};
Line Loop (2) = {3, 4, 5, 7};
Ruled Surfaces (2) = {2};
//Description of the groups of meshs/nodes (points)
Physical Not (1) = {1};
Physical Not (2) = {2};
Physical Not (3) = {3};
Physical Not (4) = {4};
Physical Not (5) = {5};
Physical Not (6) = {6};
//Description of the groups of meshs/nodes (lines)
Physical Line (11) = {1};
Physical Line (12) = {4};
Physical Line (13) = {5};
Physical Line (14) = {6};
//Description of the groups of meshs/nodes (surface)
Physical Surfaces (21) = {1,2};
//Smoothness of the mesh (regulated)
Transfinite Line {1} = nbelh+1;
Transfinite Line {4} = nbelh+1;
Transfinite Line {7} = nbelh+1;
Transfinite Line {5,3} = 0.25 * nbelv+1;
Transfinite Line {2,6} = 0.75 * nbelv+1;
Transfinite Surfaces {1} = {3,6,1,2};
Transfinite Surfaces {2} = {3, 4, 5, 6};
//Passage triangles->quadrangles
Recombine Surface {1,2};
GMSH will generate the groups of meshs 1 to 6 (points), 11 to 14 (lines) and 21 groups it (surface). These
groups of meshs are recovered in Code_Aster with name GM # # where # # is the number of
group GMSH.
In our example, we redefine these names by DEFI_GROUP to have a name of it more
convenient (SUPPORT, LFA, LDE).
Code_Aster
®
Version
7.4
Titrate:
Simple example of use
Date:
26/05/05
Author (S):
Mr. ABBAS, J.M. PROIX, NR. TARDIEU
Key
:
U1.05.00-C
Page
:
10/10
Instruction manual
U1.0- booklet: Introduction to Code_Aster
HT-66/05/004/A
Intentionally white left page.