v0.10.0
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63 Struct Reference
Inheritance diagram for EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63:
[legend]
Collaboration diagram for EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63:
[legend]

Public Member Functions

 HMHPMooneyRivlinWriggersEq63 (const double alpha, const double beta, const double lambda, const double sigma_y)
 
virtual OpJacobianreturnOpJacobian (const std::string &field_name, const int tag, const bool eval_rhs, const bool eval_lhs, boost::shared_ptr< DataAtIntegrationPts > &data_ptr, boost::shared_ptr< PhysicalEquations > &physics_ptr)
 
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 ()
 
DTensor2Ptr get_P ()
 
DTensor2Ptr get_Sigma ()
 
DTensor0Ptr get_Phi ()
 
doubleget_PhiRef ()
 
DTensor2Ptr get_Flow ()
 
DTensor3Ptr get_P_dh0 ()
 
DTensor3Ptr get_P_dH0 ()
 
DTensor3Ptr get_P_dh1 ()
 
DTensor3Ptr get_P_dH1 ()
 
DTensor3Ptr get_P_dh2 ()
 
DTensor3Ptr get_P_dH2 ()
 
DTensor3Ptr get_Sigma_dh0 ()
 
DTensor3Ptr get_Sigma_dH0 ()
 
DTensor3Ptr get_Sigma_dh1 ()
 
DTensor3Ptr get_Sigma_dH1 ()
 
DTensor3Ptr get_Sigma_dh2 ()
 
DTensor3Ptr get_Sigma_dH2 ()
 
DTensor2Ptr get_Phi_dh ()
 
DTensor2Ptr get_Phi_dH ()
 
DTensor3Ptr get_Flow_dh0 ()
 
DTensor3Ptr get_Flow_dH0 ()
 
DTensor3Ptr get_Flow_dh1 ()
 
DTensor3Ptr get_Flow_dH1 ()
 
DTensor3Ptr get_Flow_dh2 ()
 
DTensor3Ptr get_Flow_dH2 ()
 
DTensor2Ptr get_h ()
 
DTensor2Ptr get_H ()
 

Public Attributes

double alpha
 
double beta
 
double lambda
 
double epsilon
 
double sigmaY
 
ATensor2 th
 
ATensor2 tH
 
ATensor2 tF
 
adouble detH
 
adouble detF
 
ATensor2 tInvH
 
ATensor2 tInvF
 
ATensor2 tP
 
ATensor2 tSigma
 
ATensor2 tCauchy
 
ATensor2 tDevCauchy
 
ATensor2 tCof
 
ATensor2 tBF
 
ATensor2 tBCof
 
adouble tBj
 
adouble energy
 
adouble meanCauchy
 
adouble s2
 
adouble f
 
adouble phi
 
adouble A
 
adouble B
 
ATensor2 tPhi_dDevCauchy
 
ATensor2 tPhi_dCauchy
 
ATensor2 tPhi_dSigma
 
ATensor2 tPulledP
 
ATensor2 tPulledSigma
 
ATensor2 tPulledPhi_dSigma
 
- Public Attributes inherited from EshelbianPlasticity::PhysicalEquations
std::vector< doubleactiveVariables
 
std::vector< doubledependentVariables
 
std::vector< doubledependentVariablesDirevatives
 

Static Public Attributes

static constexpr int numberOfActiveVariables = 9 + 9
 
static constexpr int numberOfDependentVariables = 9 + 9 + 1 + 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::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, int S1, int S2>
static DTensor3Ptr get_vecTensor3 (std::vector< double > &v)
 

Detailed Description

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

Constructor & Destructor Documentation

◆ HMHPMooneyRivlinWriggersEq63()

EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::HMHPMooneyRivlinWriggersEq63 ( const double  alpha,
const double  beta,
const double  lambda,
const double  sigma_y 
)

Member Function Documentation

◆ getOptions()

MoFEMErrorCode EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::getOptions ( )

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

