v0.16.3
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
ADOLCPlasticity::ParaboloidalPlasticity Struct Reference

[J2 2D] More...

#include "users_modules/adolc-plasticity/src/ADOLCPlasticityMaterialModels.hpp"

Inheritance diagram for ADOLCPlasticity::ParaboloidalPlasticity:
[legend]
Collaboration diagram for ADOLCPlasticity::ParaboloidalPlasticity:
[legend]

Public Types

enum  ModelParams {
  LAMBDA , MU , NUP , SIGMA_YT ,
  SIGMA_YC , HT , HC , NT ,
  NC , LAST_PARAM
}
 
using ParamsArray = std::array< double, LAST_PARAM >
 
- Public Types inherited from ADOLCPlasticity::ClosestPointProjection
enum  TypesTags { W = 0 , Y , H , LAST_TAPE }
 

Public Member Functions

 ParaboloidalPlasticity ()
 
MoFEMErrorCode getDefaultMaterialParameters ()
 
MoFEMErrorCode addMatBlockOps (MoFEM::Interface &m_field, boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pip, std::string block_name, Sev sev)
 Get model parameters from blocks.
 
MoFEMErrorCode setParams (short tag, bool &recalculate_elastic_tangent)
 Set parameters for ADOL-C of constitutive relations.
 
MoFEMErrorCode freeHemholtzEnergy ()
 [Paraboloidal free energy]
 
MoFEMErrorCode codedHessianW (vector< double * > hessian)
 [Paraboloidal free energy]
 
MoFEMErrorCode evalF ()
 [Paraboloidal yield function]
 
MoFEMErrorCode yieldFunction ()
 Set yield function.
 
MoFEMErrorCode flowPotential ()
 [Paraboloidal yield function]
 
- Public Member Functions inherited from ADOLCPlasticity::ClosestPointProjection
VectorAdaptor getPlasticStrain ()
 
VectorAdaptor getTotalStrain ()
 
VectorAdaptor getInternalVariables ()
 
VectorAdaptor getActiveVariablesYH ()
 
VectorAdaptor getStress ()
 
VectorAdaptor getInternalFluxes ()
 
 ClosestPointProjection ()
 
MoFEMErrorCode recordW ()
 Record strain energy.
 
MoFEMErrorCode recordY ()
 Record yield function.
 
MoFEMErrorCode recordH ()
 Record flow potential.
 
MoFEMErrorCode playW ()
 
MoFEMErrorCode playW_NoHessian ()
 
MoFEMErrorCode playY ()
 
MoFEMErrorCode playY_NoGradient ()
 
MoFEMErrorCode playH ()
 
MoFEMErrorCode playH_NoHessian ()
 
MoFEMErrorCode createMatAVecR ()
 
MoFEMErrorCode evaluatePotentials ()
 
MoFEMErrorCode playPotentials ()
 
MoFEMErrorCode playPotentials_NoHessian ()
 
MoFEMErrorCode calculateR (Vec R)
 
MoFEMErrorCode calculateA ()
 
MoFEMErrorCode snesCreate ()
 Create nested snes.
 
MoFEMErrorCode solveClosestProjection ()
 Solve nonlinear system of equations to find stress, internal fluxes, and Lagrange plastic multiplier.
 
MoFEMErrorCode consistentTangent ()
 Calculate consistent tangent matrix.
 
MoFEMErrorCode recordTapes ()
 Record tapes.
 

Public Attributes

FTensor::Index< 'i', 3 > i
 
FTensor::Index< 'j', 3 > j
 
FTensor::Index< 'Z', 6 > Z
 
FTensor::Tensor2_symmetric< adouble, 3 > tTotalStrain
 
FTensor::Tensor2_symmetric< adouble, 3 > tPlasticStrain
 
FTensor::Tensor2_symmetric< adouble, 3 > tElasticStrain
 
FTensor::Tensor2_symmetric< adouble, 3 > tStress
 
FTensor::Tensor2_symmetric< adouble, 3 > tDeviator
 
