12. Calculating a user field#

The keyword factor CHAM_UTIL makes it possible to calculate any fields, called « user » fields because of the name that will be assigned to them in the result concept.

There can be several occurrences of CHAM_UTIL in order to combine the calculation of several fields.

Since the processing is done at the end of the CALC_CHAMP command, the fields calculated by the previous keywords (CONTRAINTE, DEFORMATION…) are available here.

Either we ask for the calculation of a predefined criterion, or we apply one or more formulas to calculate another field.

12.1. Operand NOM_CHAM#

This is the field from which calculations are made. The product field will have the same type: ELGA, ELNO, or NOEU.

12.2. Operand CRITERE#

Request the calculation of a predefined criterion. The criteria are (paragraph 2.6.5 provides the expressions for each criterion):

  • VMIS (for constraint fields),

  • INVA_2 (for deformation fields),

  • TRACE (for stress or deformation fields).

Each of these criteria produces a component (called X1).

One of the advantages is to be able to calculate INVA_2 of any deformation field.

12.3. Operand FORMULE#

This allows any expression to be calculated based on the components of the field provided for NOM_CHAM.

The product field will contain as many components as there are formulas provided: the first formula will correspond to the X1 component, to the second X2, etc. Up to 30 components can thus be created.

The output field is systematically extended to zero on the other components and where the input field is not defined.

Examples of formulas to find the criteria VMIS and INVA_2 can be found in the second part of the sslv104a test.

12.4. Operand NORME#

Request the calculation of a predefined standard. The standards are:

  • L2: Standard \({L}_{2}\) of a tensor

  • FROBENIUS: Frobenius norm of a tensor

The calculated norm is an integrated quantity (in the weak sense) on an element \({\Omega }_{e}\). For a \(A\) tensor, the \({L}_{2}\) standard is equal to:

(12.1)#\[{N}_{{L}_{2}}\mathrm{=}{\mathrm{\int }}_{{\Omega }_{e}}\sqrt{(A\mathrm{:}A)}\mathrm{.}d{\Omega }_{e}\]

The Frobenius norm on the \({A}_{\mathit{ij}}\) components of a \(A\) tensor:

(12.2)#\[{N}_{F}\mathrm{=}{\mathrm{\int }}_{{\Omega }_{e}}{\mathrm{\sum }}_{i,j}∣{A}_{\mathit{ij}}∣\mathrm{.}∣{A}_{\mathit{ij}}∣\mathrm{.}d{\Omega }_{e}\]

Each of these standards produces a component (called X1) on an element. So it’s a ELEM field. It should be noted that the difference between the two standards comes from the crossed terms (excluding the diagonal).

12.5. Operand NUME_CHAM_RESU#

The product field must be arranged, in a unique way, in the result concept. The « user » fields are therefore numbered using NUME_CHAM_RESU and the field type.

The field name will therefore be of the type UT01_ELGA, UT22_NOEU, etc.

12.6. Example of calculating a user field#

Produces field UT02_ELGA with two components. X1 is the trace of SIGM_ELGA (comparable to the TRSIG component of SIEQ_ELGA) and X2 is the equivalent Von Mises stress (component VMIS of SIEQ_ELGA).

Trace = FORMULE (NOM_PARA =( "SIXX "," SIYY "," "," SIZZ "), VALE =""" SIXX + SIYY + SIZZ """)

VonFriends = FORMULE (
    NOM_PARA =( "SIXX "," SIYY "," SIZZ "," "," SIXY "," SIXZ "," SIYZ "),
    VALE = "sqrt (3./2. *)* (SIXX **2 + SIYY**2 + SIZZ **2)
            + 2*SIXY**2 + 2*SIXZ**2 + 2*SIYZ**2)
            - 1./2. *fTrace (SIXX, SIYY, SIZZ)**2) "",
)

RES = CALC_CHAMP (
    use= RES,
    RESULTAT = RES,
    CHAM_UTIL =_F (NOM_CHAM =" SIGM_ELGA ", FORMULE =( fTrace, vOnSet), NUME_CHAM_RESU =2),
)