Difference between revisions of "Contrib:Claws/Code Aster/comms"

From CAELinuxWiki
Jump to: navigation, search
Line 13: Line 13:
 
                   VALE_MIN='OUI',
 
                   VALE_MIN='OUI',
 
                   SOUS_TITRE='Principal_max_min',),);
 
                   SOUS_TITRE='Principal_max_min',),);
Explanation:
+
;Definition
*IMPR_RESU means 'write result', that can either be written to a 3d-model or printed to the .resu file (or other file)
+
 
*FORMAT = RESULTAT means that the result should be formatted for text as opposed to a 3d-model file format such as 'med', I-DEAS or other.
+
:*IMPR_RESU means 'write result', that can either be written to a 3d-model or printed to the .resu file (or other file)
*RESULTAT=RESU: Use the calculated result 'RESU'
+
:*FORMAT = RESULTAT means that the result should be formatted for text as opposed to a 3d-model file format such as 'med', I-DEAS or other.
*NOM_CHAM: Name of field to write; we want the 'equivalent nodal stress'
+
:*RESULTAT=RESU: Use the calculated result 'RESU'
*FORM_TABL: Format as a table
+
:*NOM_CHAM: Name of field to write; we want the 'equivalent nodal stress'
*VALE_MIN/MAX: Display min/max values of the field
+
:*FORM_TABL: Format as a table
*SOUS_TITRE: Sub-title in the .resu file
+
:*VALE_MIN/MAX: Display min/max values of the field
 +
:*SOUS_TITRE: Sub-title in the .resu file
  
 
Applying this to your comm file should yield the following table:
 
Applying this to your comm file should yield the following table:
Line 64: Line 65:
 
                     TITRE='Principal stress',);
 
                     TITRE='Principal stress',);
  
*INTITULE: Name of the table
+
;Definition
*RESULTAT: Extract from the 'RESU' calculation
+
:*INTITULE: Name of the table
*NOM_CHAM: Name of field, here REAC_NODA and FORC_NODA
+
:*RESULTAT: Extract from the 'RESU' calculation
*Default precision
+
:*NOM_CHAM: Name of field, here REAC_NODA and FORC_NODA
*GROUP_NO: the node group - this has to be a node group (I'll describe how to extract from a whole model further down)
+
:*Default precision
*RESULTANTE: Vectorial components (Instead of RESULTANTE you can use TOUT_CMP=All components to get the values of all nodes in the group)
+
:*GROUP_NO: the node group - this has to be a node group (I'll describe how to extract from a whole model further down)
*MOYE_NOEUD: Average the result around a node
+
:*RESULTANTE: Vectorial components (Instead of RESULTANTE you can use TOUT_CMP=All components to get the values of all nodes in the group)
 +
:*MOYE_NOEUD: Average the result around a node
  
  
Line 83: Line 85:
  
  
Explanation:
+
;Definition
  
*Write the table 'Table' we just created.
+
:*Write the table 'Table' we just created.
*Format it as 'TABLEAU' - other formats are also available
+
:*Format it as 'TABLEAU' - other formats are also available
*UNITE: this is the unique number of the file you want to write the results to. This number should correspond to the number selected in ASTK, using the 'mast' file format. If you leave this unselected in your comm file, the results will be written to the .resu file
+
:*UNITE: this is the unique number of the file you want to write the results to. This number should correspond to the number selected in ASTK, using the 'mast' file format. If you leave this unselected in your comm file, the results will be written to the .resu file
*SEPARATEUR: using comma (,) as a separator - select any character you want.
+
:*SEPARATEUR: using comma (,) as a separator - select any character you want.
*TITRE: Name of the table
+
:*TITRE: Name of the table
  
 
The result should look something like this (table is a little mangled by the wiki):
 
The result should look something like this (table is a little mangled by the wiki):
Line 112: Line 114:
 
                 NOM_CHAM='EQUI_NOEU_SIGM',);
 
                 NOM_CHAM='EQUI_NOEU_SIGM',);
  
