mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
move assignment of strain into MechContainer
This commit is contained in:
parent
b41e92e67f
commit
83f99a5fe4
@ -145,6 +145,19 @@ assignPotentialForces(const unsigned globalDofIdx,
|
||||
potentialTempForce_[globalDofIdx] = tempForce;
|
||||
}
|
||||
|
||||
template<class Scalar>
|
||||
void MechContainer<Scalar>::
|
||||
assignStrain(const unsigned globalDofIdx,
|
||||
const Dune::FieldVector<Scalar,6>& strain)
|
||||
{
|
||||
this->strainXX_[globalDofIdx] = strain[0];
|
||||
this->strainYY_[globalDofIdx] = strain[1];
|
||||
this->strainZZ_[globalDofIdx] = strain[2];
|
||||
this->strainYZ_[globalDofIdx] = strain[3];
|
||||
this->strainXZ_[globalDofIdx] = strain[4];
|
||||
this->strainXY_[globalDofIdx] = strain[5];
|
||||
}
|
||||
|
||||
template<class Scalar>
|
||||
void MechContainer<Scalar>::
|
||||
assignStress(const unsigned globalDofIdx,
|
||||
|
@ -57,6 +57,9 @@ public:
|
||||
const Scalar pressForce,
|
||||
const Scalar tempForce);
|
||||
|
||||
void assignStrain(const unsigned globalDofIdx,
|
||||
const Dune::FieldVector<Scalar,6>& strain);
|
||||
|
||||
void assignStress(const unsigned globalDofIdx,
|
||||
const Dune::FieldVector<Scalar,6>& stress);
|
||||
|
||||
|
@ -217,18 +217,13 @@ public:
|
||||
model.mechPotentialPressForce(globalDofIdx),
|
||||
model.mechPotentialTempForce(globalDofIdx));
|
||||
|
||||
this->mech_.assignStrain(globalDofIdx,
|
||||
model.strain(globalDofIdx, /*include_fracture*/true));
|
||||
|
||||
// Total stress is not stored but calculated result is Voigt notation
|
||||
this->mech_.assignStress(globalDofIdx,
|
||||
model.stress(globalDofIdx, /*include_fracture*/true));;
|
||||
|
||||
const auto strain = model.strain(globalDofIdx, /*include_fracture*/true);
|
||||
this->mech_.strainXX_[globalDofIdx] = strain[Voigt::XX];
|
||||
this->mech_.strainYY_[globalDofIdx] = strain[Voigt::YY];
|
||||
this->mech_.strainZZ_[globalDofIdx] = strain[Voigt::ZZ];
|
||||
this->mech_.strainXY_[globalDofIdx] = strain[Voigt::XY];
|
||||
this->mech_.strainXZ_[globalDofIdx] = strain[Voigt::XZ];
|
||||
this->mech_.strainYZ_[globalDofIdx] = strain[Voigt::YZ];
|
||||
|
||||
// Not including fracture
|
||||
const auto delstress = model.delstress(globalDofIdx);
|
||||
this->mech_.delstressXX_[globalDofIdx] = delstress[Voigt::XX];
|
||||
|
Loading…
Reference in New Issue
Block a user