Visualization of the data fields
by J. Pellet, EDF R&D / AMA
A Code_Aster command file can be complex due to a large number of different assignments on elements or elements groups. When the file is very long, it is difficult to ensure that the affected areas are well those which one wishes to affect.
Code_Aster offers a functionality which makes it possible to visualize a field of "colors" corresponding to the various assigned quantities. For example, for the material field, each material will be associated to a color.
The user can request the writing of MED fields corresponding to the assignments made in commands AFFE_MATERIAU, AFFE_CARA_ELEM or AFFE_CHAR_MECA.
For that, he writes:
IMPR_RESU(FORMAT='MED',
CONCEPT=(_F(CHAM_MATER = CHMAT),
_F(CARA_ELEM = CARELE),
_F(CHARGE = CHAR1),),);
One obtains then in a MED file, a field called CHMAT_CHAMP_MAT having 1 value by element among: 0, 1, 2, …
A representation of this field (see below) makes it possible to visualize the assignment of the various materials.
![]() |
![]() |
The correspondence enters the values: 1,2,3… and the names of the materials is written in the message file and the result file:
IMPRESSION D'UN CHAMP DE DONNEES : Champ de matériaux
NOM DU CHAMP : CHAMAT_CHAMP_MAT
CORRESPONDANCE VALEUR <-> CONTENU :
VALEUR = 1.
X1 = BET_OBS
VALEUR = 2.
X1 = BET_FER
VALEUR = 3.
X1 = MORTIER
VALEUR = 4.
X1 = ACIE_CPV
VALEUR = 5.
X1 = ACIE_GAI
VALEUR = 6.
X1 = ACIE_ORI
The user can also visualize the assignment of the thickness of the shells, of the orientation of the local coordinate systems, of the distributed forces, …
For example:
CARA_EL1=AFFE_CARA_ELEM(MODELE=STICKMOD,
COQUE=(_F(GROUP_MA='SRADIER',
EPAIS=0.001,
COEF_RIGI_DRZ=0.001),
_F(MAILLE=('M1','M8','M15','M22'),
EPAIS=0.002,
COEF_RIGI_DRZ=0.001),
_F(MAILLE=('M43','M44','M45','M46'),
EPAIS=0.002,
COEF_RIGI_DRZ = 0.005),),);
IMPR_RESU(FORMAT='MED',
CONCEPT=_F(CARA_ELEM=CARA_EL1),);
![]() |
For this field of the geometrical characteristics of the shells, the correspondence between values 1,2,3 and the quantities affected are given by:
IMPRESSION D'UN CHAMP DE CONCEPT : Caractéristiques géométriques des coques
NOM DU CHAMP : CARA_ELE_CACOQUE
CORRESPONDANCE VALEUR <-> CONTENU :
VALEUR = 1.
EP = 1.000D-03
ALPHA = 0.000D+00
BETA = 0.000D+00
KAPPA = 8.333D-01
C_METR = 0.000D+00
CTOR = 1.000D-03
EXCENT = 0.000D+00
INERTIE = 0.000D+00
VALEUR = 2.
EP = 2.000D-03
ALPHA = 0.000D+00
BETA = 0.000D+00
KAPPA = 8.333D-01
C_METR = 0.000D+00
CTOR = 1.000D-03
EXCENT = 0.000D+00
INERTIE = 0.000D+00
VALEUR = 3.
EP = 2.000D-03
ALPHA = 0.000D+00
BETA = 0.000D+00
KAPPA = 8.333D-01
C_METR = 0.000D+00
CTOR = 5.000D-03
EXCENT = 0.000D+00
INERTIE = 0.000D+00