GRINS-0.6.0
Public Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | List of all members
GRINS::IncompressibleNavierStokesAdjointStabilization< Viscosity > Class Template Reference

Adds VMS-based stabilization to LowMachNavierStokes physics class. More...

#include <inc_navier_stokes_adjoint_stab.h>

Inheritance diagram for GRINS::IncompressibleNavierStokesAdjointStabilization< Viscosity >:
Inheritance graph
[legend]
Collaboration diagram for GRINS::IncompressibleNavierStokesAdjointStabilization< Viscosity >:
Collaboration graph
[legend]

Public Member Functions

 IncompressibleNavierStokesAdjointStabilization (const GRINS::PhysicsName &physics_name, const GetPot &input)
 
virtual ~IncompressibleNavierStokesAdjointStabilization ()
 
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 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 init_context (AssemblyContext &context)
 Initialize context for added physics variables. 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 register_parameter (const std::string &param_name, libMesh::ParameterMultiPointer< libMesh::Number > &param_pointer) const
 Each subclass will register its copy of an independent. More...
 
virtual void read_input_options (const GetPot &input)
 Read options from GetPot input file. By default, nothing is read. 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 register_postprocessing_vars (const GetPot &input, PostProcessedQuantities< libMesh::Real > &postprocessing)
 Register name of postprocessed quantity with PostProcessedQuantities. 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 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 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)
 
virtual void compute_postprocessed_quantity (unsigned int quantity_index, const AssemblyContext &context, const libMesh::Point &point, libMesh::Real &value)
 
BCHandlingBaseget_bc_handler ()
 
ICHandlingBaseget_ic_handler ()
 
virtual void set_parameter (libMesh::Number &param_variable, const GetPot &input, const std::string &param_name, libMesh::Number param_default)
 Each subclass can simultaneously read a parameter value from. More...
 

Protected Attributes

IncompressibleNavierStokesStabilizationHelper _stab_helper
 
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

 IncompressibleNavierStokesAdjointStabilization ()
 

Detailed Description

template<class Viscosity>
class GRINS::IncompressibleNavierStokesAdjointStabilization< Viscosity >

Adds VMS-based stabilization to LowMachNavierStokes physics class.

Definition at line 35 of file inc_navier_stokes_adjoint_stab.h.

Constructor & Destructor Documentation

template<class Mu >
GRINS::IncompressibleNavierStokesAdjointStabilization< Mu >::IncompressibleNavierStokesAdjointStabilization ( const GRINS::PhysicsName physics_name,
const GetPot &  input 
)

Definition at line 40 of file inc_navier_stokes_adjoint_stab.C.

References GRINS::Physics::read_input_options().

42  : IncompressibleNavierStokesStabilizationBase<Mu>(physics_name,input)
43  {
44  this->read_input_options(input);
45 
46  return;
47  }
virtual void read_input_options(const GetPot &input)
Read options from GetPot input file. By default, nothing is read.
Definition: physics.C:70

Definition at line 50 of file inc_navier_stokes_adjoint_stab.C.

51  {
52  return;
53  }

Member Function Documentation

void GRINS::Physics::attach_dirichlet_bound_func ( const GRINS::DBCContainer dirichlet_bc)
inherited

Definition at line 150 of file physics.C.

References GRINS::Physics::_bc_handler, and GRINS::BCHandlingBase::attach_dirichlet_bound_func().

151  {
152  _bc_handler->attach_dirichlet_bound_func( dirichlet_bc );
153  return;
154  }
GRINS::BCHandlingBase * _bc_handler
Definition: physics.h:256
void attach_dirichlet_bound_func(const GRINS::DBCContainer &dirichlet_bc)
void GRINS::Physics::attach_neumann_bound_func ( GRINS::NBCContainer neumann_bcs)
inherited

Definition at line 144 of file physics.C.

References GRINS::Physics::_bc_handler, and GRINS::BCHandlingBase::attach_neumann_bound_func().

145  {
146  _bc_handler->attach_neumann_bound_func( neumann_bcs );
147  return;
148  }
GRINS::BCHandlingBase * _bc_handler
Definition: physics.h:256
void attach_neumann_bound_func(GRINS::NBCContainer &neumann_bcs)
void GRINS::Physics::auxiliary_init ( MultiphysicsSystem system)
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.

Definition at line 113 of file physics.C.

114  {
115  return;
116  }
void GRINS::Physics::compute_element_constraint_cache ( const AssemblyContext context,
CachedValues cache 
)
virtualinherited

Definition at line 185 of file physics.C.

Referenced by GRINS::MultiphysicsSystem::element_constraint().

187  {
188  return;
189  }
void GRINS::Physics::compute_element_time_derivative_cache ( const AssemblyContext context,
CachedValues cache 
)
virtualinherited
void GRINS::Physics::compute_mass_residual_cache ( const AssemblyContext context,
CachedValues cache 
)
virtualinherited

Definition at line 203 of file physics.C.

Referenced by GRINS::MultiphysicsSystem::mass_residual().

205  {
206  return;
207  }
void GRINS::Physics::compute_nonlocal_constraint_cache ( const AssemblyContext context,
CachedValues cache 
)
virtualinherited

Definition at line 197 of file physics.C.

Referenced by GRINS::MultiphysicsSystem::nonlocal_constraint().

199  {
200  return;
201  }
void GRINS::Physics::compute_nonlocal_mass_residual_cache ( const AssemblyContext context,
CachedValues cache 
)
virtualinherited

Definition at line 209 of file physics.C.

Referenced by GRINS::MultiphysicsSystem::nonlocal_mass_residual().

211  {
212  return;
213  }
void GRINS::Physics::compute_nonlocal_time_derivative_cache ( const AssemblyContext context,
CachedValues cache 
)
virtualinherited

Definition at line 179 of file physics.C.

Referenced by GRINS::MultiphysicsSystem::nonlocal_time_derivative().

181  {
182  return;
183  }
void GRINS::Physics::compute_postprocessed_quantity ( unsigned int  quantity_index,
const AssemblyContext context,
const libMesh::Point &  point,
libMesh::Real &  value 
)
virtualinherited
void GRINS::Physics::compute_side_constraint_cache ( const AssemblyContext context,
CachedValues cache 
)
virtualinherited

Definition at line 191 of file physics.C.

Referenced by GRINS::MultiphysicsSystem::side_constraint().

193  {
194  return;
195  }
void GRINS::Physics::compute_side_time_derivative_cache ( const AssemblyContext context,
CachedValues cache 
)
virtualinherited

Reimplemented in GRINS::ReactingLowMachNavierStokes< Mixture, Evaluator >.

Definition at line 173 of file physics.C.

Referenced by GRINS::MultiphysicsSystem::side_time_derivative().

175  {
176  return;
177  }
template<class Mu >
void GRINS::IncompressibleNavierStokesAdjointStabilization< Mu >::element_constraint ( bool  compute_jacobian,
AssemblyContext context,
CachedValues cache 
)
virtual

Constraint part(s) of physics for element interiors.

Reimplemented from GRINS::Physics.

Definition at line 386 of file inc_navier_stokes_adjoint_stab.C.