445  {
447  CHKERR PetscOptionsBegin(PETSC_COMM_WORLD, "mooneyrivlin_", "", "none");
448 
449  alpha = 1;
450  CHKERR PetscOptionsScalar("-alpha", "Alpha", "", alpha, &alpha, PETSC_NULL);
451  beta = 1;
452  CHKERR PetscOptionsScalar("-beta", "Beta", "", beta, &beta, PETSC_NULL);
453 
454  lambda = 1;
455  CHKERR PetscOptionsScalar("-lambda", "Lambda", "", lambda, &lambda,
456  PETSC_NULL);
457 
458  epsilon = 0;
459  CHKERR PetscOptionsScalar("-epsilon", "Epsilon", "", epsilon, &epsilon,
460  PETSC_NULL);
461 
462  CHKERR PetscOptionsScalar("-sigma_y", "plastic strain", "", sigmaY, &sigmaY,
463  PETSC_NULL);
464 
465  ierr = PetscOptionsEnd();
466  CHKERRG(ierr);
468  }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:485
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:552
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:87
#define CHKERR
Inline error check.
Definition: definitions.h:604
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:415

◆ recordTape()

MoFEMErrorCode EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::recordTape ( const int  tape,
DTensor2Ptr t_h_ptr 
)
virtual

Implements EshelbianPlasticity::PhysicalEquations.

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

