GRINS-0.8.0
inc_navier_stokes.C
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2017 Paul T. Bauman, Roy H. Stogner
7 // Copyright (C) 2010-2013 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 
26 // This class
28 
29 // GRINS
30 #include "grins/assembly_context.h"
34 
35 // libMesh
36 #include "libmesh/quadrature.h"
37 
38 namespace GRINS
39 {
40 
41  template<class Mu>
42  IncompressibleNavierStokes<Mu>::IncompressibleNavierStokes(const std::string& physics_name, const GetPot& input )
43  : IncompressibleNavierStokesBase<Mu>(physics_name,
44  PhysicsNaming::incompressible_navier_stokes(), /* "core" Physics name */
45  input),
46  _p_pinning(input,physics_name),
47  _mu_index(0)
48  {
49  // This is deleted in the base class
50  this->_ic_handler = new GenericICHandler( physics_name, input );
51 
52  this->_pin_pressure = input("Physics/"+PhysicsNaming::incompressible_navier_stokes()+"/pin_pressure", false );
53 
54  if( this->_flow_vars.dim() < 2 )
55  libmesh_error_msg("ERROR: IncompressibleNavierStokes only valid for two or three dimensions! Make sure you have at least two components in your Velocity type variable.");
56  }
57 
58  template<class Mu>
60  {
61  if( _pin_pressure )
62  _p_pinning.check_pin_location(system.get_mesh());
63  }
64 
65  template<class Mu>
68  {
69  std::string section = "Physics/"+PhysicsNaming::incompressible_navier_stokes()+"/output_vars";
70 
71  if( input.have_variable(section) )
72  {
73  unsigned int n_vars = input.vector_variable_size(section);
74 
75  for( unsigned int v = 0; v < n_vars; v++ )
76  {
77  std::string name = input(section,"DIE!",v);
78 
79  if( name == std::string("mu") )
80  {
81  this->_mu_index = postprocessing.register_quantity( name );
82  }
83  else
84  {
85  std::cerr << "Error: Invalid output_vars value for "+PhysicsNaming::incompressible_navier_stokes() << std::endl
86  << " Found " << name << std::endl
87  << " Acceptable values are: mu" << std::endl;
88  libmesh_error();
89  }
90  }
91  }
92 
93  return;
94  }
95 
96  template<class Mu>
98  ( bool compute_jacobian,
99  AssemblyContext & context )
100  {
101  // The number of local degrees of freedom in each variable.
102  const unsigned int n_u_dofs = context.get_dof_indices(this->_flow_vars.u()).size();
103  const unsigned int n_p_dofs = context.get_dof_indices(this->_press_var.p()).size();
104 
105  // Check number of dofs is same for this->_flow_vars.u(), v_var and w_var.
106  libmesh_assert (n_u_dofs == context.get_dof_indices(this->_flow_vars.v()).size());
107 
108  if (this->_flow_vars.dim() == 3)
109  libmesh_assert (n_u_dofs == context.get_dof_indices(this->_flow_vars.w()).size());
110 
111  // We get some references to cell-specific data that
112  // will be used to assemble the linear system.
113 
114  // Element Jacobian * quadrature weights for interior integration.
115  const std::vector<libMesh::Real> &JxW =
116  context.get_element_fe(this->_flow_vars.u())->get_JxW();
117 
118  // The velocity shape functions at interior quadrature points.
119  const std::vector<std::vector<libMesh::Real> >& u_phi =
120  context.get_element_fe(this->_flow_vars.u())->get_phi();
121 
122  // The velocity shape function gradients (in global coords.)
123  // at interior quadrature points.
124  const std::vector<std::vector<libMesh::RealGradient> >& u_gradphi =
125  context.get_element_fe(this->_flow_vars.u())->get_dphi();
126 
127  // The pressure shape functions at interior quadrature points.
128  const std::vector<std::vector<libMesh::Real> >& p_phi =
129  context.get_element_fe(this->_press_var.p())->get_phi();
130 
131  const std::vector<libMesh::Point>& u_qpoint =
132  context.get_element_fe(this->_flow_vars.u())->get_xyz();
133 
134  // The subvectors and submatrices we need to fill:
135  //
136  // K_{\alpha \beta} = R_{\alpha},{\beta} = \partial{ R_{\alpha} } / \partial{ {\beta} } (where R denotes residual)
137  // e.g., for \alpha = v and \beta = u we get: K{vu} = R_{v},{u}
138  // Note that Kpu, Kpv, Kpw and Fp comes as constraint.
139 
140  libMesh::DenseSubMatrix<libMesh::Number> &Kuu = context.get_elem_jacobian(this->_flow_vars.u(), this->_flow_vars.u()); // R_{u},{u}
141  libMesh::DenseSubMatrix<libMesh::Number> &Kuv = context.get_elem_jacobian(this->_flow_vars.u(), this->_flow_vars.v()); // R_{u},{v}
142  libMesh::DenseSubMatrix<libMesh::Number>* Kuw = NULL;
143 
144  libMesh::DenseSubMatrix<libMesh::Number> &Kvu = context.get_elem_jacobian(this->_flow_vars.v(), this->_flow_vars.u()); // R_{v},{u}
145  libMesh::DenseSubMatrix<libMesh::Number> &Kvv = context.get_elem_jacobian(this->_flow_vars.v(), this->_flow_vars.v()); // R_{v},{v}
146  libMesh::DenseSubMatrix<libMesh::Number>* Kvw = NULL;
147 
148  libMesh::DenseSubMatrix<libMesh::Number>* Kwu = NULL;
149  libMesh::DenseSubMatrix<libMesh::Number>* Kwv = NULL;
150  libMesh::DenseSubMatrix<libMesh::Number>* Kww = NULL;
151 
152  libMesh::DenseSubMatrix<libMesh::Number> &Kup = context.get_elem_jacobian(this->_flow_vars.u(), this->_press_var.p()); // R_{u},{p}
153  libMesh::DenseSubMatrix<libMesh::Number> &Kvp = context.get_elem_jacobian(this->_flow_vars.v(), this->_press_var.p()); // R_{v},{p}
154  libMesh::DenseSubMatrix<libMesh::Number>* Kwp = NULL;
155 
156  libMesh::DenseSubVector<libMesh::Number> &Fu = context.get_elem_residual(this->_flow_vars.u()); // R_{u}
157  libMesh::DenseSubVector<libMesh::Number> &Fv = context.get_elem_residual(this->_flow_vars.v()); // R_{v}
158  libMesh::DenseSubVector<libMesh::Number>* Fw = NULL;
159 
160  if( this->_flow_vars.dim() == 3 )
161  {
162  Kuw = &context.get_elem_jacobian(this->_flow_vars.u(), this->_flow_vars.w()); // R_{u},{w}
163  Kvw = &context.get_elem_jacobian(this->_flow_vars.v(), this->_flow_vars.w()); // R_{v},{w}
164  Kwu = &context.get_elem_jacobian(this->_flow_vars.w(), this->_flow_vars.u()); // R_{w},{u};
165  Kwv = &context.get_elem_jacobian(this->_flow_vars.w(), this->_flow_vars.v()); // R_{w},{v};
166  Kww = &context.get_elem_jacobian(this->_flow_vars.w(), this->_flow_vars.w()); // R_{w},{w}
167  Kwp = &context.get_elem_jacobian(this->_flow_vars.w(), this->_press_var.p()); // R_{w},{p}
168  Fw = &context.get_elem_residual(this->_flow_vars.w()); // R_{w}
169  }
170 
171  // Now we will build the element Jacobian and residual.
172  // Constructing the residual requires the solution and its
173  // gradient from the previous timestep. This must be
174  // calculated at each quadrature point by summing the
175  // solution degree-of-freedom values by the appropriate
176  // weight functions.
177  unsigned int n_qpoints = context.get_element_qrule().n_points();
178 
179  for (unsigned int qp=0; qp != n_qpoints; qp++)
180  {
181  // Compute the solution & its gradient at the old Newton iterate.
182  libMesh::Number p, u, v;
183  p = context.interior_value(this->_press_var.p(), qp);
184  u = context.interior_value(this->_flow_vars.u(), qp);
185  v = context.interior_value(this->_flow_vars.v(), qp);
186 
187  libMesh::Gradient grad_u, grad_v, grad_w;
188  grad_u = context.interior_gradient(this->_flow_vars.u(), qp);
189  grad_v = context.interior_gradient(this->_flow_vars.v(), qp);
190  if (this->_flow_vars.dim() == 3)
191  grad_w = context.interior_gradient(this->_flow_vars.w(), qp);
192 
193  libMesh::NumberVectorValue U(u,v);
194  if (this->_flow_vars.dim() == 3)
195  U(2) = context.interior_value(this->_flow_vars.w(), qp); // w
196 
197  const libMesh::Number grad_u_x = grad_u(0);
198  const libMesh::Number grad_u_y = grad_u(1);
199  const libMesh::Number grad_u_z = (this->_flow_vars.dim() == 3)?grad_u(2):0;
200  const libMesh::Number grad_v_x = grad_v(0);
201  const libMesh::Number grad_v_y = grad_v(1);
202  const libMesh::Number grad_v_z = (this->_flow_vars.dim() == 3)?grad_v(2):0;
203  const libMesh::Number grad_w_x = (this->_flow_vars.dim() == 3)?grad_w(0):0;
204  const libMesh::Number grad_w_y = (this->_flow_vars.dim() == 3)?grad_w(1):0;
205  const libMesh::Number grad_w_z = (this->_flow_vars.dim() == 3)?grad_w(2):0;
206 
207  const libMesh::Number r = u_qpoint[qp](0);
208 
209  libMesh::Real jac = JxW[qp];
210 
211  // Compute the viscosity at this qp
212  libMesh::Real _mu_qp = this->_mu(context, qp);
213 
215  {
216  jac *= r;
217  }
218 
219  // First, an i-loop over the velocity degrees of freedom.
220  // We know that n_u_dofs == n_v_dofs so we can compute contributions
221  // for both at the same time.
222  for (unsigned int i=0; i != n_u_dofs; i++)
223  {
224  Fu(i) += jac *
225  (-this->_rho*u_phi[i][qp]*(U*grad_u) // convection term
226  +p*u_gradphi[i][qp](0) // pressure term
227  -_mu_qp*(u_gradphi[i][qp]*grad_u) ); // diffusion term
228 
231  {
232  Fu(i) += u_phi[i][qp]*( p/r - _mu_qp*U(0)/(r*r) )*jac;
233  }
234 
235  Fv(i) += jac *
236  (-this->_rho*u_phi[i][qp]*(U*grad_v) // convection term
237  +p*u_gradphi[i][qp](1) // pressure term
238  -_mu_qp*(u_gradphi[i][qp]*grad_v) ); // diffusion term
239 
240  if (this->_flow_vars.dim() == 3)
241  {
242  (*Fw)(i) += jac *
243  (-this->_rho*u_phi[i][qp]*(U*grad_w) // convection term
244  +p*u_gradphi[i][qp](2) // pressure term
245  -_mu_qp*(u_gradphi[i][qp]*grad_w) ); // diffusion term
246  }
247 
248  if (compute_jacobian)
249  {
250  for (unsigned int j=0; j != n_u_dofs; j++)
251  {
252  // TODO: precompute some terms like:
253  // (Uvec*u_gradphi[j][qp]),
254  // u_phi[i][qp]*u_phi[j][qp],
255  // (u_gradphi[i][qp]*u_gradphi[j][qp])
256 
257  Kuu(i,j) += jac * context.get_elem_solution_derivative() *
258  (-this->_rho*u_phi[i][qp]*(U*u_gradphi[j][qp]) // convection term
259  -this->_rho*u_phi[i][qp]*grad_u_x*u_phi[j][qp] // convection term
260  -_mu_qp*(u_gradphi[i][qp]*u_gradphi[j][qp])); // diffusion term
261 
262 
264  {
265  Kuu(i,j) -= u_phi[i][qp]*_mu_qp*u_phi[j][qp]/(r*r)*jac * context.get_elem_solution_derivative();
266  }
267 
268  Kuv(i,j) += jac * context.get_elem_solution_derivative() *
269  (-this->_rho*u_phi[i][qp]*grad_u_y*u_phi[j][qp]); // convection term
270 
271  Kvv(i,j) += jac * context.get_elem_solution_derivative() *
272  (-this->_rho*u_phi[i][qp]*(U*u_gradphi[j][qp]) // convection term
273  -this->_rho*u_phi[i][qp]*grad_v_y*u_phi[j][qp] // convection term
274  -_mu_qp*(u_gradphi[i][qp]*u_gradphi[j][qp])); // diffusion term
275 
276  Kvu(i,j) += jac * context.get_elem_solution_derivative() *
277  (-this->_rho*u_phi[i][qp]*grad_v_x*u_phi[j][qp]); // convection term
278 
279  if (this->_flow_vars.dim() == 3)
280  {
281  (*Kuw)(i,j) += jac * context.get_elem_solution_derivative() *
282  (-this->_rho*u_phi[i][qp]*grad_u_z*u_phi[j][qp]); // convection term
283 
284  (*Kvw)(i,j) += jac * context.get_elem_solution_derivative() *
285  (-this->_rho*u_phi[i][qp]*grad_v_z*u_phi[j][qp]); // convection term
286 
287  (*Kww)(i,j) += jac * context.get_elem_solution_derivative() *
288  (-this->_rho*u_phi[i][qp]*(U*u_gradphi[j][qp]) // convection term
289  -this->_rho*u_phi[i][qp]*grad_w_z*u_phi[j][qp] // convection term
290  -_mu_qp*(u_gradphi[i][qp]*u_gradphi[j][qp])); // diffusion term
291  (*Kwu)(i,j) += jac * context.get_elem_solution_derivative() *
292  (-this->_rho*u_phi[i][qp]*grad_w_x*u_phi[j][qp]); // convection term
293  (*Kwv)(i,j) += jac * context.get_elem_solution_derivative() *
294  (-this->_rho*u_phi[i][qp]*grad_w_y*u_phi[j][qp]); // convection term
295  }
296  } // end of the inner dof (j) loop
297 
298  // Matrix contributions for the up, vp and wp couplings
299  for (unsigned int j=0; j != n_p_dofs; j++)
300  {
301  Kup(i,j) += u_gradphi[i][qp](0)*p_phi[j][qp]*jac * context.get_elem_solution_derivative();
302  Kvp(i,j) += u_gradphi[i][qp](1)*p_phi[j][qp]*jac * context.get_elem_solution_derivative();
303 
304  if (this->_flow_vars.dim() == 3)
305  {
306  (*Kwp)(i,j) += u_gradphi[i][qp](2)*p_phi[j][qp]*jac * context.get_elem_solution_derivative();
307  }
308 
310  {
311  Kup(i,j) += u_phi[i][qp]*p_phi[j][qp]/r*jac * context.get_elem_solution_derivative();
312  }
313 
314  } // end of the inner dof (j) loop
315 
316 
317 
318  } // end - if (compute_jacobian)
319 
320  } // end of the outer dof (i) loop
321  } // end of the quadrature point (qp) loop
322  }
323 
324  template<class Mu>
326  ( bool compute_jacobian, AssemblyContext & context )
327  {
328  // The number of local degrees of freedom in each variable.
329  const unsigned int n_u_dofs = context.get_dof_indices(this->_flow_vars.u()).size();
330  const unsigned int n_p_dofs = context.get_dof_indices(this->_press_var.p()).size();
331 
332  // We get some references to cell-specific data that
333  // will be used to assemble the linear system.
334 
335  // Element Jacobian * quadrature weights for interior integration.
336  const std::vector<libMesh::Real> &JxW =
337  context.get_element_fe(this->_flow_vars.u())->get_JxW();
338 
339  // The velocity shape function gradients (in global coords.)
340  // at interior quadrature points.
341  const std::vector<std::vector<libMesh::RealGradient> >& u_gradphi =
342  context.get_element_fe(this->_flow_vars.u())->get_dphi();
343 
344  // The velocity shape function gradients (in global coords.)
345  // at interior quadrature points.
346  const std::vector<std::vector<libMesh::Real> >& u_phi =
347  context.get_element_fe(this->_flow_vars.u())->get_phi();
348 
349  // The pressure shape functions at interior quadrature points.
350  const std::vector<std::vector<libMesh::Real> >& p_phi =
351  context.get_element_fe(this->_press_var.p())->get_phi();
352 
353  const std::vector<libMesh::Point>& u_qpoint =
354  context.get_element_fe(this->_flow_vars.u())->get_xyz();
355 
356  // The subvectors and submatrices we need to fill:
357  //
358  // Kpu, Kpv, Kpw, Fp
359 
360  libMesh::DenseSubMatrix<libMesh::Number> &Kpu = context.get_elem_jacobian(this->_press_var.p(), this->_flow_vars.u()); // R_{p},{u}
361  libMesh::DenseSubMatrix<libMesh::Number> &Kpv = context.get_elem_jacobian(this->_press_var.p(), this->_flow_vars.v()); // R_{p},{v}
362  libMesh::DenseSubMatrix<libMesh::Number>* Kpw = NULL;
363 
364  libMesh::DenseSubVector<libMesh::Number> &Fp = context.get_elem_residual(this->_press_var.p()); // R_{p}
365 
366 
367  if( this->_flow_vars.dim() == 3 )
368  {
369  Kpw = &context.get_elem_jacobian(this->_press_var.p(), this->_flow_vars.w()); // R_{p},{w}
370  }
371 
372  // Add the constraint given by the continuity equation.
373  unsigned int n_qpoints = context.get_element_qrule().n_points();
374  for (unsigned int qp=0; qp != n_qpoints; qp++)
375  {
376  // Compute the velocity gradient at the old Newton iterate.
377  libMesh::Gradient grad_u, grad_v, grad_w;
378  grad_u = context.interior_gradient(this->_flow_vars.u(), qp);
379  grad_v = context.interior_gradient(this->_flow_vars.v(), qp);
380  if (this->_flow_vars.dim() == 3)
381  grad_w = context.interior_gradient(this->_flow_vars.w(), qp);
382 
383  libMesh::Number divU = grad_u(0) + grad_v(1);
384  if (this->_flow_vars.dim() == 3)
385  divU += grad_w(2);
386 
387  const libMesh::Number r = u_qpoint[qp](0);
388 
389  libMesh::Real jac = JxW[qp];
390 
392  {
393  libMesh::Number u = context.interior_value( this->_flow_vars.u(), qp );
394  divU += u/r;
395  jac *= r;
396  }
397 
398  // Now a loop over the pressure degrees of freedom. This
399  // computes the contributions of the continuity equation.
400  for (unsigned int i=0; i != n_p_dofs; i++)
401  {
402  Fp(i) += p_phi[i][qp]*divU*jac;
403 
404  if (compute_jacobian)
405  {
406  libmesh_assert_equal_to (context.get_elem_solution_derivative(), 1.0);
407 
408  for (unsigned int j=0; j != n_u_dofs; j++)
409  {
410  Kpu(i,j) += p_phi[i][qp]*u_gradphi[j][qp](0)*jac * context.get_elem_solution_derivative();
411  Kpv(i,j) += p_phi[i][qp]*u_gradphi[j][qp](1)*jac * context.get_elem_solution_derivative();
412  if (this->_flow_vars.dim() == 3)
413  (*Kpw)(i,j) += p_phi[i][qp]*u_gradphi[j][qp](2)*jac * context.get_elem_solution_derivative();
414 
416  {
417  Kpu(i,j) += p_phi[i][qp]*u_phi[j][qp]/r*jac * context.get_elem_solution_derivative();
418  }
419  } // end of the inner dof (j) loop
420 
421  } // end - if (compute_jacobian)
422 
423  } // end of the outer dof (i) loop
424  } // end of the quadrature point (qp) loop
425 
426  // Pin p = p_value at p_point
427  if( _pin_pressure )
428  {
429  _p_pinning.pin_value( context, compute_jacobian, this->_press_var.p() );
430  }
431  }
432 
433  template<class Mu>
435  ( bool compute_jacobian, AssemblyContext & context )
436  {
437  // Element Jacobian * quadrature weights for interior integration
438  // We assume the same for each flow variable
439  const std::vector<libMesh::Real> &JxW =
440  context.get_element_fe(this->_flow_vars.u())->get_JxW();
441 
442  // The shape functions at interior quadrature points.
443  // We assume the same for each flow variable
444  const std::vector<std::vector<libMesh::Real> >& u_phi =
445  context.get_element_fe(this->_flow_vars.u())->get_phi();
446 
447  const std::vector<libMesh::Point>& u_qpoint =
448  context.get_element_fe(this->_flow_vars.u())->get_xyz();
449 
450  // The number of local degrees of freedom in each variable
451  const unsigned int n_u_dofs = context.get_dof_indices(this->_flow_vars.u()).size();
452 
453  // The subvectors and submatrices we need to fill:
454  libMesh::DenseSubVector<libMesh::Real> &F_u = context.get_elem_residual(this->_flow_vars.u());
455  libMesh::DenseSubVector<libMesh::Real> &F_v = context.get_elem_residual(this->_flow_vars.v());
456  libMesh::DenseSubVector<libMesh::Real>* F_w = NULL;
457 
458  libMesh::DenseSubMatrix<libMesh::Real> &M_uu = context.get_elem_jacobian(this->_flow_vars.u(), this->_flow_vars.u());
459  libMesh::DenseSubMatrix<libMesh::Real> &M_vv = context.get_elem_jacobian(this->_flow_vars.v(), this->_flow_vars.v());
460  libMesh::DenseSubMatrix<libMesh::Real>* M_ww = NULL;
461 
462 
463  if( this->_flow_vars.dim() == 3 )
464  {
465  F_w = &context.get_elem_residual(this->_flow_vars.w()); // R_{w}
466  M_ww = &context.get_elem_jacobian(this->_flow_vars.w(), this->_flow_vars.w());
467  }
468 
469  unsigned int n_qpoints = context.get_element_qrule().n_points();
470 
471  for (unsigned int qp = 0; qp != n_qpoints; ++qp)
472  {
473  // For the mass residual, we need to be a little careful.
474  // The time integrator is handling the time-discretization
475  // for us so we need to supply M(u_fixed)*u' for the residual.
476  // u_fixed will be given by the fixed_interior_value function
477  // while u' will be given by the interior_rate function.
478  libMesh::Real u_dot, v_dot, w_dot = 0.0;
479  context.interior_rate(this->_flow_vars.u(), qp, u_dot);
480  context.interior_rate(this->_flow_vars.v(), qp, v_dot);
481 
482  if(this->_flow_vars.dim() == 3 )
483  context.interior_rate(this->_flow_vars.w(), qp, w_dot);
484 
485  const libMesh::Number r = u_qpoint[qp](0);
486 
487  libMesh::Real jac = JxW[qp];
488 
490  {
491  jac *= r;
492  }
493 
494  for (unsigned int i = 0; i != n_u_dofs; ++i)
495  {
496  F_u(i) -= this->_rho*u_dot*u_phi[i][qp]*jac;
497  F_v(i) -= this->_rho*v_dot*u_phi[i][qp]*jac;
498 
499  if( this->_flow_vars.dim() == 3 )
500  (*F_w)(i) -= this->_rho*w_dot*u_phi[i][qp]*jac;
501 
502  if( compute_jacobian )
503  {
504  for (unsigned int j=0; j != n_u_dofs; j++)
505  {
506  // Assuming rho is constant w.r.t. u, v, w
507  // and T (if Boussinesq added).
508  libMesh::Real value = this->_rho*u_phi[i][qp]*u_phi[j][qp]*jac * context.get_elem_solution_rate_derivative();
509 
510  M_uu(i,j) -= value;
511  M_vv(i,j) -= value;
512 
513  if( this->_flow_vars.dim() == 3)
514  {
515  (*M_ww)(i,j) -= value;
516  }
517 
518  } // End dof loop
519  } // End Jacobian check
520  } // End dof loop
521  } // End quadrature loop
522 
523  return;
524  }
525 
526  template<class Mu>
528  const AssemblyContext& context,
529  const libMesh::Point& point,
530  libMesh::Real& value )
531  {
532  if( quantity_index == this->_mu_index )
533  {
534  value = this->_mu(point, context.get_time());
535  }
536 
537  return;
538  }
539 
540 } // namespace GRINS
541 
542 // Instantiate
543 INSTANTIATE_INC_NS_SUBCLASS(IncompressibleNavierStokes);
virtual void mass_residual(bool compute_jacobian, AssemblyContext &context)
Mass matrix part(s) for element interiors. All boundary terms lie within the time_derivative part...
static bool is_axisymmetric()
Definition: physics.h:132
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.
unsigned int register_quantity(std::string name)
Register quantity to be postprocessed.
GRINS::ICHandlingBase * _ic_handler
Definition: physics.h:258
bool _pin_pressure
Enable pressure pinning.
Physics class for Incompressible Navier-Stokes.
INSTANTIATE_INC_NS_SUBCLASS(IncompressibleNavierStokes)
virtual void element_constraint(bool compute_jacobian, AssemblyContext &context)
Constraint part(s) of physics for element interiors.
virtual void register_postprocessing_vars(const GetPot &input, PostProcessedQuantities< libMesh::Real > &postprocessing)
Register postprocessing variables for IncompressibleNavierStokes.
Base class for reading and handling initial conditions for physics classes.
GRINS namespace.
Interface with libMesh for solving Multiphysics problems.
static PhysicsName incompressible_navier_stokes()
virtual void auxiliary_init(MultiphysicsSystem &system)
Any auxillary initialization a Physics class may need.
virtual void element_time_derivative(bool compute_jacobian, AssemblyContext &context)
Time dependent part(s) of physics for element interiors.
unsigned int dim() const
Number of components.

Generated on Tue Dec 19 2017 12:47:28 for GRINS-0.8.0 by  doxygen 1.8.9.1