SIMUL_MODEL#
Description#
The SIMUL_MODEL
ZebFront class type is used for the simplest models,
where a pure differential model is given. One good application of this
type of model is for verification of user FEM models, or to speed
simulations in an optimization procedure.
A model is defined by its “observable” variables which can be imposed as loading within the simulator (although it is up to the model programmer to sort out different loading conditions). In order to simulate different equations, “integrated” variables will be used having been given the time (or pseudo-time) derivative functions. The observable variables will be naturally part of the integrated variables, so their evolution is given in the simulation routine according to the active loading (see below for example). Additional variables may be output by assigning them “auxiliary” space in the class definition.
Syntax#
A summary follows of the pre-processor directives available in simulation models:
CODE |
DESCRIPTION |
---|---|
|
declares a user-class |
|
explicit integration function calculating variable time derivatives |
|
extra read function to search user defined syntax |
|
function for extra output which may be desired. |
The class#
A model of type SIMUL_MODEL
is more limited than other models in
ZebFront. Only the following commands sub-set of commands are available:
@Class
NAME_OF_CLASS : SIMUL_MODEL {
\(~\,~\,\) @Name
class_name;
\(~\,~\,\) @Coeff
coeff , …, coeffN ;
\(~\,~\,\) @VarInt
list;
\(~\,~\,\) @VarAux
list;
\(~\,~\,\) @Observable
list;
\(~\,~\,\) additional C++ code
};
In addition to the limitations of commands, the syntax of those available are reduced as well. The above only permit comma separated lists of names to represent the data members. The coefficients in the model file may also be only single (real) values.
Example#
The following is a complete example of a one dimensional model for a
viscoplastic behavior. Note that the syntax is simple and there are
really no pre-defined utilities. The load array specifies the variables
which are given in the input file, and can be chosen from the variables
defined as @Observable
in the class heading.
//
// Viscoplasticity with one kinematic variable, 1d loading
//
@Class CNLV1 : SIMUL_MODEL {
@Coefs young, K, n R0, Q, b, C, D;
@VarInt eel, evcum, alpha, evi;
@VarAux X, R, sigeff, f;
@Observable sig, eto;
};
@Derivative {
eto = eel + evi;
sig = young*eel;
X = C*alpha;
R = R0 + Q*(1.0-exp(-b*evcum));
sigeff = sig-X;
f = fabs(sigeff) - R;
if (f>0.0) {
devcum = exp(n*log(f/K));
devi = sign(sigeff)*devcum;
if (C>0.0) dalpha = devi - devcum*D*X/C;
}
if (load[0]=="sig") deel = dglobal[0]/young;
else if (load[0]=="eto") deel = dglobal[0] - devi;
}