www.mooseframework.org
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
PoroMechanicsAction Class Reference

#include <PoroMechanicsAction.h>

Inheritance diagram for PoroMechanicsAction:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 

Public Member Functions

 PoroMechanicsAction (const InputParameters &params)
 
virtual void act ()
 
void timedAct ()
 
virtual void addRelationshipManagers (Moose::RelationshipManagerType when_type)
 
MooseObjectName uniqueActionName () const
 
const std::string & specificTaskName () const
 
const std::set< std::string > & getAllTasks () const
 
void appendTask (const std::string &task)
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
virtual const std::string & name () const
 
std::string typeAndName () const
 
std::string errorPrefix (const std::string &error_type) const
 
void callMooseError (std::string msg, const bool with_prefix) const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
const InputParametersparameters () const
 
MooseObjectName uniqueName () const
 
const T & getParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &nm) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void mooseError (Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
PerfGraphperfGraph ()
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &name, const std::string *param=nullptr) const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 

Static Public Member Functions

static InputParameters validParams ()
 
static MultiMooseEnum outputPropertiesType ()
 
static MultiMooseEnum materialOutputOrders ()
 
static MultiMooseEnum materialOutputFamilies ()
 
static void addCartesianComponentOutput (const std::string &name, const std::string &prop_name="")
 

Public Attributes

const ConsoleStream _console
 

Static Public Attributes

static constexpr auto SYSTEM
 
static constexpr auto NAME
 
static const std::vector< char > _component_table = {'x', 'y', 'z'}
 table data for output generation More...
 
static const std::map< std::string, std::pair< std::string, std::vector< std::string > > > _rank_two_invariant_table
 
static const std::map< std::string, std::pair< std::string, std::vector< std::string > > > _rank_two_directional_component_table
 
static const std::map< std::string, std::pair< std::string, std::vector< std::string > > > _rank_two_cylindrical_component_table
 
static const std::map< std::string, std::pair< std::string, std::vector< std::string > > > _rank_two_spherical_component_table
 

Protected Types

enum  Strain { Strain::Small, Strain::Finite }
 strain formulation More...
 
enum  StrainAndIncrement { StrainAndIncrement::SmallTotal, StrainAndIncrement::FiniteTotal, StrainAndIncrement::SmallIncremental, StrainAndIncrement::FiniteIncremental }
 strain formulation More...
 
enum  PlanarFormulation { PlanarFormulation::None, PlanarFormulation::WeakPlaneStress, PlanarFormulation::PlaneStrain, PlanarFormulation::GeneralizedPlaneStrain }
 use an out of plane stress/strain formulation More...
 
enum  OutOfPlaneDirection { OutOfPlaneDirection::x, OutOfPlaneDirection::y, OutOfPlaneDirection::z }
 
enum  LKFormulation { LKFormulation::Total, LKFormulation::Updated }
 New kernel system kinematics types. More...
 

Protected Member Functions

void actSubdomainChecks ()
 
void actOutputGeneration ()
 
void actEigenstrainNames ()
 
void actOutputMatProp ()
 
void actGatherActionParameters ()
 
void verifyOrderAndFamilyOutputs ()
 
void actLagrangianKernelStrain ()
 
void actStressDivergenceTensorsStrain ()
 
virtual std::string getKernelType ()
 
virtual InputParameters getKernelParameters (std::string type)
 
template<typename T , typename T2 >
bool setupOutput (std::string out, T table, T2 setup)
 Helper function to decode generate_outputs options using a "table" of scalar output quantities and a "setup" lambda that performs the input parameter setup for the output material object. More...
 
bool addRelationshipManagers (Moose::RelationshipManagerType when_type, const InputParameters &moose_object_pars)
 
void associateWithParameter (const std::string &param_name, InputParameters &params) const
 
void associateWithParameter (const InputParameters &from_params, const std::string &param_name, InputParameters &params) const
 
const T & getMeshProperty (const std::string &data_name, const std::string &prefix)
 
const T & getMeshProperty (const std::string &data_name)
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name) const
 
bool hasMeshProperty (const std::string &data_name) const
 
std::string meshPropertyName (const std::string &data_name) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 
std::string timedSectionName (const std::string &section_name) const
 

Static Protected Member Functions

static std::string meshPropertyName (const std::string &data_name, const std::string &prefix)
 

Protected Attributes

Moose::CoordinateSystemType _coord_system
 
std::vector< SubdomainName > _subdomain_names
 if this vector is not empty the variables, kernels and materials are restricted to these subdomains More...
 
std::set< SubdomainID_subdomain_ids
 set generated from the passed in vector of subdomain names More...
 
std::set< SubdomainID_subdomain_id_union
 set generated from the combined block restrictions of all SolidMechanics/Master action blocks More...
 
enum QuasiStaticSolidMechanicsPhysics::Strain _strain
 
enum QuasiStaticSolidMechanicsPhysics::StrainAndIncrement _strain_and_increment
 
enum QuasiStaticSolidMechanicsPhysics::PlanarFormulation _planar_formulation
 
const OutOfPlaneDirection _out_of_plane_direction
 
const std::string _base_name
 base name for the current master action block More...
 
bool _use_displaced_mesh
 use displaced mesh (true unless _strain is SMALL) More...
 
std::vector< std::string > _generate_output
 output materials to generate scalar stress/strain tensor quantities More...
 
MultiMooseEnum _material_output_order
 
MultiMooseEnum _material_output_family
 
bool _cylindrical_axis_point1_valid
 booleans used to determine if cylindrical axis points are passed More...
 
bool _cylindrical_axis_point2_valid
 
bool _direction_valid
 
bool _verbose
 
Point _cylindrical_axis_point1
 points used to determine axis of rotation for cylindrical stress/strain quantities More...
 
Point _cylindrical_axis_point2
 
Point _direction
 
bool _spherical_center_point_valid
 booleans used to determine if spherical center point is passed More...
 
Point _spherical_center_point
 center point for spherical stress/strain quantities More...
 
const bool _auto_eigenstrain
 automatically gather names of eigenstrain tensors provided by simulation objects More...
 
std::vector< MaterialPropertyName > _eigenstrain_names
 
const bool _lagrangian_kernels
 New or old kernel system. More...
 
const bool _lk_large_kinematics
 Simplified flag for small/large deformations, Lagrangian kernel system. More...
 
const LKFormulation _lk_formulation
 
bool _lk_locking
 Simplified volumetric locking correction flag for new kernels. More...
 
bool _lk_homogenization
 Flag indicating if the homogenization system is present for new kernels. More...
 
const std::string _hname = "hvar"
 
const std::string _integrator_name = "integrator"
 
const std::string _homogenization_strain_name = "homogenization_gradient"
 
MultiMooseEnum _constraint_types
 
std::vector< FunctionName > _targets
 
const bool _use_ad
 
std::string _registered_identifier
 
std::string _specific_task_name
 
std::set< std::string > _all_tasks
 
ActionWarehouse_awh
 
const std::string & _current_task
 
std::shared_ptr< MooseMesh > & _mesh
 
std::shared_ptr< MooseMesh > & _displaced_mesh
 
std::shared_ptr< FEProblemBase > & _problem
 
PerfID _act_timer
 
MooseApp_app
 
const std::string _type
 
const std::string _name
 
const InputParameters_pars
 
Factory_factory
 
ActionFactory_action_factory
 
MooseApp_pg_moose_app
 
const std::string _prefix
 
const Parallel::Communicator & _communicator
 
std::vector< VariableName > _displacements
 displacement variables More...
 
unsigned int _ndisp
 Number of displacement variables. More...
 
std::vector< VariableName > _coupled_displacements
 Coupled displacement variables. More...
 
std::vector< AuxVariableName > _save_in
 residual debugging More...
 
std::vector< AuxVariableName > _diag_save_in
 

