https://mooseframework.inl.gov
Loading...
Searching...
No Matches
QuasiStaticSolidMechanicsPhysics.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
13#include "libmesh/point.h"
14
16{
17public:
19
21
22 virtual void act();
23
24protected:
25 void actSubdomainChecks();
28 void actOutputMatProp();
33
34 virtual std::string getKernelType();
35 virtual InputParameters getKernelParameters(std::string type);
36
40 std::string remapCompatOutputProp(const std::string & prop_name) const;
41
47 template <typename T, typename T2>
48 bool setupOutput(std::string out, T table, T2 setup);
49
51 std::vector<VariableName> _displacements;
52
54 unsigned int _ndisp;
55
57 std::vector<VariableName> _coupled_displacements;
59
61 std::vector<AuxVariableName> _save_in;
62 std::vector<AuxVariableName> _diag_save_in;
64
66
68 std::vector<SubdomainName> _subdomain_names;
69
71 std::set<SubdomainID> _subdomain_ids;
72
74 std::set<SubdomainID> _subdomain_id_union;
75
77 enum class Strain
78 {
79 Small,
80 Finite
82
91
100
102 {
103 x,
104 y,
105 z
106 };
107
109
111 const std::string _base_name;
112
115
117 std::vector<std::string> _generate_output;
120
126
131
134
137
140
141 std::vector<MaterialPropertyName> _eigenstrain_names;
142
146
149
152
154 enum class LKFormulation
155 {
156 Total,
157 Updated
158 };
160
162 const bool _lk_locking;
163
166
167 // Helper to translate into MOOSE talk
168 static const std::map<unsigned int, std::string> _order_mapper;
169 // Name of the homogenization scalar variable
170 const std::string _hname = "hvar";
171 // Name of the integrator
172 const std::string _integrator_name = "integrator";
173 // Name of the homogenization strain
174 const std::string _homogenization_strain_name = "homogenization_gradient";
175 // Other homogenization info
177 std::vector<FunctionName> _targets;
179 const bool _lk_h_off_jac;
180};
181
182template <typename T, typename T2>
183bool
184QuasiStaticSolidMechanicsPhysics::setupOutput(std::string out, T table, T2 setup)
185{
186 for (const auto & t1 : table)
187 {
188 // find the officially supported properties
189 for (const auto & t2 : t1.second.second)
190 if (t1.first + '_' + t2 == out)
191 {
192 const auto it = _rank_two_cartesian_component_table.find(t2);
194 {
195 setup(it->second, t1.second.first);
196 return true;
197 }
198 else
199 mooseError("Internal error. The permitted tensor shortcuts must be keys in the "
200 "'_rank_two_cartesian_component_table'.");
201 }
202
203 // check for custom properties
204 auto prefix = t1.first + '_';
205 if (out.substr(0, prefix.length()) == prefix)
206 {
207 setup(out.substr(prefix.length()), t1.second.first);
208 return true;
209 }
210 }
211
212 return false;
213}
const double T
const std::string & type() const
void mooseError(Args &&... args) const
static std::map< std::string, std::string > _rank_two_cartesian_component_table
const bool _lk_h_off_jac
Whether to use the off diagonal scalar jacobian for the homogenization system.
bool _cylindrical_axis_point1_valid
booleans used to determine if cylindrical axis points are passed
std::set< SubdomainID > _subdomain_ids
set generated from the passed in vector of subdomain names
const bool _lk_large_kinematics
Simplified flag for small/large deformations, Lagrangian kernel system.
bool _lk_homogenization
Flag indicating if the homogenization system is present for new kernels.
LKFormulation
New kernel system kinematics types.
virtual InputParameters getKernelParameters(std::string type)
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 ...
Point _cylindrical_axis_point1
points used to determine axis of rotation for cylindrical stress/strain quantities
std::vector< VariableName > _coupled_displacements
Coupled displacement variables.
bool _spherical_center_point_valid
booleans used to determine if spherical center point is passed
std::set< SubdomainID > _subdomain_id_union
set generated from the combined block restrictions of all SolidMechanics/Master action blocks
enum QuasiStaticSolidMechanicsPhysics::Strain _strain
std::vector< std::string > _generate_output
output materials to generate scalar stress/strain tensor quantities
const bool _auto_eigenstrain
automatically gather names of eigenstrain tensors provided by simulation objects
const bool _compatibility_mode
OLD-compat shim: auto-configures the Lagrangian kernel system to reproduce StressDivergenceTensors + ...
const bool _lagrangian_kernels
New or old kernel system. True if new_system = true OR compatibility_mode = true.
PlanarFormulation
use an out of plane stress/strain formulation
std::vector< MaterialPropertyName > _eigenstrain_names
enum QuasiStaticSolidMechanicsPhysics::PlanarFormulation _planar_formulation
const std::string _base_name
base name for the current master action block
enum QuasiStaticSolidMechanicsPhysics::StrainAndIncrement _strain_and_increment
std::vector< VariableName > _displacements
displacement variables
bool _use_displaced_mesh
use displaced mesh (true unless _strain is SMALL)
unsigned int _ndisp
Number of displacement variables.
std::vector< AuxVariableName > _save_in
residual debugging
static const std::map< unsigned int, std::string > _order_mapper
std::string remapCompatOutputProp(const std::string &prop_name) const
Apply compatibility_mode remapping to a property name pulled from the _rank_two_* output tables: in c...
std::vector< SubdomainName > _subdomain_names
if this vector is not empty the variables, kernels and materials are restricted to these subdomains
const bool _lk_locking
Simplified volumetric locking correction flag for new kernels.
Point _spherical_center_point
center point for spherical stress/strain quantities
void setup(EquationSystems &systems, Mesh &mesh, GetPot &args)
CoordinateSystemType