Difference between revisions of "Contrib:Claws/Code Aster/comms"
From CAELinuxWiki
Atywehacyg (Talk | contribs) |
m (Reverted edit of Atywehacyg, changed back to last version by Claws) |
||
Line 3: | Line 3: | ||
Comm files | Comm files | ||
− | + | == Contents == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Extracting max/min principal stress of a model == | == Extracting max/min principal stress of a model == |
Revision as of 11:52, 18 November 2010
<-Link: Back to Contrib:Claws/Code_Aster
Comm files
Contents
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 (these two must be included in CALC_NO)
- 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):
# #-------------------------------------------------------------------------------- # #Claus Andersen #Claus Andersen ,INTITULE ,NOEUD ,CHAM_GD ,RESU ,NOM_CHAM ,NUME_ORDRE ,INST ,ABSC_CURV ,COOR_X ,COOR_Y ,COOR_Z ,DX ,DY ,DZ ,VMIS ,TRESCA ,PRIN_1 ,PRIN_2 ,PRIN_3 ,VMIS_SG ,TRSIG ,ReacXYZ ,- ,- ,RESU ,REAC_NODA , 1 , 0.00000E+00 ,- ,- ,- ,- ,-1.35581E+06 ,-1.19057E+05 ,-3.41824E+02 ,- ,- ,- ,- ,- ,- ,- ,ForceXYZ ,- ,- ,RESU ,FORC_NODA , 1 , 0.00000E+00 ,- ,- ,- ,- ,-1.35581E+06 ,-1.19057E+05 ,-3.41824E+02 ,- ,- ,- ,- ,- ,- ,-
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
The result should look something like this (ReacXYZ and ForceXYZ is from another table):
# #-------------------------------------------------------------------------------- # #Claus Andersen #Claus Andersen ,INTITULE ,NOEUD ,CHAM_GD ,RESU ,NOM_CHAM ,NUME_ORDRE ,INST ,ABSC_CURV ,COOR_X ,COOR_Y ,COOR_Z ,DX ,DY ,DZ ,VMIS ,TRESCA ,PRIN_1 ,PRIN_2 ,PRIN_3 ,VMIS_SG ,TRSIG ,ReacXYZ ,- ,- ,RESU ,REAC_NODA , 1 , 0.00000E+00 ,- ,- ,- ,- ,-1.35581E+06 ,-1.19057E+05 ,-3.41824E+02 ,- ,- ,- ,- ,- ,- ,- ,ForceXYZ ,- ,- ,RESU ,FORC_NODA , 1 , 0.00000E+00 ,- ,- ,- ,- ,-1.35581E+06 ,-1.19057E+05 ,-3.41824E+02 ,- ,- ,- ,- ,- ,- ,- ,node_reac ,N37 ,sigm ,- ,- ,- ,- , 0.00000E+00 , 3.00000E+03 , 3.75000E+02 ,-2.18889E+01 ,- ,- ,- , 1.07338E+03 , 1.22228E+03 ,-8.83649E+02 ,-2.35115E+02 , 3.38627E+02 ,-1.33675E+03 , 0.00000E+00 ,node_reac ,N97 ,sigm ,- ,- ,- ,- , 3.00000E+03 ,-4.16334E-14 , 3.75000E+02 ,-2.18889E+01 ,- ,- ,- , 1.24277E+02 , 1.32194E+02 ,-1.62677E+02 ,-1.52712E+02 ,-3.04834E+01 ,-1.24277E+02 , 0.00000E+00 ,node_reac ,N1166 ,sigm ,- ,- ,- ,- , 3.37006E+03 , 3.70027E+02 , 3.75000E+02 ,-1.69688E+01 ,- ,- ,- , 3.29590E+01 , 3.29360E+01 ,-3.30096E+01 , 2.24046E-02 ,-7.35942E-02 ,-3.29590E+01 , 0.00000E+00 ,node_reac ,N1179 ,sigm ,- ,- ,- ,- , 3.48084E+03 , 2.59243E+02 , 3.75000E+02 ,-1.69755E+01 ,- ,- ,- , 2.77424E+01 , 2.76690E+01 ,-2.78643E+01 , 1.55714E-02 ,-1.95291E-01 ,-2.77424E+01 , 0.00000E+00 ,node_reac ,N1188 ,sigm ,- ,- ,- ,- , 3.70116E+03 , 3.89358E+01 , 3.75000E+02 ,-1.94565E+01 ,- ,- ,- , 3.69730E+01 , 4.25928E+01 ,-3.02343E+01 , 3.00930E+00 , 1.23584E+01 ,-3.69730E+01 , 0.00000E+00 ,node_reac ,N1192 ,sigm ,- ,- ,- ,- , 3.81104E+03 , 1.48784E+02 , 3.75000E+02 ,-1.71212E+01 ,- ,- ,- , 1.31783E+01 , 1.57680E+01 ,-1.50357E+01 ,-8.21171E+00 , 7.32377E-01 ,-1.31783E+01 , 0.00000E+00 ,node_reac ,N1202 ,sigm ,- ,- ,- ,- , 4.91843E+03 , 1.25618E+03 , 3.75000E+02 ,-1.69688E+01 ,- ,- ,- , 6.07226E+01 , 6.07140E+01 ,-6.08630E+01 ,-1.24418E-01 ,-1.49010E-01 ,-6.07226E+01 , 0.00000E+00
Creating a node group from the entire model
Should you want to extract all node values and didn't define one in your CAD program, your can easily do it in C_A:
mesh=DEFI_GROUP(reuse =mesh, MAILLAGE=mesh, CREA_GROUP_MA=_F(NOM='all_ma', TOUT='OUI',), CREA_GROUP_NO=_F(GROUP_MA='all_ma',),);
- Definition
- Define a group
- Use the mesh named 'mesh'
- Create a mesh group called 'all_ma'; TOUT=All
- Create a node group called 'all_ma'
Claws 07:08, 4 April 2009 (CEST)