Static Protected Attributes

static const std::map< unsigned int, std::string > _order_mapper
 
static std::map< std::string, std::string > _rank_two_cartesian_component_table
 

Detailed Description

Definition at line 14 of file PoroMechanicsAction.h.

Member Enumeration Documentation

◆ LKFormulation

enum QuasiStaticSolidMechanicsPhysics::LKFormulation
strongprotectedinherited

New kernel system kinematics types.

Enumerator
Total 
Updated 

Definition at line 145 of file QuasiStaticSolidMechanicsPhysics.h.

146  {
147  Total,
148  Updated
149  };

◆ OutOfPlaneDirection

Enumerator

Definition at line 96 of file QuasiStaticSolidMechanicsPhysics.h.

97  {
98  x,
99  y,
100  z
101  };
const std::vector< double > y
const std::vector< double > x

◆ PlanarFormulation

use an out of plane stress/strain formulation

Enumerator
None 
WeakPlaneStress 
PlaneStrain 
GeneralizedPlaneStrain 

Definition at line 88 of file QuasiStaticSolidMechanicsPhysics.h.

89  {
90  None,
92  PlaneStrain,
enum QuasiStaticSolidMechanicsPhysics::PlanarFormulation _planar_formulation

◆ Strain

enum QuasiStaticSolidMechanicsPhysics::Strain
strongprotectedinherited

strain formulation

Enumerator
Small 
Finite 

Definition at line 72 of file QuasiStaticSolidMechanicsPhysics.h.

73  {
74  Small,
75  Finite
76  } _strain;
enum QuasiStaticSolidMechanicsPhysics::Strain _strain

◆ StrainAndIncrement

strain formulation

Enumerator
SmallTotal 
FiniteTotal 
SmallIncremental 
FiniteIncremental 

Definition at line 79 of file QuasiStaticSolidMechanicsPhysics.h.

80  {
81  SmallTotal,
82  FiniteTotal,
83  SmallIncremental,
84  FiniteIncremental
enum QuasiStaticSolidMechanicsPhysics::StrainAndIncrement _strain_and_increment

Constructor & Destructor Documentation

◆ PoroMechanicsAction()

PoroMechanicsAction::PoroMechanicsAction ( const InputParameters params)

Definition at line 31 of file PoroMechanicsAction.C.

33 {
34  if (_use_ad)
35  paramError("use_ad", "AD not setup for use with PoroMechanicsAction");
36 }
QuasiStaticSolidMechanicsPhysics(const InputParameters &params)
void paramError(const std::string &param, Args... args) const

Member Function Documentation

◆ act()

void PoroMechanicsAction::act ( )
virtual

Reimplemented from QuasiStaticSolidMechanicsPhysics.

Definition at line 39 of file PoroMechanicsAction.C.

40 {
42 
43  if (_current_task == "add_kernel")
44  {
45  // Prepare displacements and set value for dim
46  std::vector<VariableName> displacements = getParam<std::vector<VariableName>>("displacements");
47  unsigned int dim = displacements.size();
48 
49  // all the kernels added below have pore pressure as a coupled variable
50  // add this to the kernel's params
51  std::string type("PoroMechanicsCoupling");
53  VariableName pp_var(getParam<VariableName>("porepressure"));
54  params.addCoupledVar("porepressure", "");
55  params.set<std::vector<VariableName>>("porepressure") = {pp_var};
56 
57  // now add the kernels
58  for (unsigned int i = 0; i < dim; ++i)
59  {
60  std::string kernel_name = "PoroMechanics" + Moose::stringify(i);
61 
62  params.set<unsigned int>("component") = i;
63  params.set<NonlinearVariableName>("variable") = displacements[i];
64 
65  _problem->addKernel(type, kernel_name, params);
66  }
67  }
68 }
unsigned int dim
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Factory & _factory
const std::string & type() const
const std::string & _current_task
std::string stringify(const T &t)
void addCoupledVar(const std::string &name, const std::string &doc_string)
std::shared_ptr< FEProblemBase > & _problem

◆ actEigenstrainNames()

void QuasiStaticSolidMechanicsPhysics::actEigenstrainNames ( )
protectedinherited

Definition at line 622 of file QuasiStaticSolidMechanicsPhysics.C.

Referenced by QuasiStaticSolidMechanicsPhysics::act().

623 {
624  // Create containers for collecting blockIDs and eigenstrain names from materials
625  std::map<std::string, std::set<SubdomainID>> material_eigenstrain_map;
626  std::set<std::string> eigenstrain_set;
627 
628  std::set<MaterialPropertyName> verified_eigenstrain_names;
629 
630  std::map<std::string, std::string> remove_add_map;
631  std::set<std::string> remove_reduced_set;
632 
633  // Loop over all the materials(eigenstrains) already created
634  auto materials = _problem->getMaterialWarehouse().getObjects();
635  for (auto & mat : materials)
636  {
637  std::shared_ptr<BlockRestrictable> blk = std::dynamic_pointer_cast<BlockRestrictable>(mat);
638  const InputParameters & mat_params = mat->parameters();
639  auto & mat_name = mat->type();
640 
641  // Check for eigenstrain names, only deal with those materials
642  if (mat_params.isParamValid("eigenstrain_name"))
643  {
644  std::shared_ptr<MaterialData> mat_dat;
645  auto name = mat_params.get<std::string>("eigenstrain_name");
646 
647  // Check for base_name prefix
648  if (mat_params.isParamValid("base_name"))
649  name = mat_params.get<std::string>("base_name") + '_' + name;
650 
651  // Check block restrictions
652  if (!blk)
653  mooseError("Internal error, Material object that does not inherit form BlockRestricted");
654  const std::set<SubdomainID> & blocks =
655  blk->blockRestricted() ? blk->blockIDs() : blk->meshBlockIDs();
656 
657  if (std::includes(blocks.begin(), blocks.end(), _subdomain_ids.begin(), _subdomain_ids.end()))
658  {
659  material_eigenstrain_map[name].insert(blocks.begin(), blocks.end());
660  eigenstrain_set.insert(name);
661  }
662  }
663 
664  // Account for reduced eigenstrains and CompositeEigenstrains
665  if (mat_name == "ComputeReducedOrderEigenstrain")
666  {
667  auto input_eigenstrain_names =
668  mat_params.get<std::vector<MaterialPropertyName>>("input_eigenstrain_names");
669  remove_reduced_set.insert(input_eigenstrain_names.begin(), input_eigenstrain_names.end());
670  }
671  // Account for CompositeEigenstrains
672  if (mat_name == "CompositeEigenstrain")
673  {
674  auto remove_list = mat_params.get<std::vector<MaterialPropertyName>>("tensors");
675  for (auto i : remove_list)
676  remove_reduced_set.insert(i);
677  }
678 
679  // Account for MaterialADConverter , add or remove later
680  if (mat_name == "RankTwoTensorMaterialADConverter")
681  {
682  std::vector<MaterialPropertyName> remove_list;
683  std::vector<MaterialPropertyName> add_list;
684 
685  if (mat_params.isParamValid("ad_props_out") && mat_params.isParamValid("reg_props_in") &&
686  _use_ad)
687  {
688  remove_list = mat_params.get<std::vector<MaterialPropertyName>>("reg_props_in");
689  add_list = mat_params.get<std::vector<MaterialPropertyName>>("ad_props_out");
690  }
691  if (mat_params.isParamValid("ad_props_in") && mat_params.isParamValid("reg_props_out") &&
692  !_use_ad)
693  {
694  remove_list = mat_params.get<std::vector<MaterialPropertyName>>("ad_props_in");
695  add_list = mat_params.get<std::vector<MaterialPropertyName>>("reg_props_out");
696  }
697 
698  // These vectors are the same size as checked in MaterialADConverter
699  for (unsigned int index = 0; index < remove_list.size(); index++)
700  remove_add_map.emplace(remove_list[index], add_list[index]);
701  }
702  }
703  // All the materials have been accounted for, now remove or add parts
704 
705  // Remove names which aren't eigenstrains (converter properties)
706  for (auto remove_add_index : remove_add_map)
707  {
708  const bool is_in = eigenstrain_set.find(remove_add_index.first) != eigenstrain_set.end();
709  if (is_in)
710  {
711  eigenstrain_set.erase(remove_add_index.first);
712  eigenstrain_set.insert(remove_add_index.second);
713  }
714  }
715  for (auto index : remove_reduced_set)
716  eigenstrain_set.erase(index);
717 
718  // Compare the blockIDs set of eigenstrain names with the vector of _eigenstrain_names for the
719  // current subdomainID
720  std::set_union(eigenstrain_set.begin(),
721  eigenstrain_set.end(),
722  _eigenstrain_names.begin(),
723  _eigenstrain_names.end(),
724  std::inserter(verified_eigenstrain_names, verified_eigenstrain_names.begin()));
725 
726  // Ensure the eigenstrain names previously passed include any missing names
727  _eigenstrain_names.resize(verified_eigenstrain_names.size());
728  std::copy(verified_eigenstrain_names.begin(),
729  verified_eigenstrain_names.end(),
730  _eigenstrain_names.begin());
731 
732  Moose::out << COLOR_CYAN << "*** Automatic Eigenstrain Names ***"
733  << "\n"
734  << _name << ": " << Moose::stringify(_eigenstrain_names) << "\n"
735  << COLOR_DEFAULT << std::flush;
736 }
std::set< SubdomainID > _subdomain_ids
set generated from the passed in vector of subdomain names
virtual const std::string & name() const
std::string stringify(const T &t)
const std::string _name
std::vector< MaterialPropertyName > _eigenstrain_names
void mooseError(Args &&... args) const
std::shared_ptr< FEProblemBase > & _problem

◆ actGatherActionParameters()

void QuasiStaticSolidMechanicsPhysics::actGatherActionParameters ( )
protectedinherited

Definition at line 897 of file QuasiStaticSolidMechanicsPhysics.C.

Referenced by QuasiStaticSolidMechanicsPhysics::act().

898 {
899  // Gather info about all other solid mechanics physics when we add variables
900  if (_current_task == "validate_coordinate_systems" && getParam<bool>("add_variables"))
901  {
903  for (const auto & action : actions)
904  {
905  const auto size_before = _subdomain_id_union.size();
906  const auto added_size = action->_subdomain_ids.size();
907  _subdomain_id_union.insert(action->_subdomain_ids.begin(), action->_subdomain_ids.end());
908  const auto size_after = _subdomain_id_union.size();
909 
910  if (size_after != size_before + added_size)
911  mooseError("The block restrictions in the SolidMechanics/QuasiStatic actions must be "
912  "non-overlapping.");
913 
914  if (added_size == 0 && actions.size() > 1)
915  mooseError(
916  "No SolidMechanics/QuasiStatic action can be block unrestricted if more than one "
917  "SolidMechanics/QuasiStatic action is specified.");
918  }
919  }
920 }
std::set< SubdomainID > _subdomain_id_union
set generated from the combined block restrictions of all SolidMechanics/Master action blocks ...
ActionWarehouse & _awh
const std::string & _current_task
void mooseError(Args &&... args) const
std::vector< const T *> getActions()

◆ actLagrangianKernelStrain()

void QuasiStaticSolidMechanicsPhysics::actLagrangianKernelStrain ( )
protectedinherited

Definition at line 923 of file QuasiStaticSolidMechanicsPhysics.C.

Referenced by QuasiStaticSolidMechanicsPhysics::act().

924 {
925  std::string type;
927  type = "ComputeLagrangianStrain";
928  else if (_coord_system == Moose::COORD_RZ)
929  type = "ComputeLagrangianStrainAxisymmetricCylindrical";
931  type = "ComputeLagrangianStrainCentrosymmetricSpherical";
932  else
933  mooseError("Unsupported coordinate system");
934 
935  auto params = _factory.getValidParams(type);
936 
937  if (isParamValid("strain_base_name"))
938  params.set<std::string>("base_name") = getParam<std::string>("strain_base_name");
939 
940  params.set<std::vector<VariableName>>("displacements") = _coupled_displacements;
941  params.set<std::vector<MaterialPropertyName>>("eigenstrain_names") = _eigenstrain_names;
942  params.set<bool>("large_kinematics") = _lk_large_kinematics;
943  params.set<std::vector<SubdomainName>>("block") = _subdomain_names;
944 
945  // Error if volumetric locking correction is on for higher-order elements
946  if (_problem->mesh().hasSecondOrderElements() && _lk_locking)
947  mooseError("Volumetric locking correction should not be used for "
948  "higher-order elements.");
949 
950  params.set<bool>("stabilize_strain") = _lk_locking;
951 
952  if (_lk_homogenization)
953  {
954  params.set<std::vector<MaterialPropertyName>>("homogenization_gradient_names") = {
956  }
957 
958  _problem->addMaterial(type, name() + "_strain", params);
959 
960  // Add the homogenization strain calculator
961  if (_lk_homogenization)
962  {
963  std::string type = "ComputeHomogenizedLagrangianStrain";
964  auto params = _factory.getValidParams(type);
965 
966  params.set<MaterialPropertyName>("homogenization_gradient_name") = _homogenization_strain_name;
967  params.set<std::vector<VariableName>>("macro_gradient") = {_hname};
968  params.set<UserObjectName>("homogenization_constraint") = _integrator_name;
969 
970  _problem->addMaterial(type, name() + "_compute_" + _homogenization_strain_name, params);
971  }
972 }
const bool _lk_large_kinematics
Simplified flag for small/large deformations, Lagrangian kernel system.
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
COORD_RSPHERICAL
virtual const std::string & name() const
bool isParamValid(const std::string &name) const
Factory & _factory
std::vector< SubdomainName > _subdomain_names
if this vector is not empty the variables, kernels and materials are restricted to these subdomains ...
std::vector< VariableName > _coupled_displacements
Coupled displacement variables.
const std::string & type() const
bool _lk_locking
Simplified volumetric locking correction flag for new kernels.
std::vector< MaterialPropertyName > _eigenstrain_names
void mooseError(Args &&... args) const
std::shared_ptr< FEProblemBase > & _problem
bool _lk_homogenization
Flag indicating if the homogenization system is present for new kernels.

◆ actOutputGeneration()

void QuasiStaticSolidMechanicsPhysics::actOutputGeneration ( )
protectedinherited

Definition at line 541 of file QuasiStaticSolidMechanicsPhysics.C.

Referenced by QuasiStaticSolidMechanicsPhysics::act().

542 {
543  if (_current_task == "add_material")
545 
546  // Add variables (optional)
547  if (_current_task == "add_aux_variable")
548  {
549  unsigned int index = 0;
550  for (auto out : _generate_output)
551  {
552  const auto & order = _material_output_order[index];
553  const auto & family = _material_output_family[index];
554 
555  std::string type = (order == "CONSTANT" && family == "MONOMIAL")
556  ? "MooseVariableConstMonomial"
557  : "MooseVariable";
558 
559  // Create output helper aux variables
560  auto params = _factory.getValidParams(type);
561  params.set<MooseEnum>("order") = order;
562  params.set<MooseEnum>("family") = family;
563 
564  if (family == "MONOMIAL")
565  _problem->addAuxVariable(type, _base_name + out, params);
566  else
567  _problem->addVariable(type, _base_name + out, params);
568 
569  index++;
570  }
571  }
572 
573  // Add output AuxKernels
574  else if (_current_task == "add_aux_kernel")
575  {
576  std::string ad_prepend = _use_ad ? "AD" : "";
577  // Loop through output aux variables
578  unsigned int index = 0;
579  for (auto out : _generate_output)
580  {
581  if (_material_output_family[index] == "MONOMIAL")
582  {
584 
585  params = _factory.getValidParams("MaterialRealAux");
586  params.applyParameters(parameters());
587  params.set<MaterialPropertyName>("property") = _base_name + out;
588  params.set<AuxVariableName>("variable") = _base_name + out;
589  params.set<ExecFlagEnum>("execute_on") = EXEC_TIMESTEP_END;
590 
591  _problem->addAuxKernel(
592  ad_prepend + "MaterialRealAux", _base_name + out + '_' + name(), params);
593  }
594  index++;
595  }
596  }
597  else if (_current_task == "add_kernel")
598  {
599  std::string ad_prepend = _use_ad ? "AD" : "";
600  // Loop through output aux variables
601  unsigned int index = 0;
602  for (auto out : _generate_output)
603  {
604  if (_material_output_family[index] != "MONOMIAL")
605  {
607 
608  params = _factory.getValidParams("MaterialPropertyValue");
609  params.applyParameters(parameters());
610  params.set<MaterialPropertyName>("prop_name") = _base_name + out;
611  params.set<NonlinearVariableName>("variable") = _base_name + out;
612 
613  _problem->addKernel(
614  ad_prepend + "MaterialPropertyValue", _base_name + out + '_' + name(), params);
615  }
616  index++;
617  }
618  }
619 }
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
void applyParameters(const InputParameters &common, const std::vector< std::string > &exclude={}, const bool allow_private=false)
std::vector< std::string > _generate_output
output materials to generate scalar stress/strain tensor quantities
virtual const std::string & name() const
InputParameters emptyInputParameters()
Factory & _factory
const std::string & type() const
const std::string & _current_task
std::shared_ptr< FEProblemBase > & _problem
const InputParameters & parameters() const
const std::string _base_name
base name for the current master action block

◆ actOutputMatProp()

void QuasiStaticSolidMechanicsPhysics::actOutputMatProp ( )
protectedinherited

Definition at line 789 of file QuasiStaticSolidMechanicsPhysics.C.

Referenced by QuasiStaticSolidMechanicsPhysics::actOutputGeneration().

790 {
791  std::string ad_prepend = _use_ad ? "AD" : "";
792 
793  if (_current_task == "add_material")
794  {
795  // Add output Materials
796  for (auto out : _generate_output)
797  {
799 
800  // RankTwoCartesianComponent
801  if (
802  [&]()
803  {
804  for (const auto & r2q : _rank_two_cartesian_component_table)
805  for (unsigned int a = 0; a < 3; ++a)
806  for (unsigned int b = 0; b < 3; ++b)
807  if (r2q.first + '_' + _component_table[a] + _component_table[b] == out)
808  {
809  auto type = ad_prepend + "RankTwoCartesianComponent";
810  params = _factory.getValidParams(type);
811  params.set<MaterialPropertyName>("rank_two_tensor") = _base_name + r2q.second;
812  params.set<unsigned int>("index_i") = a;
813  params.set<unsigned int>("index_j") = b;
814 
815  params.applyParameters(parameters());
816  params.set<MaterialPropertyName>("property_name") = _base_name + out;
817  _problem->addMaterial(type, _base_name + out + '_' + name(), params);
818  return true;
819  }
820  return false;
821  }())
822  continue;
823 
824  // RankTwoDirectionalComponent
825  if (setupOutput(out,
827  [&](std::string prop_name, std::string invariant)
828  {
829  auto type = ad_prepend + "RankTwoDirectionalComponent";
830  params = _factory.getValidParams(type);
831  params.set<MaterialPropertyName>("rank_two_tensor") =
832  _base_name + prop_name;
833  params.set<MooseEnum>("invariant") = invariant;
834  params.applyParameters(parameters());
835  params.set<MaterialPropertyName>("property_name") = _base_name + out;
836  _problem->addMaterial(type, _base_name + out + '_' + name(), params);
837  }))
838  continue;
839 
840  // RankTwoInvariant
841  if (setupOutput(out,
843  [&](std::string prop_name, std::string invariant)
844  {
845  auto type = ad_prepend + "RankTwoInvariant";
846  params = _factory.getValidParams(type);
847  params.set<MaterialPropertyName>("rank_two_tensor") =
848  _base_name + prop_name;
849  params.set<MooseEnum>("invariant") = invariant;
850  params.applyParameters(parameters());
851  params.set<MaterialPropertyName>("property_name") = _base_name + out;
852  _problem->addMaterial(type, _base_name + out + '_' + name(), params);
853  }))
854  continue;
855 
856  // RankTwoCylindricalComponent
857  if (setupOutput(
858  out,
860  [&](std::string prop_name, std::string component)
861  {
863  mooseError(
864  "Cannot use cylindrical component output in a spherical coordinate system.");
865  auto type = ad_prepend + "RankTwoCylindricalComponent";
866  params = _factory.getValidParams(type);
867  params.set<MaterialPropertyName>("rank_two_tensor") = _base_name + prop_name;
868  params.set<MooseEnum>("cylindrical_component") = component;
869  params.applyParameters(parameters());
870  params.set<MaterialPropertyName>("property_name") = _base_name + out;
871  _problem->addMaterial(type, _base_name + out + '_' + name(), params);
872  }))
873  continue;
874 
875  // RankTwoSphericalComponent
876  if (setupOutput(out,
878  [&](std::string prop_name, std::string component)
879  {
880  auto type = ad_prepend + "RankTwoSphericalComponent";
881  params = _factory.getValidParams(type);
882  params.set<MaterialPropertyName>("rank_two_tensor") =
883  _base_name + prop_name;
884  params.set<MooseEnum>("spherical_component") = component;
885  params.applyParameters(parameters());
886  params.set<MaterialPropertyName>("property_name") = _base_name + out;
887  _problem->addMaterial(type, _base_name + out + '_' + name(), params);
888  }))
889  continue;
890 
891  paramError("generate_output", "Unable to add output Material for '", out, "'");
892  }
893  }
894 }
bool setupOutput(std::string out, T table, T2 setup)
Helper function to decode generate_outputs options using a "table" of scalar output quantities and a ...
static const std::map< std::string, std::pair< std::string, std::vector< std::string > > > _rank_two_invariant_table
static const std::string component
Definition: NS.h:138
static const std::map< std::string, std::pair< std::string, std::vector< std::string > > > _rank_two_cylindrical_component_table
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
void applyParameters(const InputParameters &common, const std::vector< std::string > &exclude={}, const bool allow_private=false)
COORD_RSPHERICAL
std::vector< std::string > _generate_output
output materials to generate scalar stress/strain tensor quantities
virtual const std::string & name() const
static const std::vector< char > _component_table
table data for output generation
InputParameters emptyInputParameters()
Factory & _factory
const std::string & type() const
const std::string & _current_task
void paramError(const std::string &param, Args... args) const
static const std::map< std::string, std::pair< std::string, std::vector< std::string > > > _rank_two_directional_component_table
static std::map< std::string, std::string > _rank_two_cartesian_component_table
void mooseError(Args &&... args) const
std::shared_ptr< FEProblemBase > & _problem
const InputParameters & parameters() const
const std::string _base_name
base name for the current master action block
static const std::map< std::string, std::pair< std::string, std::vector< std::string > > > _rank_two_spherical_component_table

◆ actStressDivergenceTensorsStrain()

void QuasiStaticSolidMechanicsPhysics::actStressDivergenceTensorsStrain ( )
protectedinherited

Definition at line 975 of file QuasiStaticSolidMechanicsPhysics.C.

Referenced by QuasiStaticSolidMechanicsPhysics::act().

976 {
977  std::string ad_prepend = _use_ad ? "AD" : "";
978 
979  std::string type;
980 
981  // no plane strain
983  {
984  std::map<std::pair<Moose::CoordinateSystemType, StrainAndIncrement>, std::string> type_map = {
985  {{Moose::COORD_XYZ, StrainAndIncrement::SmallTotal}, "ComputeSmallStrain"},
986  {{Moose::COORD_XYZ, StrainAndIncrement::SmallIncremental}, "ComputeIncrementalSmallStrain"},
987  {{Moose::COORD_XYZ, StrainAndIncrement::FiniteIncremental}, "ComputeFiniteStrain"},
988  {{Moose::COORD_RZ, StrainAndIncrement::SmallTotal}, "ComputeAxisymmetricRZSmallStrain"},
990  "ComputeAxisymmetricRZIncrementalStrain"},
992  "ComputeAxisymmetricRZFiniteStrain"},
993  {{Moose::COORD_RSPHERICAL, StrainAndIncrement::SmallTotal}, "ComputeRSphericalSmallStrain"},
995  "ComputeRSphericalIncrementalStrain"},
997  "ComputeRSphericalFiniteStrain"}};
998 
999  auto type_it = type_map.find(std::make_pair(_coord_system, _strain_and_increment));
1000  if (type_it != type_map.end())
1001  type = type_it->second;
1002  else
1003  mooseError("Unsupported strain formulation");
1004  }
1008  {
1011  paramError("use_automatic_differentiation",
1012  "AD not setup for use with PlaneStrain or GeneralizedPlaneStrain");
1013 
1014  std::map<std::pair<Moose::CoordinateSystemType, StrainAndIncrement>, std::string> type_map = {
1015  {{Moose::COORD_XYZ, StrainAndIncrement::SmallTotal}, "ComputePlaneSmallStrain"},
1016  {{Moose::COORD_XYZ, StrainAndIncrement::SmallIncremental}, "ComputePlaneIncrementalStrain"},
1017  {{Moose::COORD_XYZ, StrainAndIncrement::FiniteIncremental}, "ComputePlaneFiniteStrain"},
1018  {{Moose::COORD_RZ, StrainAndIncrement::SmallTotal}, "ComputeAxisymmetric1DSmallStrain"},
1020  "ComputeAxisymmetric1DIncrementalStrain"},
1022  "ComputeAxisymmetric1DFiniteStrain"}};
1023 
1024  // choose kernel type based on coordinate system
1025  auto type_it = type_map.find(std::make_pair(_coord_system, _strain_and_increment));
1026  if (type_it != type_map.end())
1027  type = type_it->second;
1028  else
1029  mooseError("Unsupported coordinate system for plane strain.");
1030  }
1031  else
1032  mooseError("Unsupported planar formulation");
1033 
1034  // set material parameters
1035  auto params = _factory.getValidParams(ad_prepend + type);
1036  params.applyParameters(
1037  parameters(),
1038  {"displacements", "use_displaced_mesh", "out_of_plane_strain", "scalar_out_of_plane_strain"});
1039 
1040  if (isParamValid("strain_base_name"))
1041  params.set<std::string>("base_name") = getParam<std::string>("strain_base_name");
1042 
1043  params.set<std::vector<VariableName>>("displacements") = _coupled_displacements;
1044  params.set<bool>("use_displaced_mesh") = false;
1045 
1046  if (isParamValid("scalar_out_of_plane_strain"))
1047  params.set<std::vector<VariableName>>("scalar_out_of_plane_strain") = {
1048  getParam<VariableName>("scalar_out_of_plane_strain")};
1049 
1050  if (isParamValid("out_of_plane_strain"))
1051  params.set<std::vector<VariableName>>("out_of_plane_strain") = {
1052  getParam<VariableName>("out_of_plane_strain")};
1053 
1054  params.set<std::vector<MaterialPropertyName>>("eigenstrain_names") = _eigenstrain_names;
1055 
1056  _problem->addMaterial(ad_prepend + type, name() + "_strain", params);
1057 }
enum QuasiStaticSolidMechanicsPhysics::StrainAndIncrement _strain_and_increment
InputParameters getValidParams(const std::string &name) const
void applyParameters(const InputParameters &common, const std::vector< std::string > &exclude={}, const bool allow_private=false)
COORD_RSPHERICAL
virtual const std::string & name() const
enum QuasiStaticSolidMechanicsPhysics::PlanarFormulation _planar_formulation
bool isParamValid(const std::string &name) const
Factory & _factory
std::vector< VariableName > _coupled_displacements
Coupled displacement variables.
const std::string & type() const
void paramError(const std::string &param, Args... args) const
std::vector< MaterialPropertyName > _eigenstrain_names
void mooseError(Args &&... args) const
std::shared_ptr< FEProblemBase > & _problem
const InputParameters & parameters() const