389  {
390 #ifdef GRINS_USE_GRVY_TIMERS
391  this->_timer->BeginTimer("IncompressibleNavierStokesAdjointStabilization::element_constraint");
392 #endif
393 
394  // The number of local degrees of freedom in each variable.
395  const unsigned int n_p_dofs = context.get_dof_indices(this->_flow_vars.p_var()).size();
396  const unsigned int n_u_dofs = context.get_dof_indices(this->_flow_vars.u_var()).size();
397 
398  // Element Jacobian * quadrature weights for interior integration.
399  const std::vector<libMesh::Real> &JxW =
400  context.get_element_fe(this->_flow_vars.u_var())->get_JxW();
401 
402  // The pressure shape functions at interior quadrature points.
403  const std::vector<std::vector<libMesh::RealGradient> >& p_dphi =
404  context.get_element_fe(this->_flow_vars.p_var())->get_dphi();
405 
406  // The velocity shape functions at interior quadrature points.
407  const std::vector<std::vector<libMesh::Real> >& u_phi =
408  context.get_element_fe(this->_flow_vars.u_var())->get_phi();
409 
410  const std::vector<std::vector<libMesh::RealGradient> >& u_dphi =
411  context.get_element_fe(this->_flow_vars.u_var())->get_dphi();
412 
413  const std::vector<std::vector<libMesh::RealTensor> >& u_d2phi =
414  context.get_element_fe(this->_flow_vars.u_var())->get_d2phi();
415 
416  libMesh::DenseSubVector<libMesh::Number> &Fp = context.get_elem_residual(this->_flow_vars.p_var()); // R_{p}
417 
418  libMesh::DenseSubMatrix<libMesh::Number> &Kpp =
419  context.get_elem_jacobian(this->_flow_vars.p_var(), this->_flow_vars.p_var()); // J_{pp}
420  libMesh::DenseSubMatrix<libMesh::Number> &Kpu =
421  context.get_elem_jacobian(this->_flow_vars.p_var(), this->_flow_vars.u_var()); // J_{pu}
422  libMesh::DenseSubMatrix<libMesh::Number> &Kpv =
423  context.get_elem_jacobian(this->_flow_vars.p_var(), this->_flow_vars.v_var()); // J_{pv}
424  libMesh::DenseSubMatrix<libMesh::Number> *Kpw = NULL;
425 
426  if(this->_dim == 3)
427  {
428  Kpw = &context.get_elem_jacobian
429  (this->_flow_vars.p_var(), this->_flow_vars.w_var()); // J_{pw}
430  }
431 
432  unsigned int n_qpoints = context.get_element_qrule().n_points();
433 
434  libMesh::FEBase* fe = context.get_element_fe(this->_flow_vars.u_var());
435 
436  for (unsigned int qp=0; qp != n_qpoints; qp++)
437  {
438  libMesh::RealGradient g = this->_stab_helper.compute_g( fe, context, qp );
439  libMesh::RealTensor G = this->_stab_helper.compute_G( fe, context, qp );
440 
441  libMesh::RealGradient U( context.interior_value( this->_flow_vars.u_var(), qp ),
442  context.interior_value( this->_flow_vars.v_var(), qp ) );
443  if( this->_dim == 3 )
444  {
445  U(2) = context.interior_value( this->_flow_vars.w_var(), qp );
446  }
447 
448  libMesh::Real tau_M;
449  libMesh::Real d_tau_M_d_rho;
450  libMesh::Gradient d_tau_M_dU;
451  libMesh::Gradient RM_s, d_RM_s_uvw_dgraduvw;
452  libMesh::Tensor d_RM_s_dgradp, d_RM_s_dU, d_RM_s_uvw_dhessuvw;
453 
454  // Compute the viscosity at this qp
455  libMesh::Real _mu_qp = this->_mu(context, qp);
456 
457  if (compute_jacobian)
458  {
460  ( context, qp, g, G, this->_rho, U, _mu_qp,
461  tau_M, d_tau_M_d_rho, d_tau_M_dU,
462  this->_is_steady );
464  ( context, qp, this->_rho, _mu_qp,
465  RM_s, d_RM_s_dgradp, d_RM_s_dU, d_RM_s_uvw_dgraduvw,
466  d_RM_s_uvw_dhessuvw);
467  }
468  else
469  {
470  tau_M = this->_stab_helper.compute_tau_momentum( context, qp, g, G, this->_rho, U, _mu_qp, this->_is_steady );
471  RM_s = this->_stab_helper.compute_res_momentum_steady( context, qp, this->_rho, _mu_qp );
472  }
473 
474  // Now a loop over the pressure degrees of freedom. This
475  // computes the contributions of the continuity equation.
476  for (unsigned int i=0; i != n_p_dofs; i++)
477  {
478  Fp(i) += tau_M*(RM_s*p_dphi[i][qp])*JxW[qp];
479 
480  if (compute_jacobian)
481  {
482  const libMesh::Real fixed_deriv =
483  context.get_fixed_solution_derivative();
484 
485  const libMesh::TypeVector<libMesh::Number>
486  p_dphiiT_d_RM_s_dgradp =
487  d_RM_s_dgradp.transpose() * p_dphi[i][qp];
488 
489  for (unsigned int j=0; j != n_p_dofs; j++)
490  {
491  Kpp(i,j) += tau_M*(p_dphiiT_d_RM_s_dgradp*p_dphi[j][qp])*JxW[qp];
492  }
493 
494  for (unsigned int j=0; j != n_u_dofs; j++)
495  {
496  Kpu(i,j) += (
497  d_tau_M_dU(0)*u_phi[j][qp]*(RM_s*p_dphi[i][qp])
498  + tau_M*
499  (
500  d_RM_s_dU(0,0)*u_phi[j][qp]*p_dphi[i][qp](0) +
501  d_RM_s_dU(1,0)*u_phi[j][qp]*p_dphi[i][qp](1) +
502  d_RM_s_dU(2,0)*u_phi[j][qp]*p_dphi[i][qp](2) +
503  d_RM_s_uvw_dgraduvw*u_dphi[j][qp]*p_dphi[i][qp](0) +
504  d_RM_s_uvw_dhessuvw.contract(u_d2phi[j][qp])*p_dphi[i][qp](0)
505  )*fixed_deriv
506  )*JxW[qp];
507  Kpv(i,j) += (
508  d_tau_M_dU(1)*u_phi[j][qp]*(RM_s*p_dphi[i][qp])
509  + tau_M*
510  (
511  d_RM_s_dU(0,1)*u_phi[j][qp]*p_dphi[i][qp](0) +
512  d_RM_s_dU(1,1)*u_phi[j][qp]*p_dphi[i][qp](1) +
513  d_RM_s_dU(2,1)*u_phi[j][qp]*p_dphi[i][qp](2) +
514  d_RM_s_uvw_dgraduvw*u_dphi[j][qp]*p_dphi[i][qp](1) +
515  d_RM_s_uvw_dhessuvw.contract(u_d2phi[j][qp])*p_dphi[i][qp](0)
516  )*fixed_deriv
517  )*JxW[qp];
518  }
519 
520  if(this->_dim == 3)
521  {
522  for (unsigned int j=0; j != n_u_dofs; j++)
523  {
524  (*Kpw)(i,j) += (
525  d_tau_M_dU(2)*u_phi[j][qp]*(RM_s*p_dphi[i][qp])
526  + tau_M*
527  (
528  d_RM_s_dU(0,2)*u_phi[j][qp]*p_dphi[i][qp](0) +
529  d_RM_s_dU(1,2)*u_phi[j][qp]*p_dphi[i][qp](1) +
530  d_RM_s_dU(2,2)*u_phi[j][qp]*p_dphi[i][qp](2) +
531  d_RM_s_uvw_dgraduvw*u_dphi[j][qp]*p_dphi[i][qp](2) +
532  d_RM_s_uvw_dhessuvw.contract(u_d2phi[j][qp])*p_dphi[i][qp](0)
533  )*fixed_deriv
534  )*JxW[qp];
535  }
536  }
537  }
538  }
539  }
540 
541 #ifdef GRINS_USE_GRVY_TIMERS
542  this->_timer->EndTimer("IncompressibleNavierStokesAdjointStabilization::element_constraint");
543 #endif
544 
545  return;
546  }
void compute_tau_momentum_and_derivs(AssemblyContext &c, unsigned int qp, libMesh::RealGradient &g, libMesh::RealTensor &G, libMesh::Real rho, libMesh::Gradient U, libMesh::Real T, libMesh::Real &tau_M, libMesh::Real &d_tau_M_d_rho, libMesh::Gradient &d_tau_M_d_U, bool is_steady) const
libMesh::RealTensor compute_G(libMesh::FEBase *fe, AssemblyContext &c, unsigned int qp) const
Definition: stab_helper.C:64
libMesh::RealGradient compute_res_momentum_steady(AssemblyContext &context, unsigned int qp, const libMesh::Real rho, const libMesh::Real mu) const
libMesh::Number _rho
Material parameters, read from input.
unsigned int _dim
Physical dimension of problem.
IncompressibleNavierStokesStabilizationHelper _stab_helper
libMesh::RealGradient compute_g(libMesh::FEBase *fe, AssemblyContext &c, unsigned int qp) const
Definition: stab_helper.C:47
static bool _is_steady
Caches whether or not the solver that's being used is steady or not.
Definition: physics.h:266
void compute_res_momentum_steady_and_derivs(AssemblyContext &context, unsigned int qp, const libMesh::Real rho, const libMesh::Real mu, libMesh::Gradient &res_M, libMesh::Tensor &d_res_M_dgradp, libMesh::Tensor &d_res_M_dU, libMesh::Gradient &d_res_Muvw_dgraduvw, libMesh::Tensor &d_res_Muvw_dhessuvw) const
libMesh::Real compute_tau_momentum(AssemblyContext &c, unsigned int qp, libMesh::RealGradient &g, libMesh::RealTensor &G, libMesh::Real rho, libMesh::Gradient U, libMesh::Real mu, bool is_steady) const
template<class Mu >
void GRINS::IncompressibleNavierStokesAdjointStabilization< Mu >::element_time_derivative ( bool  compute_jacobian,
AssemblyContext context,
CachedValues cache 
)
virtual

