5.11.8. Equation parser

An equation parser has been implemented in the Envyo applkication, based on the Shunting yard algorithm and is available as an MIT license [6]. This equation parser has been modified to work with common LSDYNA variables such as histories and effective plastic strains and stresses. Variables are declared using the & symbol and commands are executed in the order of input.

The following variables are supported:

&HISV#i History variable at position i.
&EPS Effective plastic strain (the last entry in *INITIAL STRESS SHELL which may have a different meaning than eff. plas. strain).
&ELELENGTH The element length of the current element.
&SIG_IJ Components of the 2nd order stress tensor.
&SIG_INIT Allows initialization of a specific stress value. Refers to all stress components.
&ADD ELE HISV#i Element history variable from file i is used.
&LookupTable#i Lookup table from file i is used.
exp Exponent. An alternative input would be e**.

The example below illustrates the usage of the equation parser in combination with lookup tables. The commands following the additional history and lookup table definition are executed in the order of input:

Example: History variable manipulation

AddEleHISVFile#1 = Results A.dyn
AddEleHISVFile#2 = Results B.dyn
LookupTable#1 = data A.txt,&COL#1,&COL#2,&COL#3
LookupTable#2 = data B.txt,&COL#1,&COL#2,&COL#3
&HISV#3 = &ADDELE HISV#2
&HISV#2 = &ADDELE HISV#1
&HISV#4 = abs(&HISV#3-&HISV#2)*0.000467354
&EPS = &LookupTable#1,linearInterpolation,&HISV#4,&ELELENGTH,&COL#3
&HISV#6 = &LookupTable#2,nextNeighbour,&EPS,&ELELENGTH,&COL#3
&HISV#8 = &HISV#2
&HISV#9 = &ELELENGTH
MAX_NUM_HISV = 8

Two additional element history files are loaded into the Envyo application and are stored internally. In addition, two lookup table files are read. For each of these, column one, two, and three are considered. These numbers can be different and it is also possible to have more than just three columns.

After reading the data, the following commands are executed:

  • Additional element history variable from file 2 are stored as history variable # 3.

  • Additional element history variable from file 1 are stored as history variable # 2.

  • The value of history variable # 4 are calculated using the absolute value of history #3 - # 2, multiplied by a scale factor.

  • To get information about the effective plastic strain, lookup table # 1 is used. Linear interpolation is used if values are between two values provided within one of the columns. In this case, history variable #4 is compared to values stored in column # 1.

  • The application takes the element length of each element and compares it with the values stored in column # 2 of lookup table # 1. The final result is the value provided in column # 3.

  • The value of history variable # 6 is derived in a similar way, considering the next neighbour instead of performing a linear interpolation between the values. The first input is the resulting effective plastic strain from the previous step. Again, results are provided in column # 3.

  • Following these operations, history variable # 8 is assigned the value at history variable # 2, and the element length is stored at history variable # 9.

  • Nevertheless, only eight history variables are written to the final result file due to MAX_NUM_HISV.