◆ actSubdomainChecks()

void QuasiStaticSolidMechanicsPhysics::actSubdomainChecks ( )
protectedinherited

Definition at line 498 of file QuasiStaticSolidMechanicsPhysics.C.

Referenced by QuasiStaticSolidMechanicsPhysics::act().

499 {
500  // Do the coordinate system check only once the problem is created
501  if (_current_task == "setup_mesh_complete")
502  {
503  // get subdomain IDs
504  for (auto & name : _subdomain_names)
505  _subdomain_ids.insert(_mesh->getSubdomainID(name));
506  }
507 
508  if (_current_task == "validate_coordinate_systems")
509  {
510  // use either block restriction list or list of all subdomains in the mesh
511  const auto & check_subdomains =
512  _subdomain_ids.empty() ? _problem->mesh().meshSubdomains() : _subdomain_ids;
513  if (check_subdomains.empty())
514  mooseError("No subdomains found");
515 
516  // make sure all subdomains are using the same coordinate system
517  _coord_system = _problem->getCoordSystem(*check_subdomains.begin());
518  for (auto subdomain : check_subdomains)
519  if (_problem->getCoordSystem(subdomain) != _coord_system)
520  mooseError("The SolidMechanics action requires all subdomains to have the same coordinate "
521  "system.");
522 
524  {
526  mooseError("'out_of_plane_direction' must be 'z' for axisymmetric simulations");
527  }
529  {
531  mooseError(
532  "Must specify two displacements for plane strain when the out of plane direction is z");
534  mooseError("Must specify three displacements for plane strain when the out of plane "
535  "direction is x or y");
536  }
537  }
538 }
std::set< SubdomainID > _subdomain_ids
set generated from the passed in vector of subdomain names
unsigned int _ndisp
Number of displacement variables.
virtual const std::string & name() const
enum QuasiStaticSolidMechanicsPhysics::PlanarFormulation _planar_formulation
std::vector< SubdomainName > _subdomain_names
if this vector is not empty the variables, kernels and materials are restricted to these subdomains ...
const std::string & _current_task
std::shared_ptr< MooseMesh > & _mesh
void mooseError(Args &&... args) const
std::shared_ptr< FEProblemBase > & _problem

