4. Use of CALCUL and table_containers#

CALCULne only produces a table_container in which one or more fields are stored for each order number (constraints, internal variables, elementary vectors of internal forces, elementary matrices of the tangent matrix).

To extract these fields, use the EXTR_TABLE command. For example, if we want the constraints field from the CALCUL command, we would do:

CONT = CALCUL (OPTION =( “COMPORTEMENT”, “”, “FORC_INTE_ELEM”, “MATR_TANG_ELEM”),

MODELE =ME,

CHAM_MATER = CHMAT,

INCREMENT =_F (LIST_INST = LIST,

NUME_ORDRE =1),

EXCIT =_F (CHARGE = CHARGE),

DEPL =U,

INCR_DEPL =SOME,

SIGM = SIGP,

VARI = VARIP,

COMPORTEMENT =_F (RELATION =” VMIS_ISOT_LINE “,),

INFO =2,);

SIGM = EXTR_TABLE (TYPE_RESU =” CHAM_GD_SDASTER “,

TABLE = CONT,

NOM_PARA =” NOM_SD “,

FILTRE =_F (NOM_PARA =” NOM_OBJET “,

VALE_K =” SIEF_ELGA “),)

To calculate the second member of external forces or other quantities (such as mass matrices), you can use the CALC_VECT_ELEM or CALC_MATR_ELEM commands.

The matr_elem or the vect_elem can be assembled using the ASSE_VECTEUR and ASSE_MATRICE commands.

It should be noted that the MATR_ELEM of stiffness produced by CALCUL also contain the contribution resulting from the dualization of the Dirichlet limit conditions (EXCIT).

An example of the use of CALCUL for mechanics is available in the test case PYNL01A.For thermal engineering, a purely Python use is presented in pynl03a.