v0.9.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)
 
- 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 431 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 450 of file EshelbianADOL-C.cpp.

450  {
452  CHKERR PetscOptionsBegin(PETSC_COMM_WORLD, "mooneyrivlin_", "", "none");
453 
454  alpha = 1;
455  CHKERR PetscOptionsScalar("-alpha", "Alpha", "", alpha, &alpha, PETSC_NULL);
456  beta = 1;
457  CHKERR PetscOptionsScalar("-beta", "Beta", "", beta, &beta, PETSC_NULL);
458 
459  lambda = 1;
460  CHKERR PetscOptionsScalar("-lambda", "Lambda", "", lambda, &lambda,
461  PETSC_NULL);
462 
463  epsilon = 0;
464  CHKERR PetscOptionsScalar("-epsilon", "Epsilon", "", epsilon, &epsilon,
465  PETSC_NULL);
466 
467  CHKERR PetscOptionsScalar("-sigma_y", "plastic strain", "", sigmaY, &sigmaY,
468  PETSC_NULL);
469 
470  ierr = PetscOptionsEnd();
471  CHKERRG(ierr);
473  }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:544
#define CHKERR
Inline error check.
Definition: definitions.h:596
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

◆ recordTape()

MoFEMErrorCode EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::recordTape ( const int  tape)
virtual

Implements EshelbianPlasticity::PhysicalEquations.

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

518  {
520 
530 
531  CHKERR getOptions();
532 
533  auto ih = get_h();
534  auto iH = get_H();
535  ih(i, j) = 0;
536  iH(i, j) = 0;
537  for (int ii = 0; ii != 3; ++ii) {
538  ih(ii, ii) = 1;
539  iH(ii, ii) = 1;
540  }
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  detF = fabs(detF);
563 
564  tCof(i, I) = detF * tInvF(I, i);
565 
566  A = tF(k, K) * tF(k, K);
567  B = tCof(k, K) * tCof(k, K);
568 
569  tBF(i, I) = 4 * alpha * (A * tF(i, I));
570  tBCof(i, I) = 4 * beta * (B * tCof(i, I));
571  tBj = (-12 * alpha - 24 * beta) / detF +
572  0.5 * (lambda / epsilon) *
573  (pow(detF, epsilon - 1) - pow(detF, -epsilon - 1));
574 
575  tP(i, I) = tBF(i, I);
576  tP(i, I) += (levi_civita(i, j, k) * tBCof(j, J)) *
577  (levi_civita(I, J, K) * tF(k, K));
578  tP(i, I) += tCof(i, I) * tBj;
579 
580  energy = alpha * pow(A, 2) + beta * pow(B, 2);
581  energy += (-12 * alpha - 24 * beta) * log(detF) +
582  (lambda / (2 * epsilon * epsilon)) *
583  (pow(detF, epsilon) + pow(detF, -epsilon));
584 
585  // Stress Eshelby
586  tSigma(I, J) = -tF(i, I) * tP(i, J);
587  tSigma(N0, N0) += energy;
588  tSigma(N1, N1) += energy;
589  tSigma(N2, N2) += energy;
590 
591  // Deviator Cauchy Stress
592  meanCauchy = third * tCauchy(i, i);
593  tDevCauchy(i, j) = tCauchy(i, j);
594  tDevCauchy(N0, N0) -= meanCauchy;
595  tDevCauchy(N1, N1) -= meanCauchy;
596  tDevCauchy(N2, N2) -= meanCauchy;
597 
598  // // Plastic surface
599 
600  s2 = tDevCauchy(i, j) * tDevCauchy(i, j); // s:s
601  f = sqrt(1.5 * s2);
602  phi = f - sigmaY;
603 
604  // Flow
605  tPhi_dDevCauchy(i, j) = tDevCauchy(i, j);
606  tPhi_dDevCauchy(i, j) *= 1.5 / f;
607  tPhi_dCauchy(i, j) = tPhi_dDevCauchy(i, j);
608  tPhi_dCauchy(N0, N0) -= third * tPhi_dDevCauchy(i, i);
609  tPhi_dCauchy(N1, N1) -= third * tPhi_dDevCauchy(i, i);
610  tPhi_dCauchy(N2, N2) -= third * tPhi_dDevCauchy(i, i);
611  tPhi_dSigma(I, J) = tInvF(I, i) * (tPhi_dCauchy(i, j) * tF(j, J));
612  tPhi_dSigma(I, J) *= -(1 / detF);
613 
614  // Pull back
615  tPulledP(i, J) = tP(i, I) * tInvH(J, I);
616  tPulledP(i, J) *= detH;
617  tPulledSigma(i, J) = tSigma(i, I) * tInvH(J, I);
618  tPulledSigma(i, J) *= detH;
619  tPulledPhi_dSigma(i, J) = tPhi_dSigma(i, I) * tInvH(J, I);
620  tPulledPhi_dSigma(i, J) *= detH;
621 
622  // Set dependent variables to ADOL-C
623  tPulledP(i, j) >>= r_P(i, j);
624  tPulledSigma(i, j) >>= r_Sigma(i, j);
625  phi >>= r_phi;
626  tPulledPhi_dSigma(i, j) >>= r_Flow(i, j);
627 
628  trace_off();
629 
631  }
MoFEMErrorCode determinantTensor3by3(T1 &t, T2 &det)
Calculate determinant 3 by 3.
Definition: Templates.hpp:415
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
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:396
#define CHKERR
Inline error check.
Definition: definitions.h:596
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407
constexpr double third
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 442 of file EshelbianADOL-C.cpp.

445  {
446  return (
447  new OpHMHH(field_name, tag, eval_rhs, eval_lhs, data_ptr, physics_ptr));
448  }

Member Data Documentation

◆ A

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::A

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

◆ alpha

double EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::alpha

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

◆ B

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::B

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

◆ beta

double EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::beta

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

◆ detF

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::detF

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

◆ detH

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::detH

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

◆ energy

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::energy

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

◆ epsilon

double EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::epsilon

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

◆ f

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::f

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

◆ lambda

double EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::lambda

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

◆ meanCauchy

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::meanCauchy

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

◆ numberOfActiveVariables

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

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

◆ numberOfDependentVariables

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

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

◆ phi

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::phi

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

◆ s2

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::s2

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

◆ sigmaY

double EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::sigmaY

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

◆ tBCof

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tBCof

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

◆ tBF

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tBF

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

◆ tBj

adouble EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tBj

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

◆ tCauchy

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tCauchy

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

◆ tCof

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tCof

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

◆ tDevCauchy

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tDevCauchy

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

◆ tF

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tF

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

◆ th

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::th

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

◆ tH

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tH

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

◆ tInvF

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tInvF

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

◆ tInvH

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tInvH

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

◆ tP

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tP

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

◆ tPhi_dCauchy

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tPhi_dCauchy

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

◆ tPhi_dDevCauchy

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tPhi_dDevCauchy

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

◆ tPhi_dSigma

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tPhi_dSigma

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

◆ tPulledP

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tPulledP

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

◆ tPulledPhi_dSigma

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tPulledPhi_dSigma

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

◆ tPulledSigma

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tPulledSigma

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

◆ tSigma

ATensor2 EshelbianPlasticity::HMHPMooneyRivlinWriggersEq63::tSigma

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


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