v0.14.0
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
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 ()
 
virtual OpJacobianreturnOpJacobian (const int tag, const bool eval_rhs, const bool eval_lhs, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
 
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 VolUserDataOperatorreturnOpSpatialPhysical (const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha_u)
 
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)
 
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()

EshelbianPlasticity::HMHStVenantKirchhoff::HMHStVenantKirchhoff ( const double  lambda,
const double  mu 
)
inline

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  CHKERR PetscOptionsBegin(PETSC_COMM_WORLD, "stvenant_", "", "none");
29 
30  CHKERR PetscOptionsScalar("-young_modulus", "Young modulus", "", E, &E,
31  PETSC_NULL);
32  CHKERR PetscOptionsScalar("-poisson_ratio", "poisson ratio", "", nu, &nu,
33  PETSC_NULL);
34 
35  ierr = PetscOptionsEnd();
36  CHKERRG(ierr);
37 
38  MOFEM_LOG("EP", Sev::inform) << "St Venant Kirchhoff model parameters: "
39  << "E = " << E << ", nu = " << nu;
40 
41  lambda = LAMBDA(E, nu);
42  mu = MU(E, nu);
43 
45  }

◆ recordTape()

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

Implements EshelbianPlasticity::PhysicalEquations.

Definition at line 79 of file HMHHStVenantKirchhoff.cpp.

79  {
88 
90 
92 
93  auto ih = get_h();
94  // auto iH = get_H();
95  if (t_h_ptr)
96  ih(i, j) = (*t_h_ptr)(i, j);
97  else {
98  ih(i, j) = t_kd(i, j);
99  }
100 
101  auto r_P = get_P();
102 
103  enableMinMaxUsingAbs();
104  trace_on(tape);
105 
106  // Set active variables to ADOL-C
107  th(i, j) <<= get_h()(i, j);
108 
109  tF(i, I) = th(i, I);
112 
113  // Deformation and strain
114  tC(I, J) = tF(i, I) * tF(i, J);
115  tE(I, J) = tC(I, J);
116  tE(N0, N0) -= 1;
117  tE(N1, N1) -= 1;
118  tE(N2, N2) -= 1;
119  tE(I, J) *= 0.5;
120 
121  // Energy
122  trE = tE(I, I);
123  energy = 0.5 * lambda * trE * trE + mu * (tE(I, J) * tE(I, J));
124 
125  // Stress Piola II
126  tS(I, J) = tE(I, J);
127  tS(I, J) *= 2 * mu;
128  tS(N0, N0) += lambda * trE;
129  tS(N1, N1) += lambda * trE;
130  tS(N2, N2) += lambda * trE;
131  // Stress Piola I
132  tP(i, J) = tF(i, I) * tS(I, J);
133 
134  // Set dependent variables to ADOL-C
135  tP(i, j) >>= r_P(i, j);
136 
137  trace_off();
138 
140  }

◆ returnOpJacobian()

virtual OpJacobian* EshelbianPlasticity::HMHStVenantKirchhoff::returnOpJacobian ( const int  tag,
const bool  eval_rhs,
const bool  eval_lhs,
boost::shared_ptr< DataAtIntegrationPts data_ptr,
boost::shared_ptr< PhysicalEquations physics_ptr 
)
inlinevirtual

Implements EshelbianPlasticity::PhysicalEquations.

Definition at line 48 of file HMHHStVenantKirchhoff.cpp.

50  {
51  return (new OpHMHH(tag, eval_rhs, eval_lhs, data_ptr, physics_ptr));
52  }

Member Data Documentation

◆ detF

adouble EshelbianPlasticity::HMHStVenantKirchhoff::detF

Definition at line 68 of file HMHHStVenantKirchhoff.cpp.

◆ detH

adouble EshelbianPlasticity::HMHStVenantKirchhoff::detH

Definition at line 67 of file HMHHStVenantKirchhoff.cpp.

◆ energy

adouble EshelbianPlasticity::HMHStVenantKirchhoff::energy

Definition at line 65 of file HMHHStVenantKirchhoff.cpp.

◆ f

adouble EshelbianPlasticity::HMHStVenantKirchhoff::f

Definition at line 64 of file HMHHStVenantKirchhoff.cpp.

◆ lambda

double EshelbianPlasticity::HMHStVenantKirchhoff::lambda

Definition at line 54 of file HMHHStVenantKirchhoff.cpp.

◆ mu

double EshelbianPlasticity::HMHStVenantKirchhoff::mu

Definition at line 55 of file HMHHStVenantKirchhoff.cpp.

◆ numberOfActiveVariables

constexpr int EshelbianPlasticity::HMHStVenantKirchhoff::numberOfActiveVariables = 9
staticconstexpr

Definition at line 15 of file HMHHStVenantKirchhoff.cpp.

◆ numberOfDependentVariables

constexpr int EshelbianPlasticity::HMHStVenantKirchhoff::numberOfDependentVariables = 9
staticconstexpr

Definition at line 16 of file HMHHStVenantKirchhoff.cpp.

◆ phi

adouble EshelbianPlasticity::HMHStVenantKirchhoff::phi

Definition at line 62 of file HMHHStVenantKirchhoff.cpp.

◆ s2

adouble EshelbianPlasticity::HMHStVenantKirchhoff::s2

Definition at line 63 of file HMHHStVenantKirchhoff.cpp.

◆ sigmaY

double EshelbianPlasticity::HMHStVenantKirchhoff::sigmaY

Definition at line 56 of file HMHHStVenantKirchhoff.cpp.

◆ tC

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tC

Definition at line 73 of file HMHHStVenantKirchhoff.cpp.

◆ tE

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tE

Definition at line 74 of file HMHHStVenantKirchhoff.cpp.

◆ tF

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tF

Definition at line 71 of file HMHHStVenantKirchhoff.cpp.

◆ th

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::th

Definition at line 58 of file HMHHStVenantKirchhoff.cpp.

◆ tH

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tH

Definition at line 59 of file HMHHStVenantKirchhoff.cpp.

◆ tInvF

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tInvF

Definition at line 72 of file HMHHStVenantKirchhoff.cpp.

◆ tInvH

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tInvH

Definition at line 70 of file HMHHStVenantKirchhoff.cpp.

◆ tP

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tP

Definition at line 60 of file HMHHStVenantKirchhoff.cpp.

◆ tPulledP

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tPulledP

Definition at line 77 of file HMHHStVenantKirchhoff.cpp.

◆ trE

adouble EshelbianPlasticity::HMHStVenantKirchhoff::trE

Definition at line 69 of file HMHHStVenantKirchhoff.cpp.

◆ tS

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tS

Definition at line 75 of file HMHHStVenantKirchhoff.cpp.

◆ tSigma

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tSigma

Definition at line 61 of file HMHHStVenantKirchhoff.cpp.


The documentation for this struct was generated from the following file:
EshelbianPlasticity::HMHStVenantKirchhoff::detF
adouble detF
Definition: HMHHStVenantKirchhoff.cpp:68
E
LAMBDA
#define LAMBDA(E, NU)
Definition: fem_tools.h:22
J
FTensor::Index< 'J', DIM1 > J
Definition: level_set.cpp:30
EshelbianPlasticity::HMHStVenantKirchhoff::trE
adouble trE
Definition: HMHHStVenantKirchhoff.cpp:69
EshelbianPlasticity::HMHStVenantKirchhoff::tInvF
ATensor2 tInvF
Definition: HMHHStVenantKirchhoff.cpp:72
EshelbianPlasticity::HMHStVenantKirchhoff::tP
ATensor2 tP
Definition: HMHHStVenantKirchhoff.cpp:60
I
constexpr IntegrationType I
Definition: operators_tests.cpp:31
MoFEM::invertTensor3by3
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.
Definition: Templates.hpp:1588
FTensor::Number< 0 >
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
EshelbianPlasticity::HMHStVenantKirchhoff::tF
ATensor2 tF
Definition: HMHHStVenantKirchhoff.cpp:71
EshelbianPlasticity::HMHStVenantKirchhoff::numberOfActiveVariables
static constexpr int numberOfActiveVariables
Definition: HMHHStVenantKirchhoff.cpp:15
EshelbianPlasticity::HMHStVenantKirchhoff::tS
ATensor2 tS
Definition: HMHHStVenantKirchhoff.cpp:75
EshelbianPlasticity::HMHStVenantKirchhoff::lambda
double lambda
Definition: HMHHStVenantKirchhoff.cpp:54
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
EshelbianPlasticity::HMHStVenantKirchhoff::energy
adouble energy
Definition: HMHHStVenantKirchhoff.cpp:65
t_kd
constexpr auto t_kd
Definition: free_surface.cpp:137
EshelbianPlasticity::HMHStVenantKirchhoff::tE
ATensor2 tE
Definition: HMHHStVenantKirchhoff.cpp:74
FTensor::Index< 'i', 3 >
MoFEM::determinantTensor3by3
static auto determinantTensor3by3(T &t)
Calculate the determinant of a 3x3 matrix or a tensor of rank 2.
Definition: Templates.hpp:1540
MOFEM_LOG
#define MOFEM_LOG(channel, severity)
Log.
Definition: LogManager.hpp:308
EshelbianPlasticity::HMHStVenantKirchhoff::getOptions
MoFEMErrorCode getOptions()
Definition: HMHHStVenantKirchhoff.cpp:22
EshelbianPlasticity::HMHStVenantKirchhoff::th
ATensor2 th
Definition: HMHHStVenantKirchhoff.cpp:58
EshelbianPlasticity::HMHStVenantKirchhoff::numberOfDependentVariables
static constexpr int numberOfDependentVariables
Definition: HMHHStVenantKirchhoff.cpp:16
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
MoFEM::Exceptions::ierr
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:76
FTensor::Kronecker_Delta_symmetric
Kronecker Delta class symmetric.
Definition: Kronecker_Delta.hpp:49
EshelbianPlasticity::PhysicalEquations::get_h
DTensor2Ptr get_h()
Definition: EshelbianPlasticity.hpp:317
EshelbianPlasticity::HMHStVenantKirchhoff::mu
double mu
Definition: HMHHStVenantKirchhoff.cpp:55
EshelbianPlasticity::HMHStVenantKirchhoff::tC
ATensor2 tC
Definition: HMHHStVenantKirchhoff.cpp:73
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
CHKERRG
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:496
EshelbianPlasticity::PhysicalEquations::PhysicalEquations
PhysicalEquations()=delete
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
EshelbianPlasticity::PhysicalEquations::get_P
DTensor2Ptr get_P()
Definition: EshelbianPlasticity.hpp:325
MU
#define MU(E, NU)
Definition: fem_tools.h:23