◆ addCartesianComponentOutput()

void QuasiStaticSolidMechanicsPhysicsBase::addCartesianComponentOutput ( const std::string &  name,
const std::string &  prop_name = "" 
)
staticinherited

Definition at line 330 of file QuasiStaticSolidMechanicsPhysicsBase.C.

332 {
333  if (prop_name.empty())
334  // the enum name is the actual tensor material property name
335  _rank_two_cartesian_component_table.emplace(enum_name, enum_name);
336  else
337  // supply a different name for the enum options (this is done for
338  // 'strain' -> 'mechanical_strain' in the TMA)
339  _rank_two_cartesian_component_table.emplace(enum_name, prop_name);
340 }
static std::map< std::string, std::string > _rank_two_cartesian_component_table

◆ getKernelParameters()

InputParameters QuasiStaticSolidMechanicsPhysics::getKernelParameters ( std::string  type)
protectedvirtualinherited

Reimplemented in DynamicSolidMechanicsPhysics.

Definition at line 1119 of file QuasiStaticSolidMechanicsPhysics.C.

Referenced by QuasiStaticSolidMechanicsPhysics::act(), and DynamicSolidMechanicsPhysics::getKernelParameters().

1120 {
1122  params.applyParameters(
1123  parameters(),
1124  {"displacements", "use_displaced_mesh", "save_in", "diag_save_in", "out_of_plane_strain"});
1125 
1126  params.set<std::vector<VariableName>>("displacements") = _coupled_displacements;
1127 
1128  if (_lagrangian_kernels)
1129  {
1130  params.set<bool>("use_displaced_mesh") =
1132  params.set<bool>("large_kinematics") = _lk_large_kinematics;
1133  params.set<bool>("stabilize_strain") = _lk_locking;
1134  }
1135  else
1136  params.set<bool>("use_displaced_mesh") = _use_displaced_mesh;
1137 
1138  return params;
1139 }
const bool _lk_large_kinematics
Simplified flag for small/large deformations, Lagrangian kernel system.
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
void applyParameters(const InputParameters &common, const std::vector< std::string > &exclude={}, const bool allow_private=false)
Factory & _factory
bool _use_displaced_mesh
use displaced mesh (true unless _strain is SMALL)
std::vector< VariableName > _coupled_displacements
Coupled displacement variables.
const std::string & type() const
bool _lk_locking
Simplified volumetric locking correction flag for new kernels.
const bool _lagrangian_kernels
New or old kernel system.
const InputParameters & parameters() const

