GRINS-0.6.0
|
Physics class for Incompressible Navier-Stokes. More...
#include <inc_navier_stokes.h>
Public Member Functions | |
IncompressibleNavierStokes (const std::string &physics_name, const GetPot &input) | |
~IncompressibleNavierStokes () | |
virtual void | read_input_options (const GetPot &input) |
Read options from GetPot input file. More... | |
virtual void | register_postprocessing_vars (const GetPot &input, PostProcessedQuantities< libMesh::Real > &postprocessing) |
Register postprocessing variables for IncompressibleNavierStokes. More... | |
virtual void | element_time_derivative (bool compute_jacobian, AssemblyContext &context, CachedValues &cache) |
Time dependent part(s) of physics for element interiors. More... | |
virtual void | element_constraint (bool compute_jacobian, AssemblyContext &context, CachedValues &cache) |
Constraint part(s) of physics for element interiors. More... | |
virtual void | side_constraint (bool compute_jacobian, AssemblyContext &context, CachedValues &cache) |
Constraint part(s) of physics for boundaries of elements on the domain boundary. More... | |
virtual void | mass_residual (bool compute_jacobian, AssemblyContext &context, CachedValues &cache) |
Mass matrix part(s) for element interiors. All boundary terms lie within the time_derivative part. More... | |
virtual void | compute_postprocessed_quantity (unsigned int quantity_index, const AssemblyContext &context, const libMesh::Point &point, libMesh::Real &value) |
Compute value of postprocessed quantities at libMesh::Point. More... | |
virtual void | init_variables (libMesh::FEMSystem *system) |
Initialization of Navier-Stokes variables. More... | |
virtual void | set_time_evolving_vars (libMesh::FEMSystem *system) |
Sets velocity variables to be time-evolving. More... | |
virtual void | init_context (AssemblyContext &context) |
Initialize context for added physics variables. More... | |
virtual void | register_parameter (const std::string ¶m_name, libMesh::ParameterMultiPointer< libMesh::Number > ¶m_pointer) const |
Each subclass will register its copy of an independent. More... | |
virtual bool | enabled_on_elem (const libMesh::Elem *elem) |
Find if current physics is active on supplied element. More... | |
void | set_is_steady (bool is_steady) |
Sets whether this physics is to be solved with a steady solver or not. More... | |
bool | is_steady () const |
Returns whether or not this physics is being solved with a steady solver. More... | |
virtual void | auxiliary_init (MultiphysicsSystem &system) |
Any auxillary initialization a Physics class may need. More... | |
virtual void | side_time_derivative (bool compute_jacobian, AssemblyContext &context, CachedValues &cache) |
Time dependent part(s) of physics for boundaries of elements on the domain boundary. More... | |
virtual void | nonlocal_time_derivative (bool compute_jacobian, AssemblyContext &context, CachedValues &cache) |
Time dependent part(s) of physics for scalar variables. More... | |
virtual void | nonlocal_constraint (bool compute_jacobian, AssemblyContext &context, CachedValues &cache) |
Constraint part(s) of physics for scalar variables. More... | |
virtual void | nonlocal_mass_residual (bool compute_jacobian, AssemblyContext &context, CachedValues &cache) |
Mass matrix part(s) for scalar variables. More... | |
void | init_bcs (libMesh::FEMSystem *system) |
void | init_ics (libMesh::FEMSystem *system, libMesh::CompositeFunction< libMesh::Number > &all_ics) |
void | attach_neumann_bound_func (GRINS::NBCContainer &neumann_bcs) |
void | attach_dirichlet_bound_func (const GRINS::DBCContainer &dirichlet_bc) |
virtual void | compute_element_time_derivative_cache (const AssemblyContext &context, CachedValues &cache) |
virtual void | compute_side_time_derivative_cache (const AssemblyContext &context, CachedValues &cache) |
virtual void | compute_nonlocal_time_derivative_cache (const AssemblyContext &context, CachedValues &cache) |
virtual void | compute_element_constraint_cache (const AssemblyContext &context, CachedValues &cache) |
virtual void | compute_side_constraint_cache (const AssemblyContext &context, CachedValues &cache) |
virtual void | compute_nonlocal_constraint_cache (const AssemblyContext &context, CachedValues &cache) |
virtual void | compute_mass_residual_cache (const AssemblyContext &context, CachedValues &cache) |
virtual void | compute_nonlocal_mass_residual_cache (const AssemblyContext &context, CachedValues &cache) |
BCHandlingBase * | get_bc_handler () |
ICHandlingBase * | get_ic_handler () |
virtual void | set_parameter (libMesh::Number ¶m_variable, const GetPot &input, const std::string ¶m_name, libMesh::Number param_default) |
Each subclass can simultaneously read a parameter value from. More... | |
Protected Attributes | |
PressurePinning | _p_pinning |
bool | _pin_pressure |
Enable pressure pinning. More... | |
unsigned int | _mu_index |
Index from registering this quantity. More... | |
unsigned int | _dim |
Physical dimension of problem. More... | |
PrimitiveFlowFEVariables | _flow_vars |
libMesh::Number | _rho |
Material parameters, read from input. More... | |
Viscosity | _mu |
Viscosity object. More... | |
const PhysicsName | _physics_name |
Name of the physics object. Used for reading physics specific inputs. More... | |
GRINS::BCHandlingBase * | _bc_handler |
GRINS::ICHandlingBase * | _ic_handler |
std::set< libMesh::subdomain_id_type > | _enabled_subdomains |
Subdomains on which the current Physics class is enabled. More... | |
bool | _is_axisymmetric |
Static Protected Attributes | |
static bool | _is_steady = false |
Caches whether or not the solver that's being used is steady or not. More... | |
Private Member Functions | |
IncompressibleNavierStokes () | |
Physics class for Incompressible Navier-Stokes.
This physics class implements the classical Incompressible Navier-Stokes equations. This is a templated class, the class Viscosity can be instantiated as a specific type (right now:ConstantViscosity or SpatiallyVaryingViscosity) to allow the user to specify a constant or spatially varying viscosity in the input file
Definition at line 44 of file inc_navier_stokes.h.
GRINS::IncompressibleNavierStokes< Mu >::IncompressibleNavierStokes | ( | const std::string & | physics_name, |
const GetPot & | input | ||
) |
Definition at line 43 of file inc_navier_stokes.C.
References GRINS::Physics::_bc_handler, GRINS::Physics::_ic_handler, GRINS::Physics::_is_axisymmetric, GRINS::BCHandlingBase::is_axisymmetric(), and GRINS::IncompressibleNavierStokes< Viscosity >::read_input_options().
GRINS::IncompressibleNavierStokes< Mu >::~IncompressibleNavierStokes | ( | ) |
Definition at line 66 of file inc_navier_stokes.C.
|
private |
|
inherited |
Definition at line 150 of file physics.C.
References GRINS::Physics::_bc_handler, and GRINS::BCHandlingBase::attach_dirichlet_bound_func().
|
inherited |
Definition at line 144 of file physics.C.
References GRINS::Physics::_bc_handler, and GRINS::BCHandlingBase::attach_neumann_bound_func().
|
virtualinherited |
Any auxillary initialization a Physics class may need.
This is called after all variables are added, so this method can safely query the MultiphysicsSystem about variable information.
|
virtualinherited |
Definition at line 185 of file physics.C.
Referenced by GRINS::MultiphysicsSystem::element_constraint().
|
virtualinherited |
Reimplemented in GRINS::LowMachNavierStokes< Viscosity, SpecificHeat, ThermalConductivity >, and GRINS::ReactingLowMachNavierStokes< Mixture, Evaluator >.
Definition at line 167 of file physics.C.
Referenced by GRINS::MultiphysicsSystem::element_time_derivative().
|
virtualinherited |
Definition at line 203 of file physics.C.
Referenced by GRINS::MultiphysicsSystem::mass_residual().
|
virtualinherited |
Definition at line 197 of file physics.C.
Referenced by GRINS::MultiphysicsSystem::nonlocal_constraint().
|
virtualinherited |
Definition at line 209 of file physics.C.
Referenced by GRINS::MultiphysicsSystem::nonlocal_mass_residual().
|
virtualinherited |
Definition at line 179 of file physics.C.
Referenced by GRINS::MultiphysicsSystem::nonlocal_time_derivative().
|
virtual |
Compute value of postprocessed quantities at libMesh::Point.
Reimplemented from GRINS::Physics.
Definition at line 575 of file inc_navier_stokes.C.
|
virtualinherited |
Definition at line 191 of file physics.C.
Referenced by GRINS::MultiphysicsSystem::side_constraint().
|
virtualinherited |
Reimplemented in GRINS::ReactingLowMachNavierStokes< Mixture, Evaluator >.
Definition at line 173 of file physics.C.
Referenced by GRINS::MultiphysicsSystem::side_time_derivative().
|
virtual |
Constraint part(s) of physics for element interiors.
Reimplemented from GRINS::Physics.
Definition at line 351 of file inc_navier_stokes.C.
|
virtual |
Time dependent part(s) of physics for element interiors.
Reimplemented from GRINS::Physics.
Definition at line 114 of file inc_navier_stokes.C.
|
virtualinherited |
Find if current physics is active on supplied element.
Definition at line 83 of file physics.C.
References GRINS::Physics::_enabled_subdomains.
|
inlineinherited |
|
inlineinherited |
|
inherited |
Definition at line 118 of file physics.C.
References GRINS::Physics::_bc_handler, GRINS::BCHandlingBase::init_bc_data(), GRINS::BCHandlingBase::init_dirichlet_bc_func_objs(), GRINS::BCHandlingBase::init_dirichlet_bcs(), and GRINS::BCHandlingBase::init_periodic_bcs().
|
virtualinherited |
Initialize context for added physics variables.
Reimplemented from GRINS::Physics.
Reimplemented in GRINS::AveragedTurbine< Viscosity >, GRINS::VelocityDrag< Viscosity >, GRINS::AveragedFan< Viscosity >, GRINS::ParsedVelocitySource< Viscosity >, GRINS::VelocityPenalty< Viscosity >, GRINS::AveragedTurbineAdjointStabilization< Viscosity >, GRINS::VelocityDragAdjointStabilization< Viscosity >, GRINS::AveragedFanAdjointStabilization< Viscosity >, GRINS::ParsedVelocitySourceAdjointStabilization< Viscosity >, GRINS::VelocityPenaltyAdjointStabilization< Viscosity >, and GRINS::IncompressibleNavierStokesStabilizationBase< Viscosity >.
Definition at line 91 of file inc_navier_stokes_base.C.
Referenced by GRINS::IncompressibleNavierStokesStabilizationBase< Viscosity >::init_context().
|
inherited |
Definition at line 133 of file physics.C.
References GRINS::Physics::_ic_handler, and GRINS::ICHandlingBase::init_ic_data().
|
virtualinherited |
Initialization of Navier-Stokes variables.
Add velocity and pressure variables to system.
Implements GRINS::Physics.
Reimplemented in GRINS::AveragedTurbineBase< Viscosity >, and GRINS::IncompressibleNavierStokesStabilizationBase< Viscosity >.
Definition at line 63 of file inc_navier_stokes_base.C.
Referenced by GRINS::IncompressibleNavierStokesStabilizationBase< Viscosity >::init_variables(), and GRINS::AveragedTurbineBase< Viscosity >::init_variables().
|
inherited |
Returns whether or not this physics is being solved with a steady solver.
Definition at line 103 of file physics.C.
References GRINS::Physics::_is_steady.
Referenced by GRINS::Physics::set_is_steady().
|
virtual |
Mass matrix part(s) for element interiors. All boundary terms lie within the time_derivative part.
Reimplemented from GRINS::Physics.
Definition at line 482 of file inc_navier_stokes.C.
|
virtualinherited |
Constraint part(s) of physics for scalar variables.
Reimplemented in GRINS::ScalarODE.
Definition at line 250 of file physics.C.
Referenced by GRINS::MultiphysicsSystem::nonlocal_constraint().
|
virtualinherited |
Mass matrix part(s) for scalar variables.
Reimplemented in GRINS::ScalarODE, and GRINS::AveragedTurbine< Viscosity >.
Definition at line 264 of file physics.C.
Referenced by GRINS::MultiphysicsSystem::nonlocal_mass_residual().
|
virtualinherited |
Time dependent part(s) of physics for scalar variables.
Reimplemented in GRINS::AveragedTurbine< Viscosity >, and GRINS::ScalarODE.
Definition at line 229 of file physics.C.
Referenced by GRINS::MultiphysicsSystem::nonlocal_time_derivative().
|
virtual |
Read options from GetPot input file.
Reimplemented from GRINS::Physics.
Definition at line 72 of file inc_navier_stokes.C.
References GRINS::incompressible_navier_stokes.
Referenced by GRINS::IncompressibleNavierStokes< Viscosity >::IncompressibleNavierStokes().
|
virtualinherited |
Each subclass will register its copy of an independent.
Reimplemented from GRINS::ParameterUser.
Definition at line 114 of file inc_navier_stokes_base.C.
References GRINS::ParameterUser::register_parameter().
|
virtual |
Register postprocessing variables for IncompressibleNavierStokes.
Reimplemented from GRINS::Physics.
Definition at line 83 of file inc_navier_stokes.C.
References GRINS::incompressible_navier_stokes, and GRINS::PostProcessedQuantities< NumericType >::register_quantity().
|
inherited |
Sets whether this physics is to be solved with a steady solver or not.
Since the member variable is static, only needs to be called on a single physics.
Definition at line 97 of file physics.C.
References GRINS::Physics::_is_steady, and GRINS::Physics::is_steady().
|
virtualinherited |
Each subclass can simultaneously read a parameter value from.
Definition at line 35 of file parameter_user.C.
References GRINS::ParameterUser::_my_name, and GRINS::ParameterUser::_my_parameters.
Referenced by GRINS::AveragedFanAdjointStabilization< Viscosity >::AveragedFanAdjointStabilization(), GRINS::AveragedTurbineAdjointStabilization< Viscosity >::AveragedTurbineAdjointStabilization(), GRINS::BoussinesqBuoyancyAdjointStabilization< Viscosity >::BoussinesqBuoyancyAdjointStabilization(), GRINS::BoussinesqBuoyancyBase::BoussinesqBuoyancyBase(), GRINS::BoussinesqBuoyancySPGSMStabilization< Viscosity >::BoussinesqBuoyancySPGSMStabilization(), GRINS::ConstantConductivity::ConstantConductivity(), GRINS::ConstantPrandtlConductivity::ConstantPrandtlConductivity(), GRINS::ConstantSourceFunction::ConstantSourceFunction(), GRINS::ConstantSourceTerm::ConstantSourceTerm(), GRINS::ConstantSpecificHeat::ConstantSpecificHeat(), GRINS::ConstantViscosity::ConstantViscosity(), GRINS::ElasticCable< StressStrainLaw >::ElasticCable(), GRINS::ElasticCableConstantGravity::ElasticCableConstantGravity(), GRINS::ElasticMembrane< StressStrainLaw >::ElasticMembrane(), GRINS::ElasticMembraneConstantPressure::ElasticMembraneConstantPressure(), GRINS::HeatConduction< Conductivity >::HeatConduction(), GRINS::HeatTransferBase< Conductivity >::HeatTransferBase(), GRINS::IncompressibleNavierStokesBase< Viscosity >::IncompressibleNavierStokesBase(), GRINS::AverageNusseltNumber::init(), GRINS::MooneyRivlin::MooneyRivlin(), GRINS::ReactingLowMachNavierStokesBase< Mixture, Evaluator >::ReactingLowMachNavierStokesBase(), GRINS::HookesLaw1D::read_input_options(), GRINS::HookesLaw::read_input_options(), GRINS::AxisymmetricBoussinesqBuoyancy::read_input_options(), and GRINS::VelocityDragAdjointStabilization< Viscosity >::VelocityDragAdjointStabilization().
|
virtualinherited |
Sets velocity variables to be time-evolving.
Reimplemented from GRINS::Physics.
Reimplemented in GRINS::AveragedTurbineBase< Viscosity >, and GRINS::ParsedVelocitySourceBase< Viscosity >.
Definition at line 75 of file inc_navier_stokes_base.C.
Referenced by GRINS::AveragedTurbineBase< Viscosity >::set_time_evolving_vars().
|
virtual |
Constraint part(s) of physics for boundaries of elements on the domain boundary.
Reimplemented from GRINS::Physics.
Definition at line 468 of file inc_navier_stokes.C.
|
virtualinherited |
Time dependent part(s) of physics for boundaries of elements on the domain boundary.
Reimplemented in GRINS::AxisymmetricHeatTransfer< Conductivity >, GRINS::LowMachNavierStokes< Viscosity, SpecificHeat, ThermalConductivity >, GRINS::HeatTransfer< Conductivity >, GRINS::ReactingLowMachNavierStokes< Mixture, Evaluator >, GRINS::ElasticCable< StressStrainLaw >, and GRINS::ElasticMembrane< StressStrainLaw >.
Definition at line 222 of file physics.C.
Referenced by GRINS::MultiphysicsSystem::side_time_derivative().
|
protectedinherited |
Definition at line 256 of file physics.h.
Referenced by GRINS::Physics::attach_dirichlet_bound_func(), GRINS::Physics::attach_neumann_bound_func(), GRINS::AxisymmetricHeatTransfer< Conductivity >::AxisymmetricHeatTransfer(), GRINS::ElasticCable< StressStrainLaw >::ElasticCable(), GRINS::ElasticMembrane< StressStrainLaw >::ElasticMembrane(), GRINS::Physics::get_bc_handler(), GRINS::HeatConduction< Conductivity >::HeatConduction(), GRINS::HeatTransfer< Conductivity >::HeatTransfer(), GRINS::IncompressibleNavierStokes< Viscosity >::IncompressibleNavierStokes(), GRINS::Physics::init_bcs(), GRINS::LowMachNavierStokes< Viscosity, SpecificHeat, ThermalConductivity >::LowMachNavierStokes(), GRINS::ReactingLowMachNavierStokes< Mixture, Evaluator >::ReactingLowMachNavierStokes(), GRINS::SpalartAllmaras< Viscosity >::SpalartAllmaras(), GRINS::Stokes< Viscosity >::Stokes(), and GRINS::Physics::~Physics().
|
protectedinherited |
Physical dimension of problem.
Definition at line 79 of file inc_navier_stokes_base.h.
|
protectedinherited |
Subdomains on which the current Physics class is enabled.
Definition at line 261 of file physics.h.
Referenced by GRINS::Physics::enabled_on_elem(), and GRINS::Physics::read_input_options().
|
protectedinherited |
Definition at line 81 of file inc_navier_stokes_base.h.
|
protectedinherited |
Definition at line 258 of file physics.h.
Referenced by GRINS::AveragedTurbine< Viscosity >::AveragedTurbine(), GRINS::AxisymmetricHeatTransfer< Conductivity >::AxisymmetricHeatTransfer(), GRINS::ElasticCable< StressStrainLaw >::ElasticCable(), GRINS::ElasticMembrane< StressStrainLaw >::ElasticMembrane(), GRINS::Physics::get_ic_handler(), GRINS::HeatConduction< Conductivity >::HeatConduction(), GRINS::HeatTransfer< Conductivity >::HeatTransfer(), GRINS::IncompressibleNavierStokes< Viscosity >::IncompressibleNavierStokes(), GRINS::Physics::init_ics(), GRINS::LowMachNavierStokes< Viscosity, SpecificHeat, ThermalConductivity >::LowMachNavierStokes(), GRINS::ReactingLowMachNavierStokes< Mixture, Evaluator >::ReactingLowMachNavierStokes(), GRINS::ScalarODE::ScalarODE(), GRINS::SpalartAllmaras< Viscosity >::SpalartAllmaras(), GRINS::Stokes< Viscosity >::Stokes(), and GRINS::Physics::~Physics().
|
protectedinherited |
Definition at line 268 of file physics.h.
Referenced by GRINS::HeatTransfer< Conductivity >::HeatTransfer(), GRINS::IncompressibleNavierStokes< Viscosity >::IncompressibleNavierStokes(), GRINS::Physics::Physics(), and GRINS::ReactingLowMachNavierStokes< Mixture, Evaluator >::ReactingLowMachNavierStokes().
|
staticprotectedinherited |
Caches whether or not the solver that's being used is steady or not.
This is need, for example, in flow stabilization as the tau terms change depending on whether the solver is steady or unsteady.
Definition at line 266 of file physics.h.
Referenced by GRINS::Physics::is_steady(), and GRINS::Physics::set_is_steady().
|
protectedinherited |
Viscosity object.
Definition at line 88 of file inc_navier_stokes_base.h.
|
protected |
Index from registering this quantity.
Definition at line 95 of file inc_navier_stokes.h.
|
protected |
Definition at line 89 of file inc_navier_stokes.h.
|
protectedinherited |
Name of the physics object. Used for reading physics specific inputs.
We use a reference because the physics names are const global objects in GRINS namespace
No, we use a copy, because otherwise as soon as the memory in std::set<std::string> requested_physics gets overwritten we get in trouble.
Definition at line 254 of file physics.h.
Referenced by GRINS::SourceTermBase::parse_var_info(), and GRINS::Physics::read_input_options().
|
protected |
Enable pressure pinning.
Definition at line 92 of file inc_navier_stokes.h.
|
protectedinherited |
Material parameters, read from input.
Definition at line 85 of file inc_navier_stokes_base.h.
Referenced by GRINS::IncompressibleNavierStokesBase< Viscosity >::IncompressibleNavierStokesBase().