12 #include "libmesh/quadrature.h" 21 params.
addClassDescription(
"Postprocessor that computes the minimum value of h_min/|u|, where " 22 "|u| is coupled in as an aux variable.");
29 "0 < beta < 1, choose some fraction of the limiting timestep size");
32 params.
addParam<MaterialPropertyName>(
"mu_name",
"mu",
"The name of the dynamic viscosity");
33 params.
addParam<MaterialPropertyName>(
"rho_name",
"rho",
"The name of the density");
40 _vel_mag(coupledValue(
"vel_mag")),
43 _beta(getParam<
Real>(
"beta")),
46 _mu(getMaterialProperty<
Real>(
"mu_name")),
47 _rho(getMaterialProperty<
Real>(
"rho_name"))
56 _value = std::numeric_limits<Real>::max();
68 for (
unsigned qp = 0; qp <
_qrule->n_points(); ++qp)
71 Real vel_mag = std::max(
_vel_mag[qp], std::numeric_limits<Real>::epsilon());
74 Real courant_limit_dt = h_min / vel_mag;
79 Real diffusive_limit_dt = 0.5 * h_min * h_min / (
_mu[qp] /
_rho[qp]) /
dim;
82 Real combined_limit_dt = 2. * (
_mu[qp] /
_rho[qp]) / vel_mag / vel_mag;
92 _beta * std::min(std::min(courant_limit_dt, diffusive_limit_dt), combined_limit_dt));
Real _beta
We can compute maximum stable timesteps based on the linearized theory, but even those timesteps are ...
const MaterialProperty< Real > & _mu
Material properties: the explicit time scheme limit for the viscous problem also depends on the kinem...
virtual void execute() override
static InputParameters validParams()
registerMooseObject("NavierStokesApp", INSExplicitTimestepSelector)
static InputParameters validParams()
const MaterialProperty< Real > & _rho
Postprocessor that computes the minimum value of h_min/|u|, where |u| is coupled in as an aux variabl...
const VariableValue & _vel_mag
Velocity magnitude. Hint: Use VectorMagnitudeAux in Moose for this.
virtual Real getValue() const override
virtual ~INSExplicitTimestepSelector()
virtual void initialize() override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const QBase *const & _qrule
const Elem *const & _current_elem
INSExplicitTimestepSelector(const InputParameters ¶meters)
Real _value
The value of dt (NOTE: _dt member variable is already defined)
virtual void finalize() override
virtual void threadJoin(const UserObject &uo) override