Академический Документы
Профессиональный Документы
Культура Документы
UDMs - continued
All UDMs are instances of C++ classes derived from a base class
called ConstitutiveModel (defined in an Itasca-supplied header
file). For example class UserSsoft : public ConstitutiveModel {};
The base class specifies a number of virtual functions that must
be overridden by same-named functions in the derived class.
These functions contain user-written code that specify how the
model works, the names of properties, and so on. For example,
virtual char *Keyword(void) = 0;
is the base-class function to supply a model name, and
char *UserSsoft::Keyword(void) {return("userssoft");}
is the overriding function that actually specifies the name.
};
double
dSubZoneVolume, dZoneVolume;
STensor
double
double
double
bool
Note that variables dE1, dE2 and dG2 are property values
stored as part of the ElasticModel class. The model may
return a pointer to a character string if it detects an error
the string is then printed as an error message.
UDM an example
stress
strain
a (b 0 0 a )
1
ab a 0
p0 ( 11 22 33 ) / 3
v 11 22 33
p1
a (bp0 p0 v a v )
ab a v p0 v
K * ( p1 p0 ) / v
3K * (1 2 )
G
2(1 )
*
11d 23 G * (211 22 33 )
d
22
23 G * (2 22 11 33 )
33d 23 G* (2 33 11 22 )
11d 11 p0
where
22d 22 p0
33d 33 p0
d
d
Then, final stresses are: 11 11 11 p1
22 22d 22d p1
33 33d 33d p1
*
and: 12 : 12 2G 12
13 : 13 2G *13
23 : 23 2G * 23
Note that this is a nonlinear, elastic model unloading will follow the
same path as loading. This is fine if the types of simulations
performed always involve loading (such as the convergence of a
progressively-mined tunnel).
To implement the model, we start with the existing elastic
model in C++, and rename the source files and class name.
Thus,
class ElasticModel : public ConstitutiveModel {
public:
enum ModelNum { mnElasticModel=2 };
// rest of class follows
becomes
class GobModel : public ConstitutiveModel {
public:
enum ModelNum { mnGobModel=102 };
// rest of class follows
and so on.
Note that the model ID number should be chosen to avoid
conflicts with existing models. This number is used during
save and restore operations.