◆ getKernelType()

std::string QuasiStaticSolidMechanicsPhysics::getKernelType ( )
protectedvirtualinherited

Reimplemented in DynamicSolidMechanicsPhysics.

Definition at line 1060 of file QuasiStaticSolidMechanicsPhysics.C.

Referenced by QuasiStaticSolidMechanicsPhysics::act().

1061 {
1062  if (_lagrangian_kernels)
1063  {
1064  std::string type;
1066  {
1067  if (_lk_homogenization)
1068  type = "HomogenizedTotalLagrangianStressDivergence";
1070  type = "TotalLagrangianStressDivergence";
1072  type = "UpdatedLagrangianStressDivergence";
1073  else
1074  mooseError("Unknown formulation type");
1075  }
1076  else if (_coord_system == Moose::COORD_RZ)
1077  {
1078  if (_lk_homogenization)
1079  mooseError("The Lagrangian mechanics kernels do not yet support homogenization in "
1080  "coordinate systems other than Cartesian.");
1082  type = "TotalLagrangianStressDivergenceAxisymmetricCylindrical";
1084  mooseError("The Lagrangian mechanics kernels do not yet support the updated Lagrangian "
1085  "formulation in RZ coordinates.");
1086  }
1088  {
1089  if (_lk_homogenization)
1090  mooseError("The Lagrangian mechanics kernels do not yet support homogenization in "
1091  "coordinate systems other than Cartesian.");
1093  type = "TotalLagrangianStressDivergenceCentrosymmetricSpherical";
1095  mooseError("The Lagrangian mechanics kernels do not yet support the updated Lagrangian "
1096  "formulation in RZ coordinates.");
1097  }
1098  else
1099  mooseError("Unsupported coordinate system");
1100  return type;
1101  }
1102  else
1103  {
1104  std::map<Moose::CoordinateSystemType, std::string> type_map = {
1105  {Moose::COORD_XYZ, "StressDivergenceTensors"},
1106  {Moose::COORD_RZ, "StressDivergenceRZTensors"},
1107  {Moose::COORD_RSPHERICAL, "StressDivergenceRSphericalTensors"}};
1108 
1109  // choose kernel type based on coordinate system
1110  auto type_it = type_map.find(_coord_system);
1111  if (type_it != type_map.end())
1112  return type_it->second;
1113  else
1114  mooseError("Unsupported coordinate system");
1115  }
1116 }
COORD_RSPHERICAL
const std::string & type() const
const bool _lagrangian_kernels
New or old kernel system.
void mooseError(Args &&... args) const
bool _lk_homogenization
Flag indicating if the homogenization system is present for new kernels.