*Create (extract) a field of the type NOEU_SIEF_R; effective stress at the nodes from the calculation (RESU) and use the EQUI_NOEU_SIGM field calculated in RESU (EQUI_NOEU_SIGM: Equivalent node stress)  
+
;Definition
 +
:*Create (extract) a field of the type NOEU_SIEF_R; effective stress at the nodes from the calculation (RESU) and use the EQUI_NOEU_SIGM field calculated in RESU (EQUI_NOEU_SIGM: Equivalent node stress)  
  
 
  Table=POST_RELEVE_T(ACTION=(_F(OPERATION='EXTRACTION',
 
  Table=POST_RELEVE_T(ACTION=(_F(OPERATION='EXTRACTION',
Line 122: Line 125:
 
                     TITRE='Principal stress',);
 
                     TITRE='Principal stress',);
  
*CHAM_GD: create the table from the field we created.  
+
;Definition
*TOUT_CMP: All the components
+
:*CHAM_GD: create the table from the field we created.  
 +
:*TOUT_CMP: All the components
  
 
  IMPR_TABLE(TABLE=Table,
 
  IMPR_TABLE(TABLE=Table,

Revision as of 06:55, 4 April 2009

Comm files

Contents

Extracting max/min principal stress of a model

IMPR_RESU(FORMAT='RESULTAT',
         RESU=_F(RESULTAT=RESU,
                 NOM_CHAM='EQUI_NOEU_SIGM',
                 FORM_TABL='OUI',
                 VALE_MAX='OUI',
                 VALE_MIN='OUI',
                 SOUS_TITRE='Principal_max_min',),);
Definition
  • IMPR_RESU means 'write result', that can either be written to a 3d-model or printed to the .resu file (or other file)
  • FORMAT = RESULTAT means that the result should be formatted for text as opposed to a 3d-model file format such as 'med', I-DEAS or other.
  • RESULTAT=RESU: Use the calculated result 'RESU'
  • NOM_CHAM: Name of field to write; we want the 'equivalent nodal stress'
  • FORM_TABL: Format as a table
  • VALE_MIN/MAX: Display min/max values of the field
  • SOUS_TITRE: Sub-title in the .resu file

Applying this to your comm file should yield the following table:

======>
------>
Principal_max_min                                                              

LA VALEUR MAXIMALE DE VMIS     EST  1.34509E+03 EN    1 NOEUD(S) : N2      
LA VALEUR MAXIMALE DE TRESCA   EST  1.46813E+03 EN    1 NOEUD(S) : N2      
LA VALEUR MAXIMALE DE PRIN_1   EST  1.54083E+02 EN    1 NOEUD(S) : NS2689  
LA VALEUR MAXIMALE DE PRIN_2   EST  2.19908E+02 EN    1 NOEUD(S) : NS2856  
LA VALEUR MAXIMALE DE PRIN_3   EST  4.36280E+02 EN    1 NOEUD(S) : NS2856  
LA VALEUR MAXIMALE DE VMIS_SG  EST  7.11318E+02 EN    1 NOEUD(S) : NS2835  
LA VALEUR MAXIMALE DE TRSIG    EST  0.00000E+00 EN **** NOEUD(S) : N1      
LA VALEUR MINIMALE DE VMIS     EST -6.91240E+01 EN    1 NOEUD(S) : NS12279 
LA VALEUR MINIMALE DE TRESCA   EST -7.77194E+01 EN    1 NOEUD(S) : NS12279 
LA VALEUR MINIMALE DE PRIN_1   EST -1.25101E+03 EN    1 NOEUD(S) : N2      
LA VALEUR MINIMALE DE PRIN_2   EST -2.95197E+02 EN    1 NOEUD(S) : NS3361  
LA VALEUR MINIMALE DE PRIN_3   EST -1.44362E+02 EN    1 NOEUD(S) : NS10331 
LA VALEUR MINIMALE DE VMIS_SG  EST -1.45302E+03 EN    1 NOEUD(S) : N2      
LA VALEUR MINIMALE DE TRSIG    EST  0.00000E+00 EN **** NOEUD(S) : N1

Extracting node reactions and forces

Extracting the results

Table=POST_RELEVE_T(ACTION=(_F(OPERATION='EXTRACTION',
                              INTITULE='ReacXYZ',
                              RESULTAT=RESU,
                              NOM_CHAM='REAC_NODA',
                              PRECISION=0.0001,
                              GROUP_NO='load',
                              RESULTANTE=('DX','DY','DZ',),
                              MOYE_NOEUD='OUI',),
                           _F(OPERATION='EXTRACTION',
                              INTITULE='ForceXYZ',
                              RESULTAT=RESU,
                              NOM_CHAM='FORC_NODA',
                              TOUT_ORDRE='OUI',
                              GROUP_NO='load',
                              RESULTANTE=('DX','DY','DZ',),),
                   TITRE='Principal stress',);
Definition
  • INTITULE: Name of the table
  • RESULTAT: Extract from the 'RESU' calculation
  • NOM_CHAM: Name of field, here REAC_NODA and FORC_NODA
  • Default precision
  • GROUP_NO: the node group - this has to be a node group (I'll describe how to extract from a whole model further down)
  • RESULTANTE: Vectorial components (Instead of RESULTANTE you can use TOUT_CMP=All components to get the values of all nodes in the group)
  • MOYE_NOEUD: Average the result around a node


Writing the table to a file:

IMPR_TABLE(TABLE=Table,
          FORMAT='TABLEAU',
          UNITE=26,
          SEPARATEUR=' ,',
          TITRE='Reac/Force at nodes',);


Definition
  • Write the table 'Table' we just created.
  • Format it as 'TABLEAU' - other formats are also available
  • UNITE: this is the unique number of the file you want to write the results to. This number should correspond to the number selected in ASTK, using the 'mast' file format. If you leave this unselected in your comm file, the results will be written to the .resu file
  • SEPARATEUR: using comma (,) as a separator - select any character you want.
  • TITRE: Name of the table

The result should look something like this (table is a little mangled by the wiki):

"#",,,,,,,,,,,,,
"#--------------------------------------------------------------------------------",,,,,,,,,,,,,
"#",,,,,,,,,,,,,
"#Reac/Force at nodes",,,,,,,,,,,,,
"#Reac/Force at nodes                                                                  ",,,,,,,,,,,,,
                                                              ",,,,,,,,,,,,,
" ","INTITULE         ","NOEUD    ","RESU     ","NOM_CHAM         ","NUME_ORDRE   ","INST         ","ABSC_CURV    ","COOR_X       ","COOR_Y       ","COOR_Z       ","DX           ","DY           ","DZ          "
" ","ReacXYZ          ","-        ","RESU     ","REAC_NODA        ",1,0.00E+000,"-            ","-            ","-            ","-            ",-1.36E+006,-1.19E+005,-3.42E+002
" ","ForceXYZ         ","-        ","RESU     ","FORC_NODA        ",1,0.00E+000,"-            ","-            ","-            ","-            ",-1.36E+006,-1.19E+005,-3.42E+002


Should you want the values for a whole node group, you can use TOUT_CMP (all the components) instead of the resultant (RESULTANT)

Create a table of the principal stresses from each node

sigm=CREA_CHAMP(TYPE_CHAM='NOEU_SIEF_R',
               OPERATION='EXTR',
               RESULTAT=RESU,
               NOM_CHAM='EQUI_NOEU_SIGM',);
Definition
  • Create (extract) a field of the type NOEU_SIEF_R; effective stress at the nodes from the calculation (RESU) and use the EQUI_NOEU_SIGM field calculated in RESU (EQUI_NOEU_SIGM: Equivalent node stress)
Table=POST_RELEVE_T(ACTION=(_F(OPERATION='EXTRACTION',
                              INTITULE='Principal stress',
                              CHAM_GD=sigm,
                              TOUT='OUI',
                              GROUP_NO='backbone',
                              TOUT_CMP='OUI',),),
                   TITRE='Principal stress',);
Definition
  • CHAM_GD: create the table from the field we created.
  • TOUT_CMP: All the components
IMPR_TABLE(TABLE=Table,
          FORMAT='TABLEAU',
          UNITE=26,
          SEPARATEUR=' ,',
          TITRE='Title',);
  • Again, write the table to a file