513  {
515 
525 
526  CHKERR getOptions();
527 
528  auto ih = get_h();
529  auto iH = get_H();
530  if (t_h_ptr)
531  ih(i, j) = (*t_h_ptr)(i, j);
532  else {
533  ih(i, j) = 0;
534  for (auto ii : {0, 1, 2})
535  ih(ii, ii) = 1;
536  }
537 
538  iH(i, j) = 0;
539  for (auto ii : {0, 1, 2})
540  iH(ii, ii) = 1;
541 
542  auto r_P = get_P();
543  auto r_Sigma = get_Sigma();
544  double &r_phi = get_PhiRef();
545  auto r_Flow = get_Flow();
546 
547  enableMinMaxUsingAbs();
548  trace_on(tape);
549 
550  // Set active variables to ADOL-C
551  th(i, j) <<= get_h()(i, j);
552  tH(i, j) <<= get_H()(i, j);
553 
554  // Deformation gradient
557 
558  tF(i, I) = th(i, J) * tInvH(J, I);
561 
562  tCof(i, I) = detF * tInvF(I, i);
563 
564  A = tF(k, K) * tF(k, K);
565  B = tCof(k, K) * tCof(k, K);
566 
567  tBF(i, I) = 4 * alpha * (A * tF(i, I));
568  tBCof(i, I) = 4 * beta * (B * tCof(i, I));
569  tBj = (-12 * alpha - 24 * beta) / detF +
570  0.5 * (lambda / epsilon) *
571  (pow(detF, epsilon - 1) - pow(detF, -epsilon - 1));
572 
573  tP(i, I) = tBF(i, I);
574  tP(i, I) += (levi_civita(i, j, k) * tBCof(j, J)) *
575  (levi_civita(I, J, K) * tF(k, K));
576  tP(i, I) += tCof(i, I) * tBj;
577 
578  energy = alpha * pow(A, 2) + beta * pow(B, 2);
579  energy += (-12 * alpha - 24 * beta) * log(detF) +
580  (lambda / (2 * epsilon * epsilon)) *
581  (pow(detF, epsilon) + pow(detF, -epsilon));
582 
583  // Stress Eshelby
584  tSigma(I, J) = -tF(i, I) * tP(i, J);
585  tSigma(N0, N0) += energy;
586  tSigma(N1, N1) += energy;
587  tSigma(N2, N2) += energy;
588 
589  // Deviator Cauchy Stress
590  meanCauchy = third * tCauchy(i, i);
591  tDevCauchy(i, j) = tCauchy(i, j);
592  tDevCauchy(N0, N0) -= meanCauchy;
593  tDevCauchy(N1, N1) -= meanCauchy;
594  tDevCauchy(N2, N2) -= meanCauchy;
595 
596  // // Plastic surface
597 
598  s2 = tDevCauchy(i, j) * tDevCauchy(i, j); // s:s
599  f = sqrt(1.5 * s2);
600  phi = f - sigmaY;
601 
602  // Flow
604  tPhi_dDevCauchy(i, j) *= 1.5 / f;
609  tPhi_dSigma(I, J) = tInvF(I, i) * (tPhi_dCauchy(i, j) * tF(j, J));
610  tPhi_dSigma(I, J) *= -(1 / detF);
611 
612  // Pull back
613  tPulledP(i, J) = tP(i, I) * tInvH(J, I);
614  tPulledP(i, J) *= detH;
615  tPulledSigma(i, J) = tSigma(i, I) * tInvH(J, I);
616  tPulledSigma(i, J) *= detH;
617  tPulledPhi_dSigma(i, J) = tPhi_dSigma(i, I) * tInvH(J, I);
618  tPulledPhi_dSigma(i, J) *= detH;
619 
620  // Set dependent variables to ADOL-C
621  tPulledP(i, j) >>= r_P(i, j);
622  tPulledSigma(i, j) >>= r_Sigma(i, j);
623  phi >>= r_phi;
624  tPulledPhi_dSigma(i, j) >>= r_Flow(i, j);
625 
626  trace_off();
627 
629  }
MoFEMErrorCode determinantTensor3by3(T1 &t, T2 &det)
Calculate determinant 3 by 3.
Definition: Templates.hpp:505
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:485
FTensor::Index< 'J', 3 > J
Definition: PlasticOps.hpp:71
FTensor::Index< 'I', 3 > I
Definition: PlasticOps.hpp:70
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:486
static Index< 'i', 3 > i
static Number< 2 > N2
static Index< 'j', 3 > j
#define CHKERR
Inline error check.
Definition: definitions.h:604
static Number< 1 > N1
static Index< 'k', 3 > k
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:415
constexpr double third
static Number< 0 > N0
Index< 'K', 3 > K
constexpr std::enable_if<(Dim0<=2 &&Dim1<=2), Tensor2_Expr< Levi_Civita< T >, T, Dim0, Dim1, i, j > >::type levi_civita(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
levi_civita functions to make for easy adhoc use

◆ returnOpJacobian()

virtual OpJacobian* EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::returnOpJacobian ( const std::string &  field_name,
const int  tag,
const bool  eval_rhs,
const bool  eval_lhs,
boost::shared_ptr< DataAtIntegrationPts > &  data_ptr,
boost::shared_ptr< PhysicalEquations > &  physics_ptr 
)
virtual

Implements EshelbianPlasticity::PhysicalEquations.

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

440  {
441  return (
442  new OpHMHH(field_name, tag, eval_rhs, eval_lhs, data_ptr, physics_ptr));
443  }

Member Data Documentation

◆ A

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::A

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

◆ alpha

double EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::alpha

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

◆ B

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::B

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

◆ beta

double EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::beta

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

◆ detF

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::detF

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

◆ detH

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::detH

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

◆ energy

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::energy

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

◆ epsilon

double EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::epsilon

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

◆ f

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::f

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

◆ lambda

double EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::lambda

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

◆ meanCauchy

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::meanCauchy

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

◆ numberOfActiveVariables

constexpr int EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::numberOfActiveVariables = 9 + 9
static

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

◆ numberOfDependentVariables

constexpr int EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::numberOfDependentVariables = 9 + 9 + 1 + 9
static

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

◆ phi

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::phi

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

◆ s2

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::s2

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

◆ sigmaY

double EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::sigmaY

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

◆ tBCof

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tBCof

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

◆ tBF

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tBF

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

◆ tBj

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tBj

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

◆ tCauchy

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tCauchy

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

◆ tCof

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tCof

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

◆ tDevCauchy

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tDevCauchy

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

◆ tF

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tF

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

◆ th

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::th

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

◆ tH

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tH

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

◆ tInvF

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tInvF

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

◆ tInvH

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tInvH

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

◆ tP

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tP

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

◆ tPhi_dCauchy

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tPhi_dCauchy

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

◆ tPhi_dDevCauchy

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tPhi_dDevCauchy

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

◆ tPhi_dSigma

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tPhi_dSigma

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

◆ tPulledP

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tPulledP

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

◆ tPulledPhi_dSigma

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tPulledPhi_dSigma

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

◆ tPulledSigma

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tPulledSigma

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

◆ tSigma

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tSigma

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


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