◆ materialOutputFamilies()

MultiMooseEnum QuasiStaticSolidMechanicsPhysicsBase::materialOutputFamilies ( )
staticinherited

◆ materialOutputOrders()

MultiMooseEnum QuasiStaticSolidMechanicsPhysicsBase::materialOutputOrders ( )
staticinherited

Definition at line 287 of file QuasiStaticSolidMechanicsPhysicsBase.C.

Referenced by QuasiStaticSolidMechanicsPhysicsBase::validParams(), and QuasiStaticSolidMechanicsPhysics::validParams().

288 {
290 
291  return MultiMooseEnum(orders);
292 }
std::string getRawNames() const
static MooseEnum getAuxVariableOrders()

◆ outputPropertiesType()

MultiMooseEnum QuasiStaticSolidMechanicsPhysicsBase::outputPropertiesType ( )
staticinherited

Definition at line 301 of file QuasiStaticSolidMechanicsPhysicsBase.C.

Referenced by QuasiStaticSolidMechanicsPhysicsBase::validParams(), and QuasiStaticSolidMechanicsPhysics::validParams().

302 {
303  std::string options = "";
304  for (auto & r2tc : _rank_two_cartesian_component_table)
305  for (unsigned int a = 0; a < 3; ++a)
306  for (unsigned int b = 0; b < 3; ++b)
307  options += (options == "" ? "" : " ") + r2tc.first + '_' + _component_table[a] +
309 
310  for (auto & r2i : _rank_two_invariant_table)
311  for (auto & t : r2i.second.second)
312  options += " " + r2i.first + "_" + t;
313 
314  for (auto & r2sdc : _rank_two_directional_component_table)
315  for (auto & r : r2sdc.second.second)
316  options += " " + r2sdc.first + "_" + r;
317 
318  for (auto & r2cc : _rank_two_cylindrical_component_table)
319  for (auto & r : r2cc.second.second)
320  options += " " + r2cc.first + "_" + r;
321 
322  for (auto & r2sc : _rank_two_spherical_component_table)
323  for (auto & r : r2sc.second.second)
324  options += " " + r2sc.first + "_" + r;
325 
326  return MultiMooseEnum(options, "", true);
327 }
static const std::map< std::string, std::pair< std::string, std::vector< std::string > > > _rank_two_invariant_table
static const std::map< std::string, std::pair< std::string, std::vector< std::string > > > _rank_two_cylindrical_component_table
static const std::vector< char > _component_table
table data for output generation
static const std::map< std::string, std::pair< std::string, std::vector< std::string > > > _rank_two_directional_component_table
static std::map< std::string, std::string > _rank_two_cartesian_component_table
static const std::map< std::string, std::pair< std::string, std::vector< std::string > > > _rank_two_spherical_component_table

◆ setupOutput()

template<typename T , typename T2 >
bool QuasiStaticSolidMechanicsPhysics::setupOutput ( std::string  out,
table,
T2  setup 
)
protectedinherited

Helper function to decode generate_outputs options using a "table" of scalar output quantities and a "setup" lambda that performs the input parameter setup for the output material object.

Definition at line 173 of file QuasiStaticSolidMechanicsPhysics.h.

Referenced by QuasiStaticSolidMechanicsPhysics::actOutputMatProp().

