GRINS-0.6.0
Public Member Functions | Protected Attributes | List of all members
GRINS::LowMachNavierStokesStabilizationHelper Class Reference

#include <low_mach_navier_stokes_stab_helper.h>

Inheritance diagram for GRINS::LowMachNavierStokesStabilizationHelper:
Inheritance graph
[legend]
Collaboration diagram for GRINS::LowMachNavierStokesStabilizationHelper:
Collaboration graph
[legend]

Public Member Functions

 LowMachNavierStokesStabilizationHelper (const std::string &helper_name, const GetPot &input)
 
 ~LowMachNavierStokesStabilizationHelper ()
 
libMesh::Real compute_tau_energy (AssemblyContext &c, unsigned int qp, libMesh::RealGradient &g, libMesh::RealTensor &G, libMesh::Real rho, libMesh::Gradient U, libMesh::Real k, libMesh::Real cp, bool is_steady) const
 
void init (libMesh::FEMSystem &system)
 
libMesh::Real compute_tau_continuity (libMesh::Real tau_C, libMesh::RealGradient &g) const
 
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
 
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_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::Real compute_tau (AssemblyContext &c, unsigned int qp, libMesh::Real mat_prop_sq, libMesh::RealGradient &g, libMesh::RealTensor &G, libMesh::Real rho, libMesh::Gradient U, bool is_steady) const
 
void compute_tau_and_derivs (AssemblyContext &c, unsigned int qp, libMesh::Real mat_prop_sq, libMesh::RealGradient &g, libMesh::RealTensor &G, libMesh::Real rho, libMesh::Gradient U, libMesh::Real &tau, libMesh::Real &d_tau_d_rho, libMesh::Gradient &d_tau_d_U, bool is_steady) const
 
libMesh::Real compute_res_continuity (AssemblyContext &context, unsigned int qp) const
 
void compute_res_continuity_and_derivs (AssemblyContext &context, unsigned int qp, libMesh::Real &res_C, libMesh::Tensor &d_res_C_dgradU) const
 
libMesh::RealGradient compute_res_momentum_steady (AssemblyContext &context, unsigned int qp, const libMesh::Real rho, const libMesh::Real mu) const
 
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::RealGradient compute_res_momentum_transient (AssemblyContext &context, unsigned int qp, const libMesh::Real rho) const
 
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::RealGradient UdotGradU (libMesh::Gradient &U, libMesh::Gradient &grad_u, libMesh::Gradient &grad_v) const
 
libMesh::RealGradient UdotGradU (libMesh::Gradient &U, libMesh::Gradient &grad_u, libMesh::Gradient &grad_v, libMesh::Gradient &grad_w) const
 
libMesh::RealGradient div_GradU (libMesh::RealTensor &hess_u, libMesh::RealTensor &hess_v) const
 
libMesh::RealGradient div_GradU (libMesh::RealTensor &hess_u, libMesh::RealTensor &hess_v, libMesh::RealTensor &hess_w) const
 
libMesh::RealGradient div_GradU_T (libMesh::RealTensor &hess_u, libMesh::RealTensor &hess_v) const
 
libMesh::RealGradient div_GradU_T (libMesh::RealTensor &hess_u, libMesh::RealTensor &hess_v, libMesh::RealTensor &hess_w) const
 
libMesh::RealGradient div_divU_I (libMesh::RealTensor &hess_u, libMesh::RealTensor &hess_v) const
 
libMesh::RealGradient div_divU_I (libMesh::RealTensor &hess_u, libMesh::RealTensor &hess_v, libMesh::RealTensor &hess_w) const
 
libMesh::RealGradient compute_g (libMesh::FEBase *fe, AssemblyContext &c, unsigned int qp) const
 
libMesh::RealTensor compute_G (libMesh::FEBase *fe, AssemblyContext &c, unsigned int qp) const
 
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...
 
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...
 

Protected Attributes

libMesh::Real _C
 
libMesh::Real _tau_factor
 
PrimitiveFlowVariables _flow_vars
 

Detailed Description

Definition at line 33 of file low_mach_navier_stokes_stab_helper.h.

Constructor & Destructor Documentation

GRINS::LowMachNavierStokesStabilizationHelper::LowMachNavierStokesStabilizationHelper ( const std::string &  helper_name,
const GetPot &  input 
)

Definition at line 33 of file low_mach_navier_stokes_stab_helper.C.

36  {
37  return;
38  }
IncompressibleNavierStokesStabilizationHelper(const std::string &helper_name, const GetPot &input)
GRINS::LowMachNavierStokesStabilizationHelper::~LowMachNavierStokesStabilizationHelper ( )

Definition at line 40 of file low_mach_navier_stokes_stab_helper.C.

41  {
42  return;
43  }

Member Function Documentation

libMesh::RealGradient GRINS::StabilizationHelper::compute_g ( libMesh::FEBase *  fe,
AssemblyContext c,
unsigned int  qp 
) const
inherited
Todo:
Should we inline this?

Definition at line 47 of file stab_helper.C.

50  {
51  libMesh::RealGradient g( fe->get_dxidx()[qp] + fe->get_detadx()[qp],
52  fe->get_dxidy()[qp] + fe->get_detady()[qp] );
53 
54  if( c.get_dim() == 3 )
55  {
56  g(0) += fe->get_dzetadx()[qp];
57  g(1) += fe->get_dzetady()[qp];
58  g(2) = fe->get_dxidz()[qp] + fe->get_detadz()[qp] + fe->get_dzetadz()[qp];
59  }
60 
61  return g;
62  }
libMesh::RealTensor GRINS::StabilizationHelper::compute_G ( libMesh::FEBase *  fe,
AssemblyContext c,
unsigned int  qp 
) const
inherited
Todo:
Should we inline this?

Definition at line 64 of file stab_helper.C.

67  {
68  libMesh::Real dxidx = fe->get_dxidx()[qp];
69  libMesh::Real dxidy = fe->get_dxidy()[qp];
70 
71  libMesh::Real detadx = fe->get_detadx()[qp];
72  libMesh::Real detady = fe->get_detady()[qp];
73 
74  libMesh::RealTensor G( dxidx*dxidx + detadx*detadx,
75  dxidx*dxidy + detadx*detady,
76  0.0,
77  dxidy*dxidx + detady*detadx,
78  dxidy*dxidy + detady*detady,
79  0.0 );
80 
81  if( c.get_dim() == 3 )
82  {
83  libMesh::Real dxidz = fe->get_dxidz()[qp];
84 
85  libMesh::Real detadz = fe->get_detadz()[qp];
86 
87  libMesh::Real dzetadx = fe->get_dzetadx()[qp];
88  libMesh::Real dzetady = fe->get_dzetady()[qp];
89  libMesh::Real dzetadz = fe->get_dzetadz()[qp];
90 
91  G(0,0) += dzetadx*dzetadx;
92  G(0,1) += dzetadx*dzetady;
93  G(0,2) = dxidx*dxidz + detadx*detadz + dzetadx*dzetadz;
94  G(1,0) += dzetady*dzetadx;
95  G(1,1) += dzetady*dzetady;
96  G(1,2) = dxidy*dxidz + detady*detadz + dzetady*dzetadz;
97  G(2,0) = dxidz*dxidx + detadz*detadx + dzetadz*dzetadx;
98  G(2,1) = dxidz*dxidy + detadz*detady + dzetadz*dzetady;
99  G(2,2) = dxidz*dxidz + detadz*detadz + dzetadz*dzetadz;
100  }
101 
102  return G;
103  }
libMesh::Real GRINS::IncompressibleNavierStokesStabilizationHelper::compute_res_continuity ( AssemblyContext context,
unsigned int  qp 
) const
inherited

Definition at line 137 of file inc_navier_stokes_stab_helper.C.

References GRINS::IncompressibleNavierStokesStabilizationHelper::_flow_vars, GRINS::PrimitiveFlowVariables::u_var(), GRINS::PrimitiveFlowVariables::v_var(), and GRINS::PrimitiveFlowVariables::w_var().

139  {
140  libMesh::RealGradient grad_u, grad_v;
141 
142  grad_u = context.fixed_interior_gradient(this->_flow_vars.u_var(), qp);
143  grad_v = context.fixed_interior_gradient(this->_flow_vars.v_var(), qp);
144 
145  libMesh::Real divU = grad_u(0) + grad_v(1);
146 
147  if( context.get_system().get_mesh().mesh_dimension() == 3 )
148  {
149  divU += (context.fixed_interior_gradient(this->_flow_vars.w_var(), qp))(2);
150  }
151 
152  return divU;
153  }
void GRINS::IncompressibleNavierStokesStabilizationHelper::compute_res_continuity_and_derivs ( AssemblyContext context,
unsigned int  qp,
libMesh::Real &  res_C,
libMesh::Tensor &  d_res_C_dgradU 
) const
inherited

Definition at line 156 of file inc_navier_stokes_stab_helper.C.

161  {
162  libMesh::RealGradient grad_u, grad_v;
163 
164  grad_u = context.fixed_interior_gradient(this->_flow_vars.u_var(), qp);
165  grad_v = context.fixed_interior_gradient(this->_flow_vars.v_var(), qp);
166 
167  libMesh::Real divU = grad_u(0) + grad_v(1);
168  d_res_C_dgradU = 0;
169  d_res_C_dgradU(0,0) = 1;
170  d_res_C_dgradU(1,1) = 1;
171 
172  if( context.get_system().get_mesh().mesh_dimension() == 3 )
173  {
174  divU += (context.fixed_interior_gradient(this->_flow_vars.w_var(), qp))(2);
175  d_res_C_dgradU(2,2) = 1;
176  }
177 
178  res_C = divU;
179  }
libMesh::RealGradient GRINS::IncompressibleNavierStokesStabilizationHelper::compute_res_momentum_steady ( AssemblyContext context,
unsigned int  qp,
const libMesh::Real  rho,
const libMesh::Real  mu 
) const
inherited

Definition at line 181 of file inc_navier_stokes_stab_helper.C.

References GRINS::IncompressibleNavierStokesStabilizationHelper::_flow_vars, GRINS::IncompressibleNavierStokesStabilizationHelper::div_GradU(), GRINS::PrimitiveFlowVariables::p_var(), GRINS::PrimitiveFlowVariables::u_var(), GRINS::IncompressibleNavierStokesStabilizationHelper::UdotGradU(), GRINS::PrimitiveFlowVariables::v_var(), and GRINS::PrimitiveFlowVariables::w_var().

183  {
184  libMesh::RealGradient U( context.fixed_interior_value(this->_flow_vars.u_var(), qp),
185  context.fixed_interior_value(this->_flow_vars.v_var(), qp) );
186  if(context.get_system().get_mesh().mesh_dimension() == 3)
187  U(2) = context.fixed_interior_value(this->_flow_vars.w_var(), qp);
188 
189  libMesh::RealGradient grad_p = context.fixed_interior_gradient(this->_flow_vars.p_var(), qp);
190 
191  libMesh::RealGradient grad_u = context.fixed_interior_gradient(this->_flow_vars.u_var(), qp);
192  libMesh::RealGradient grad_v = context.fixed_interior_gradient(this->_flow_vars.v_var(), qp);
193 
194  libMesh::RealTensor hess_u = context.fixed_interior_hessian(this->_flow_vars.u_var(), qp);
195  libMesh::RealTensor hess_v = context.fixed_interior_hessian(this->_flow_vars.v_var(), qp);
196 
197  libMesh::RealGradient rhoUdotGradU;
198  libMesh::RealGradient divGradU;
199 
200  if( context.get_system().get_mesh().mesh_dimension() < 3 )
201  {
202  rhoUdotGradU = rho*this->UdotGradU( U, grad_u, grad_v );
203  divGradU = this->div_GradU( hess_u, hess_v );
204  }
205  else
206  {
207  libMesh::RealGradient grad_w = context.fixed_interior_gradient(this->_flow_vars.w_var(), qp);
208  libMesh::RealTensor hess_w = context.fixed_interior_hessian(this->_flow_vars.w_var(), qp);
209 
210  rhoUdotGradU = rho*this->UdotGradU( U, grad_u, grad_v, grad_w );
211 
212  divGradU = this->div_GradU( hess_u, hess_v, hess_w );
213  }
214 
215  return rhoUdotGradU + grad_p - mu*divGradU;
216  }
libMesh::RealGradient div_GradU(libMesh::RealTensor &hess_u, libMesh::RealTensor &hess_v) const
libMesh::RealGradient UdotGradU(libMesh::Gradient &U, libMesh::Gradient &grad_u, libMesh::Gradient &grad_v) const
void GRINS::IncompressibleNavierStokesStabilizationHelper::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
inherited

Definition at line 219 of file inc_navier_stokes_stab_helper.C.

227  {
228  libMesh::RealGradient U( context.fixed_interior_value(this->_flow_vars.u_var(), qp),
229  context.fixed_interior_value(this->_flow_vars.v_var(), qp) );
230  if(context.get_system().get_mesh().mesh_dimension() == 3)
231  U(2) = context.fixed_interior_value(this->_flow_vars.w_var(), qp);
232 
233  libMesh::RealGradient grad_p = context.fixed_interior_gradient(this->_flow_vars.p_var(), qp);
234 
235  libMesh::RealGradient grad_u = context.fixed_interior_gradient(this->_flow_vars.u_var(), qp);
236  libMesh::RealGradient grad_v = context.fixed_interior_gradient(this->_flow_vars.v_var(), qp);
237 
238  libMesh::RealTensor hess_u = context.fixed_interior_hessian(this->_flow_vars.u_var(), qp);
239  libMesh::RealTensor hess_v = context.fixed_interior_hessian(this->_flow_vars.v_var(), qp);
240 
241  libMesh::RealGradient rhoUdotGradU;
242  libMesh::RealGradient divGradU;
243 
244  if( context.get_system().get_mesh().mesh_dimension() < 3 )
245  {
246  rhoUdotGradU = rho*this->UdotGradU( U, grad_u, grad_v );
247  divGradU = this->div_GradU( hess_u, hess_v );
248  }
249  else
250  {
251  libMesh::RealGradient grad_w = context.fixed_interior_gradient(this->_flow_vars.w_var(), qp);
252  libMesh::RealTensor hess_w = context.fixed_interior_hessian(this->_flow_vars.w_var(), qp);
253 
254  rhoUdotGradU = rho*this->UdotGradU( U, grad_u, grad_v, grad_w );
255 
256  divGradU = this->div_GradU( hess_u, hess_v, hess_w );
257 
258  d_res_M_dU(0,2) = rho * grad_u(2);
259  d_res_M_dU(1,2) = rho * grad_v(2);
260 
261  d_res_Muvw_dgraduvw(2) = rho * U(2);
262  d_res_M_dgradp(2,2) = 1;
263  d_res_Muvw_dhessuvw(2,2) = mu;
264 
265  d_res_M_dU(2,0) = rho * grad_w(0);
266  d_res_M_dU(2,1) = rho * grad_w(1);
267  d_res_M_dU(2,2) = rho * grad_w(2);
268  }
269 
270  res_M = rhoUdotGradU + grad_p - mu*divGradU;
271 
272  d_res_M_dU(0,0) = rho * grad_u(0);
273  d_res_M_dU(0,1) = rho * grad_u(1);
274  d_res_M_dU(1,0) = rho * grad_v(0);
275  d_res_M_dU(1,1) = rho * grad_v(1);
276 
277  d_res_Muvw_dgraduvw(0) = rho * U(0);
278  d_res_Muvw_dgraduvw(1) = rho * U(1);
279 
280  d_res_M_dgradp(0,0) = 1;
281  d_res_M_dgradp(1,1) = 1;
282 
283  d_res_Muvw_dhessuvw(0,0) = mu;
284  d_res_Muvw_dhessuvw(1,1) = mu;
285  }
libMesh::RealGradient div_GradU(libMesh::RealTensor &hess_u, libMesh::RealTensor &hess_v) const
libMesh::RealGradient UdotGradU(libMesh::Gradient &U, libMesh::Gradient &grad_u, libMesh::Gradient &grad_v) const
libMesh::RealGradient GRINS::IncompressibleNavierStokesStabilizationHelper::compute_res_momentum_transient ( AssemblyContext context,
unsigned int  qp,
const libMesh::Real  rho 
) const
inherited

Definition at line 288 of file inc_navier_stokes_stab_helper.C.

References GRINS::IncompressibleNavierStokesStabilizationHelper::_flow_vars, GRINS::PrimitiveFlowVariables::u_var(), and GRINS::PrimitiveFlowVariables::v_var().

289  {
290  libMesh::RealGradient u_dot;
291  context.interior_rate(this->_flow_vars.u_var(), qp, u_dot(0));
292  context.interior_rate(this->_flow_vars.v_var(), qp, u_dot(1));
293  if(context.get_system().get_mesh().mesh_dimension() == 3)
294  context.interior_rate(this->_flow_vars.w_var(), qp, u_dot(2));
295 
296  return rho*u_dot;
297  }
void GRINS::IncompressibleNavierStokesStabilizationHelper::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
inherited

Definition at line 301 of file inc_navier_stokes_stab_helper.C.

307  {
308  libMesh::RealGradient u_dot;
309  context.interior_rate(this->_flow_vars.u_var(), qp, u_dot(0));
310  context.interior_rate(this->_flow_vars.v_var(), qp, u_dot(1));
311  if(context.get_system().get_mesh().mesh_dimension() == 3)
312  context.interior_rate(this->_flow_vars.w_var(), qp, u_dot(2));
313 
314  res_M = rho*u_dot;
315  d_res_Muvw_duvw = rho;
316  }
libMesh::Real GRINS::IncompressibleNavierStokesStabilizationHelper::compute_tau ( AssemblyContext c,
unsigned int  qp,
libMesh::Real  mat_prop_sq,
libMesh::RealGradient &  g,
libMesh::RealTensor &  G,
libMesh::Real  rho,
libMesh::Gradient  U,
bool  is_steady 
) const
inlineinherited

Definition at line 238 of file inc_navier_stokes_stab_helper.h.

References GRINS::IncompressibleNavierStokesStabilizationHelper::_C, and GRINS::IncompressibleNavierStokesStabilizationHelper::_tau_factor.

Referenced by compute_tau_energy(), and GRINS::IncompressibleNavierStokesStabilizationHelper::compute_tau_momentum().

246  {
247  libMesh::Real tau = (rho*U)*(G*(rho*U)) + this->_C*mat_prop_sq*G.contract(G);
248 
249  if(!is_steady)
250  tau += (2.0*rho/c.get_deltat_value())*(2.0*rho/c.get_deltat_value());
251 
252  return this->_tau_factor/std::sqrt(tau);
253  }
void GRINS::IncompressibleNavierStokesStabilizationHelper::compute_tau_and_derivs ( AssemblyContext c,
unsigned int  qp,
libMesh::Real  mat_prop_sq,
libMesh::RealGradient &  g,
libMesh::RealTensor &  G,
libMesh::Real  rho,
libMesh::Gradient  U,
libMesh::Real &  tau,
libMesh::Real &  d_tau_d_rho,
libMesh::Gradient &  d_tau_d_U,
bool  is_steady 
) const
inlineinherited

Definition at line 258 of file inc_navier_stokes_stab_helper.h.

269  {
270  libMesh::Gradient rhoU = rho*U;
271  libMesh::Gradient GrhoU = G*rhoU;
272  libMesh::Real rhoUGrhoU = rhoU * GrhoU;
273  libMesh::Real GG = G.contract(G);
274  tau = rhoUGrhoU + this->_C*mat_prop_sq*GG;
275  d_tau_d_rho = rhoUGrhoU*2/rho;
276  d_tau_d_U = 2*rho*GrhoU;
277 
278  if(!is_steady)
279  {
280  libMesh::Real two_rho_over_dt = 2*rho/c.get_deltat_value();
281  tau += two_rho_over_dt * two_rho_over_dt;
282  d_tau_d_rho += 4*two_rho_over_dt/c.get_deltat_value();
283  }
284 
285  // But what we've computed so far isn't tau; we need
286  // tau = _tau_factor/ sqrt(our_tau)
287 
288  libMesh::Real root_oldtau = std::sqrt(tau);
289  libMesh::Real d_tau_d_oldtau = -this->_tau_factor / (tau*root_oldtau) / 2;
290 
291  d_tau_d_rho = d_tau_d_oldtau * d_tau_d_rho;
292  d_tau_d_U = d_tau_d_oldtau * d_tau_d_U;
293 
294  tau = this->_tau_factor / root_oldtau;
295  }
libMesh::Real GRINS::IncompressibleNavierStokesStabilizationHelper::compute_tau_continuity ( libMesh::Real  tau_C,
libMesh::RealGradient &  g 
) const
inlineinherited
void GRINS::IncompressibleNavierStokesStabilizationHelper::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
inlineinherited

Definition at line 189 of file inc_navier_stokes_stab_helper.h.

197  {
198  tau_C = this->_tau_factor/(tau_M*(g*g));
199  libMesh::Real d_tau_C_d_tau_M = -tau_C/tau_M;
200  d_tau_C_d_rho = d_tau_C_d_tau_M * d_tau_M_d_rho;
201  d_tau_C_d_U = d_tau_C_d_tau_M * d_tau_M_d_U;
202  }
libMesh::Real GRINS::LowMachNavierStokesStabilizationHelper::compute_tau_energy ( AssemblyContext c,
unsigned int  qp,
libMesh::RealGradient &  g,
libMesh::RealTensor &  G,
libMesh::Real  rho,
libMesh::Gradient  U,
libMesh::Real  k,
libMesh::Real  cp,
bool  is_steady 
) const
inline

Definition at line 57 of file low_mach_navier_stokes_stab_helper.h.

References GRINS::IncompressibleNavierStokesStabilizationHelper::compute_tau().

66  {
67  /*
68  libMesh::Real tau = (rho*U)*(G*(rho*U)) + this->_C*k*k*G.contract(G);
69 
70  if(!is_steady)
71  tau += (2.0*rho/c.get_deltat_value())*(2.0*rho/c.get_deltat_value());
72 
73  return this->_tau_factor/std::sqrt(tau);
74  */
75  return this->compute_tau( c, qp, k*k, g, G, rho*cp, U, is_steady );
76  }
libMesh::Real compute_tau(AssemblyContext &c, unsigned int qp, libMesh::Real mat_prop_sq, libMesh::RealGradient &g, libMesh::RealTensor &G, libMesh::Real rho, libMesh::Gradient U, bool is_steady) const
libMesh::Real GRINS::IncompressibleNavierStokesStabilizationHelper::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
inlineinherited

Definition at line 205 of file inc_navier_stokes_stab_helper.h.

References GRINS::IncompressibleNavierStokesStabilizationHelper::compute_tau().

213  {
214  return this->compute_tau( c, qp, mu*mu, g, G, rho, U, is_steady );
215  }
libMesh::Real compute_tau(AssemblyContext &c, unsigned int qp, libMesh::Real mat_prop_sq, libMesh::RealGradient &g, libMesh::RealTensor &G, libMesh::Real rho, libMesh::Gradient U, bool is_steady) const
void GRINS::IncompressibleNavierStokesStabilizationHelper::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
inlineinherited

Definition at line 219 of file inc_navier_stokes_stab_helper.h.

230  {
231  this->compute_tau_and_derivs( c, qp, mu*mu, g, G, rho, U, tau_M,
232  d_tau_M_d_rho, d_tau_M_d_U,
233  is_steady );
234  }
void compute_tau_and_derivs(AssemblyContext &c, unsigned int qp, libMesh::Real mat_prop_sq, libMesh::RealGradient &g, libMesh::RealTensor &G, libMesh::Real rho, libMesh::Gradient U, libMesh::Real &tau, libMesh::Real &d_tau_d_rho, libMesh::Gradient &d_tau_d_U, bool is_steady) const
libMesh::RealGradient GRINS::IncompressibleNavierStokesStabilizationHelper::div_divU_I ( libMesh::RealTensor &  hess_u,
libMesh::RealTensor &  hess_v 
) const
inherited
Todo:
Should we inline this?

Definition at line 121 of file inc_navier_stokes_stab_helper.C.

123  {
124  return libMesh::RealGradient( hess_u(0,0) + hess_v(1,0),
125  hess_u(0,1) + hess_v(1,1) );
126  }
libMesh::RealGradient GRINS::IncompressibleNavierStokesStabilizationHelper::div_divU_I ( libMesh::RealTensor &  hess_u,
libMesh::RealTensor &  hess_v,
libMesh::RealTensor &  hess_w 
) const
inherited
Todo:
Should we inline this?

Definition at line 128 of file inc_navier_stokes_stab_helper.C.

131  {
132  return libMesh::RealGradient( hess_u(0,0) + hess_v(1,0) + hess_w(2,0),
133  hess_u(0,1) + hess_v(1,1) + hess_w(2,1),
134  hess_u(0,2) + hess_v(1,2) + hess_w(2,2) );
135  }
libMesh::RealGradient GRINS::IncompressibleNavierStokesStabilizationHelper::div_GradU ( libMesh::RealTensor &  hess_u,
libMesh::RealTensor &  hess_v 
) const
inherited
Todo:
Should we inline this?

Definition at line 89 of file inc_navier_stokes_stab_helper.C.

Referenced by GRINS::IncompressibleNavierStokesStabilizationHelper::compute_res_momentum_steady().

91  {
92  return libMesh::RealGradient( hess_u(0,0) + hess_u(1,1),
93  hess_v(0,0) + hess_v(1,1) );
94  }
libMesh::RealGradient GRINS::IncompressibleNavierStokesStabilizationHelper::div_GradU ( libMesh::RealTensor &  hess_u,
libMesh::RealTensor &  hess_v,
libMesh::RealTensor &  hess_w 
) const
inherited
Todo:
Should we inline this?

Definition at line 96 of file inc_navier_stokes_stab_helper.C.

99  {
100  return libMesh::RealGradient( hess_u(0,0) + hess_u(1,1) + hess_u(2,2),
101  hess_v(0,0) + hess_v(1,1) + hess_v(2,2),
102  hess_w(0,0) + hess_w(1,1) + hess_w(2,2) );
103  }
libMesh::RealGradient GRINS::IncompressibleNavierStokesStabilizationHelper::div_GradU_T ( libMesh::RealTensor &  hess_u,
libMesh::RealTensor &  hess_v 
) const
inherited
Todo:
Should we inline this?

Definition at line 105 of file inc_navier_stokes_stab_helper.C.

107  {
108  return libMesh::RealGradient( hess_u(0,0) + hess_v(0,1),
109  hess_u(1,0) + hess_v(1,1) );
110  }
libMesh::RealGradient GRINS::IncompressibleNavierStokesStabilizationHelper::div_GradU_T ( libMesh::RealTensor &  hess_u,
libMesh::RealTensor &  hess_v,
libMesh::RealTensor &  hess_w 
) const
inherited
Todo:
Should we inline this?

Definition at line 112 of file inc_navier_stokes_stab_helper.C.

115  {
116  return libMesh::RealGradient( hess_u(0,0) + hess_v(0,1) + hess_w(0,2),
117  hess_u(1,0) + hess_v(1,1) + hess_w(1,2),
118  hess_u(2,0) + hess_v(2,1) + hess_w(2,2) );
119  }
void GRINS::IncompressibleNavierStokesStabilizationHelper::init ( libMesh::FEMSystem &  system)
inherited
void GRINS::ParameterUser::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 in GRINS::AxisymmetricHeatTransfer< Conductivity >, GRINS::LowMachNavierStokesBase< Viscosity, SpecificHeat, ThermalConductivity >, GRINS::IncompressibleNavierStokesBase< Viscosity >, GRINS::BoussinesqBuoyancySPGSMStabilization< Viscosity >, GRINS::HeatConduction< Conductivity >, GRINS::HeatTransferBase< Conductivity >, and GRINS::BoussinesqBuoyancyAdjointStabilization< Viscosity >.

Definition at line 50 of file parameter_user.C.

Referenced by GRINS::BoussinesqBuoyancyAdjointStabilization< Viscosity >::register_parameter(), GRINS::HeatTransferBase< Conductivity >::register_parameter(), GRINS::HeatConduction< Conductivity >::register_parameter(), GRINS::BoussinesqBuoyancySPGSMStabilization< Viscosity >::register_parameter(), GRINS::IncompressibleNavierStokesBase< Viscosity >::register_parameter(), GRINS::LowMachNavierStokesBase< Viscosity, SpecificHeat, ThermalConductivity >::register_parameter(), and GRINS::AxisymmetricHeatTransfer< Conductivity >::register_parameter().

53  {
54  std::map<std::string, libMesh::Number*>::const_iterator it =
55  _my_parameters.find(param_name);
56 
57  if (it != _my_parameters.end())
58  {
59  std::cout << _my_name << " uses parameter " << param_name
60  << std::endl;
61  param_pointer.push_back(it->second);
62  }
63  }
std::map< std::string, libMesh::Number * > _my_parameters
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
libMesh::RealGradient GRINS::IncompressibleNavierStokesStabilizationHelper::UdotGradU ( libMesh::Gradient &  U,
libMesh::Gradient &  grad_u,
libMesh::Gradient &  grad_v 
) const
inherited
Todo:
Should we inline this?

Definition at line 74 of file inc_navier_stokes_stab_helper.C.

Referenced by GRINS::IncompressibleNavierStokesStabilizationHelper::compute_res_momentum_steady().

77  {
78  return libMesh::RealGradient( U*grad_u, U*grad_v );
79  }
libMesh::RealGradient GRINS::IncompressibleNavierStokesStabilizationHelper::UdotGradU ( libMesh::Gradient &  U,
libMesh::Gradient &  grad_u,
libMesh::Gradient &  grad_v,
libMesh::Gradient &  grad_w 
) const
inherited
Todo:
Should we inline this?

Definition at line 81 of file inc_navier_stokes_stab_helper.C.

85  {
86  return libMesh::RealGradient( U*grad_u, U*grad_v, U*grad_w );
87  }

Member Data Documentation

libMesh::Real GRINS::IncompressibleNavierStokesStabilizationHelper::_C
protectedinherited
PrimitiveFlowVariables GRINS::IncompressibleNavierStokesStabilizationHelper::_flow_vars
protectedinherited
libMesh::Real GRINS::IncompressibleNavierStokesStabilizationHelper::_tau_factor
protectedinherited

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