Add a State Variables node (
) under
Definitions>Variable Utilities in a model component or under
Global Definitions>Variable Utilities to define
states that are updated using an update expression at the beginning or end of each completed solver step. States are dependent variables in the model and stored as such in solutions, but they are explicitly updated by the solver after each converged time or parameter step rather than solved for in the usual sense. Use state variables to, for example, store the previous-step value of some expression. This is useful, for example, when implementing material models with history dependence or
hysteresis.
The Settings window contains the following sections:
For a State Variables node in a component, use this section to define the geometric entities where the state variables should be defined at integration points in each element.
Enter state variable names in the State column and corresponding initialization expressions in the
Initial value column. These initial values are handled in the same way as for other dependent variables, depending on study and solver settings. Then specify an
Update expression for each state variable, if
Update is not set to
Only initialization.
The update expression is evaluated every time a time or parameter step is written to the solution, either after completion of the step (before storing the result) or at the very beginning of each new solver step. You can select this behavior by choosing to Update either
Before step or
After step. The default is to update
Before step, which is appropriate for variables representing a value from the previous converged step. Notice, however, that state variables (and other dependent variables) from previous steps will only be used when the process is of continuation type or when the solution is reused from a previous step. The process is of continuation type for time stepping and when the parametric solver is changing its continuation parameter. At changes of noncontinuation parameters, the
Reuse solution from previous step study setting controls whether the solution will be reset to the initial data or use the previous solution. The default is to use the initial data. The first update then happens immediately
after the first time or parameter step is stored and the result is recorded in the second solution vector. When the feature is set to update
After step, the first update is performed, based on initial values,
before the first step is stored. The first value recorded in the solution is therefore not necessarily equal to the initial value specified.
You can also choose Only initialization, if you want that a complicated or expensive expression is evaluated only once. Press Ctrl+Space or use the
Insert Expression button (
) below the table to choose from previously defined parameters, mathematical constants and functions, operators, and physical constants that you can insert into an expression at the position of the cursor.
When the State Variables node belongs to a component, select the
Order of integration points in which the state variables will be defined. Allowed orders are even numbers between 0 and 14. The state variable degrees of freedom are defined in the same way as a standard dependent variable using
Gauss point data shape functions. Typically choose the same order as the integration order used by the physics equations in the model. States defined in that way are suitable for storing material property history data locally at each point where it is used by the equations.
Optionally specify a custom Description for each state and select the
Allow complex values check box to allow complex-valued state values when the solver is set to split complex values in real and imaginary parts.