174 {
175  for (const auto & t1 : table)
176  {
177  // find the officially supported properties
178  for (const auto & t2 : t1.second.second)
179  if (t1.first + '_' + t2 == out)
180  {
181  const auto it = _rank_two_cartesian_component_table.find(t2);
182  if (it != _rank_two_cartesian_component_table.end())
183  {
184  setup(it->second, t1.second.first);
185  return true;
186  }
187  else
188  mooseError("Internal error. The permitted tensor shortcuts must be keys in the "
189  "'_rank_two_cartesian_component_table'.");
190  }
191 
192  // check for custom properties
193  auto prefix = t1.first + '_';
194  if (out.substr(0, prefix.length()) == prefix)
195  {
196  setup(out.substr(prefix.length()), t1.second.first);
197  return true;
198  }
199  }
200 
201  return false;
202 }
static std::map< std::string, std::string > _rank_two_cartesian_component_table
OStreamProxy out
void setup(EquationSystems &systems, Mesh &mesh, GetPot &args)
void mooseError(Args &&... args) const

◆ validParams()

InputParameters PoroMechanicsAction::validParams ( )
static

Definition at line 24 of file PoroMechanicsAction.C.

25 {
27  params.addRequiredParam<VariableName>("porepressure", "The pore pressure variable");
28  return params;
29 }
void addRequiredParam(const std::string &name, const std::string &doc_string)

◆ verifyOrderAndFamilyOutputs()

void QuasiStaticSolidMechanicsPhysics::verifyOrderAndFamilyOutputs ( )
protectedinherited

Definition at line 739 of file QuasiStaticSolidMechanicsPhysics.C.

Referenced by QuasiStaticSolidMechanicsPhysics::QuasiStaticSolidMechanicsPhysics().