Time dependent part(s) of physics for element interiors.

Reimplemented from GRINS::Physics.

Definition at line 56 of file inc_navier_stokes_adjoint_stab.C.

59  {
60 #ifdef GRINS_USE_GRVY_TIMERS
61  this->_timer->BeginTimer("IncompressibleNavierStokesAdjointStabilization::element_time_derivative");
62 #endif
63 
64  // The number of local degrees of freedom in each variable.
65  const unsigned int n_p_dofs = context.get_dof_indices(this->_flow_vars.p_var()).size();
66  const unsigned int n_u_dofs = context.get_dof_indices(this->_flow_vars.u_var()).size();
67 
68  // Element Jacobian * quadrature weights for interior integration.
69  const std::vector<libMesh::Real> &JxW =
70  context.get_element_fe(this->_flow_vars.u_var())->get_JxW();
71 
72  const std::vector<std::vector<libMesh::RealGradient> >& p_gradphi =
73  context.get_element_fe(this->_flow_vars.p_var())->get_dphi();
74 
75  const std::vector<std::vector<libMesh::Real> >& u_phi =
76  context.get_element_fe(this->_flow_vars.u_var())->get_phi();
77 
78  const std::vector<std::vector<libMesh::RealGradient> >& u_gradphi =
79  context.get_element_fe(this->_flow_vars.u_var())->get_dphi();
80 
81  const std::vector<std::vector<libMesh::RealTensor> >& u_hessphi =
82  context.get_element_fe(this->_flow_vars.u_var())->get_d2phi();
83 
84  libMesh::DenseSubVector<libMesh::Number> &Fu = context.get_elem_residual(this->_flow_vars.u_var()); // R_{p}
85  libMesh::DenseSubVector<libMesh::Number> &Fv = context.get_elem_residual(this->_flow_vars.v_var()); // R_{p}
86  libMesh::DenseSubMatrix<libMesh::Number> &Kup =
87  context.get_elem_jacobian(this->_flow_vars.u_var(), this->_flow_vars.p_var()); // J_{up}
88  libMesh::DenseSubMatrix<libMesh::Number> &Kuu =
89  context.get_elem_jacobian(this->_flow_vars.u_var(), this->_flow_vars.u_var()); // J_{uu}
90  libMesh::DenseSubMatrix<libMesh::Number> &Kuv =
91  context.get_elem_jacobian(this->_flow_vars.u_var(), this->_flow_vars.v_var()); // J_{uv}
92  libMesh::DenseSubMatrix<libMesh::Number> &Kvp =
93  context.get_elem_jacobian(this->_flow_vars.v_var(), this->_flow_vars.p_var()); // J_{vp}
94  libMesh::DenseSubMatrix<libMesh::Number> &Kvu =
95  context.get_elem_jacobian(this->_flow_vars.v_var(), this->_flow_vars.u_var()); // J_{vu}
96  libMesh::DenseSubMatrix<libMesh::Number> &Kvv =
97  context.get_elem_jacobian(this->_flow_vars.v_var(), this->_flow_vars.v_var()); // J_{vv}
98 
99  libMesh::DenseSubVector<libMesh::Number> *Fw = NULL;
100  libMesh::DenseSubMatrix<libMesh::Number> *Kuw = NULL;
101  libMesh::DenseSubMatrix<libMesh::Number> *Kvw = NULL;
102  libMesh::DenseSubMatrix<libMesh::Number> *Kwp = NULL;
103  libMesh::DenseSubMatrix<libMesh::Number> *Kwu = NULL;
104  libMesh::DenseSubMatrix<libMesh::Number> *Kwv = NULL;
105  libMesh::DenseSubMatrix<libMesh::Number> *Kww = NULL;
106 
107  if(this->_dim == 3)
108  {
109  Fw = &context.get_elem_residual(this->_flow_vars.w_var()); // R_{w}
110  Kuw = &context.get_elem_jacobian
111  (this->_flow_vars.u_var(), this->_flow_vars.w_var()); // J_{uw}
112  Kvw = &context.get_elem_jacobian
113  (this->_flow_vars.v_var(), this->_flow_vars.w_var()); // J_{vw}
114  Kwp = &context.get_elem_jacobian
115  (this->_flow_vars.w_var(), this->_flow_vars.p_var()); // J_{wp}
116  Kwu = &context.get_elem_jacobian
117  (this->_flow_vars.w_var(), this->_flow_vars.u_var()); // J_{wu}
118  Kwv = &context.get_elem_jacobian
119  (this->_flow_vars.w_var(), this->_flow_vars.v_var()); // J_{wv}
120  Kww = &context.get_elem_jacobian
121  (this->_flow_vars.w_var(), this->_flow_vars.w_var()); // J_{ww}
122  }
123 
124  unsigned int n_qpoints = context.get_element_qrule().n_points();
125 
126  libMesh::FEBase* fe = context.get_element_fe(this->_flow_vars.u_var());
127 
128  for (unsigned int qp=0; qp != n_qpoints; qp++)
129  {
130  libMesh::RealGradient g = this->_stab_helper.compute_g( fe, context, qp );
131  libMesh::RealTensor G = this->_stab_helper.compute_G( fe, context, qp );
132 
133  libMesh::RealGradient U( context.interior_value( this->_flow_vars.u_var(), qp ),
134  context.interior_value( this->_flow_vars.v_var(), qp ) );
135  if( this->_dim == 3 )
136  {
137  U(2) = context.interior_value( this->_flow_vars.w_var(), qp );
138  }
139 
140  /*
141  libMesh::Gradient grad_u, grad_v, grad_w;
142  grad_u = context.interior_gradient(this->_flow_vars.u_var(), qp);
143  grad_v = context.interior_gradient(this->_flow_vars.v_var(), qp);
144  if (_dim == 3)
145  grad_w = context.interior_gradient(this->_flow_vars.w_var(), qp);
146  */
147 
148  libMesh::Real tau_M, tau_C;
149  libMesh::Real d_tau_M_d_rho, d_tau_C_d_rho;
150  libMesh::Gradient d_tau_M_dU, d_tau_C_dU;
151  libMesh::Gradient RM_s, d_RM_s_uvw_dgraduvw;
152  libMesh::Real RC;
153  libMesh::Tensor d_RC_dgradU,
154  d_RM_s_dgradp, d_RM_s_dU, d_RM_s_uvw_dhessuvw;
155 
156  // Compute the viscosity at this qp
157  libMesh::Real _mu_qp = this->_mu(context, qp);
158 
159  if (compute_jacobian)
160  {
162  ( context, qp, g, G, this->_rho, U, _mu_qp,
163  tau_M, d_tau_M_d_rho, d_tau_M_dU,
164  this->_is_steady );
166  ( tau_M, d_tau_M_d_rho, d_tau_M_dU,
167  g,
168  tau_C, d_tau_C_d_rho, d_tau_C_dU );
170  ( context, qp, this->_rho, _mu_qp,
171  RM_s, d_RM_s_dgradp, d_RM_s_dU, d_RM_s_uvw_dgraduvw,
172  d_RM_s_uvw_dhessuvw);
174  ( context, qp, RC, d_RC_dgradU );
175  }
176  else
177  {
178  tau_M = this->_stab_helper.compute_tau_momentum( context, qp, g, G, this->_rho, U, _mu_qp, this->_is_steady );
179  tau_C = this->_stab_helper.compute_tau_continuity( tau_M, g );
180  RM_s = this->_stab_helper.compute_res_momentum_steady( context, qp, this->_rho, _mu_qp );
181  RC = this->_stab_helper.compute_res_continuity( context, qp );
182  }
183 
184  for (unsigned int i=0; i != n_u_dofs; i++)
185  {
186  libMesh::Real test_func = this->_rho*U*u_gradphi[i][qp] +
187  _mu_qp*( u_hessphi[i][qp](0,0) + u_hessphi[i][qp](1,1) + u_hessphi[i][qp](2,2) );
188  libMesh::Gradient d_test_func_dU = this->_rho*u_gradphi[i][qp];
189 
190  //libMesh::RealGradient zeroth_order_term = - this->_rho*u_phi[i][qp]*(grad_u + grad_v + grad_w);
191 
192  Fu(i) += ( -tau_M*RM_s(0)*test_func - tau_C*RC*u_gradphi[i][qp](0) )*JxW[qp];
193 
194  Fv(i) += ( -tau_M*RM_s(1)*test_func - tau_C*RC*u_gradphi[i][qp](1) )*JxW[qp];
195 
196  if(this->_dim == 3)
197  {
198  (*Fw)(i) += ( -tau_M*RM_s(2)*test_func - tau_C*RC*u_gradphi[i][qp](2) )*JxW[qp];
199  }
200 
201  if (compute_jacobian)
202  {
203  const libMesh::Real fixed_deriv =
204  context.get_fixed_solution_derivative();
205  for (unsigned int j=0; j != n_p_dofs; j++)
206  {
207  Kup(i,j) += ( -tau_M*
208  ( d_RM_s_dgradp(0,0) *
209  p_gradphi[j][qp](0) +
210  d_RM_s_dgradp(0,1) *
211  p_gradphi[j][qp](1) +
212  d_RM_s_dgradp(0,2) *
213  p_gradphi[j][qp](2)
214  )*test_func)*fixed_deriv*JxW[qp];
215  Kvp(i,j) += ( -tau_M*
216  ( d_RM_s_dgradp(1,0) *
217  p_gradphi[j][qp](0) +
218  d_RM_s_dgradp(1,1) *
219  p_gradphi[j][qp](1) +
220  d_RM_s_dgradp(1,2) *
221  p_gradphi[j][qp](2)
222  )*test_func)*fixed_deriv*JxW[qp];
223  }
224  for (unsigned int j=0; j != n_u_dofs; j++)
225  {
226  Kuu(i,j) += ( -d_tau_M_dU(0)*RM_s(0)*test_func
227  -tau_M*d_RM_s_dU(0,0)*test_func
228  - d_tau_C_dU(0)*RC*u_gradphi[i][qp](0)
229  )*fixed_deriv*u_phi[j][qp]*JxW[qp];
230  Kuu(i,j) += ( -tau_M*RM_s(0)*d_test_func_dU(0)
231  )*u_phi[j][qp]*JxW[qp];
232  Kuu(i,j) += ( - tau_C*
233  (
234  d_RC_dgradU(0,0)*u_gradphi[j][qp](0) +
235  d_RC_dgradU(0,1)*u_gradphi[j][qp](1) +
236  d_RC_dgradU(0,2)*u_gradphi[j][qp](2)
237  )
238  *fixed_deriv*u_gradphi[i][qp](0)
239  )*JxW[qp];
240  Kuu(i,j) += ( -tau_M*test_func*(d_RM_s_uvw_dgraduvw*u_gradphi[j][qp])
241  )*fixed_deriv*JxW[qp];
242  Kuu(i,j) += ( -tau_M*test_func*(d_RM_s_uvw_dhessuvw.contract(u_hessphi[j][qp]))
243  )*fixed_deriv*JxW[qp];
244  Kuv(i,j) += ( -d_tau_M_dU(1)*RM_s(0)*test_func
245  -tau_M*d_RM_s_dU(0,1)*test_func
246  )*fixed_deriv*u_phi[j][qp]*JxW[qp];
247  Kuv(i,j) += ( -tau_M*RM_s(0)*d_test_func_dU(1)
248  )*u_phi[j][qp]*JxW[qp];
249  Kuv(i,j) += ( - tau_C*
250  (
251  d_RC_dgradU(1,0)*u_gradphi[j][qp](0) +
252  d_RC_dgradU(1,1)*u_gradphi[j][qp](1) +
253  d_RC_dgradU(1,2)*u_gradphi[j][qp](2)
254  )
255  *fixed_deriv*u_gradphi[i][qp](0)
256  )*JxW[qp];
257  Kvu(i,j) += ( -d_tau_M_dU(0)*RM_s(1)*test_func
258  -tau_M*d_RM_s_dU(1,0)*test_func
259  )*fixed_deriv*u_phi[j][qp]*JxW[qp];
260  Kvu(i,j) += ( -tau_M*RM_s(1)*d_test_func_dU(0)
261  )*u_phi[j][qp]*JxW[qp];
262  Kvu(i,j) += ( - tau_C*
263  (
264  d_RC_dgradU(0,0)*u_gradphi[j][qp](0) +
265  d_RC_dgradU(0,1)*u_gradphi[j][qp](1) +
266  d_RC_dgradU(0,2)*u_gradphi[j][qp](2)
267  )
268  *fixed_deriv*u_gradphi[i][qp](1)
269  )*JxW[qp];
270  Kvv(i,j) += ( -d_tau_M_dU(1)*RM_s(1)*test_func
271  -tau_M*d_RM_s_dU(1,1)*test_func
272  )*fixed_deriv*u_phi[j][qp]*JxW[qp];
273  Kvv(i,j) += ( -tau_M*RM_s(1)*d_test_func_dU(1)
274  )*u_phi[j][qp]*JxW[qp];
275  Kvv(i,j) += ( - tau_C*
276  (
277  d_RC_dgradU(1,0)*u_gradphi[j][qp](0) +
278  d_RC_dgradU(1,1)*u_gradphi[j][qp](1) +
279  d_RC_dgradU(1,2)*u_gradphi[j][qp](2)
280  )
281  *fixed_deriv*u_gradphi[i][qp](1)
282  )*JxW[qp];
283  Kvv(i,j) += ( -tau_M*test_func*(d_RM_s_uvw_dgraduvw*u_gradphi[j][qp])
284  )*fixed_deriv*JxW[qp];
285  Kvv(i,j) += ( -tau_M*test_func*(d_RM_s_uvw_dhessuvw.contract(u_hessphi[j][qp]))
286  )*fixed_deriv*JxW[qp];
287  }
288  if(this->_dim == 3)
289  {
290  for (unsigned int j=0; j != n_p_dofs; j++)
291  {
292  (*Kwp)(i,j) += ( -tau_M*
293  ( d_RM_s_dgradp(2,0) *
294  p_gradphi[j][qp](0) +
295  d_RM_s_dgradp(2,1) *
296  p_gradphi[j][qp](1) +
297  d_RM_s_dgradp(2,2) *
298  p_gradphi[j][qp](2)
299  )*test_func)*fixed_deriv*JxW[qp];
300  }
301  for (unsigned int j=0; j != n_u_dofs; j++)
302  {
303  (*Kuw)(i,j) += ( -d_tau_M_dU(2)*RM_s(0)*test_func
304  -tau_M*d_RM_s_dU(0,2)*test_func
305  )*fixed_deriv*u_phi[j][qp]*JxW[qp];
306  (*Kuw)(i,j) += ( -tau_M*RM_s(0)*d_test_func_dU(2)
307  )*u_phi[j][qp]*JxW[qp];
308  (*Kuw)(i,j) += ( - tau_C*
309  (
310  d_RC_dgradU(2,0)*u_gradphi[j][qp](0) +
311  d_RC_dgradU(2,1)*u_gradphi[j][qp](1) +
312  d_RC_dgradU(2,2)*u_gradphi[j][qp](2)
313  )
314  *fixed_deriv* u_gradphi[i][qp](0)
315  )*JxW[qp];
316  (*Kvw)(i,j) += ( -d_tau_M_dU(2)*RM_s(1)*test_func
317  -tau_M*d_RM_s_dU(1,2)*test_func
318  )*fixed_deriv*u_phi[j][qp]*JxW[qp];
319  (*Kvw)(i,j) += ( -tau_M*RM_s(1)*d_test_func_dU(2)
320  )*u_phi[j][qp]*JxW[qp];
321  (*Kvw)(i,j) += ( - tau_C*
322  (
323  d_RC_dgradU(2,0)*u_gradphi[j][qp](0) +
324  d_RC_dgradU(2,1)*u_gradphi[j][qp](1) +
325  d_RC_dgradU(2,2)*u_gradphi[j][qp](2)
326  )
327  *fixed_deriv* u_gradphi[i][qp](1)
328  )*JxW[qp];
329  (*Kwu)(i,j) += ( -d_tau_M_dU(0)*RM_s(2)*test_func
330  -tau_M*d_RM_s_dU(2,0)*test_func
331  )*fixed_deriv*u_phi[j][qp]*JxW[qp];
332  (*Kwu)(i,j) += ( -tau_M*RM_s(2)*d_test_func_dU(0)
333  )*u_phi[j][qp]*JxW[qp];
334  (*Kwu)(i,j) += ( - tau_C*
335  (
336  d_RC_dgradU(0,0)*u_gradphi[j][qp](0) +
337  d_RC_dgradU(0,1)*u_gradphi[j][qp](1) +
338  d_RC_dgradU(0,2)*u_gradphi[j][qp](2)
339  )
340  *fixed_deriv* u_gradphi[i][qp](2)
341  )*JxW[qp];
342  (*Kwv)(i,j) += ( -d_tau_M_dU(1)*RM_s(2)*test_func
343  -tau_M*d_RM_s_dU(2,1)*test_func
344  )*fixed_deriv*u_phi[j][qp]*JxW[qp];
345  (*Kwv)(i,j) += ( -tau_M*RM_s(2)*d_test_func_dU(1)
346  )*u_phi[j][qp]*JxW[qp];
347  (*Kwv)(i,j) += ( - tau_C*
348  (
349  d_RC_dgradU(1,0)*u_gradphi[j][qp](0) +
350  d_RC_dgradU(1,1)*u_gradphi[j][qp](1) +
351  d_RC_dgradU(1,2)*u_gradphi[j][qp](2)
352  )
353  *fixed_deriv* u_gradphi[i][qp](2)
354  )*JxW[qp];
355  (*Kww)(i,j) += ( -d_tau_M_dU(2)*RM_s(2)*test_func
356  -tau_M*d_RM_s_dU(2,2)*test_func
357  )*fixed_deriv*u_phi[j][qp]*JxW[qp];
358  (*Kww)(i,j) += ( -tau_M*RM_s(2)*d_test_func_dU(2)
359  )*u_phi[j][qp]*JxW[qp];
360  (*Kww)(i,j) += ( - tau_C*
361  (
362  d_RC_dgradU(2,0)*u_gradphi[j][qp](0) +
363  d_RC_dgradU(2,1)*u_gradphi[j][qp](1) +
364  d_RC_dgradU(2,2)*u_gradphi[j][qp](2)
365  )
366  *fixed_deriv* u_gradphi[i][qp](2)
367  )*JxW[qp];
368  (*Kww)(i,j) += ( -tau_M*test_func*(d_RM_s_uvw_dgraduvw*u_gradphi[j][qp])
369  )*fixed_deriv*JxW[qp];
370  (*Kww)(i,j) += ( -tau_M*test_func*(d_RM_s_uvw_dhessuvw.contract(u_hessphi[j][qp]))
371  )*fixed_deriv*JxW[qp];
372 
373  }
374  }
375  }
376  }
377  }
378 
379 #ifdef GRINS_USE_GRVY_TIMERS
380  this->_timer->EndTimer("IncompressibleNavierStokesAdjointStabilization::element_time_derivative");
381 #endif
382  return;
383  }
void compute_tau_momentum_and_derivs(AssemblyContext &c, unsigned int qp, libMesh::RealGradient &g, libMesh::RealTensor &G, libMesh::Real rho, libMesh::Gradient U, libMesh::Real T, libMesh::Real &tau_M, libMesh::Real &d_tau_M_d_rho, libMesh::Gradient &d_tau_M_d_U, bool is_steady) const
libMesh::RealTensor compute_G(libMesh::FEBase *fe, AssemblyContext &c, unsigned int qp) const
Definition: stab_helper.C:64
libMesh::Real compute_tau_continuity(libMesh::Real tau_C, libMesh::RealGradient &g) const
libMesh::RealGradient compute_res_momentum_steady(AssemblyContext &context, unsigned int qp, const libMesh::Real rho, const libMesh::Real mu) const
libMesh::Number _rho
Material parameters, read from input.
unsigned int _dim
Physical dimension of problem.
IncompressibleNavierStokesStabilizationHelper _stab_helper
libMesh::RealGradient compute_g(libMesh::FEBase *fe, AssemblyContext &c, unsigned int qp) const
Definition: stab_helper.C:47
void compute_tau_continuity_and_derivs(libMesh::Real tau_M, libMesh::Real d_tau_M_d_rho, libMesh::Gradient d_tau_M_d_U, libMesh::RealGradient &g, libMesh::Real &tau_C, libMesh::Real &d_tau_C_d_rho, libMesh::Gradient &d_tau_C_d_U) const
static bool _is_steady
Caches whether or not the solver that's being used is steady or not.
Definition: physics.h:266
void compute_res_momentum_steady_and_derivs(AssemblyContext &context, unsigned int qp, const libMesh::Real rho, const libMesh::Real mu, libMesh::Gradient &res_M, libMesh::Tensor &d_res_M_dgradp, libMesh::Tensor &d_res_M_dU, libMesh::Gradient &d_res_Muvw_dgraduvw, libMesh::Tensor &d_res_Muvw_dhessuvw) const
libMesh::Real compute_tau_momentum(AssemblyContext &c, unsigned int qp, libMesh::RealGradient &g, libMesh::RealTensor &G, libMesh::Real rho, libMesh::Gradient U, libMesh::Real mu, bool is_steady) const
void compute_res_continuity_and_derivs(AssemblyContext &context, unsigned int qp, libMesh::Real &res_C, libMesh::Tensor &d_res_C_dgradU) const
libMesh::Real compute_res_continuity(AssemblyContext &context, unsigned int qp) const
bool GRINS::Physics::enabled_on_elem ( const libMesh::Elem *  elem)
virtualinherited