adouble tR
 
double lambda
 
double mu
 
double nup
 
double Ht
 
double Hc
 
double sigmaYt
 
double sigmaYc
 
double nt
 
double nc
 
boost::shared_ptr< ParamsArray > defaultParamsArrayPtr = nullptr
 
boost::shared_ptr< ParamsArray > paramsArrayPtr = nullptr
 
boost::shared_ptr< ParamsArray > oldParamsArrayPtr = nullptr
 
adouble I1
 
adouble J2
 
- Public Attributes inherited from ADOLCPlasticity::ClosestPointProjection
int nbInternalVariables
 
boost::function< int(int, int, int)> integrationRule
 
VectorDouble internalVariables0
 
VectorDouble plasticStrain0
 
std::array< int, LAST_TAPE > tapesTags
 
VectorAdaptor activeVariablesW
 
VectorAdaptor gradientW
 
double w
 
double y
 
double h
 
double deltaGamma
 
MatrixDouble Ep
 
MatrixDouble Cp
 
MatrixDouble Cep
 
ublas::symmetric_matrix< double, ublas::lower > C
 
ublas::symmetric_matrix< double, ublas::lower > D
 
PetscBool implHessianW
 
MatrixDouble hessianW
 
VectorDouble gradientY
 
VectorDouble gradientH
 
MatrixDouble hessianH
 
MatrixDouble partialWStrainPlasticStrain
 
VectorAdaptor partialYSigma
 
VectorAdaptor partialYFlux
 
VectorAdaptor partialHSigma
 
VectorAdaptor partialHFlux
 
ublas::symmetric_matrix< double, ublas::lower > partial2HSigma
 
ublas::symmetric_matrix< double, ublas::lower > partial2HFlux
 
MatrixDouble partial2HSigmaFlux
 
SmartPetscObj< Mat > A
 
SmartPetscObj< Vec > R
 
SmartPetscObj< Vec > Chi
 
SmartPetscObj< Vec > dChi
 
ublas::matrix< double, ublas::column_major > dataA
 
SmartPetscObj< SNES > sNes
 
ublas::vector< adouble > a_sTrain
 
ublas::vector< adouble > a_plasticStrain
 
ublas::vector< adouble > a_internalVariables
 
ublas::vector< adouble > a_sTress
 
ublas::vector< adouble > a_internalFluxes
 
adouble a_w
 
adouble a_y
 
adouble a_h
 

Detailed Description

[J2 2D]

Paraboloidal yield criterion

See paper for reference [ullah2017three] and [stier2015comparing]

Linear hardening

\[ \psi = \frac{1}{2} \lambda \textrm{tr}[\varepsilon]^2 + \mu \varepsilon : \varepsilon + \sigma_{yt}\alpha_0 + \frac{1}{2} H_t \alpha_0^2 + \sigma_{yc}\alpha_1 + \frac{1}{2} H_c \alpha_1^2 \]

Exponential hardening

\[ \psi = \frac{1}{2} \lambda \textrm{tr}[\varepsilon]^2 + \mu \varepsilon : \varepsilon\\ + (\sigma_{yt}+H_t)\alpha_0 + \frac{H_t}{n_t} \exp{(-n_t \alpha_0)}\\ + (\sigma_{yc}+H_c)\alpha_0 + \frac{H_c}{n_c} \exp{(-n_c \alpha_1)} \]

\[ I_1 = \textrm{tr} (\boldsymbol{\sigma}) \]

\[ \eta=\textrm{dev}[\boldsymbol{\sigma}] \]

\[ J_2 = \frac{1}{2} \eta:\eta \]

\[ y = 6J_2 + 2I_1\left(\overline{\alpha_1}-\overline{\alpha_0}\right) - 2\overline{\alpha_0} \,\overline{\alpha_1} \]

where

\[ \overline{\alpha_0}=\frac{\partial \psi}{\partial \alpha_0}=\sigma_{yt} + H_t \alpha_0 \]