740 {
741  // Ensure material output order and family vectors are same size as generate output
742 
743  // check number of supplied orders and families
745  paramError("material_output_order",
746  "The number of orders assigned to material outputs must be: 0 to be assigned "
747  "CONSTANT; 1 to assign all outputs the same value, or the same size as the number "
748  "of generate outputs listed.");
749 
750  if (_material_output_family.size() > 1 &&
752  paramError("material_output_family",
753  "The number of families assigned to material outputs must be: 0 to be assigned "
754  "MONOMIAL; 1 to assign all outputs the same value, or the same size as the number "
755  "of generate outputs listed.");
756 
757  // if no value was provided, chose the default CONSTANT
758  if (_material_output_order.size() == 0)
759  _material_output_order.push_back("CONSTANT");
760 
761  // For only one order, make all orders the same magnitude
762  if (_material_output_order.size() == 1)
764  std::vector<std::string>(_generate_output.size(), _material_output_order[0]);
765 
766  if (_verbose)
767  Moose::out << COLOR_CYAN << "*** Automatic applied material output orders ***"
768  << "\n"
769  << _name << ": " << Moose::stringify(_material_output_order) << "\n"
770  << COLOR_DEFAULT << std::flush;
771 
772  // if no value was provided, chose the default MONOMIAL
773  if (_material_output_family.size() == 0)
775 
776  // For only one family, make all families that value
777  if (_material_output_family.size() == 1)
779  std::vector<std::string>(_generate_output.size(), _material_output_family[0]);
780 
781  if (_verbose)
782  Moose::out << COLOR_CYAN << "*** Automatic applied material output families ***"
783  << "\n"
784  << _name << ": " << Moose::stringify(_material_output_family) << "\n"
785  << COLOR_DEFAULT << std::flush;
786 }
unsigned int size() const
std::vector< std::string > _generate_output
output materials to generate scalar stress/strain tensor quantities
void paramError(const std::string &param, Args... args) const
std::string stringify(const T &t)
const std::string _name
void push_back(const std::string &names)

Member Data Documentation

◆ _auto_eigenstrain

const bool QuasiStaticSolidMechanicsPhysics::_auto_eigenstrain
protectedinherited

automatically gather names of eigenstrain tensors provided by simulation objects

Definition at line 134 of file QuasiStaticSolidMechanicsPhysics.h.

Referenced by QuasiStaticSolidMechanicsPhysics::act().

◆ _base_name

const std::string QuasiStaticSolidMechanicsPhysics::_base_name
protectedinherited

base name for the current master action block

Definition at line 106 of file QuasiStaticSolidMechanicsPhysics.h.

Referenced by QuasiStaticSolidMechanicsPhysics::actOutputGeneration(), and QuasiStaticSolidMechanicsPhysics::actOutputMatProp().

◆ _component_table

const std::vector< char > QuasiStaticSolidMechanicsPhysicsBase::_component_table = {'x', 'y', 'z'}
staticinherited

◆ _constraint_types

MultiMooseEnum QuasiStaticSolidMechanicsPhysics::_constraint_types
protectedinherited

◆ _coord_system

Moose::CoordinateSystemType QuasiStaticSolidMechanicsPhysics::_coord_system
protectedinherited

◆ _coupled_displacements

std::vector<VariableName> QuasiStaticSolidMechanicsPhysics::_coupled_displacements
protectedinherited

◆ _cylindrical_axis_point1

Point QuasiStaticSolidMechanicsPhysics::_cylindrical_axis_point1
protectedinherited

points used to determine axis of rotation for cylindrical stress/strain quantities

Definition at line 123 of file QuasiStaticSolidMechanicsPhysics.h.

Referenced by QuasiStaticSolidMechanicsPhysics::QuasiStaticSolidMechanicsPhysics().

◆ _cylindrical_axis_point1_valid

bool QuasiStaticSolidMechanicsPhysics::_cylindrical_axis_point1_valid
protectedinherited

booleans used to determine if cylindrical axis points are passed

Definition at line 117 of file QuasiStaticSolidMechanicsPhysics.h.

Referenced by QuasiStaticSolidMechanicsPhysics::QuasiStaticSolidMechanicsPhysics().

◆ _cylindrical_axis_point2

Point QuasiStaticSolidMechanicsPhysics::_cylindrical_axis_point2
protectedinherited

◆ _cylindrical_axis_point2_valid

bool QuasiStaticSolidMechanicsPhysics::_cylindrical_axis_point2_valid
protectedinherited

◆ _diag_save_in

std::vector<AuxVariableName> QuasiStaticSolidMechanicsPhysics::_diag_save_in
protectedinherited

◆ _direction

Point QuasiStaticSolidMechanicsPhysics::_direction
protectedinherited

◆ _direction_valid

bool QuasiStaticSolidMechanicsPhysics::_direction_valid
protectedinherited

◆ _displacements

std::vector<VariableName> QuasiStaticSolidMechanicsPhysics::_displacements
protectedinherited

◆ _eigenstrain_names

std::vector<MaterialPropertyName> QuasiStaticSolidMechanicsPhysics::_eigenstrain_names
protectedinherited

◆ _generate_output

std::vector<std::string> QuasiStaticSolidMechanicsPhysics::_generate_output
protectedinherited

◆ _hname

const std::string QuasiStaticSolidMechanicsPhysics::_hname = "hvar"
protectedinherited

◆ _homogenization_strain_name

const std::string QuasiStaticSolidMechanicsPhysics::_homogenization_strain_name = "homogenization_gradient"
protectedinherited

◆ _integrator_name

const std::string QuasiStaticSolidMechanicsPhysics::_integrator_name = "integrator"
protectedinherited

◆ _lagrangian_kernels

const bool QuasiStaticSolidMechanicsPhysics::_lagrangian_kernels
protectedinherited

◆ _lk_formulation

const LKFormulation QuasiStaticSolidMechanicsPhysics::_lk_formulation
protectedinherited

◆ _lk_homogenization

bool QuasiStaticSolidMechanicsPhysics::_lk_homogenization
protectedinherited

◆ _lk_large_kinematics

const bool QuasiStaticSolidMechanicsPhysics::_lk_large_kinematics
protectedinherited

◆ _lk_locking

bool QuasiStaticSolidMechanicsPhysics::_lk_locking
protectedinherited

Simplified volumetric locking correction flag for new kernels.

Definition at line 153 of file QuasiStaticSolidMechanicsPhysics.h.

Referenced by QuasiStaticSolidMechanicsPhysics::actLagrangianKernelStrain(), and QuasiStaticSolidMechanicsPhysics::getKernelParameters().

◆ _material_output_family

MultiMooseEnum QuasiStaticSolidMechanicsPhysics::_material_output_family
protectedinherited

◆ _material_output_order

MultiMooseEnum QuasiStaticSolidMechanicsPhysics::_material_output_order
protectedinherited

◆ _ndisp

unsigned int QuasiStaticSolidMechanicsPhysics::_ndisp
protectedinherited

◆ _order_mapper

const std::map<unsigned int, std::string> QuasiStaticSolidMechanicsPhysics::_order_mapper
staticprotectedinherited

Definition at line 159 of file QuasiStaticSolidMechanicsPhysics.h.

◆ _out_of_plane_direction

const OutOfPlaneDirection QuasiStaticSolidMechanicsPhysics::_out_of_plane_direction
protectedinherited

◆ _planar_formulation

enum QuasiStaticSolidMechanicsPhysics::PlanarFormulation QuasiStaticSolidMechanicsPhysics::_planar_formulation
protectedinherited

◆ _rank_two_cartesian_component_table

std::map< std::string, std::string > QuasiStaticSolidMechanicsPhysicsBase::_rank_two_cartesian_component_table
staticprotectedinherited
Initial value:
= {
{"strain", "total_strain"},
{"mechanical_strain", "mechanical_strain"},
{"stress", "stress"},
{"cauchy_stress", "cauchy_stress"},
{"deformation_gradient", "deformation_gradient"},
{"pk1_stress", "pk1_stress"},
{"pk2_stress", "pk2_stress"},
{"small_stress", "small_stress"},
{"elastic_strain", "elastic_strain"},
{"plastic_strain", "plastic_strain"},
{"creep_strain", "creep_strain"},
{"creep_stress", "creep_stress"}}

Definition at line 42 of file QuasiStaticSolidMechanicsPhysicsBase.h.

Referenced by QuasiStaticSolidMechanicsPhysics::actOutputMatProp(), QuasiStaticSolidMechanicsPhysicsBase::addCartesianComponentOutput(), QuasiStaticSolidMechanicsPhysicsBase::outputPropertiesType(), and QuasiStaticSolidMechanicsPhysics::setupOutput().

◆ _rank_two_cylindrical_component_table

const std::map< std::string, std::pair< std::string, std::vector< std::string > > > QuasiStaticSolidMechanicsPhysicsBase::_rank_two_cylindrical_component_table
staticinherited
Initial value:
= {
{"axial",
{"AxialStress", {"stress", "strain", "plastic_strain", "creep_strain", "elastic_strain"}}},
{"hoop",
{"HoopStress", {"stress", "strain", "plastic_strain", "creep_strain", "elastic_strain"}}},
{"radial", {"RadialStress", {"stress", "strain"}}}}

Definition at line 33 of file QuasiStaticSolidMechanicsPhysicsBase.h.

Referenced by QuasiStaticSolidMechanicsPhysics::actOutputMatProp(), and QuasiStaticSolidMechanicsPhysicsBase::outputPropertiesType().

◆ _rank_two_directional_component_table

const std::map< std::string, std::pair< std::string, std::vector< std::string > > > QuasiStaticSolidMechanicsPhysicsBase::_rank_two_directional_component_table
staticinherited
Initial value:
= {
{"directional", {"Direction", {"stress", "strain"}}}}

Definition at line 31 of file QuasiStaticSolidMechanicsPhysicsBase.h.

Referenced by QuasiStaticSolidMechanicsPhysics::actOutputMatProp(), and QuasiStaticSolidMechanicsPhysicsBase::outputPropertiesType().

◆ _rank_two_invariant_table

const std::map< std::string, std::pair< std::string, std::vector< std::string > > > QuasiStaticSolidMechanicsPhysicsBase::_rank_two_invariant_table
staticinherited

◆ _rank_two_spherical_component_table

const std::map< std::string, std::pair< std::string, std::vector< std::string > > > QuasiStaticSolidMechanicsPhysicsBase::_rank_two_spherical_component_table
staticinherited
Initial value:
= {
{"spherical_hoop",
{"HoopStress", {"stress", "strain", "plastic_strain", "creep_strain", "elastic_strain"}}},
{"spherical_radial", {"RadialStress", {"stress", "strain"}}}}

Definition at line 35 of file QuasiStaticSolidMechanicsPhysicsBase.h.

Referenced by QuasiStaticSolidMechanicsPhysics::actOutputMatProp(), and QuasiStaticSolidMechanicsPhysicsBase::outputPropertiesType().

◆ _save_in

std::vector<AuxVariableName> QuasiStaticSolidMechanicsPhysics::_save_in
protectedinherited

◆ _spherical_center_point

Point QuasiStaticSolidMechanicsPhysics::_spherical_center_point
protectedinherited

center point for spherical stress/strain quantities

Definition at line 131 of file QuasiStaticSolidMechanicsPhysics.h.

Referenced by QuasiStaticSolidMechanicsPhysics::QuasiStaticSolidMechanicsPhysics().

◆ _spherical_center_point_valid

bool QuasiStaticSolidMechanicsPhysics::_spherical_center_point_valid
protectedinherited

booleans used to determine if spherical center point is passed

Definition at line 128 of file QuasiStaticSolidMechanicsPhysics.h.

Referenced by QuasiStaticSolidMechanicsPhysics::QuasiStaticSolidMechanicsPhysics().

◆ _strain

enum QuasiStaticSolidMechanicsPhysics::Strain QuasiStaticSolidMechanicsPhysics::_strain
protectedinherited

◆ _strain_and_increment

enum QuasiStaticSolidMechanicsPhysics::StrainAndIncrement QuasiStaticSolidMechanicsPhysics::_strain_and_increment
protectedinherited

◆ _subdomain_id_union

std::set<SubdomainID> QuasiStaticSolidMechanicsPhysics::_subdomain_id_union
protectedinherited

set generated from the combined block restrictions of all SolidMechanics/Master action blocks

Definition at line 69 of file QuasiStaticSolidMechanicsPhysics.h.

Referenced by QuasiStaticSolidMechanicsPhysics::actGatherActionParameters().

◆ _subdomain_ids

std::set<SubdomainID> QuasiStaticSolidMechanicsPhysics::_subdomain_ids
protectedinherited

set generated from the passed in vector of subdomain names

Definition at line 66 of file QuasiStaticSolidMechanicsPhysics.h.

Referenced by QuasiStaticSolidMechanicsPhysics::actEigenstrainNames(), and QuasiStaticSolidMechanicsPhysics::actSubdomainChecks().

◆ _subdomain_names

std::vector<SubdomainName> QuasiStaticSolidMechanicsPhysics::_subdomain_names
protectedinherited

if this vector is not empty the variables, kernels and materials are restricted to these subdomains

Definition at line 63 of file QuasiStaticSolidMechanicsPhysics.h.

Referenced by QuasiStaticSolidMechanicsPhysics::act(), QuasiStaticSolidMechanicsPhysics::actLagrangianKernelStrain(), and QuasiStaticSolidMechanicsPhysics::actSubdomainChecks().

◆ _targets

std::vector<FunctionName> QuasiStaticSolidMechanicsPhysics::_targets
protectedinherited

◆ _use_ad

const bool QuasiStaticSolidMechanicsPhysicsBase::_use_ad
protectedinherited

◆ _use_displaced_mesh

bool QuasiStaticSolidMechanicsPhysics::_use_displaced_mesh
protectedinherited

◆ _verbose

bool QuasiStaticSolidMechanicsPhysics::_verbose
protectedinherited

The documentation for this class was generated from the following files: