v0.14.0
Loading...
Searching...
No Matches
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 MoFEMErrorCode recordTape (const int tag, DTensor2Ptr *t_h)=0
 
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)=0
 
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 184 of file EshelbianADOL-C.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 193 of file EshelbianADOL-C.cpp.

193 {
195
196 double E = 1;
197 double nu = 0;
198
199 CHKERR PetscOptionsBegin(PETSC_COMM_WORLD, "stvenant_", "", "none");
200
201 CHKERR PetscOptionsScalar("-young_modulus", "Young modulus", "", E, &E,
202 PETSC_NULL);
203 CHKERR PetscOptionsScalar("-poisson_ratio", "poisson ratio", "", nu, &nu,
204 PETSC_NULL);
205
206 ierr = PetscOptionsEnd();
207 CHKERRG(ierr);
208
209 MOFEM_LOG("EP", Sev::inform) << "St Venant Kirchhoff model parameters: "
210 << "E = " << E << ", nu = " << nu;
211
212 lambda = LAMBDA(E, nu);
213 mu = MU(E, nu);
214
216 }
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:483
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
#define CHKERR
Inline error check.
Definition: definitions.h:535
#define MU(E, NU)
Definition: fem_tools.h:23
#define LAMBDA(E, NU)
Definition: fem_tools.h:22
#define MOFEM_LOG(channel, severity)
Log.
Definition: LogManager.hpp:308
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:76

◆ recordTape()

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

Implements EshelbianPlasticity::PhysicalEquations.

Definition at line 250 of file EshelbianADOL-C.cpp.

250 {
259
261
263
264 auto ih = get_h();
265 // auto iH = get_H();
266 if (t_h_ptr)
267 ih(i, j) = (*t_h_ptr)(i, j);
268 else {
269 ih(i, j) = t_kd(i, j);
270 }
271
272 auto r_P = get_P();
273
274 enableMinMaxUsingAbs();
275 trace_on(tape);
276
277 // Set active variables to ADOL-C
278 th(i, j) <<= get_h()(i, j);
279
280 tF(i, I) = th(i, I);
283
284 // Deformation and strain
285 tC(I, J) = tF(i, I) * tF(i, J);
286 tE(I, J) = tC(I, J);
287 tE(N0, N0) -= 1;
288 tE(N1, N1) -= 1;
289 tE(N2, N2) -= 1;
290 tE(I, J) *= 0.5;
291
292 // Energy
293 trE = tE(I, I);
294 energy = 0.5 * lambda * trE * trE + mu * (tE(I, J) * tE(I, J));
295
296 // Stress Piola II
297 tS(I, J) = tE(I, J);
298 tS(I, J) *= 2 * mu;
299 tS(N0, N0) += lambda * trE;
300 tS(N1, N1) += lambda * trE;
301 tS(N2, N2) += lambda * trE;
302 // Stress Piola I
303 tP(i, J) = tF(i, I) * tS(I, J);
304
305 // Set dependent variables to ADOL-C
306 tP(i, j) >>= r_P(i, j);
307
308 trace_off();
309
311 }
static Index< 'J', 3 > J
static Number< 2 > N2
static Number< 1 > N1
static Number< 0 > N0
Kronecker Delta class symmetric.
constexpr auto t_kd
FTensor::Index< 'i', SPACE_DIM > i
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.
Definition: Templates.hpp:1559
static auto determinantTensor3by3(T &t)
Calculate the determinant of a 3x3 matrix or a tensor of rank 2.
Definition: Templates.hpp:1511
constexpr IntegrationType I

◆ 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 219 of file EshelbianADOL-C.cpp.

221 {
222 return (new OpHMHH(tag, eval_rhs, eval_lhs, data_ptr, physics_ptr));
223 }

Member Data Documentation

◆ detF

adouble EshelbianPlasticity::HMHStVenantKirchhoff::detF

Definition at line 239 of file EshelbianADOL-C.cpp.

◆ detH

adouble EshelbianPlasticity::HMHStVenantKirchhoff::detH

Definition at line 238 of file EshelbianADOL-C.cpp.

◆ energy

adouble EshelbianPlasticity::HMHStVenantKirchhoff::energy

Definition at line 236 of file EshelbianADOL-C.cpp.

◆ f

adouble EshelbianPlasticity::HMHStVenantKirchhoff::f

Definition at line 235 of file EshelbianADOL-C.cpp.

◆ lambda

double EshelbianPlasticity::HMHStVenantKirchhoff::lambda

Definition at line 225 of file EshelbianADOL-C.cpp.

◆ mu

double EshelbianPlasticity::HMHStVenantKirchhoff::mu

Definition at line 226 of file EshelbianADOL-C.cpp.

◆ numberOfActiveVariables

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

Definition at line 186 of file EshelbianADOL-C.cpp.

◆ numberOfDependentVariables

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

Definition at line 187 of file EshelbianADOL-C.cpp.

◆ phi

adouble EshelbianPlasticity::HMHStVenantKirchhoff::phi

Definition at line 233 of file EshelbianADOL-C.cpp.

◆ s2

adouble EshelbianPlasticity::HMHStVenantKirchhoff::s2

Definition at line 234 of file EshelbianADOL-C.cpp.

◆ sigmaY

double EshelbianPlasticity::HMHStVenantKirchhoff::sigmaY

Definition at line 227 of file EshelbianADOL-C.cpp.

◆ tC

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tC

Definition at line 244 of file EshelbianADOL-C.cpp.

◆ tE

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tE

Definition at line 245 of file EshelbianADOL-C.cpp.

◆ tF

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tF

Definition at line 242 of file EshelbianADOL-C.cpp.

◆ th

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::th

Definition at line 229 of file EshelbianADOL-C.cpp.

◆ tH

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tH

Definition at line 230 of file EshelbianADOL-C.cpp.

◆ tInvF

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tInvF

Definition at line 243 of file EshelbianADOL-C.cpp.

◆ tInvH

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tInvH

Definition at line 241 of file EshelbianADOL-C.cpp.

◆ tP

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tP

Definition at line 231 of file EshelbianADOL-C.cpp.

◆ tPulledP

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tPulledP

Definition at line 248 of file EshelbianADOL-C.cpp.

◆ trE

adouble EshelbianPlasticity::HMHStVenantKirchhoff::trE

Definition at line 240 of file EshelbianADOL-C.cpp.

◆ tS

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tS

Definition at line 246 of file EshelbianADOL-C.cpp.

◆ tSigma

ATensor2 EshelbianPlasticity::HMHStVenantKirchhoff::tSigma

Definition at line 232 of file EshelbianADOL-C.cpp.


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