https://mooseframework.inl.gov
Loading...
Searching...
No Matches
NewmarkAccelAux.C
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#include "NewmarkAccelAux.h"
11
13
16{
18 params.addClassDescription("Computes the current acceleration using the Newmark method.");
19 params.addRequiredCoupledVar("displacement", "displacement variable");
20 params.addRequiredCoupledVar("velocity", "velocity variable");
21 params.addRequiredParam<Real>("beta", "beta parameter for Newmark method");
22 return params;
23}
24
26 : AuxKernel(parameters),
27 _disp_old(coupledValueOld("displacement")),
28 _disp(coupledValue("displacement")),
29 _vel_old(coupledValueOld("velocity")),
30 _u_old(uOld()),
31 _beta(getParam<Real>("beta"))
32{
33}
34
35Real
37{
38 if (!isNodal())
39 mooseError("must run on a nodal variable");
40
41 Real accel_old = _u_old[_qp];
42 if (_dt == 0)
43 return accel_old;
44
45 // Calculates acceeleration using Newmark time integration method
46 return 1.0 / _beta *
47 ((_disp[_qp] - _disp_old[_qp]) / (_dt * _dt) - _vel_old[_qp] / _dt -
48 accel_old * (0.5 - _beta));
49}
registerMooseObject("SolidMechanicsApp", NewmarkAccelAux)
static InputParameters validParams()
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void mooseError(Args &&... args) const
NewmarkAccelAux(const InputParameters &parameters)
Computes Acceleration using Newmark Time integration scheme.
const VariableValue & _u_old
static InputParameters validParams()
virtual Real computeValue()
const VariableValue & _disp_old
const VariableValue & _vel_old
const VariableValue & _disp