Find if current physics is active on supplied element.

Definition at line 83 of file physics.C.

References GRINS::Physics::_enabled_subdomains.

84  {
85  // Check if enabled_subdomains flag has been set and if we're
86  // looking at a real element (rather than a nonlocal evaluation)
87  if( !elem || _enabled_subdomains.empty() )
88  return true;
89 
90  // Check if current physics is enabled on elem
91  if( _enabled_subdomains.find( elem->subdomain_id() ) == _enabled_subdomains.end() )
92  return false;
93 
94  return true;
95  }
std::set< libMesh::subdomain_id_type > _enabled_subdomains
Subdomains on which the current Physics class is enabled.
Definition: physics.h:261
BCHandlingBase * GRINS::Physics::get_bc_handler ( )
inlineinherited

Definition at line 282 of file physics.h.

References GRINS::Physics::_bc_handler.

283  {
284  return _bc_handler;
285  }
GRINS::BCHandlingBase * _bc_handler
Definition: physics.h:256
ICHandlingBase * GRINS::Physics::get_ic_handler ( )
inlineinherited

Definition at line 288 of file physics.h.

References GRINS::Physics::_ic_handler.

289  {
290  return _ic_handler;
291  }
GRINS::ICHandlingBase * _ic_handler
Definition: physics.h:258
void GRINS::Physics::init_bcs ( libMesh::FEMSystem *  system)
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().

119  {
120  // Only need to init BC's if the physics actually created a handler
121  if( _bc_handler )
122  {
123  _bc_handler->init_bc_data( *system );
124  _bc_handler->init_dirichlet_bcs( system );
126  _bc_handler->init_periodic_bcs( system );
127  }
128 
129  return;
130  }
GRINS::BCHandlingBase * _bc_handler
Definition: physics.h:256
virtual void init_dirichlet_bcs(libMesh::FEMSystem *system) const
virtual void init_periodic_bcs(libMesh::FEMSystem *system) const
virtual void init_dirichlet_bc_func_objs(libMesh::FEMSystem *system) const
virtual void init_bc_data(const libMesh::FEMSystem &system)
Override this method to initialize any system-dependent data.
template<class Mu >
void GRINS::IncompressibleNavierStokesStabilizationBase< Mu >::init_context ( AssemblyContext context)
virtualinherited

Initialize context for added physics variables.

Reimplemented from GRINS::IncompressibleNavierStokesBase< Viscosity >.

Definition at line 54 of file inc_navier_stokes_stab_base.C.

References GRINS::IncompressibleNavierStokesBase< Viscosity >::init_context().

55  {
56  // First call base class
58 
59  // We need pressure derivatives
60  context.get_element_fe(this->_flow_vars.p_var())->get_dphi();
61 
62  // We also need second derivatives, so initialize those.
63  context.get_element_fe(this->_flow_vars.u_var())->get_d2phi();
64 
65  return;
66  }
virtual void init_context(AssemblyContext &context)
Initialize context for added physics variables.
void GRINS::Physics::init_ics ( libMesh::FEMSystem *  system,
libMesh::CompositeFunction< libMesh::Number > &  all_ics 
)
inherited

Definition at line 133 of file physics.C.

References GRINS::Physics::_ic_handler, and GRINS::ICHandlingBase::init_ic_data().

135  {
136  if( _ic_handler )
137  {
138  _ic_handler->init_ic_data( *system, all_ics );
139  }
140 
141  return;
142  }
GRINS::ICHandlingBase * _ic_handler
Definition: physics.h:258
virtual void init_ic_data(const libMesh::FEMSystem &system, libMesh::CompositeFunction< libMesh::Number > &all_ics)
Override this method to initialize any system-dependent data.
template<class Mu >
void GRINS::IncompressibleNavierStokesStabilizationBase< Mu >::init_variables ( libMesh::FEMSystem *  system)
virtualinherited

Initialization of Navier-Stokes variables.

Add velocity and pressure variables to system.

Reimplemented from GRINS::IncompressibleNavierStokesBase< Viscosity >.

Definition at line 69 of file inc_navier_stokes_stab_base.C.

References GRINS::IncompressibleNavierStokesBase< Viscosity >::init_variables().

70  {
71  // First call base class
73 
74  _stab_helper.init(*system);
75 
76  return;
77  }
IncompressibleNavierStokesStabilizationHelper _stab_helper
virtual void init_variables(libMesh::FEMSystem *system)
Initialization of Navier-Stokes variables.
bool GRINS::Physics::is_steady ( ) const
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().

104  {
105  return _is_steady;
106  }
static bool _is_steady
Caches whether or not the solver that's being used is steady or not.
Definition: physics.h:266
template<class Mu >
void GRINS::IncompressibleNavierStokesAdjointStabilization< Mu >::mass_residual ( bool  compute_jacobian,
AssemblyContext context,
CachedValues cache 
)
virtual

Mass matrix part(s) for element interiors. All boundary terms lie within the time_derivative part.

Reimplemented from GRINS::Physics.

Definition at line 549 of file inc_navier_stokes_adjoint_stab.C.

552  {
553 #ifdef GRINS_USE_GRVY_TIMERS
554  this->_timer->BeginTimer("IncompressibleNavierStokesAdjointStabilization::mass_residual");
555 #endif
556 
557  // The number of local degrees of freedom in each variable.
558  const unsigned int n_p_dofs = context.get_dof_indices(this->_flow_vars.p_var()).size();
559  const unsigned int n_u_dofs = context.get_dof_indices(this->_flow_vars.u_var()).size();
560 
561  // Element Jacobian * quadrature weights for interior integration.
562  const std::vector<libMesh::Real> &JxW =
563  context.get_element_fe(this->_flow_vars.u_var())->get_JxW();
564 
565  // The pressure shape functions at interior quadrature points.
566  const std::vector<std::vector<libMesh::RealGradient> >& p_dphi =
567  context.get_element_fe(this->_flow_vars.p_var())->get_dphi();
568 
569  const std::vector<std::vector<libMesh::Real> >& u_phi =
570  context.get_element_fe(this->_flow_vars.u_var())->get_phi();
571 
572  const std::vector<std::vector<libMesh::RealGradient> >& u_gradphi =
573  context.get_element_fe(this->_flow_vars.u_var())->get_dphi();
574 
575  const std::vector<std::vector<libMesh::RealTensor> >& u_hessphi =
576  context.get_element_fe(this->_flow_vars.u_var())->get_d2phi();
577 
578  libMesh::DenseSubVector<libMesh::Number> &Fu = context.get_elem_residual(this->_flow_vars.u_var()); // R_{p}
579  libMesh::DenseSubVector<libMesh::Number> &Fv = context.get_elem_residual(this->_flow_vars.v_var()); // R_{p}
580  libMesh::DenseSubVector<libMesh::Number> *Fw = NULL;
581 
582  libMesh::DenseSubVector<libMesh::Number> &Fp = context.get_elem_residual(this->_flow_vars.p_var()); // R_{p}
583 
584  libMesh::DenseSubMatrix<libMesh::Number> &Kuu =
585  context.get_elem_jacobian(this->_flow_vars.u_var(), this->_flow_vars.u_var()); // J_{uu}
586  libMesh::DenseSubMatrix<libMesh::Number> &Kuv =
587  context.get_elem_jacobian(this->_flow_vars.u_var(), this->_flow_vars.v_var()); // J_{uv}
588  libMesh::DenseSubMatrix<libMesh::Number> &Kvu =
589  context.get_elem_jacobian(this->_flow_vars.v_var(), this->_flow_vars.u_var()); // J_{vu}
590  libMesh::DenseSubMatrix<libMesh::Number> &Kvv =
591  context.get_elem_jacobian(this->_flow_vars.v_var(), this->_flow_vars.v_var()); // J_{vv}
592 
593  libMesh::DenseSubMatrix<libMesh::Number> *Kuw = NULL;
594  libMesh::DenseSubMatrix<libMesh::Number> *Kvw = NULL;
595  libMesh::DenseSubMatrix<libMesh::Number> *Kwu = NULL;
596  libMesh::DenseSubMatrix<libMesh::Number> *Kwv = NULL;
597  libMesh::DenseSubMatrix<libMesh::Number> *Kww = NULL;
598 
599  libMesh::DenseSubMatrix<libMesh::Number> &Kpu =
600  context.get_elem_jacobian(this->_flow_vars.p_var(), this->_flow_vars.u_var()); // J_{pu}
601  libMesh::DenseSubMatrix<libMesh::Number> &Kpv =
602  context.get_elem_jacobian(this->_flow_vars.p_var(), this->_flow_vars.v_var()); // J_{pv}
603  libMesh::DenseSubMatrix<libMesh::Number> *Kpw = NULL;
604 
605  if(this->_dim == 3)
606  {
607  Fw = &context.get_elem_residual(this->_flow_vars.w_var()); // R_{w}
608 
609  Kuw = &context.get_elem_jacobian
610  (this->_flow_vars.u_var(), this->_flow_vars.w_var()); // J_{uw}
611  Kvw = &context.get_elem_jacobian
612  (this->_flow_vars.v_var(), this->_flow_vars.w_var()); // J_{vw}
613  Kwu = &context.get_elem_jacobian
614  (this->_flow_vars.w_var(), this->_flow_vars.u_var()); // J_{wu}
615  Kwv = &context.get_elem_jacobian
616  (this->_flow_vars.w_var(), this->_flow_vars.v_var()); // J_{wv}
617  Kww = &context.get_elem_jacobian
618  (this->_flow_vars.w_var(), this->_flow_vars.w_var()); // J_{ww}
619 
620  Kpw = &context.get_elem_jacobian
621  (this->_flow_vars.p_var(), this->_flow_vars.w_var()); // J_{pw}
622  }
623 
624  unsigned int n_qpoints = context.get_element_qrule().n_points();
625 
626  for (unsigned int qp=0; qp != n_qpoints; qp++)
627  {
628  libMesh::FEBase* fe = context.get_element_fe(this->_flow_vars.u_var());
629 
630  libMesh::RealGradient g = this->_stab_helper.compute_g( fe, context, qp );
631  libMesh::RealTensor G = this->_stab_helper.compute_G( fe, context, qp );
632 
633  libMesh::RealGradient U( context.fixed_interior_value( this->_flow_vars.u_var(), qp ),
634  context.fixed_interior_value( this->_flow_vars.v_var(), qp ) );
635  if( this->_dim == 3 )
636  {
637  U(2) = context.fixed_interior_value( this->_flow_vars.w_var(), qp );
638  }
639 
640  /*
641  libMesh::Gradient grad_u, grad_v, grad_w;
642  grad_u = context.interior_gradient(this->_flow_vars.u_var(), qp);
643  grad_v = context.interior_gradient(this->_flow_vars.v_var(), qp);
644  if (_dim == 3)
645  grad_w = context.interior_gradient(this->_flow_vars.w_var(), qp);
646  */
647 
648  libMesh::Real tau_M;
649 
650  libMesh::Real d_tau_M_d_rho;
651 
652  libMesh::Gradient d_tau_M_dU;
653 
654  libMesh::RealGradient RM_t;
655 
656  libMesh::Real d_RM_t_uvw_duvw;
657 
658  // Compute the viscosity at this qp
659  libMesh::Real _mu_qp = this->_mu(context, qp);
660 
661  if (compute_jacobian)
662  {
664  ( context, qp, g, G, this->_rho, U, _mu_qp,
665  tau_M, d_tau_M_d_rho, d_tau_M_dU,
666  false );
668  ( context, qp, this->_rho,
669  RM_t, d_RM_t_uvw_duvw );
670  }
671  else
672  {
673  tau_M = this->_stab_helper.compute_tau_momentum( context, qp, g, G, this->_rho, U, _mu_qp, false );
674  RM_t = this->_stab_helper.compute_res_momentum_transient( context, qp, this->_rho );
675  }
676 
677 
678  // Now a loop over the pressure degrees of freedom. This
679  // computes the contributions of the continuity equation.
680  for (unsigned int i=0; i != n_p_dofs; i++)
681  {
682  Fp(i) -= tau_M*RM_t*p_dphi[i][qp]*JxW[qp];
683 
684  if (compute_jacobian)
685  {
686  const libMesh::Real fixed_deriv =
687  context.get_fixed_solution_derivative();
688 
689  for (unsigned int j=0; j != n_u_dofs; j++)
690  {
691  Kpu(i,j) -= d_tau_M_dU(0)*u_phi[j][qp]*RM_t*p_dphi[i][qp]*fixed_deriv*JxW[qp];
692  Kpu(i,j) -= tau_M*d_RM_t_uvw_duvw*u_phi[j][qp]*p_dphi[i][qp](0)*fixed_deriv*JxW[qp];
693 
694  Kpv(i,j) -= d_tau_M_dU(1)*u_phi[j][qp]*RM_t*p_dphi[i][qp]*fixed_deriv*JxW[qp];
695  Kpv(i,j) -= tau_M*d_RM_t_uvw_duvw*u_phi[j][qp]*p_dphi[i][qp](1)*fixed_deriv*JxW[qp];
696  }
697 
698  if(this->_dim == 3)
699  {
700  for (unsigned int j=0; j != n_u_dofs; j++)
701  {
702  (*Kpw)(i,j) -= d_tau_M_dU(2)*u_phi[j][qp]*RM_t*p_dphi[i][qp]*fixed_deriv*JxW[qp];
703  (*Kpw)(i,j) -= tau_M*d_RM_t_uvw_duvw*u_phi[j][qp]*p_dphi[i][qp](2)*fixed_deriv*JxW[qp];
704  }
705  }
706  }
707  }
708 
709  for (unsigned int i=0; i != n_u_dofs; i++)
710  {
711  libMesh::Real test_func = this->_rho*U*u_gradphi[i][qp] +
712  _mu_qp*( u_hessphi[i][qp](0,0) + u_hessphi[i][qp](1,1) + u_hessphi[i][qp](2,2) );
713  libMesh::Gradient d_test_func_dU = this->_rho*u_gradphi[i][qp];
714 
715  //libMesh::RealGradient zeroth_order_term = - this->_rho*u_phi[i][qp]*(grad_u + grad_v + grad_w);
716 
717  Fu(i) -= tau_M*RM_t(0)*test_func*JxW[qp];
718 
719  Fv(i) -= tau_M*RM_t(1)*test_func*JxW[qp];
720 
721  if(this->_dim == 3)
722  {
723  (*Fw)(i) -= tau_M*RM_t(2)*test_func*JxW[qp];
724  }
725 
726  if (compute_jacobian)
727  {
728  const libMesh::Real fixed_deriv =
729  context.get_fixed_solution_derivative();
730 
731  for (unsigned int j=0; j != n_u_dofs; j++)
732  {
733  Kuu(i,j) -= d_tau_M_dU(0)*u_phi[j][qp]*RM_t(0)*test_func*fixed_deriv*JxW[qp];
734  Kuu(i,j) -= tau_M*d_RM_t_uvw_duvw*u_phi[j][qp]*test_func*fixed_deriv*JxW[qp];
735  Kuu(i,j) -= tau_M*RM_t(0)*d_test_func_dU(0)*u_phi[j][qp]*fixed_deriv*JxW[qp];
736 
737  Kuv(i,j) -= d_tau_M_dU(1)*u_phi[j][qp]*RM_t(0)*test_func*fixed_deriv*JxW[qp];
738  Kuv(i,j) -= tau_M*RM_t(0)*d_test_func_dU(1)*u_phi[j][qp]*fixed_deriv*JxW[qp];
739 
740  Kvu(i,j) -= d_tau_M_dU(0)*u_phi[j][qp]*RM_t(1)*test_func*fixed_deriv*JxW[qp];
741  Kvu(i,j) -= tau_M*RM_t(1)*d_test_func_dU(0)*u_phi[j][qp]*fixed_deriv*JxW[qp];
742 
743  Kvv(i,j) -= d_tau_M_dU(1)*u_phi[j][qp]*RM_t(1)*test_func*fixed_deriv*JxW[qp];
744  Kvv(i,j) -= tau_M*d_RM_t_uvw_duvw*u_phi[j][qp]*test_func*fixed_deriv*JxW[qp];
745  Kvv(i,j) -= tau_M*RM_t(1)*d_test_func_dU(1)*u_phi[j][qp]*fixed_deriv*JxW[qp];
746  }
747  if(this->_dim == 3)
748  {
749  for (unsigned int j=0; j != n_u_dofs; j++)
750  {
751  (*Kuw)(i,j) -= d_tau_M_dU(2)*u_phi[j][qp]*RM_t(0)*test_func*fixed_deriv*JxW[qp];
752  (*Kuw)(i,j) -= tau_M*RM_t(0)*d_test_func_dU(2)*u_phi[j][qp]*fixed_deriv*JxW[qp];
753 
754  (*Kvw)(i,j) -= d_tau_M_dU(2)*u_phi[j][qp]*RM_t(1)*test_func*fixed_deriv*JxW[qp];
755  (*Kvw)(i,j) -= tau_M*RM_t(1)*d_test_func_dU(2)*u_phi[j][qp]*fixed_deriv*JxW[qp];
756 
757  (*Kwu)(i,j) -= d_tau_M_dU(0)*u_phi[j][qp]*RM_t(2)*test_func*fixed_deriv*JxW[qp];
758  (*Kwu)(i,j) -= tau_M*RM_t(2)*d_test_func_dU(0)*u_phi[j][qp]*fixed_deriv*JxW[qp];
759 
760  (*Kwv)(i,j) -= d_tau_M_dU(1)*u_phi[j][qp]*RM_t(2)*test_func*fixed_deriv*JxW[qp];
761  (*Kwv)(i,j) -= tau_M*RM_t(2)*d_test_func_dU(1)*u_phi[j][qp]*fixed_deriv*JxW[qp];
762 
763  (*Kww)(i,j) -= d_tau_M_dU(2)*u_phi[j][qp]*RM_t(2)*test_func*fixed_deriv*JxW[qp];
764  (*Kww)(i,j) -= tau_M*d_RM_t_uvw_duvw*u_phi[j][qp]*test_func*fixed_deriv*JxW[qp];
765  (*Kww)(i,j) -= tau_M*RM_t(2)*d_test_func_dU(2)*u_phi[j][qp]*fixed_deriv*JxW[qp];
766  }
767  }
768  }
769  }
770 
771  }
772 
773 #ifdef GRINS_USE_GRVY_TIMERS
774  this->_timer->EndTimer("IncompressibleNavierStokesAdjointStabilization::mass_residual");
775 #endif
776  return;
777  }
void compute_tau_momentum_and_derivs(AssemblyContext &c, unsigned int qp, libMesh::RealGradient &g, libMesh::RealTensor &G, libMesh::Real rho, libMesh::Gradient U, libMesh::Real T, libMesh::Real &tau_M, libMesh::Real &d_tau_M_d_rho, libMesh::Gradient &d_tau_M_d_U, bool is_steady) const
libMesh::RealTensor compute_G(libMesh::FEBase *fe, AssemblyContext &c, unsigned int qp) const
Definition: stab_helper.C:64
libMesh::RealGradient compute_res_momentum_transient(AssemblyContext &context, unsigned int qp, const libMesh::Real rho) const
libMesh::Number _rho
Material parameters, read from input.
unsigned int _dim
Physical dimension of problem.
IncompressibleNavierStokesStabilizationHelper _stab_helper
libMesh::RealGradient compute_g(libMesh::FEBase *fe, AssemblyContext &c, unsigned int qp) const
Definition: stab_helper.C:47
void compute_res_momentum_transient_and_derivs(AssemblyContext &context, unsigned int qp, const libMesh::Real rho, libMesh::RealGradient &res_M, libMesh::Real &d_res_Muvw_duvw) const
libMesh::Real compute_tau_momentum(AssemblyContext &c, unsigned int qp, libMesh::RealGradient &g, libMesh::RealTensor &G, libMesh::Real rho, libMesh::Gradient U, libMesh::Real mu, bool is_steady) const
void GRINS::Physics::nonlocal_constraint ( bool  compute_jacobian,
AssemblyContext context,
CachedValues cache 
)
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().

253  {
254  return;
255  }
void GRINS::Physics::nonlocal_mass_residual ( bool  compute_jacobian,
AssemblyContext context,
CachedValues cache 
)
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().

267  {
268  return;
269  }
void GRINS::Physics::nonlocal_time_derivative ( bool  compute_jacobian,
AssemblyContext context,
CachedValues cache 
)
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().

232  {
233  return;
234  }
void GRINS::Physics::read_input_options ( const GetPot &  input)
virtualinherited

Read options from GetPot input file. By default, nothing is read.

Reimplemented in GRINS::ScalarODE, GRINS::AveragedTurbineBase< Viscosity >, GRINS::AxisymmetricBoussinesqBuoyancy, GRINS::LowMachNavierStokesBase< Viscosity, SpecificHeat, ThermalConductivity >, GRINS::AxisymmetricHeatTransfer< Conductivity >, GRINS::AveragedFanBase< Viscosity >, GRINS::ParsedVelocitySourceBase< Viscosity >, GRINS::VelocityDragBase< Viscosity >, GRINS::VelocityPenaltyBase< Viscosity >, GRINS::IncompressibleNavierStokes< Viscosity >, GRINS::LowMachNavierStokes< Viscosity, SpecificHeat, ThermalConductivity >, GRINS::HeatTransfer< Conductivity >, GRINS::ReactingLowMachNavierStokesBase< Mixture, Evaluator >, and GRINS::ReactingLowMachNavierStokes< Mixture, Evaluator >.

Definition at line 70 of file physics.C.

References GRINS::Physics::_enabled_subdomains, and GRINS::Physics::_physics_name.

Referenced by GRINS::HeatTransferBase< Conductivity >::HeatTransferBase(), GRINS::HeatTransferStabilizationBase< Conductivity >::HeatTransferStabilizationBase(), GRINS::IncompressibleNavierStokesAdjointStabilization< Viscosity >::IncompressibleNavierStokesAdjointStabilization(), GRINS::IncompressibleNavierStokesSPGSMStabilization< Viscosity >::IncompressibleNavierStokesSPGSMStabilization(), GRINS::Physics::Physics(), and GRINS::SpalartAllmarasSPGSMStabilization< Viscosity >::SpalartAllmarasSPGSMStabilization().

71  {
72  int num_ids = input.vector_variable_size( "Physics/"+this->_physics_name+"/enabled_subdomains" );
73 
74  for( int i = 0; i < num_ids; i++ )
75  {
76  libMesh::subdomain_id_type dumvar = input( "Physics/"+this->_physics_name+"/enabled_subdomains", -1, i );
77  _enabled_subdomains.insert( dumvar );
78  }
79 
80  return;
81  }
const PhysicsName _physics_name
Name of the physics object. Used for reading physics specific inputs.
Definition: physics.h:254
std::set< libMesh::subdomain_id_type > _enabled_subdomains
Subdomains on which the current Physics class is enabled.
Definition: physics.h:261
template<class Mu >
void GRINS::IncompressibleNavierStokesBase< Mu >::register_parameter ( const std::string &  param_name,
libMesh::ParameterMultiPointer< libMesh::Number > &  param_pointer 
) const
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().

117  {
118  ParameterUser::register_parameter(param_name, param_pointer);
119  _mu.register_parameter(param_name, param_pointer);
120  }
virtual void register_parameter(const std::string &param_name, libMesh::ParameterMultiPointer< libMesh::Number > &param_pointer) const
Each subclass will register its copy of an independent.
void GRINS::Physics::register_postprocessing_vars ( const GetPot &  input,
PostProcessedQuantities< libMesh::Real > &  postprocessing 
)
virtualinherited

Register name of postprocessed quantity with PostProcessedQuantities.

Each Physics class will need to cache an unsigned int corresponding to each postprocessed quantity. This will be used in computing the values and putting them in the CachedVariables object.

Reimplemented in GRINS::ParsedVelocitySource< Viscosity >, GRINS::VelocityPenalty< Viscosity >, GRINS::IncompressibleNavierStokes< Viscosity >, GRINS::LowMachNavierStokes< Viscosity, SpecificHeat, ThermalConductivity >, GRINS::HeatTransfer< Conductivity >, GRINS::ElasticCable< StressStrainLaw >, GRINS::ElasticMembrane< StressStrainLaw >, and GRINS::ReactingLowMachNavierStokes< Mixture, Evaluator >.

Definition at line 161 of file physics.C.

163  {
164  return;
165  }
void GRINS::Physics::set_is_steady ( bool  is_steady)
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().

98  {
100  return;
101  }
bool is_steady() const
Returns whether or not this physics is being solved with a steady solver.
Definition: physics.C:103
static bool _is_steady
Caches whether or not the solver that's being used is steady or not.
Definition: physics.h:266
void GRINS::ParameterUser::set_parameter ( libMesh::Number &  param_variable,
const GetPot &  input,
const std::string &  param_name,
libMesh::Number  param_default 
)
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().

39  {
40  param_variable = input(param_name, param_default);
41 
42  libmesh_assert_msg(!_my_parameters.count(param_name),
43  "ERROR: " << _my_name << " double-registered parameter " <<
44  param_name);
45 
46  _my_parameters[param_name] = &param_variable;
47  }
std::map< std::string, libMesh::Number * > _my_parameters
template<class Mu >
void GRINS::IncompressibleNavierStokesBase< Mu >::set_time_evolving_vars ( libMesh::FEMSystem *  system)
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().

76  {
77  const unsigned int dim = system->get_mesh().mesh_dimension();
78 
79  // Tell the system to march velocity forward in time, but
80  // leave p as a constraint only
81  system->time_evolving(_flow_vars.u_var());
82  system->time_evolving(_flow_vars.v_var());
83 
84  if (dim == 3)
85  system->time_evolving(_flow_vars.w_var());
86 
87  return;
88  }
void GRINS::Physics::side_constraint ( bool  compute_jacobian,
AssemblyContext context,
CachedValues cache 
)
virtualinherited

Constraint part(s) of physics for boundaries of elements on the domain boundary.

Reimplemented in GRINS::IncompressibleNavierStokes< Viscosity >, GRINS::LowMachNavierStokes< Viscosity, SpecificHeat, ThermalConductivity >, and GRINS::ReactingLowMachNavierStokes< Mixture, Evaluator >.

Definition at line 243 of file physics.C.

Referenced by GRINS::MultiphysicsSystem::side_constraint().

246  {
247  return;
248  }
void GRINS::Physics::side_time_derivative ( bool  compute_jacobian,
AssemblyContext context,
CachedValues cache 
)
virtualinherited

Member Data Documentation

GRINS::BCHandlingBase* GRINS::Physics::_bc_handler
protectedinherited
template<class Viscosity >
unsigned int GRINS::IncompressibleNavierStokesBase< Viscosity >::_dim
protectedinherited

Physical dimension of problem.

Todo:
Do we really need to cache this?

Definition at line 79 of file inc_navier_stokes_base.h.

std::set<libMesh::subdomain_id_type> GRINS::Physics::_enabled_subdomains
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().

template<class Viscosity >
PrimitiveFlowFEVariables GRINS::IncompressibleNavierStokesBase< Viscosity >::_flow_vars
protectedinherited

Definition at line 81 of file inc_navier_stokes_base.h.

GRINS::ICHandlingBase* GRINS::Physics::_ic_handler
protectedinherited
bool GRINS::Physics::_is_axisymmetric
protectedinherited
bool GRINS::Physics::_is_steady = false
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().

template<class Viscosity >
Viscosity GRINS::IncompressibleNavierStokesBase< Viscosity >::_mu
protectedinherited

Viscosity object.

Definition at line 88 of file inc_navier_stokes_base.h.

const PhysicsName GRINS::Physics::_physics_name
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().

template<class Viscosity >
libMesh::Number GRINS::IncompressibleNavierStokesBase< Viscosity >::_rho
protectedinherited

Material parameters, read from input.

Todo:
Create objects to allow for function specification

Definition at line 85 of file inc_navier_stokes_base.h.

Referenced by GRINS::IncompressibleNavierStokesBase< Viscosity >::IncompressibleNavierStokesBase().

template<class Viscosity >
IncompressibleNavierStokesStabilizationHelper GRINS::IncompressibleNavierStokesStabilizationBase< Viscosity >::_stab_helper
protectedinherited

Definition at line 52 of file inc_navier_stokes_stab_base.h.


The documentation for this class was generated from the following files:

Generated on Mon Jun 22 2015 21:32:23 for GRINS-0.6.0 by  doxygen 1.8.9.1