\[ \overline{\alpha_1}=\frac{\partial \psi}{\partial \alpha_1}=\sigma_{yc} + H_c \alpha_1 \]

\[ \Psi = 6J_2 + 2\alpha I_1 \left(\overline{\alpha_1}-\overline{\alpha_0}\right) - 2\overline{\alpha_0} \,\overline{\alpha_1} \]

\[ \alpha= \frac{1-2\nu_p}{1+\nu_p} \]

Definition at line 599 of file ADOLCPlasticityMaterialModels.hpp.

Member Typedef Documentation

◆ ParamsArray

Member Enumeration Documentation

◆ ModelParams

Constructor & Destructor Documentation

◆ ParaboloidalPlasticity()

ADOLCPlasticity::ParaboloidalPlasticity::ParaboloidalPlasticity ( )
inline

Member Function Documentation

◆ addMatBlockOps()

MoFEMErrorCode ADOLCPlasticity::ParaboloidalPlasticity::addMatBlockOps ( MoFEM::Interface &  m_field,
boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &  pip,
std::string  block_name,
Sev  sev 
)
inlinevirtual

Get model parameters from blocks.

Reimplemented from ADOLCPlasticity::ClosestPointProjection.

Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/adolc-plasticity/src/ADOLCPlasticityMaterialModels.hpp.

Definition at line 719 of file ADOLCPlasticityMaterialModels.hpp.

