10 #if !defined(KRATOS_SMALL_STRAIN_UMAT_MODEL_H_INCLUDED )
11 #define KRATOS_SMALL_STRAIN_UMAT_MODEL_H_INCLUDED
104 virtual ConstitutiveModel::Pointer Clone()
const override;
126 virtual void InitializeModel(
ModelDataType& rValues)
override;
152 virtual void CalculateConstitutiveTensor(
ModelDataType& rValues,
Matrix& rConstitutiveMatrix)
override;
164 virtual int Check(
const Properties& rMaterialProperties,
const ProcessInfo& rCurrentProcessInfo)
override;
213 rComponentVariables.push_back(DISPLACEMENT);
233 virtual std::string
Info()
const override
235 std::stringstream buffer;
236 buffer <<
"SmallStrainUmatModel";
241 virtual void PrintInfo(std::ostream& rOStream)
const override
243 rOStream <<
"SmallStrainUmatModel";
247 virtual void PrintData(std::ostream& rOStream)
const override
249 rOStream <<
"SmallStrainUmatModel Data";
293 void InitializeElasticData(ModelDataType& rValues, UmatDataType& rVariables);
300 KRATOS_ERROR <<
" Calling the base GetNumberOfStateVariables " << std::endl;
307 KRATOS_ERROR <<
" Calling the base CreateConstitutiveParametersVector " << std::endl;
316 rpStateVariables =
new double[rNumberStateVariables];
317 for (
int i = 0;
i < rNumberStateVariables;
i++)
319 rpStateVariables[
i] = mStateVariablesFinalized(
i);
336 rpStrain =
new double[6];
337 rpIncrementalStrain =
new double[6];
339 for (
unsigned int i = 0;
i < 6;
i++) {
340 rpStrain[
i] = mStrainVectorFinalized(
i);
341 rpIncrementalStrain[
i] = ( StrainVector(
i) - mStrainVectorFinalized(
i) );
354 rpStressVector =
new double[6];
355 for (
unsigned int i = 0;
i < 6;
i++) {
356 rpStressVector[
i] = mStressVectorFinalized(
i);
368 mStrainVectorFinalized = StrainVector;
371 if ( fabs( Pressure) < 1
e-5) {
372 for (
unsigned int i = 0;
i < 6;
i++)
373 mStressVectorFinalized(
i) = rpStressVector[
i];
377 for (
unsigned int i = 0;
i < 3;
i++)
378 meanP += rpStressVector[
i];
381 for (
unsigned int i = 0;
i < 3;
i++)
382 mStressVectorFinalized(
i) = rpStressVector[
i] + Pressure - meanP;
383 for (
unsigned int i = 3;
i < 6;
i++)
384 mStressVectorFinalized(
i) = rpStressVector[
i];
387 int nStateVariables = this->GetNumberOfStateVariables();
388 for (
int i = 0;
i < nStateVariables;
i++)
389 mStateVariablesFinalized(
i) = rpStateVariables[
i];
398 KRATOS_ERROR <<
" Calling the base case of GetConstitutiveEquationNumber " << std::endl;
451 virtual void save(
Serializer& rSerializer)
const override
454 rSerializer.
save(
"InitializedModel", mInitializedModel );
455 rSerializer.
save(
"StressVectorFinalized", mStressVectorFinalized );
456 rSerializer.
save(
"StrainVectorFinalized", mStrainVectorFinalized );
457 rSerializer.
save(
"StateVariablesFinalized", mStateVariablesFinalized );
463 rSerializer.
load(
"InitializedModel", mInitializedModel );
464 rSerializer.
load(
"StressVectorFinalized", mStressVectorFinalized );
465 rSerializer.
load(
"StrainVectorFinalized", mStrainVectorFinalized );
466 rSerializer.
load(
"StateVariablesFinalized", mStateVariablesFinalized );
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Short class definition.
Definition: constitutive_model.hpp:52
static void StrainTensorToVector(const MatrixType &rMatrix, array_1d< double, 6 > &rVector)
Definition: constitutive_model_utilities.hpp:646
Definition: amatrix_interface.h:41
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
void load(std::string const &rTag, TDataType &rObject)
Definition: serializer.h:207
void save(std::string const &rTag, std::array< TDataType, TDataSize > const &rObject)
Definition: serializer.h:545
Short class definition.
Definition: small_strain_umat_model.hpp:51
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: small_strain_umat_model.hpp:247
virtual void InitializeStateVariables(Vector &rStateVariables, const Properties &rMaterialProperties)
Definition: small_strain_umat_model.hpp:286
VectorType mStressVectorFinalized
Definition: small_strain_umat_model.hpp:272
virtual void SetValue(const Variable< Matrix > &rThisVariable, const Matrix &rValue, const ProcessInfo &rCurrentProcessInfo) override
Definition: small_strain_umat_model.hpp:187
virtual void CreateStateVariablesVector(double *&rpStateVariables, int &rNumberStateVariables)
Definition: small_strain_umat_model.hpp:314
virtual void CreateStressAtInitialState(UmatDataType &rVariables, double *&rpStressVector)
Definition: small_strain_umat_model.hpp:351
virtual std::string Info() const override
Turn back information as a string.
Definition: small_strain_umat_model.hpp:233
virtual void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: small_strain_umat_model.hpp:241
UmatModelData UmatDataType
Definition: small_strain_umat_model.hpp:87
virtual int GetConstitutiveEquationNumber()
Definition: small_strain_umat_model.hpp:396
virtual unsigned int GetNumberOfStateVariables()
Definition: small_strain_umat_model.hpp:299
virtual void GetDomainVariablesList(std::vector< Variable< double > > &rScalarVariables, std::vector< Variable< array_1d< double, 3 > > > &rComponentVariables) override
Definition: small_strain_umat_model.hpp:208
virtual void UpdateVariables(UmatDataType &rVariables, double *&rpStressVector, double *&rpStateVariables, double Pressure=0.0)
Definition: small_strain_umat_model.hpp:364
VectorType mStrainVectorFinalized
Definition: small_strain_umat_model.hpp:273
virtual void SetValue(const Variable< Vector > &rThisVariable, const Vector &rValue, const ProcessInfo &rCurrentProcessInfo) override
Definition: small_strain_umat_model.hpp:170
Vector mStateVariablesFinalized
Definition: small_strain_umat_model.hpp:271
bool mInitializedModel
Definition: small_strain_umat_model.hpp:269
virtual void CreateConstitutiveParametersVector(double *&rpVector, int &rNumberParameters, const Properties &rMaterialProperties)
Definition: small_strain_umat_model.hpp:306
virtual void CreateStrainsVectors(UmatDataType &rVariables, double *&rpStrain, double *&rpIncrementalStrain)
Definition: small_strain_umat_model.hpp:330
KRATOS_CLASS_POINTER_DEFINITION(SmallStrainUmatModel)
Pointer definition of SmallStrainUmatModel.
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
#define KRATOS_ERROR
Definition: exception.h:161
double CalculateStrainEnergy(Element &rElement)
Definition: mpm_energy_calculation_utility.cpp:89
Parameters GetValue(Parameters &rParameters, const std::string &rEntry)
Definition: add_kratos_parameters_to_python.cpp:53
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def load(f)
Definition: ode_solve.py:307
integer i
Definition: TensorModule.f:17
e
Definition: run_cpp_mpi_tests.py:31
Definition: constitutive_model_data.hpp:92
Definition: constitutive_model_data.hpp:383
const MaterialData & GetMaterialParameters() const
Definition: constitutive_model_data.hpp:462
Definition: small_strain_umat_model.hpp:55
const ModelDataType & GetModelData() const
Definition: small_strain_umat_model.hpp:71
const MaterialDataType & GetMaterialParameters() const
Definition: small_strain_umat_model.hpp:72
void SetModelData(const ModelDataType &rModelData)
Definition: small_strain_umat_model.hpp:68
const Flags & GetState() const
Definition: small_strain_umat_model.hpp:78
MatrixType TotalStrainMatrix
Definition: small_strain_umat_model.hpp:64
void SetState(Flags &rState)
Definition: small_strain_umat_model.hpp:67
MatrixType IncrementalDeformation
Definition: small_strain_umat_model.hpp:63
Flags & State()
Definition: small_strain_umat_model.hpp:75