24 params.
addClassDescription(
"Computes the inertial forces and mass proportional damping terms " 25 "corresponding to nodal mass.");
27 params.
addCoupledVar(
"acceleration",
"acceleration variable");
29 "beta",
"beta>0.0",
"beta parameter for Newmark Time integration");
31 "gamma",
"gamma>0.0",
"gamma parameter for Newmark Time integration");
35 "Constant real number defining the eta parameter for " 39 "alpha >= -0.3333 & alpha <= 0.0",
40 "Alpha parameter for mass dependent numerical damping induced " 41 "by HHT time integration scheme");
42 params.
addParam<
Real>(
"mass",
"Mass associated with the node");
45 "The file containing the nodal positions and the corresponding nodal masses.");
51 _has_mass(isParamValid(
"mass")),
52 _has_beta(isParamValid(
"beta")),
53 _has_gamma(isParamValid(
"gamma")),
54 _has_velocity(isParamValid(
"velocity")),
55 _has_acceleration(isParamValid(
"acceleration")),
56 _has_nodal_mass_file(isParamValid(
"nodal_mass_file")),
57 _mass(_has_mass ? getParam<
Real>(
"mass") : 0.0),
58 _beta(_has_beta ? getParam<
Real>(
"beta") : 0.1),
59 _gamma(_has_gamma ? getParam<
Real>(
"gamma") : 0.1),
60 _eta(getParam<
Real>(
"eta")),
61 _alpha(getParam<
Real>(
"alpha")),
62 _time_integrator(_sys.getTimeIntegrator(_var.number()))
87 mooseError(
"NodalTranslationalInertia: Either all or none of `beta`, `gamma`, `velocity` and " 88 "`acceleration` should be provided as input.");
92 "NodalTranslationalInertia: Please provide either mass or nodal_mass_file as input.");
94 mooseError(
"NodalTranslationalInertia: Please provide either mass or nodal_mass_file as input, " 101 nodal_mass_file.
read();
102 std::vector<std::vector<Real>> data = nodal_mass_file.
getData();
103 if (data.size() != 4)
104 mooseError(
"NodalTranslationalInertia: The number of columns in ",
105 getParam<FileName>(
"nodal_mass_file"),
107 unsigned int node_found = 0;
109 for (
auto & bnd_id : bnd_ids)
112 for (
auto & bnd_node : bnd_node_set)
117 for (
unsigned int i = 0; i < data[0].size(); ++i)
130 if (node_found != data[0].size())
131 mooseError(
"NodalTranslationalInertia: Out of ",
133 " nodal positions in ",
134 getParam<FileName>(
"nodal_mass_file"),
137 " nodes were found in the boundary.");
142 mooseError(
"NodalTranslationalInertia: HHT time integration parameter can only be used with " 143 "Newmark-Beta time integration.");
147 mooseError(
"NodalTranslationalInertia: Newmark-beta integration parameter, beta, cannot be " 148 "provided along with an explicit time " 167 mooseError(
"NodalTranslationalInertia: Unable to find an entry for the current node in the " 168 "_node_id_to_mass map.");
173 mooseAssert(
_beta > 0.0,
"NodalTranslationalInertia: Beta parameter should be positive.");
177 const Real accel_old =
190 return mass * ((*_u_dotdot_factor)[
_qp] + (*_u_dot_factor)[
_qp] *
_eta * (1.0 +
_alpha) -
198 mooseAssert(
_beta > 0.0,
"NodalTranslationalInertia: Beta parameter should be positive.");
212 mooseError(
"NodalTranslationalInertia: Unable to find an entry for the current node in the " 213 "_node_id_to_mass map.");
const VariableValue * _du_dot_du
const bool _has_mass
Booleans for validity of params.
const DoFValue & dofValuesDotOld() const override
bool absoluteFuzzyEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
const Real _mass
Mass associated with the node.
unsigned int number() const
const Real _beta
Newmark time integration parameter.
static InputParameters validParams()
static InputParameters validParams()
const bool _has_nodal_mass_file
const Real & _eta
Mass proportional Rayliegh damping.
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
const Real & _alpha
HHT time integration parameter.
AuxiliarySystem * _aux_sys
Auxiliary system object.
virtual const Node & nodeRef(const dof_id_type i) const
virtual bool isExplicit() const
const VariableValue * _u_dotdot_factor
const VariableValue * _du_dotdot_du
Calculates the inertial force and mass proportional damping for a nodal mass.
const VariableValue & duDotDotDu() const
const TimeIntegrator & _time_integrator
The TimeIntegrator.
const VariableValue * _u_dot_old
void addFEVariableCoupleableVectorTag(TagID tag)
unsigned int _accel_num
Variable number corresponding to the acceleration aux variable.
const std::vector< dof_id_type > & getNodeList(boundary_id_type nodeset_id) const
registerMooseObject("SolidMechanicsApp", NodalTranslationalInertia)
const DoFValue & dofValuesOld() const override
FEProblemBase & _fe_problem
TagID uDotDotFactorTag() const
unsigned int number() const
AuxiliarySystem & getAuxiliarySystem()
const std::vector< std::vector< T > > & getData() const
const bool _has_acceleration
const VariableValue * _u_old
Old value of displacement.
TagID uDotFactorTag() const
NodalTranslationalInertia(const InputParameters ¶meters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::map< dof_id_type, Real > _node_id_to_mass
Map between boundary nodes and nodal mass.
const DoFValue & vectorTagDofValue(TagID tag) const override
const VariableValue * _u_dot_factor
const VariableValue & duDotDu() const
void setHeaderFlag(HeaderFlag value)
void mooseError(Args &&... args) const
unsigned int _vel_num
Variable number corresponding to the velocity aux variable.
const Node *const & _current_node
NumericVector< Number > & solutionOld()
virtual const std::set< BoundaryID > & boundaryIDs() const
const Real _gamma
Newmark time integration parameter.
virtual Real computeQpResidual() override
virtual Real computeQpJacobian() override