721 {
723
724 struct OpMatBlocks : public ForcesAndSourcesCore::UserDataOperator {
725
726 using OP = ForcesAndSourcesCore::UserDataOperator;
727
728 OpMatBlocks(boost::shared_ptr<ParamsArray> params_array_ptr,
729 boost::shared_ptr<ParamsArray> def_params_array_ptr,
730 MoFEM::Interface &m_field, Sev sev,
731 std::vector<const CubitMeshSets *> meshset_vec_ptr)
732 : OP(NOSPACE, OP::OPSPACE), paramsArrayPtr(params_array_ptr),
733 defParamsArray(def_params_array_ptr) {
734 CHK_THROW_MESSAGE(extractBlockData(m_field, meshset_vec_ptr, sev),
735 "Can not get data from block");
736 }
737
738 MoFEMErrorCode doWork(int side, EntityType type,
739 EntitiesFieldData::EntData &data) {
741
742 for (auto &b : blockData) {
743
744 if (b.blockEnts.find(getFEEntityHandle()) != b.blockEnts.end()) {
745 std::copy(b.paramsArray.begin(), b.paramsArray.end(),
746 paramsArrayPtr->begin());
748 }
749 }
750
751 std::copy(defParamsArray->begin(), defParamsArray->end(),
752 paramsArrayPtr->begin());
753
755 }
756
757 private:
758 boost::shared_ptr<ParamsArray> paramsArrayPtr;
759 boost::shared_ptr<ParamsArray> defParamsArray;
760
761 struct BlockData {
762 ParamsArray paramsArray;
763 Range blockEnts;
764 };
765
766 std::vector<BlockData> blockData;
767
769 extractBlockData(MoFEM::Interface &m_field,
770 std::vector<const CubitMeshSets *> meshset_vec_ptr,
771 Sev sev) {
773
774 for (auto m : meshset_vec_ptr) {
775 MOFEM_TAG_AND_LOG("ADOLCPlasticityWold", sev, "Paraboloidal") << *m;
776 std::vector<double> block_data;
777 CHKERR m->getAttributes(block_data);
778 if (block_data.size() != 9) {
779 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
780 "Expected that block has nine attributes");
781 }
782 auto get_block_ents = [&]() {
783 Range ents;
784 CHKERR
785 m_field.get_moab().get_entities_by_handle(m->meshset, ents, true);
786 return ents;
787 };
788
789 blockData.push_back({*defParamsArray, get_block_ents()});
790 std::copy(block_data.begin(), block_data.end(),
791 blockData.back().paramsArray.begin());
792
793 const auto young_modulus = blockData.back().paramsArray[LAMBDA];
794 const auto poisson_ratio = blockData.back().paramsArray[MU];
795
796 // It is assumed that user provide young_modulus and poisson_ratio in
797 // first two arguments of the block
798
799 MOFEM_LOG("ADOLCPlasticityWold", sev)
800 << "Young modulus: " << (blockData.back().paramsArray)[LAMBDA];
801 MOFEM_LOG("ADOLCPlasticityWold", sev)
802 << "Poisson ratio: " << (blockData.back().paramsArray)[MU];
803
804 blockData.back().paramsArray[LAMBDA] =
806 blockData.back().paramsArray[MU] = MU(young_modulus, poisson_ratio);
807
808 MOFEM_LOG("ADOLCPlasticityWold", sev)
809 << "LAMBDA: " << (blockData.back().paramsArray)[LAMBDA];
810 MOFEM_LOG("ADOLCPlasticityWold", sev)
811 << "MU: " << (blockData.back().paramsArray)[MU];
812 MOFEM_LOG("ADOLCPlasticityWold", sev)
813 << "NUP: " << (blockData.back().paramsArray)[NUP];
814 MOFEM_LOG("ADOLCPlasticityWold", sev)
815 << "SIGMA_YT: " << (blockData.back().paramsArray)[SIGMA_YT];
816 MOFEM_LOG("ADOLCPlasticityWold", sev)
817 << "SIGMA_YC: " << (blockData.back().paramsArray)[SIGMA_YC];
818 MOFEM_LOG("ADOLCPlasticityWold", sev)
819 << "HT: " << (blockData.back().paramsArray)[HT];
820 MOFEM_LOG("ADOLCPlasticityWold", sev)
821 << "HC: " << (blockData.back().paramsArray)[HC];
822 MOFEM_LOG("ADOLCPlasticityWold", sev)
823 << "NT: " << (blockData.back().paramsArray)[NT];
824 MOFEM_LOG("ADOLCPlasticityWold", sev)
825 << "NC: " << (blockData.back().paramsArray)[NC];
826 }
828 }
829 };
830
831 auto cubit_meshsets_vec_ptr =
832 m_field.getInterface<MeshsetsManager>()->getCubitMeshsetPtr(
833 std::regex((boost::format("%s(.*)") % block_name).str()));
834
835 pip.push_back(new OpMatBlocks(paramsArrayPtr, defaultParamsArrayPtr,
836 m_field, sev, cubit_meshsets_vec_ptr));
837
839 }
std::string type
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
Tag and log in channel.
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ NOSPACE
Definition definitions.h:83
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
Definition definitions.h:31
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
#define MU(E, NU)
Definition fem_tools.h:23
#define LAMBDA(E, NU)
Definition fem_tools.h:22
#define MOFEM_LOG(channel, severity)
Log.
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
double young_modulus
Young modulus.
Definition plastic.cpp:126
double poisson_ratio
Poisson ratio.
Definition plastic.cpp:127
FTensor::Index< 'm', 3 > m
virtual moab::Interface & get_moab()=0
Deprecated interface functions.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.

◆ codedHessianW()

MoFEMErrorCode ADOLCPlasticity::ParaboloidalPlasticity::codedHessianW ( vector< double * >  hessian)
inlinevirtual

[Paraboloidal free energy]

Reimplemented from ADOLCPlasticity::ClosestPointProjection.

Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/adolc-plasticity/src/ADOLCPlasticityMaterialModels.hpp.

Definition at line 904 of file ADOLCPlasticityMaterialModels.hpp.

904 {
906 // first 6x6 is \frac{\partial^2 \psi}{\partial \varepsilon^p^2}
907 // lower symmetric part
908
909 lambda = (*paramsArrayPtr)[0];
910 mu = (*paramsArrayPtr)[1];
911
912 Ht = (*paramsArrayPtr)[5];
913 Hc = (*paramsArrayPtr)[6];
914
915 double lambda_plus_2mu = lambda + 2 * mu;
916
917 // Diagonal elements
918 hessian[0][0] = lambda_plus_2mu;
919 hessian[1][1] = lambda_plus_2mu;
920 hessian[2][2] = lambda_plus_2mu;
921
922 // Off-diagonal elements
923 hessian[1][0] = lambda;
924 hessian[2][0] = lambda;
925 hessian[2][1] = lambda;
926
927 // Shear components
928 for (int i = 3; i <= 5; ++i) {
929 hessian[i][i] = mu;
930 }
931
932 // next 6x6 is \frac{\partial^2 \psi}{\partial \varepsilon \partial
933 // \varepsilon^p}
934 double neg_lambda_plus_2mu = -(lambda + 2 * mu);
935 double neg_lambda = -lambda;
936 double neg_mu = -mu;
937
938 for (int i = 6; i <= 8; ++i) {
939 for (int j = 0; j <= 2; ++j) {
940 hessian[i][j] = (i - 6 == j) ? neg_lambda_plus_2mu : neg_lambda;
941 }
942 }
943
944 hessian[9][3] = neg_mu;
945 hessian[10][4] = neg_mu;
946 hessian[11][5] = neg_mu;
947
948 // next 6x6 is \frac{\partial^2 \psi}{\partial \varepsilon \partial
949 // \varepsilon}
950 hessian[6][6] = lambda_plus_2mu;
951 hessian[7][6] = lambda;
952 hessian[7][7] = lambda_plus_2mu;
953 hessian[8][6] = lambda;
954 hessian[8][7] = lambda;
955 hessian[8][8] = lambda_plus_2mu;
956 hessian[9][9] = mu;
957 hessian[10][10] = mu;
958 hessian[11][11] = mu;
959
960 // internalVariables is \frac{\partial^2 \psi}{\partial \alpha^2}
961 hessian[12][12] = Ht;
962 hessian[13][13] = Hc;
963
965 }

◆ evalF()

MoFEMErrorCode ADOLCPlasticity::ParaboloidalPlasticity::evalF ( )
inline

[Paraboloidal yield function]

Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/adolc-plasticity/src/ADOLCPlasticityMaterialModels.hpp.

Definition at line 970 of file ADOLCPlasticityMaterialModels.hpp.

970 {
972 auto t_voight_stress_op = voight_to_stress_op();
973 auto t_vioght_stress = getFTensor1FromPtr<6>(&a_sTress[0]);
974 tStress(i, j) = t_voight_stress_op(i, j, Z) * t_vioght_stress(Z);
975 tR = tStress(i, i);
976 I1 = tR;
978 tR /= 3.;
979 tDeviator(i, j) = tStress(i, j) - tR * t_kd(i, j);
980 J2 = 0.5 * (tDeviator(i, j) * tDeviator(i, j));
982 }
Kronecker Delta class symmetric.
constexpr auto t_kd
FTensor::Dg< double, 3, 6 > voight_to_stress_op()
Op convert Vight stress vector to stress tensor.
FTensor::Tensor2_symmetric< adouble, 3 > tDeviator
FTensor::Tensor2_symmetric< adouble, 3 > tStress

◆ flowPotential()

MoFEMErrorCode ADOLCPlasticity::ParaboloidalPlasticity::flowPotential ( )
inlinevirtual

[Paraboloidal yield function]

[Paraboloidal flow potential]

Implements ADOLCPlasticity::ClosestPointProjection.

Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/adolc-plasticity/src/ADOLCPlasticityMaterialModels.hpp.

Definition at line 994 of file ADOLCPlasticityMaterialModels.hpp.

994 {
996 CHKERR evalF();
997 double alpha =
998 (1 - 2 * nup) /
999 (1 + nup); // relation between alpha and plastic poisson's ratio
1000 a_h = 6 * J2 +
1001 2 * alpha * I1 * (a_internalFluxes[1] - a_internalFluxes[0]) -
1004 }
MoFEMErrorCode evalF()
[Paraboloidal yield function]

◆ freeHemholtzEnergy()

MoFEMErrorCode ADOLCPlasticity::ParaboloidalPlasticity::freeHemholtzEnergy ( )
inlinevirtual

[Paraboloidal free energy]

Implements ADOLCPlasticity::ClosestPointProjection.

Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/adolc-plasticity/src/ADOLCPlasticityMaterialModels.hpp.

Definition at line 869 of file ADOLCPlasticityMaterialModels.hpp.

869 {
871
872 auto p_lambda = mkparam(lambda); // 0
873 auto p_mu = mkparam(mu); // 1
874 auto p_nup = mkparam(nup); // 2
875 auto p_sigma_yt = mkparam(sigmaYt); // 3
876 auto p_sigma_yc = mkparam(sigmaYc); // 4
877 auto p_Ht = mkparam(Ht); // 5
878 auto p_Hc = mkparam(Hc); // 6
879 auto p_nt = mkparam(nt); // 7
880 auto p_nc = mkparam(nc); // 8
881
882 auto t_voight_strain_op = voight_to_strain_op();
883 auto t_voight_total_strain = getFTensor1FromPtr<6>(&a_sTrain[0]);
884 auto t_voight_plastic_strain = getFTensor1FromPtr<6>(&a_plasticStrain[0]);
885
886 tTotalStrain(i, j) = t_voight_strain_op(i, j, Z) * t_voight_total_strain(Z);
887 tPlasticStrain(i, j) =
888 t_voight_strain_op(i, j, Z) * t_voight_plastic_strain(Z);
890 tR = tElasticStrain(i, i);
891
892 a_w = 0.5 * p_lambda * tR * tR +
893 p_mu * (tElasticStrain(i, j) * tElasticStrain(i, j));
894
895 a_w += p_sigma_yt * a_internalVariables[0] +
896 0.5 * p_Ht * a_internalVariables[0] * a_internalVariables[0];
897 a_w += p_sigma_yc * a_internalVariables[1] +
898 0.5 * p_Hc * a_internalVariables[1] * a_internalVariables[1];
899
901 }
FTensor::Dg< double, 3, 6 > voight_to_strain_op()
Op convert Vight strain vector to strain tensor.
FTensor::Tensor2_symmetric< adouble, 3 > tPlasticStrain
FTensor::Tensor2_symmetric< adouble, 3 > tTotalStrain
FTensor::Tensor2_symmetric< adouble, 3 > tElasticStrain

◆ getDefaultMaterialParameters()

MoFEMErrorCode ADOLCPlasticity::ParaboloidalPlasticity::getDefaultMaterialParameters ( )
inline
Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/adolc-plasticity/src/ADOLCPlasticityMaterialModels.hpp.

Definition at line 643 of file ADOLCPlasticityMaterialModels.hpp.

643 {
645
646 double young_modulus = 1;
647 double poisson_ratio = 0.25;
648
649 sigmaYt = 1;
650 sigmaYc = 1;
651 Ht = 0.1;
652 Hc = 0.1;
653 nc = 1.;
654 nt = 1.;
655 nup = 0.;
656
657 CHKERR PetscOptionsGetScalar(PETSC_NULLPTR, "-young_modulus",
658 &young_modulus, PETSC_NULLPTR);
659 CHKERR PetscOptionsGetScalar(PETSC_NULLPTR, "-poisson_ratio",
660 &poisson_ratio, 0);
661 CHKERR PetscOptionsGetScalar(PETSC_NULLPTR, "-sigma_yt", &sigmaYt,
662 PETSC_NULLPTR);
663 CHKERR PetscOptionsGetScalar(PETSC_NULLPTR, "-sigma_yc", &sigmaYc,
664 PETSC_NULLPTR);
665 CHKERR PetscOptionsGetScalar(PETSC_NULLPTR, "-Ht", &Ht, PETSC_NULLPTR);
666 CHKERR PetscOptionsGetScalar(PETSC_NULLPTR, "-Hc", &Hc, PETSC_NULLPTR);
667 CHKERR PetscOptionsGetScalar(PETSC_NULLPTR, "-nt", &nt, PETSC_NULLPTR);
668 CHKERR PetscOptionsGetScalar(PETSC_NULLPTR, "-nc", &nc, PETSC_NULLPTR);
669 CHKERR PetscOptionsGetScalar(PETSC_NULLPTR, "-nup", &nup, PETSC_NULLPTR);
670
671 MOFEM_LOG("ADOLCPlasticityWold", Sev::inform)
672 << "Young modulus: " << young_modulus;
673 MOFEM_LOG("ADOLCPlasticityWold", Sev::inform)
674 << "Poisson ratio: " << poisson_ratio;
675
678
679 defaultParamsArrayPtr = boost::make_shared<ParamsArray>();
680 (*defaultParamsArrayPtr)[LAMBDA] = lambda;
681 (*defaultParamsArrayPtr)[MU] = mu;
682 (*defaultParamsArrayPtr)[NUP] = nup;
683 (*defaultParamsArrayPtr)[SIGMA_YT] = sigmaYt;
684 (*defaultParamsArrayPtr)[SIGMA_YC] = sigmaYc;
685 (*defaultParamsArrayPtr)[HT] = Ht;
686 (*defaultParamsArrayPtr)[HC] = Hc;
687 (*defaultParamsArrayPtr)[NT] = nt;
688 (*defaultParamsArrayPtr)[NC] = nc;
689
690 MOFEM_LOG("ADOLCPlasticityWold", Sev::inform)
691 << "LAMBDA: " << (*defaultParamsArrayPtr)[LAMBDA];
692 MOFEM_LOG("ADOLCPlasticityWold", Sev::inform)
693 << "MU: " << (*defaultParamsArrayPtr)[MU];
694 MOFEM_LOG("ADOLCPlasticityWold", Sev::inform)
695 << "NUP: " << (*defaultParamsArrayPtr)[NUP];
696 MOFEM_LOG("ADOLCPlasticityWold", Sev::inform)
697 << "SIGMA_YT: " << (*defaultParamsArrayPtr)[SIGMA_YT];
698 MOFEM_LOG("ADOLCPlasticityWold", Sev::inform)
699 << "SIGMA_YC: " << (*defaultParamsArrayPtr)[SIGMA_YC];
700 MOFEM_LOG("ADOLCPlasticityWold", Sev::inform)
701 << "HT: " << (*defaultParamsArrayPtr)[HT];
702 MOFEM_LOG("ADOLCPlasticityWold", Sev::inform)
703 << "HC: " << (*defaultParamsArrayPtr)[HC];
704 MOFEM_LOG("ADOLCPlasticityWold", Sev::inform)
705 << "NT: " << (*defaultParamsArrayPtr)[NT];
706 MOFEM_LOG("ADOLCPlasticityWold", Sev::inform)
707 << "NC: " << (*defaultParamsArrayPtr)[NC];
708
709 paramsArrayPtr = boost::make_shared<ParamsArray>();
710 std::copy(defaultParamsArrayPtr->begin(), defaultParamsArrayPtr->end(),
711 paramsArrayPtr->begin());
712 oldParamsArrayPtr = boost::make_shared<ParamsArray>();
713 std::fill(oldParamsArrayPtr->begin(), oldParamsArrayPtr->end(), 0);
714
716 };
PetscErrorCode PetscOptionsGetScalar(PetscOptions *, const char pre[], const char name[], PetscScalar *dval, PetscBool *set)

◆ setParams()

MoFEMErrorCode ADOLCPlasticity::ParaboloidalPlasticity::setParams ( short  tag,
bool &  recalculate_elastic_tangent 
)
inlinevirtual

Set parameters for ADOL-C of constitutive relations.

Parameters
tag[in] - tag of the tape
recalculate_elastic_tangent[out] - if setParam set it to true, tangent matrix for elastic domain should be recalculated

Reimplemented from ADOLCPlasticity::ClosestPointProjection.

Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/adolc-plasticity/src/ADOLCPlasticityMaterialModels.hpp.

Definition at line 841 of file ADOLCPlasticityMaterialModels.hpp.

841 {
843 switch (tag) {
844 case TypesTags::W: {
845 set_param_vec(tapesTags[tag], paramsArrayPtr->size(),
846 paramsArrayPtr->data());
847 for (auto p = 0; p != LAST_PARAM; p++) {
848 if ((*paramsArrayPtr)[p] != (*oldParamsArrayPtr)[p]) {
849 recalculate_elastic_tangent = true;
850 std::copy(paramsArrayPtr->begin(), paramsArrayPtr->end(),
851 oldParamsArrayPtr->begin());
852 break;
853 }
854 }
855
856 } break;
857 case TypesTags::Y:
858 case TypesTags::H:
859 break;
860 default:
861 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
862 "Unknown tag for setParams");
863 }
865 return 0;
866 }
Tag tag
std::array< int, LAST_TAPE > tapesTags

◆ yieldFunction()

MoFEMErrorCode ADOLCPlasticity::ParaboloidalPlasticity::yieldFunction ( )
inlinevirtual

Member Data Documentation

◆ defaultParamsArrayPtr

boost::shared_ptr<ParamsArray> ADOLCPlasticity::ParaboloidalPlasticity::defaultParamsArrayPtr = nullptr

◆ Hc

double ADOLCPlasticity::ParaboloidalPlasticity::Hc

◆ Ht

double ADOLCPlasticity::ParaboloidalPlasticity::Ht

◆ i

FTensor::Index<'i', 3> ADOLCPlasticity::ParaboloidalPlasticity::i

◆ I1

adouble ADOLCPlasticity::ParaboloidalPlasticity::I1

◆ j

FTensor::Index<'j', 3> ADOLCPlasticity::ParaboloidalPlasticity::j

◆ J2

adouble ADOLCPlasticity::ParaboloidalPlasticity::J2

◆ lambda

double ADOLCPlasticity::ParaboloidalPlasticity::lambda

◆ mu

double ADOLCPlasticity::ParaboloidalPlasticity::mu

◆ nc

double ADOLCPlasticity::ParaboloidalPlasticity::nc

◆ nt

double ADOLCPlasticity::ParaboloidalPlasticity::nt

◆ nup

double ADOLCPlasticity::ParaboloidalPlasticity::nup

◆ oldParamsArrayPtr

boost::shared_ptr<ParamsArray> ADOLCPlasticity::ParaboloidalPlasticity::oldParamsArrayPtr = nullptr

◆ paramsArrayPtr

boost::shared_ptr<ParamsArray> ADOLCPlasticity::ParaboloidalPlasticity::paramsArrayPtr = nullptr

◆ sigmaYc

double ADOLCPlasticity::ParaboloidalPlasticity::sigmaYc

◆ sigmaYt

double ADOLCPlasticity::ParaboloidalPlasticity::sigmaYt

◆ tDeviator

FTensor::Tensor2_symmetric<adouble, 3> ADOLCPlasticity::ParaboloidalPlasticity::tDeviator

◆ tElasticStrain

FTensor::Tensor2_symmetric<adouble, 3> ADOLCPlasticity::ParaboloidalPlasticity::tElasticStrain

◆ tPlasticStrain

FTensor::Tensor2_symmetric<adouble, 3> ADOLCPlasticity::ParaboloidalPlasticity::tPlasticStrain

◆ tR

adouble ADOLCPlasticity::ParaboloidalPlasticity::tR

◆ tStress

FTensor::Tensor2_symmetric<adouble, 3> ADOLCPlasticity::ParaboloidalPlasticity::tStress

◆ tTotalStrain

FTensor::Tensor2_symmetric<adouble, 3> ADOLCPlasticity::ParaboloidalPlasticity::tTotalStrain

◆ Z

FTensor::Index<'Z', 6> ADOLCPlasticity::ParaboloidalPlasticity::Z

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