v0.15.0
Loading...
Searching...
No Matches
EshelbianPlasticity::HMHStVenantKirchhoff Struct Reference
Inheritance diagram for EshelbianPlasticity::HMHStVenantKirchhoff:
[legend]
Collaboration diagram for EshelbianPlasticity::HMHStVenantKirchhoff:
[legend]

Public Member Functions

 HMHStVenantKirchhoff (const double lambda, const double mu)
 
MoFEMErrorCode getOptions ()
 
MoFEMErrorCode recordTape (const int tape, DTensor2Ptr *t_h_ptr)
 
- Public Member Functions inherited from EshelbianPlasticity::PhysicalEquations
 PhysicalEquations ()=delete
 
 PhysicalEquations (const int size_active, const int size_dependent)
 
virtual ~PhysicalEquations ()=default
 
virtual UserDataOperatorreturnOpJacobian (const int tag, const bool eval_rhs, const bool eval_lhs, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
 
virtual VolUserDataOperatorreturnOpSpatialPhysical (const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha_u)
 
virtual VolUserDataOperatorreturnOpSpatialPhysicalExternalStrain (const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< ExternalStrainVec > external_strain_vec_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv)
 
virtual VolUserDataOperatorreturnOpSpatialPhysical_du_du (std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha)
 
virtual VolUserDataOperatorreturnOpCalculateEnergy (boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< double > total_energy_ptr)
 
virtual VolUserDataOperatorreturnOpCalculateStretchFromStress (boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
 
virtual VolUserDataOperatorreturnOpCalculateVarStretchFromStress (boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
 
virtual VolUserDataOperatorreturnOpSetScale (boost::shared_ptr< double > scale_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
 
DTensor2Ptr get_P ()
 
DTensor3Ptr get_P_dh0 ()
 
DTensor3Ptr get_P_dh1 ()
 
DTensor3Ptr get_P_dh2 ()
 
DTensor2Ptr get_h ()
 

Public Attributes

double lambda
 
double mu
 
double sigmaY
 
ATensor2 th
 
ATensor2 tH
 
ATensor2 tP
 
ATensor2 tSigma
 
adouble phi
 
adouble s2
 
adouble f
 
adouble energy
 
adouble detH
 
adouble detF
 
adouble trE
 
ATensor2 tInvH
 
ATensor2 tF
 
ATensor2 tInvF
 
ATensor2 tC
 
ATensor2 tE
 
ATensor2 tS
 
ATensor2 tPulledP
 
- Public Attributes inherited from EshelbianPlasticity::PhysicalEquations
std::vector< doubleactiveVariables
 
std::vector< doubledependentVariablesPiola
 
std::vector< doubledependentVariablesPiolaDirevatives
 

Static Public Attributes

static constexpr int numberOfActiveVariables = 9
 
static constexpr int numberOfDependentVariables = 9
 

Additional Inherited Members

- Public Types inherited from EshelbianPlasticity::PhysicalEquations
typedef FTensor::Tensor1< adouble, 3 > ATensor1
 
typedef FTensor::Tensor2< adouble, 3, 3 > ATensor2
 
typedef FTensor::Tensor3< adouble, 3, 3, 3 > ATensor3
 
typedef FTensor::Tensor1< double, 3 > DTensor1
 
typedef FTensor::Tensor2< double, 3, 3 > DTensor2
 
typedef FTensor::Tensor3< double, 3, 3, 3 > DTensor3
 
typedef FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > DTensor0Ptr
 
typedef FTensor::Tensor2< FTensor::PackPtr< double *, 1 >, 3, 3 > DTensor2Ptr
 
typedef FTensor::Tensor3< FTensor::PackPtr< double *, 1 >, 3, 3, 3 > DTensor3Ptr
 
- Static Public Member Functions inherited from EshelbianPlasticity::PhysicalEquations
template<int S>
static DTensor2Ptr get_VecTensor2 (std::vector< double > &v)
 
template<int S>
static DTensor0Ptr get_VecTensor0 (std::vector< double > &v)
 
template<int S0>
static DTensor3Ptr get_vecTensor3 (std::vector< double > &v, const int nba)
 

Detailed Description

Definition at line 13 of file HMHHStVenantKirchhoff.cpp.

Constructor & Destructor Documentation

◆ HMHStVenantKirchhoff()

Member Function Documentation

◆ getOptions()

MoFEMErrorCode EshelbianPlasticity::HMHStVenantKirchhoff::getOptions ( )
inline

Definition at line 22 of file HMHHStVenantKirchhoff.cpp.

22 {
24
25 double E = 1;
26 double nu = 0;
27
28 PetscOptionsBegin(PETSC_COMM_WORLD, "stvenant_", "", "none");
29
30 CHKERR PetscOptionsScalar("-young_modulus", "Young modulus", "", E, &E,
31 PETSC_NULLPTR);
32 CHKERR PetscOptionsScalar("-poisson_ratio", "poisson ratio", "", nu, &nu,
33 PETSC_NULLPTR);
34
35 PetscOptionsEnd();
36
37 MOFEM_LOG("EP", Sev::inform) << "St Venant Kirchhoff model parameters: "
38 << "E = " << E << ", nu = " << nu;
39
40 lambda = LAMBDA(E, nu);
41 mu = MU(E, nu);
42
44 }
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
#define MU(E, NU)
Definition fem_tools.h:23
#define LAMBDA(E, NU)
Definition fem_tools.h:22
#define MOFEM_LOG(channel, severity)
Log.

◆ recordTape()

MoFEMErrorCode EshelbianPlasticity::HMHStVenantKirchhoff::recordTape ( const int tape,
DTensor2Ptr * t_h_ptr )
inlinevirtual

Implements EshelbianPlasticity::PhysicalEquations.

Definition at line 71 of file HMHHStVenantKirchhoff.cpp.

71 {
73 FTensor::Index<'i', 3> i;
74 FTensor::Index<'j', 3> j;
75 FTensor::Index<'I', 3> I;
76 FTensor::Index<'J', 3> J;
80
82
84
85 auto ih = get_h();
86 // auto iH = get_H();
87 if (t_h_ptr)
88 ih(i, j) = (*t_h_ptr)(i, j);
89 else {
90 ih(i, j) = t_kd(i, j);
91 }
92
93 auto r_P = get_P();
94
95 enableMinMaxUsingAbs();
96 trace_on(tape);
97
98 // Set active variables to ADOL-C
99 th(i, j) <<= get_h()(i, j);
100
101 tF(i, I) = th(i, I);
104
105 // Deformation and strain
106 tC(I, J) = tF(i, I) * tF(i, J);
107 tE(I, J) = tC(I, J);
108 tE(N0, N0) -= 1;
109 tE(N1, N1) -= 1;
110 tE(N2, N2) -= 1;
111 tE(I, J) *= 0.5;
112
113 // Energy
114 trE = tE(I, I);
115 energy = 0.5 * lambda * trE * trE + mu * (tE(I, J) * tE(I, J));
116
117 // Stress Piola II
118 tS(I, J) = tE(I, J);
119 tS(I, J) *= 2 * mu;
120 tS(N0, N0) += lambda * trE;
121 tS(N1, N1) += lambda * trE;
122 tS(N2, N2) += lambda * trE;
123 // Stress Piola I
124 tP(i, J) = tF(i, I) * tS(I, J);
125
126 // Set dependent variables to ADOL-C
127 tP(i, j) >>= r_P(i, j);
128
129 trace_off();
130
132 }
Kronecker Delta class symmetric.
constexpr auto t_kd
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'J', DIM1 > J
Definition level_set.cpp:30
FTensor::Index< 'j', 3 > j
MoFEMErrorCode invertTensor3by3(ublas::matrix< T, L, A > &jac_data, ublas::vector< T, A > &det_data, ublas::matrix< T, L, A > &inv_jac_data)
Calculate inverse of tensor rank 2 at integration points.
MoFEMErrorCode determinantTensor3by3(T1 &t, T2 &det)
Calculate determinant 3 by 3.
constexpr IntegrationType I

Member Data Documentation

◆ detF

adouble EshelbianPlasticity::HMHStVenantKirchhoff::detF

Definition at line 60 of file HMHHStVenantKirchhoff.cpp.

◆ detH

adouble EshelbianPlasticity::HMHStVenantKirchhoff::detH

Definition at line 59 of file HMHHStVenantKirchhoff.cpp.

◆ energy

adouble EshelbianPlasticity::HMHStVenantKirchhoff::energy

Definition at line 57 of file HMHHStVenantKirchhoff.cpp.

◆ f

adouble EshelbianPlasticity::HMHStVenantKirchhoff::f

Definition at line 56 of file HMHHStVenantKirchhoff.cpp.

◆ lambda

double EshelbianPlasticity::HMHStVenantKirchhoff::lambda

Definition at line 46 of file HMHHStVenantKirchhoff.cpp.

◆ mu

double EshelbianPlasticity::HMHStVenantKirchhoff::mu

Definition at line 47 of file HMHHStVenantKirchhoff.cpp.

◆ numberOfActiveVariables

int EshelbianPlasticity::HMHStVenantKirchhoff::numberOfActiveVariables = 9
staticconstexpr

Definition at line 15 of file HMHHStVenantKirchhoff.cpp.

◆ numberOfDependentVariables

int EshelbianPlasticity::HMHStVenantKirchhoff::numberOfDependentVariables = 9
staticconstexpr

Definition at line 16 of file HMHHStVenantKirchhoff.cpp.

◆ phi

adouble EshelbianPlasticity::HMHStVenantKirchhoff::phi

Definition at line 54 of file HMHHStVenantKirchhoff.cpp.

◆ s2

adouble EshelbianPlasticity::HMHStVenantKirchhoff::s2

Definition at line 55 of file HMHHStVenantKirchhoff.cpp.

◆ sigmaY

double EshelbianPlasticity::HMHStVenantKirchhoff::sigmaY

Definition at line 48 of file HMHHStVenantKirchhoff.cpp.

◆ tC

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tC

Definition at line 65 of file HMHHStVenantKirchhoff.cpp.

◆ tE

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tE

Definition at line 66 of file HMHHStVenantKirchhoff.cpp.

◆ tF

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tF

Definition at line 63 of file HMHHStVenantKirchhoff.cpp.

◆ tH

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tH

Definition at line 51 of file HMHHStVenantKirchhoff.cpp.

◆ th

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::th

Definition at line 50 of file HMHHStVenantKirchhoff.cpp.

◆ tInvF

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tInvF

Definition at line 64 of file HMHHStVenantKirchhoff.cpp.

◆ tInvH

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tInvH

Definition at line 62 of file HMHHStVenantKirchhoff.cpp.

◆ tP

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tP

Definition at line 52 of file HMHHStVenantKirchhoff.cpp.

◆ tPulledP

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tPulledP

Definition at line 69 of file HMHHStVenantKirchhoff.cpp.

◆ trE

adouble EshelbianPlasticity::HMHStVenantKirchhoff::trE

Definition at line 61 of file HMHHStVenantKirchhoff.cpp.

◆ tS

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tS

Definition at line 67 of file HMHHStVenantKirchhoff.cpp.

◆ tSigma

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tSigma

Definition at line 53 of file HMHHStVenantKirchhoff.cpp.


The documentation for this struct was generated from the following file: