Example codes
and tutorials
The (Not-so) Quick Guide
List of tutorials/demo codes
Single-Physics Problems
Poisson
Adaptivity illustrated for Poisson
Advection-Diffusion
Unsteady heat equation
Linear wave equation
The Young-Laplace equation
Navier-Stokes
Free-surface Navier-Stokes
Axisymmetric Navier-Stokes
Solid mechanics
Beam structures
Shell structures
Multi-physics Problems
Fluid-structure interaction
Boussinesq convection
Steady thermoelasticity
Methods-based example codes and tutorials
Mesh generation
Linear solvers and preconditioners
Visualisation of the results
Parallel processing
How to write a new element
How to write a new refineable element
Default nonlinear solvers -- the sequence of action functions
...
Documentation
FE theory and top-down discussion of the data structure
The (Not-so) Quick Guide
Comprehensive bottom-up discussion of the data structure
List of available structured and unstructured meshes
Linear solvers and preconditioners
Visualisation of the results
Parallel processing
Coding conventions and C++ style
Creating documentation
Optimisation - robustness vs. "raw speed"
Linear vs. nonlinear problems
Storing shape functions
Changing the default "full" integration scheme
Disabling the ALE formulation of unsteady equations
C vs. C++ output
Different sparse assembly techniques and the STL memory pool
Publications
Publications
Talks
Journal publications
Theses
Picture show
Download
Copyright
Download/installation instructions
Download page
FAQ & Contact
FAQ
Change log
Bugs and other known problems
Completeness of the library & our "To-Do List"
Contact the developers
Get involved

 


Beta release!

Please note that the library has not been "officially" released. While we continue to work on the documentation, these web pages are likely to contain broken links and documents in draft form. Please send an email to

oomph-lib AT maths DOT man DOT ac DOT uk

if you wish to be informed of the library's "official" release.

oomph::NavierStokesEquations< DIM > Class Template Reference

#include <navier_stokes_elements.h>

Inheritance diagram for oomph::NavierStokesEquations< DIM >:

oomph::FSIFluidElement oomph::FiniteElement oomph::GeneralisedElement oomph::GeomObject oomph::QCrouzeixRaviartElement< DIM > oomph::QTaylorHoodElement< DIM > oomph::RefineableNavierStokesEquations< DIM > oomph::TTaylorHoodElement< DIM > oomph::RefineableQCrouzeixRaviartElement< DIM > oomph::RefineableQTaylorHoodElement< DIM > oomph::RefineableQCrouzeixRaviartElement< DIM > oomph::RefineableQTaylorHoodElement< DIM > List of all members.

Detailed Description

template<unsigned DIM>
class oomph::NavierStokesEquations< DIM >

A class for elements that solve the cartesian Navier--Stokes equations, templated by the dimension DIM. This contains the generic maths -- any concrete implementation must be derived from this.

We're solving:

$ { Re \left( St \frac{\partial u_i}{\partial t} + /// (u_j - u_j^{M}) \frac{\partial u_i}{\partial x_j} \right) = /// - \frac{\partial p}{\partial x_i} - R_\rho B_i(x_j) - /// \frac{Re}{Fr} G_i + /// \frac{\partial }{\partial x_j} \left[ R_\mu \left( /// \frac{\partial u_i}{\partial x_j} + /// \frac{\partial u_j}{\partial x_i} \right) \right] } $

and

$ {\Large \frac{\partial u_i}{\partial x_i} = Q } $

We also provide all functions required to use this element in FSI problems, by deriving it from the FSIFluidElement base class.

Definition at line 72 of file navier_stokes_elements.h.


Public Types

typedef void(*) NavierStokesBodyForceFctPt (const double &time, const Vector< double > &x, Vector< double > &body_force)
 Function pointer to body force function fct(t,x,f(x)) x is a Vector!
typedef double(*) NavierStokesSourceFctPt (const double &time, const Vector< double > &x)
 Function pointer to source function fct(t,x) x is a Vector!

Public Member Functions

 NavierStokesEquations ()
 Constructor: NULL the body force and source function and make sure the ALE terms are included by default.
const double & re () const
 Reynolds number.
const double & re_st () const
 Product of Reynolds and Strouhal number (=Womersley number).
double *& re_pt ()
 Pointer to Reynolds number.
double *& re_st_pt ()
 Pointer to product of Reynolds and Strouhal number (=Womersley number).
const double & viscosity_ratio () const
 Viscosity ratio for element: Element's viscosity relative to the viscosity used in the definition of the Reynolds number.
double *& viscosity_ratio_pt ()
 Pointer to Viscosity Ratio.
const double & density_ratio () const
 Density ratio for element: Element's density relative to the viscosity used in the definition of the Reynolds number.
double *& density_ratio_pt ()
 Pointer to Density ratio.
const double & re_invfr () const
 Global inverse Froude number.
double *& re_invfr_pt ()
 Pointer to global inverse Froude number.
const Vector< double > & g () const
 Vector of gravitational components.
Vector< double > *& g_pt ()
 Pointer to Vector of gravitational components.
NavierStokesBodyForceFctPtbody_force_fct_pt ()
 Access function for the body-force pointer.
NavierStokesBodyForceFctPt body_force_fct_pt () const
 Access function for the body-force pointer. Const version.
NavierStokesSourceFctPtsource_fct_pt ()
 Access function for the source-function pointer.
NavierStokesSourceFctPt source_fct_pt () const
 Access function for the source-function pointer. Const version.
virtual unsigned npres_nst () const =0
 Function to return number of pressure degrees of freedom.
double u_nst (const unsigned &n, const unsigned &i) const
 Velocity i at local node n. Uses suitably interpolated value for hanging nodes. The use of u_index_nst() permits the use of this element as the basis for multi-physics elements. The default is to assume that the i-th velocity component is stored at the i-th location of the node.
double u_nst (const unsigned &t, const unsigned &n, const unsigned &i) const
 Velocity i at local node n at timestep t (t=0: present; t>0: previous). Uses suitably interpolated value for hanging nodes.
virtual unsigned u_index_nst (const unsigned &i) const
 Return the index at which the i-th unknown velocity component.
double du_dt_nst (const unsigned &n, const unsigned &i) const
 i-th component of du/dt at local node n. Uses suitably interpolated value for hanging nodes.
void disable_ALE ()
 Disable ALE, i.e. assert the mesh is not moving -- you do this at your own risk!
void enable_ALE ()
 (Re-)enable ALE, i.e. take possible mesh motion into account when evaluating the time-derivative. Note: By default, ALE is enabled, at the expense of possibly creating unnecessary work in problems where the mesh is, in fact, stationary.
virtual double p_nst (const unsigned &n_p) const =0
 Pressure at local pressure "node" n_p Uses suitably interpolated value for hanging nodes.
virtual void fix_pressure (const unsigned &p_dof, const double &p_value)=0
 Pin p_dof-th pressure dof and set it to value specified by p_value.
virtual int p_nodal_index_nst () const
 Return the index at which the pressure is stored if it is stored at the nodes. If not stored at the nodes this will return a negative number.
double pressure_integral () const
 Return pressure integrated over the element.
double dissipation () const
 Return integral of dissipation over element.
double dissipation (const Vector< double > &s) const
 Return dissipation at local coordinate s.
void get_vorticity (const Vector< double > &s, Vector< double > &vorticity) const
 Compute the vorticity vector at local coordinate s.
double kin_energy () const
 Get integral of kinetic energy over element:.
double d_kin_energy_dt () const
 Get integral of time derivative of kinetic energy over element:.
void strain_rate (const Vector< double > &s, DenseMatrix< double > &strain_rate) const
 Get strain-rate tensor: 1/2 (du_i/dx_j + du_j/dx_i).
void get_traction (const Vector< double > &s, const Vector< double > &N, Vector< double > &traction)
 Compute traction (on the viscous scale) exerted onto the fluid at local coordinate s. N has to be outer unit normal to the fluid.
void get_load (const Vector< double > &s, const Vector< double > &N, Vector< double > &load)
 This implements a pure virtual function defined in the FSIFluidElement class. The function computes the traction (on the viscous scale), at the element's local coordinate s, that the fluid element exerts onto an adjacent solid element. The number of arguments is imposed by the interface defined in the FSIFluidElement -- only the unit normal N (pointing into the fluid!) is actually used in the computation.
void get_velocity_mass_matrix_diagonal (Vector< double > &mass_diag)
 Compute the diagonal of the velocity mass matrix.
void output (std::ostream &outfile)
 Output function: x,y,[z],u,v,[w],p in tecplot format. Default number of plot points.
void output (std::ostream &outfile, const unsigned &nplot)
 Output function: x,y,[z],u,v,[w],p in tecplot format. nplot points in each coordinate direction.
void output (FILE *file_pt)
 C-style output function: x,y,[z],u,v,[w],p in tecplot format. Default number of plot points.
void output (FILE *file_pt, const unsigned &nplot)
 C-style output function: x,y,[z],u,v,[w],p in tecplot format. nplot points in each coordinate direction.
void full_output (std::ostream &outfile)
 Full output function: x,y,[z],u,v,[w],p,du/dt,dv/dt,[dw/dt],dissipation in tecplot format. Default number of plot points.
void full_output (std::ostream &outfile, const unsigned &nplot)
 Full output function: x,y,[z],u,v,[w],p,du/dt,dv/dt,[dw/dt],dissipation in tecplot format. nplot points in each coordinate direction.
void output_veloc (std::ostream &outfile, const unsigned &nplot, const unsigned &t)
 Output function: x,y,[z],u,v,[w] in tecplot format. nplot points in each coordinate direction at timestep t (t=0: present; t>0: previous timestep).
void output_vorticity (std::ostream &outfile, const unsigned &nplot)
 Output function: x,y,[z], [omega_x,omega_y,[and/or omega_z]] in tecplot format. nplot points in each coordinate direction.
void output_fct (std::ostream &outfile, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
 Output exact solution specified via function pointer at a given number of plot points. Function prints as many components as are returned in solution Vector.
void output_fct (std::ostream &outfile, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
 Output exact solution specified via function pointer at a given time and at a given number of plot points. Function prints as many components as are returned in solution Vector.
void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 Validate against exact solution at given time Solution is provided via function pointer. Plot at a given number of plot points and compute L2 error and L2 norm of velocity solution over element.
void compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
 Validate against exact solution. Solution is provided via function pointer. Plot at a given number of plot points and compute L2 error and L2 norm of velocity solution over element.
void fill_in_contribution_to_residuals (Vector< double > &residuals)
 Compute the element's residual Vector.
void fill_in_contribution_to_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 Compute the element's residual Vector and the jacobian matrix Virtual function can be overloaded by hanging-node version.
void fill_in_contribution_to_jacobian_and_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
virtual void get_dresidual_dnodal_coordinates (RankThreeTensor< double > &dresidual_dnodal_coordinates)
 Compute derivatives of elemental residual vector with respect to nodal coordinates. Overwrites default implementation in FiniteElement base class. dresidual_dnodal_coordinates(l,i,j) = d res(l) / dX_{ij}.
void interpolated_u_nst (const Vector< double > &s, Vector< double > &veloc) const
 Compute vector of FE interpolated velocity u at local coordinate s.
double interpolated_u_nst (const Vector< double > &s, const unsigned &i) const
 Return FE interpolated velocity u[i] at local coordinate s.
virtual void dinterpolated_u_nst_ddata (const Vector< double > &s, const unsigned &i, Vector< double > &du_ddata, Vector< unsigned > &global_eqn_number)
 Compute the derivatives of the i-th component of velocity at point s with respect to all data that can affect its value. In addition, return the global equation numbers corresponding to the data. The function is virtual so that it can be overloaded in the refineable version.
double interpolated_p_nst (const Vector< double > &s) const
 Return FE interpolated pressure at local coordinate s.
template<>
void get_vorticity (const Vector< double > &s, Vector< double > &vorticity) const
template<>
void get_vorticity (const Vector< double > &s, Vector< double > &vorticity) const

Static Public Attributes

static Vector< double > Gamma
 Navier--Stokes equations static data.

Protected Member Functions

virtual int p_local_eqn (const unsigned &n)=0
 Access function for the local equation number information for the pressure. p_local_eqn[n] = local equation number or < 0 if pinned.
virtual double dshape_and_dtest_eulerian_nst (const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
 Compute the shape functions and derivatives w.r.t. global coords at local coordinate s. Return Jacobian of mapping between local and global coordinates.
virtual double dshape_and_dtest_eulerian_at_knot_nst (const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
 Compute the shape functions and derivatives w.r.t. global coords at ipt-th integration point Return Jacobian of mapping between local and global coordinates.
virtual void pshape_nst (const Vector< double > &s, Shape &psi) const =0
 Compute the pressure shape functions at local coordinate s.
virtual void pshape_nst (const Vector< double > &s, Shape &psi, Shape &test) const =0
 Compute the pressure shape and test functions at local coordinate s.
virtual void get_body_force_nst (const double &time, const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &result)
 Calculate the body force at a given time and local and/or Eulerian position. This function is virtual so that it can be overloaded in multi-physics elements where the body force might depend on another variable.
virtual void get_body_force_gradient_nst (const double &time, const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, DenseMatrix< double > &d_body_force_dx)
virtual double get_source_nst (const double &time, const unsigned &ipt, const Vector< double > &x)
 Calculate the source fct at given time and Eulerian position.
virtual void get_source_gradient_nst (const double &time, const unsigned &ipt, const Vector< double > &x, Vector< double > &gradient)
virtual void fill_in_generic_residual_contribution_nst (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix, unsigned flag)
 Compute the residuals for the Navier--Stokes equations; flag=1(or 0): do (or don't) compute the Jacobian as well.

Protected Attributes

double * Viscosity_Ratio_pt
 Pointer to the viscosity ratio (relative to the viscosity used in the definition of the Reynolds number).
double * Density_Ratio_pt
 Pointer to the density ratio (relative to the density used in the definition of the Reynolds number).
double * Re_pt
 Pointer to global Reynolds number.
double * ReSt_pt
 Pointer to global Reynolds number x Strouhal number (=Womersley).
double * ReInvFr_pt
 Pointer to global Reynolds number x inverse Froude number (= Bond number / Capillary number).
Vector< double > * G_pt
 Pointer to global gravity Vector.
NavierStokesBodyForceFctPt Body_force_fct_pt
 Pointer to body force function.
NavierStokesSourceFctPt Source_fct_pt
 Pointer to volumetric source function.
bool ALE_is_disabled
 Boolean flag to indicate if ALE formulation is disabled when time-derivatives are computed. Only set to true if you're sure that the mesh is stationary.

Static Private Attributes

static int Pressure_not_stored_at_node = -100
 Static "magic" number that indicates that the pressure is not stored at a node.
static double Default_Physical_Constant_Value = 0.0
 Navier--Stokes equations static data.
static double Default_Physical_Ratio_Value = 1.0
 Navier--Stokes equations static data.
static Vector< double > Default_Gravity_vector
 Navier-Stokes equations default gravity vector.

Member Typedef Documentation

template<unsigned DIM>
typedef void(*) oomph::NavierStokesEquations< DIM >::NavierStokesBodyForceFctPt(const double &time, const Vector< double > &x, Vector< double > &body_force)

Function pointer to body force function fct(t,x,f(x)) x is a Vector!

Definition at line 79 of file navier_stokes_elements.h.

template<unsigned DIM>
typedef double(*) oomph::NavierStokesEquations< DIM >::NavierStokesSourceFctPt(const double &time, const Vector< double > &x)

Function pointer to source function fct(t,x) x is a Vector!

Definition at line 85 of file navier_stokes_elements.h.


Constructor & Destructor Documentation

template<unsigned DIM>
oomph::NavierStokesEquations< DIM >::NavierStokesEquations (  )  [inline]

Constructor: NULL the body force and source function and make sure the ALE terms are included by default.

Definition at line 306 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::Default_Gravity_vector, oomph::NavierStokesEquations< DIM >::Default_Physical_Constant_Value, oomph::NavierStokesEquations< DIM >::Default_Physical_Ratio_Value, oomph::NavierStokesEquations< DIM >::Density_Ratio_pt, oomph::NavierStokesEquations< DIM >::G_pt, oomph::NavierStokesEquations< DIM >::Re_pt, oomph::NavierStokesEquations< DIM >::ReInvFr_pt, oomph::NavierStokesEquations< DIM >::ReSt_pt, and oomph::NavierStokesEquations< DIM >::Viscosity_Ratio_pt.


Member Function Documentation

template<unsigned DIM>
NavierStokesBodyForceFctPt oomph::NavierStokesEquations< DIM >::body_force_fct_pt (  )  const [inline]

Access function for the body-force pointer. Const version.

Definition at line 370 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::Body_force_fct_pt.

template<unsigned DIM>
NavierStokesBodyForceFctPt& oomph::NavierStokesEquations< DIM >::body_force_fct_pt (  )  [inline]

Access function for the body-force pointer.

Definition at line 366 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::Body_force_fct_pt.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::further_build().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::compute_error ( std::ostream &  outfile,
FiniteElement::SteadyExactSolutionFctPt  exact_soln_pt,
double &  error,
double &  norm 
) [virtual]

Validate against exact solution. Solution is provided via function pointer. Plot at a given number of plot points and compute L2 error and L2 norm of velocity solution over element.

Validate against exact velocity solution Solution is provided via function pointer. Plot at a given number of plot points and compute L2 error and L2 norm of velocity solution over element.

Reimplemented from oomph::FiniteElement.

Definition at line 222 of file navier_stokes_elements.cc.

References oomph::FiniteElement::integral_pt(), oomph::NavierStokesEquations< DIM >::interpolated_u_nst(), oomph::FiniteElement::interpolated_x(), oomph::FiniteElement::J_eulerian(), oomph::Integral::nweight(), oomph::QuadTreeNames::W, and oomph::Integral::weight().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::compute_error ( std::ostream &  outfile,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt,
const double &  time,
double &  error,
double &  norm 
) [virtual]

Validate against exact solution at given time Solution is provided via function pointer. Plot at a given number of plot points and compute L2 error and L2 norm of velocity solution over element.

Validate against exact velocity solution at given time. Solution is provided via function pointer. Plot at a given number of plot points and compute L2 error and L2 norm of velocity solution over element.

Reimplemented from oomph::FiniteElement.

Definition at line 143 of file navier_stokes_elements.cc.

References oomph::FiniteElement::integral_pt(), oomph::NavierStokesEquations< DIM >::interpolated_u_nst(), oomph::FiniteElement::interpolated_x(), oomph::FiniteElement::J_eulerian(), oomph::Integral::nweight(), oomph::QuadTreeNames::W, and oomph::Integral::weight().

template<unsigned DIM>
double oomph::NavierStokesEquations< DIM >::d_kin_energy_dt (  )  const

Get integral of time derivative of kinetic energy over element:.

Definition at line 1169 of file navier_stokes_elements.cc.

References oomph::NavierStokesEquations< DIM >::ALE_is_disabled, oomph::FiniteElement::dshape_eulerian_at_knot(), oomph::NavierStokesEquations< DIM >::du_dt_nst(), oomph::FiniteElement::integral_pt(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), oomph::Integral::nweight(), and oomph::Integral::weight().

template<unsigned DIM>
const double& oomph::NavierStokesEquations< DIM >::density_ratio (  )  const [inline]

Density ratio for element: Element's density relative to the viscosity used in the definition of the Reynolds number.

Definition at line 348 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::Density_Ratio_pt.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::NavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::RefineableNavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates(), and oomph::NavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates().

template<unsigned DIM>
double* & oomph::NavierStokesEquations< DIM >::density_ratio_pt (  )  [inline]

Pointer to Density ratio.

Definition at line 351 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::Density_Ratio_pt.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::further_build().

template<unsigned DIM>
virtual void oomph::NavierStokesEquations< DIM >::dinterpolated_u_nst_ddata ( const Vector< double > &  s,
const unsigned &  i,
Vector< double > &  du_ddata,
Vector< unsigned > &  global_eqn_number 
) [inline, virtual]

Compute the derivatives of the i-th component of velocity at point s with respect to all data that can affect its value. In addition, return the global equation numbers corresponding to the data. The function is virtual so that it can be overloaded in the refineable version.

Reimplemented in oomph::RefineableNavierStokesEquations< DIM >.

Definition at line 683 of file navier_stokes_elements.h.

References oomph::FiniteElement::nnode(), oomph::FiniteElement::shape(), and oomph::NavierStokesEquations< DIM >::u_index_nst().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::disable_ALE (  )  [inline, virtual]

Disable ALE, i.e. assert the mesh is not moving -- you do this at your own risk!

Reimplemented from oomph::FiniteElement.

Definition at line 435 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::ALE_is_disabled.

template<unsigned DIM>
double oomph::NavierStokesEquations< DIM >::dissipation ( const Vector< double > &  s  )  const

Return dissipation at local coordinate s.

Definition at line 880 of file navier_stokes_elements.cc.

References oomph::NavierStokesEquations< DIM >::strain_rate().

template<unsigned DIM>
double oomph::NavierStokesEquations< DIM >::dissipation (  )  const

Return integral of dissipation over element.

Definition at line 797 of file navier_stokes_elements.cc.

References oomph::FiniteElement::integral_pt(), oomph::FiniteElement::J_eulerian(), oomph::Integral::nweight(), oomph::NavierStokesEquations< DIM >::strain_rate(), and oomph::Integral::weight().

Referenced by oomph::NavierStokesEquations< DIM >::full_output().

template<unsigned DIM>
virtual double oomph::NavierStokesEquations< DIM >::dshape_and_dtest_eulerian_at_knot_nst ( const unsigned &  ipt,
Shape psi,
DShape dpsidx,
Shape test,
DShape dtestdx 
) const [protected, pure virtual]

Compute the shape functions and derivatives w.r.t. global coords at ipt-th integration point Return Jacobian of mapping between local and global coordinates.

Implemented in oomph::QCrouzeixRaviartElement< DIM >, oomph::QTaylorHoodElement< DIM >, oomph::TTaylorHoodElement< DIM >, oomph::QCrouzeixRaviartElement< DIM >, oomph::QCrouzeixRaviartElement< DIM >, oomph::QTaylorHoodElement< DIM >, oomph::QTaylorHoodElement< DIM >, oomph::TTaylorHoodElement< DIM >, and oomph::TTaylorHoodElement< DIM >.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::NavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::RefineableNavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates(), and oomph::NavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates().

template<unsigned DIM>
virtual double oomph::NavierStokesEquations< DIM >::dshape_and_dtest_eulerian_nst ( const Vector< double > &  s,
Shape psi,
DShape dpsidx,
Shape test,
DShape dtestdx 
) const [protected, pure virtual]

Compute the shape functions and derivatives w.r.t. global coords at local coordinate s. Return Jacobian of mapping between local and global coordinates.

Implemented in oomph::QCrouzeixRaviartElement< DIM >, oomph::QTaylorHoodElement< DIM >, oomph::TTaylorHoodElement< DIM >, oomph::QCrouzeixRaviartElement< DIM >, oomph::QCrouzeixRaviartElement< DIM >, oomph::QTaylorHoodElement< DIM >, oomph::QTaylorHoodElement< DIM >, oomph::TTaylorHoodElement< DIM >, and oomph::TTaylorHoodElement< DIM >.

template<unsigned DIM>
double oomph::NavierStokesEquations< DIM >::du_dt_nst ( const unsigned &  n,
const unsigned &  i 
) const [inline]

i-th component of du/dt at local node n. Uses suitably interpolated value for hanging nodes.

Definition at line 407 of file navier_stokes_elements.h.

References oomph::TimeStepper::is_steady(), oomph::FiniteElement::nodal_value(), oomph::FiniteElement::node_pt(), oomph::TimeStepper::ntstorage(), oomph::Data::time_stepper_pt(), oomph::GeomObject::time_stepper_pt(), and oomph::TimeStepper::weight().

Referenced by oomph::NavierStokesEquations< DIM >::d_kin_energy_dt(), oomph::RefineableNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::NavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::NavierStokesEquations< DIM >::full_output(), oomph::RefineableNavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates(), and oomph::NavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::enable_ALE (  )  [inline, virtual]

(Re-)enable ALE, i.e. take possible mesh motion into account when evaluating the time-derivative. Note: By default, ALE is enabled, at the expense of possibly creating unnecessary work in problems where the mesh is, in fact, stationary.

Reimplemented from oomph::FiniteElement.

Definition at line 444 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::ALE_is_disabled.

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::fill_in_contribution_to_jacobian ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
) [inline, virtual]

Compute the element's residual Vector and the jacobian matrix Virtual function can be overloaded by hanging-node version.

Reimplemented from oomph::FiniteElement.

Definition at line 604 of file navier_stokes_elements.h.

References oomph::GeneralisedElement::Dummy_matrix, and oomph::NavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::fill_in_contribution_to_jacobian_and_mass_matrix ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
DenseMatrix< double > &  mass_matrix 
) [inline, virtual]

Add the element's contribution to its residuals vector, jacobian matrix and mass matrix

Reimplemented from oomph::GeneralisedElement.

Definition at line 614 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::fill_in_contribution_to_residuals ( Vector< double > &  residuals  )  [inline, virtual]

Compute the element's residual Vector.

Reimplemented from oomph::GeneralisedElement.

Definition at line 593 of file navier_stokes_elements.h.

References oomph::GeneralisedElement::Dummy_matrix, and oomph::NavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
DenseMatrix< double > &  mass_matrix,
unsigned  flag 
) [protected, virtual]

Compute the residuals for the Navier--Stokes equations; flag=1(or 0): do (or don't) compute the Jacobian as well.

Compute the residuals for the Navier--Stokes equations; flag=1(or 0): do (or don't) compute the Jacobian as well.

Reimplemented in oomph::RefineableNavierStokesEquations< DIM >.

Definition at line 1313 of file navier_stokes_elements.cc.

References oomph::NavierStokesEquations< DIM >::ALE_is_disabled, oomph::NavierStokesEquations< DIM >::density_ratio(), oomph::NavierStokesEquations< DIM >::dshape_and_dtest_eulerian_at_knot_nst(), oomph::NavierStokesEquations< DIM >::du_dt_nst(), oomph::NavierStokesEquations< DIM >::g(), oomph::NavierStokesEquations< DIM >::Gamma, oomph::NavierStokesEquations< DIM >::get_body_force_nst(), oomph::NavierStokesEquations< DIM >::get_source_nst(), oomph::FiniteElement::integral_pt(), oomph::FiniteElement::interpolated_x(), oomph::GeneralisedElement::ndof(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_local_eqn(), oomph::FiniteElement::node_pt(), oomph::NavierStokesEquations< DIM >::npres_nst(), oomph::Integral::nweight(), oomph::NavierStokesEquations< DIM >::p_local_eqn(), oomph::NavierStokesEquations< DIM >::p_nst(), oomph::NavierStokesEquations< DIM >::pshape_nst(), oomph::FiniteElement::raw_nodal_position(), oomph::FiniteElement::raw_nodal_value(), oomph::NavierStokesEquations< DIM >::re(), oomph::NavierStokesEquations< DIM >::re_invfr(), oomph::NavierStokesEquations< DIM >::re_st(), oomph::GeneralisedElement::time(), oomph::Data::time_stepper_pt(), oomph::NavierStokesEquations< DIM >::u_index_nst(), oomph::NavierStokesEquations< DIM >::viscosity_ratio(), oomph::QuadTreeNames::W, oomph::TimeStepper::weight(), and oomph::Integral::weight().

Referenced by oomph::NavierStokesEquations< DIM >::fill_in_contribution_to_jacobian(), oomph::NavierStokesEquations< DIM >::fill_in_contribution_to_jacobian_and_mass_matrix(), and oomph::NavierStokesEquations< DIM >::fill_in_contribution_to_residuals().

template<unsigned DIM>
virtual void oomph::NavierStokesEquations< DIM >::fix_pressure ( const unsigned &  p_dof,
const double &  p_value 
) [pure virtual]

Pin p_dof-th pressure dof and set it to value specified by p_value.

Implemented in oomph::QCrouzeixRaviartElement< DIM >, oomph::QTaylorHoodElement< DIM >, and oomph::TTaylorHoodElement< DIM >.

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::full_output ( std::ostream &  outfile,
const unsigned &  nplot 
)

Full output function: x,y,[z],u,v,[w],p,du/dt,dv/dt,[dw/dt],dissipation in tecplot format. nplot points in each coordinate direction.

Full output function: x,y,[z],u,v,[w],p,du/dt,dv/dt,[dw/dt],dissipation in tecplot format. Specified number of plot points in each coordinate direction

Reimplemented in oomph::QCrouzeixRaviartElement< DIM >.

Definition at line 590 of file navier_stokes_elements.cc.

References oomph::NavierStokesEquations< DIM >::dissipation(), oomph::FiniteElement::dnodal_position_dt(), oomph::FiniteElement::dshape_eulerian(), oomph::NavierStokesEquations< DIM >::du_dt_nst(), oomph::FiniteElement::get_s_plot(), oomph::NavierStokesEquations< DIM >::interpolated_p_nst(), oomph::NavierStokesEquations< DIM >::interpolated_u_nst(), oomph::FiniteElement::interpolated_x(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), oomph::FiniteElement::nplot_points(), oomph::FiniteElement::tecplot_zone_string(), oomph::NavierStokesEquations< DIM >::u_index_nst(), and oomph::FiniteElement::write_tecplot_zone_footer().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::full_output ( std::ostream &  outfile  )  [inline]

Full output function: x,y,[z],u,v,[w],p,du/dt,dv/dt,[dw/dt],dissipation in tecplot format. Default number of plot points.

Reimplemented in oomph::QCrouzeixRaviartElement< DIM >.

Definition at line 538 of file navier_stokes_elements.h.

template<unsigned DIM>
const Vector<double>& oomph::NavierStokesEquations< DIM >::g (  )  const [inline]

Vector of gravitational components.

Definition at line 360 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::G_pt.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::NavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::RefineableNavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates(), and oomph::NavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates().

template<unsigned DIM>
Vector<double>* & oomph::NavierStokesEquations< DIM >::g_pt (  )  [inline]

Pointer to Vector of gravitational components.

Definition at line 363 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::G_pt.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::further_build().

template<unsigned DIM>
virtual void oomph::NavierStokesEquations< DIM >::get_body_force_gradient_nst ( const double &  time,
const unsigned &  ipt,
const Vector< double > &  s,
const Vector< double > &  x,
DenseMatrix< double > &  d_body_force_dx 
) [inline, protected, virtual]

Get gradient of body force term at (Eulerian) position x. This function is virtual to allow overloading in multi-physics problems where the strength of the source function might be determined by another system of equations. Computed via function pointer (if set) or by finite differencing (default)

Definition at line 200 of file navier_stokes_elements.h.

References oomph::GeneralisedElement::Default_fd_jacobian_step, and oomph::NavierStokesEquations< DIM >::get_body_force_nst().

Referenced by oomph::NavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates().

template<unsigned DIM>
virtual void oomph::NavierStokesEquations< DIM >::get_body_force_nst ( const double &  time,
const unsigned &  ipt,
const Vector< double > &  s,
const Vector< double > &  x,
Vector< double > &  result 
) [inline, protected, virtual]

Calculate the body force at a given time and local and/or Eulerian position. This function is virtual so that it can be overloaded in multi-physics elements where the body force might depend on another variable.

Definition at line 176 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::Body_force_fct_pt.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::NavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::NavierStokesEquations< DIM >::get_body_force_gradient_nst(), and oomph::NavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates ( RankThreeTensor< double > &  dresidual_dnodal_coordinates  )  [virtual]

Compute derivatives of elemental residual vector with respect to nodal coordinates. Overwrites default implementation in FiniteElement base class. dresidual_dnodal_coordinates(l,i,j) = d res(l) / dX_{ij}.

Compute derivatives of elemental residual vector with respect to nodal coordinates. dresidual_dnodal_coordinates(l,i,j) = d res(l) / dX_{ij} Overloads the FD-based version in the FE base class.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::RefineableNavierStokesEquations< DIM >.

Definition at line 1622 of file navier_stokes_elements.cc.

References oomph::NavierStokesEquations< DIM >::ALE_is_disabled, oomph::GeneralisedElement::Default_fd_jacobian_step, oomph::NavierStokesEquations< DIM >::density_ratio(), oomph::NavierStokesEquations< DIM >::dshape_and_dtest_eulerian_at_knot_nst(), oomph::NavierStokesEquations< DIM >::du_dt_nst(), oomph::NavierStokesEquations< DIM >::g(), oomph::NavierStokesEquations< DIM >::Gamma, oomph::NavierStokesEquations< DIM >::get_body_force_gradient_nst(), oomph::NavierStokesEquations< DIM >::get_body_force_nst(), oomph::NavierStokesEquations< DIM >::get_source_gradient_nst(), oomph::NavierStokesEquations< DIM >::get_source_nst(), oomph::FiniteElement::integral_pt(), oomph::FiniteElement::interpolated_x(), oomph::GeneralisedElement::ndof(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_local_eqn(), oomph::FiniteElement::node_pt(), oomph::NavierStokesEquations< DIM >::npres_nst(), oomph::Integral::nweight(), oomph::NavierStokesEquations< DIM >::p_local_eqn(), oomph::NavierStokesEquations< DIM >::p_nst(), oomph::Node::position_time_stepper_pt(), oomph::NavierStokesEquations< DIM >::pshape_nst(), oomph::FiniteElement::raw_nodal_position(), oomph::FiniteElement::raw_nodal_value(), oomph::NavierStokesEquations< DIM >::re(), oomph::NavierStokesEquations< DIM >::re_invfr(), oomph::NavierStokesEquations< DIM >::re_st(), oomph::GeneralisedElement::time(), oomph::Data::time_stepper_pt(), oomph::NavierStokesEquations< DIM >::u_index_nst(), oomph::NavierStokesEquations< DIM >::viscosity_ratio(), oomph::TimeStepper::weight(), oomph::Integral::weight(), and oomph::Node::x().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::get_load ( const Vector< double > &  s,
const Vector< double > &  N,
Vector< double > &  load 
) [inline, virtual]

This implements a pure virtual function defined in the FSIFluidElement class. The function computes the traction (on the viscous scale), at the element's local coordinate s, that the fluid element exerts onto an adjacent solid element. The number of arguments is imposed by the interface defined in the FSIFluidElement -- only the unit normal N (pointing into the fluid!) is actually used in the computation.

Implements oomph::FSIFluidElement.

Definition at line 497 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::get_traction(), and oomph::QuadTreeNames::N.

template<unsigned DIM>
virtual void oomph::NavierStokesEquations< DIM >::get_source_gradient_nst ( const double &  time,
const unsigned &  ipt,
const Vector< double > &  x,
Vector< double > &  gradient 
) [inline, protected, virtual]

Get gradient of source term at (Eulerian) position x. This function is virtual to allow overloading in multi-physics problems where the strength of the source function might be determined by another system of equations. Computed via function pointer (if set) or by finite differencing (default)

Definition at line 256 of file navier_stokes_elements.h.

References oomph::GeneralisedElement::Default_fd_jacobian_step, and oomph::NavierStokesEquations< DIM >::get_source_nst().

Referenced by oomph::NavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates().

template<unsigned DIM>
virtual double oomph::NavierStokesEquations< DIM >::get_source_nst ( const double &  time,
const unsigned &  ipt,
const Vector< double > &  x 
) [inline, protected, virtual]

Calculate the source fct at given time and Eulerian position.

Definition at line 241 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::Source_fct_pt.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::NavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::NavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates(), and oomph::NavierStokesEquations< DIM >::get_source_gradient_nst().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::get_traction ( const Vector< double > &  s,
const Vector< double > &  N,
Vector< double > &  traction 
)

Compute traction (on the viscous scale) exerted onto the fluid at local coordinate s. N has to be outer unit normal to the fluid.

Compute traction (on the viscous scale) exerted onto the fluid at local coordinate s. N has to be outer unit normal to the fluid.

Definition at line 852 of file navier_stokes_elements.cc.

References oomph::NavierStokesEquations< DIM >::interpolated_p_nst(), oomph::QuadTreeNames::N, and oomph::NavierStokesEquations< DIM >::strain_rate().

Referenced by oomph::NavierStokesEquations< DIM >::get_load().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::get_velocity_mass_matrix_diagonal ( Vector< double > &  mass_diag  ) 

Compute the diagonal of the velocity mass matrix.

Definition at line 67 of file navier_stokes_elements.cc.

References oomph::FiniteElement::dim(), oomph::FiniteElement::integral_pt(), oomph::FiniteElement::J_eulerian_at_knot(), oomph::GeneralisedElement::ndof(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_local_eqn(), oomph::Integral::nweight(), oomph::FiniteElement::shape_at_knot(), and oomph::QuadTreeNames::W.

Referenced by oomph::NavierStokesLSCPreconditioner::assemble_velocity_mass_matrix_diagonal().

template<>
void oomph::NavierStokesEquations< 3 >::get_vorticity ( const Vector< double > &  s,
Vector< double > &  vorticity 
) const

Definition at line 1051 of file navier_stokes_elements.cc.

References oomph::FiniteElement::dshape_eulerian(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), OOMPH_EXCEPTION_LOCATION, and oomph::NavierStokesEquations< DIM >::u_index_nst().

template<>
void oomph::NavierStokesEquations< 2 >::get_vorticity ( const Vector< double > &  s,
Vector< double > &  vorticity 
) const

Compute 2D vorticity vector at local coordinate s (return in one and only component of vorticity vector

Definition at line 978 of file navier_stokes_elements.cc.

References oomph::FiniteElement::dshape_eulerian(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), OOMPH_EXCEPTION_LOCATION, and oomph::NavierStokesEquations< DIM >::u_index_nst().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::get_vorticity ( const Vector< double > &  s,
Vector< double > &  vorticity 
) const

Compute the vorticity vector at local coordinate s.

Referenced by oomph::NavierStokesEquations< DIM >::output_vorticity().

template<unsigned DIM>
double oomph::NavierStokesEquations< DIM >::interpolated_p_nst ( const Vector< double > &  s  )  const [inline]

Return FE interpolated pressure at local coordinate s.

Definition at line 732 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::npres_nst(), oomph::NavierStokesEquations< DIM >::p_nst(), and oomph::NavierStokesEquations< DIM >::pshape_nst().

Referenced by oomph::NavierStokesEquations< DIM >::full_output(), oomph::RefineableQCrouzeixRaviartElement< DIM >::further_build(), oomph::RefineableQTaylorHoodElement< DIM >::get_interpolated_values(), oomph::NavierStokesEquations< DIM >::get_traction(), oomph::NavierStokesEquations< DIM >::output(), and oomph::NavierStokesEquations< DIM >::pressure_integral().

template<unsigned DIM>
double oomph::NavierStokesEquations< DIM >::interpolated_u_nst ( const Vector< double > &  s,
const unsigned &  i 
) const [inline]

Return FE interpolated velocity u[i] at local coordinate s.

Definition at line 655 of file navier_stokes_elements.h.

References oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), oomph::FiniteElement::shape(), and oomph::NavierStokesEquations< DIM >::u_index_nst().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::interpolated_u_nst ( const Vector< double > &  s,
Vector< double > &  veloc 
) const [inline]

Compute vector of FE interpolated velocity u at local coordinate s.

Definition at line 631 of file navier_stokes_elements.h.

References oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), oomph::FiniteElement::shape(), and oomph::NavierStokesEquations< DIM >::u_index_nst().

Referenced by oomph::NavierStokesEquations< DIM >::compute_error(), oomph::NavierStokesEquations< DIM >::full_output(), oomph::NavierStokesEquations< DIM >::kin_energy(), and oomph::NavierStokesEquations< DIM >::output().

template<unsigned DIM>
double oomph::NavierStokesEquations< DIM >::kin_energy (  )  const

Get integral of kinetic energy over element:.

Definition at line 1123 of file navier_stokes_elements.cc.

References oomph::FiniteElement::integral_pt(), oomph::NavierStokesEquations< DIM >::interpolated_u_nst(), oomph::FiniteElement::J_eulerian(), oomph::Integral::nweight(), and oomph::Integral::weight().

template<unsigned DIM>
virtual unsigned oomph::NavierStokesEquations< DIM >::npres_nst (  )  const [pure virtual]

Function to return number of pressure degrees of freedom.

Implemented in oomph::QCrouzeixRaviartElement< DIM >, oomph::QTaylorHoodElement< DIM >, oomph::TTaylorHoodElement< DIM >, oomph::TTaylorHoodElement< DIM >, and oomph::TTaylorHoodElement< DIM >.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::NavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::RefineableNavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates(), oomph::NavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates(), and oomph::NavierStokesEquations< DIM >::interpolated_p_nst().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::output ( FILE *  file_pt,
const unsigned &  nplot 
) [virtual]

C-style output function: x,y,[z],u,v,[w],p in tecplot format. nplot points in each coordinate direction.

C-style output function: x,y,[z],u,v,[w],p in tecplot format. Specified number of plot points in each coordinate direction.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QCrouzeixRaviartElement< DIM >, oomph::QTaylorHoodElement< DIM >, and oomph::TTaylorHoodElement< DIM >.

Definition at line 542 of file navier_stokes_elements.cc.

References oomph::FiniteElement::get_s_plot(), oomph::NavierStokesEquations< DIM >::interpolated_p_nst(), oomph::NavierStokesEquations< DIM >::interpolated_u_nst(), oomph::FiniteElement::interpolated_x(), oomph::FiniteElement::nplot_points(), oomph::FiniteElement::tecplot_zone_string(), and oomph::FiniteElement::write_tecplot_zone_footer().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::output ( FILE *  file_pt  )  [inline, virtual]

C-style output function: x,y,[z],u,v,[w],p in tecplot format. Default number of plot points.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QCrouzeixRaviartElement< DIM >, oomph::QTaylorHoodElement< DIM >, and oomph::TTaylorHoodElement< DIM >.

Definition at line 525 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::output().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::output ( std::ostream &  outfile,
const unsigned &  nplot 
) [virtual]

Output function: x,y,[z],u,v,[w],p in tecplot format. nplot points in each coordinate direction.

Output function: x,y,[z],u,v,[w],p in tecplot format. Specified number of plot points in each coordinate direction.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QCrouzeixRaviartElement< DIM >, oomph::QTaylorHoodElement< DIM >, and oomph::TTaylorHoodElement< DIM >.

Definition at line 492 of file navier_stokes_elements.cc.

References oomph::FiniteElement::get_s_plot(), oomph::NavierStokesEquations< DIM >::interpolated_p_nst(), oomph::NavierStokesEquations< DIM >::interpolated_u_nst(), oomph::FiniteElement::interpolated_x(), oomph::FiniteElement::nplot_points(), oomph::FiniteElement::tecplot_zone_string(), and oomph::FiniteElement::write_tecplot_zone_footer().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::output ( std::ostream &  outfile  )  [inline, virtual]

Output function: x,y,[z],u,v,[w],p in tecplot format. Default number of plot points.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QCrouzeixRaviartElement< DIM >, oomph::QTaylorHoodElement< DIM >, and oomph::TTaylorHoodElement< DIM >.

Definition at line 513 of file navier_stokes_elements.h.

Referenced by oomph::NavierStokesEquations< DIM >::output().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::output_fct ( std::ostream &  outfile,
const unsigned &  nplot,
const double &  time,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt 
) [virtual]

Output exact solution specified via function pointer at a given time and at a given number of plot points. Function prints as many components as are returned in solution Vector.

Output "exact" solution at a given time Solution is provided via function pointer. Plot at a given number of plot points. Function prints as many components as are returned in solution Vector.

Reimplemented from oomph::FiniteElement.

Definition at line 360 of file navier_stokes_elements.cc.

References oomph::FiniteElement::get_s_plot(), oomph::FiniteElement::interpolated_x(), oomph::FiniteElement::nplot_points(), oomph::FiniteElement::tecplot_zone_string(), and oomph::FiniteElement::write_tecplot_zone_footer().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::output_fct ( std::ostream &  outfile,
const unsigned &  nplot,
FiniteElement::SteadyExactSolutionFctPt  exact_soln_pt 
) [virtual]

Output exact solution specified via function pointer at a given number of plot points. Function prints as many components as are returned in solution Vector.

Output "exact" solution Solution is provided via function pointer. Plot at a given number of plot points. Function prints as many components as are returned in solution Vector.

Reimplemented from oomph::FiniteElement.

Definition at line 301 of file navier_stokes_elements.cc.

References oomph::FiniteElement::get_s_plot(), oomph::FiniteElement::interpolated_x(), oomph::FiniteElement::nplot_points(), oomph::FiniteElement::tecplot_zone_string(), and oomph::FiniteElement::write_tecplot_zone_footer().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::output_veloc ( std::ostream &  outfile,
const unsigned &  nplot,
const unsigned &  t 
)

Output function: x,y,[z],u,v,[w] in tecplot format. nplot points in each coordinate direction at timestep t (t=0: present; t>0: previous timestep).

Output function: Velocities only x,y,[z],u,v,[w] in tecplot format at specified previous timestep (t=0: present; t>0: previous timestep). Specified number of plot points in each coordinate direction.

Definition at line 420 of file navier_stokes_elements.cc.

References oomph::FiniteElement::get_s_plot(), oomph::FiniteElement::interpolated_x(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_position(), oomph::FiniteElement::nodal_value(), oomph::FiniteElement::nplot_points(), oomph::FiniteElement::shape(), oomph::FiniteElement::tecplot_zone_string(), oomph::NavierStokesEquations< DIM >::u_index_nst(), and oomph::FiniteElement::write_tecplot_zone_footer().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::output_vorticity ( std::ostream &  outfile,
const unsigned &  nplot 
)

Output function: x,y,[z], [omega_x,omega_y,[and/or omega_z]] in tecplot format. nplot points in each coordinate direction.

Output function for vorticity. x,y,[z],[omega_x,omega_y,[and/or omega_z]] in tecplot format. Specified number of plot points in each coordinate direction.

Definition at line 723 of file navier_stokes_elements.cc.

References oomph::FiniteElement::get_s_plot(), oomph::NavierStokesEquations< DIM >::get_vorticity(), oomph::FiniteElement::interpolated_x(), oomph::FiniteElement::nplot_points(), OOMPH_EXCEPTION_LOCATION, oomph::FiniteElement::tecplot_zone_string(), and oomph::FiniteElement::write_tecplot_zone_footer().

template<unsigned DIM>
virtual int oomph::NavierStokesEquations< DIM >::p_local_eqn ( const unsigned &  n  )  [protected, pure virtual]

Access function for the local equation number information for the pressure. p_local_eqn[n] = local equation number or < 0 if pinned.

Implemented in oomph::QCrouzeixRaviartElement< DIM >, oomph::QTaylorHoodElement< DIM >, and oomph::TTaylorHoodElement< DIM >.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::NavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), and oomph::NavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates().

template<unsigned DIM>
virtual int oomph::NavierStokesEquations< DIM >::p_nodal_index_nst (  )  const [inline, virtual]

Return the index at which the pressure is stored if it is stored at the nodes. If not stored at the nodes this will return a negative number.

Reimplemented in oomph::QTaylorHoodElement< DIM >.

Definition at line 459 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::Pressure_not_stored_at_node.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), and oomph::RefineableNavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates().

template<unsigned DIM>
virtual double oomph::NavierStokesEquations< DIM >::p_nst ( const unsigned &  n_p  )  const [pure virtual]

Pressure at local pressure "node" n_p Uses suitably interpolated value for hanging nodes.

Implemented in oomph::QCrouzeixRaviartElement< DIM >, oomph::QTaylorHoodElement< DIM >, and oomph::TTaylorHoodElement< DIM >.

Referenced by oomph::NavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::NavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates(), and oomph::NavierStokesEquations< DIM >::interpolated_p_nst().

template<unsigned DIM>
double oomph::NavierStokesEquations< DIM >::pressure_integral (  )  const

Return pressure integrated over the element.

Definition at line 1263 of file navier_stokes_elements.cc.

References oomph::FiniteElement::integral_pt(), oomph::NavierStokesEquations< DIM >::interpolated_p_nst(), oomph::FiniteElement::J_eulerian(), oomph::Integral::nweight(), oomph::QuadTreeNames::W, and oomph::Integral::weight().

template<unsigned DIM>
virtual void oomph::NavierStokesEquations< DIM >::pshape_nst ( const Vector< double > &  s,
Shape psi,
Shape test 
) const [protected, pure virtual]

Compute the pressure shape and test functions at local coordinate s.

Implemented in oomph::QCrouzeixRaviartElement< DIM >, oomph::QTaylorHoodElement< DIM >, oomph::TTaylorHoodElement< DIM >, oomph::QCrouzeixRaviartElement< DIM >, oomph::QCrouzeixRaviartElement< DIM >, oomph::QTaylorHoodElement< DIM >, oomph::QTaylorHoodElement< DIM >, oomph::TTaylorHoodElement< DIM >, and oomph::TTaylorHoodElement< DIM >.

template<unsigned DIM>
virtual void oomph::NavierStokesEquations< DIM >::pshape_nst ( const Vector< double > &  s,
Shape psi 
) const [protected, pure virtual]

Compute the pressure shape functions at local coordinate s.

Implemented in oomph::QCrouzeixRaviartElement< DIM >, oomph::QTaylorHoodElement< DIM >, oomph::TTaylorHoodElement< DIM >, oomph::QCrouzeixRaviartElement< DIM >, oomph::QCrouzeixRaviartElement< DIM >, oomph::QTaylorHoodElement< DIM >, oomph::QTaylorHoodElement< DIM >, oomph::TTaylorHoodElement< DIM >, and oomph::TTaylorHoodElement< DIM >.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::NavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::RefineableNavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates(), oomph::NavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates(), and oomph::NavierStokesEquations< DIM >::interpolated_p_nst().

template<unsigned DIM>
const double& oomph::NavierStokesEquations< DIM >::re (  )  const [inline]

Reynolds number.

Definition at line 328 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::Re_pt.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::NavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::RefineableNavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates(), and oomph::NavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates().

template<unsigned DIM>
const double& oomph::NavierStokesEquations< DIM >::re_invfr (  )  const [inline]

Global inverse Froude number.

Definition at line 354 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::ReInvFr_pt.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::NavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::RefineableNavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates(), and oomph::NavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates().

template<unsigned DIM>
double* & oomph::NavierStokesEquations< DIM >::re_invfr_pt (  )  [inline]

Pointer to global inverse Froude number.

Definition at line 357 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::ReInvFr_pt.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::further_build().

template<unsigned DIM>
double* & oomph::NavierStokesEquations< DIM >::re_pt (  )  [inline]

Pointer to Reynolds number.

Definition at line 334 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::Re_pt.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::further_build().

template<unsigned DIM>
const double& oomph::NavierStokesEquations< DIM >::re_st (  )  const [inline]

Product of Reynolds and Strouhal number (=Womersley number).

Definition at line 331 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::ReSt_pt.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::NavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::RefineableNavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates(), and oomph::NavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates().

template<unsigned DIM>
double* & oomph::NavierStokesEquations< DIM >::re_st_pt (  )  [inline]

Pointer to product of Reynolds and Strouhal number (=Womersley number).

Definition at line 337 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::ReSt_pt.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::further_build().

template<unsigned DIM>
NavierStokesSourceFctPt oomph::NavierStokesEquations< DIM >::source_fct_pt (  )  const [inline]

Access function for the source-function pointer. Const version.

Definition at line 377 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::Source_fct_pt.

template<unsigned DIM>
NavierStokesSourceFctPt& oomph::NavierStokesEquations< DIM >::source_fct_pt (  )  [inline]

Access function for the source-function pointer.

Definition at line 374 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::Source_fct_pt.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::further_build().

template<unsigned DIM>
void oomph::NavierStokesEquations< DIM >::strain_rate ( const Vector< double > &  s,
DenseMatrix< double > &  strain_rate 
) const

Get strain-rate tensor: 1/2 (du_i/dx_j + du_j/dx_i).

Definition at line 903 of file navier_stokes_elements.cc.

References oomph::FiniteElement::dshape_eulerian(), oomph::DenseMatrix< T >::ncol(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_value(), oomph::DenseMatrix< T >::nrow(), OOMPH_EXCEPTION_LOCATION, and oomph::NavierStokesEquations< DIM >::u_index_nst().

Referenced by oomph::NavierStokesEquations< DIM >::dissipation(), oomph::NavierStokesEquations< DIM >::get_traction(), and oomph::RefineableNavierStokesEquations< DIM >::get_Z2_flux().

template<unsigned DIM>
virtual unsigned oomph::NavierStokesEquations< DIM >::u_index_nst ( const unsigned &  i  )  const [inline, virtual]

Return the index at which the i-th unknown velocity component.

is stored. The default value, i, is appropriate for single-physics problems. In derived multi-physics elements, this function should be overloaded to reflect the chosen storage scheme. Note that these equations require that the unknowns are always stored at the same indices at each node.

Definition at line 402 of file navier_stokes_elements.h.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::dinterpolated_u_nst_ddata(), oomph::NavierStokesEquations< DIM >::dinterpolated_u_nst_ddata(), oomph::NavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::NavierStokesEquations< DIM >::full_output(), oomph::NavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates(), oomph::NavierStokesEquations< DIM >::get_vorticity(), oomph::NavierStokesEquations< DIM >::interpolated_u_nst(), oomph::NavierStokesEquations< DIM >::output_veloc(), oomph::NavierStokesEquations< DIM >::strain_rate(), and oomph::NavierStokesEquations< DIM >::u_nst().

template<unsigned DIM>
double oomph::NavierStokesEquations< DIM >::u_nst ( const unsigned &  t,
const unsigned &  n,
const unsigned &  i 
) const [inline]

Velocity i at local node n at timestep t (t=0: present; t>0: previous). Uses suitably interpolated value for hanging nodes.

Definition at line 392 of file navier_stokes_elements.h.

References oomph::FiniteElement::nodal_value(), and oomph::NavierStokesEquations< DIM >::u_index_nst().

template<unsigned DIM>
double oomph::NavierStokesEquations< DIM >::u_nst ( const unsigned &  n,
const unsigned &  i 
) const [inline]

Velocity i at local node n. Uses suitably interpolated value for hanging nodes. The use of u_index_nst() permits the use of this element as the basis for multi-physics elements. The default is to assume that the i-th velocity component is stored at the i-th location of the node.

Definition at line 387 of file navier_stokes_elements.h.

References oomph::FiniteElement::nodal_value(), and oomph::NavierStokesEquations< DIM >::u_index_nst().

template<unsigned DIM>
const double& oomph::NavierStokesEquations< DIM >::viscosity_ratio (  )  const [inline]

Viscosity ratio for element: Element's viscosity relative to the viscosity used in the definition of the Reynolds number.

Definition at line 341 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::Viscosity_Ratio_pt.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::NavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::RefineableNavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates(), and oomph::NavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates().

template<unsigned DIM>
double* & oomph::NavierStokesEquations< DIM >::viscosity_ratio_pt (  )  [inline]

Pointer to Viscosity Ratio.

Definition at line 344 of file navier_stokes_elements.h.

References oomph::NavierStokesEquations< DIM >::Viscosity_Ratio_pt.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::further_build().


Member Data Documentation

template<unsigned DIM>
bool oomph::NavierStokesEquations< DIM >::ALE_is_disabled [protected]

Boolean flag to indicate if ALE formulation is disabled when time-derivatives are computed. Only set to true if you're sure that the mesh is stationary.

Definition at line 139 of file navier_stokes_elements.h.

Referenced by oomph::NavierStokesEquations< DIM >::d_kin_energy_dt(), oomph::NavierStokesEquations< DIM >::disable_ALE(), oomph::NavierStokesEquations< DIM >::enable_ALE(), oomph::RefineableNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::NavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::RefineableNavierStokesEquations< DIM >::further_build(), and oomph::NavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates().

template<unsigned DIM>
NavierStokesBodyForceFctPt oomph::NavierStokesEquations< DIM >::Body_force_fct_pt [protected]

Pointer to body force function.

Definition at line 131 of file navier_stokes_elements.h.

Referenced by oomph::NavierStokesEquations< DIM >::body_force_fct_pt(), oomph::RefineableNavierStokesEquations< DIM >::further_build(), and oomph::NavierStokesEquations< DIM >::get_body_force_nst().

template<unsigned DIM>
Vector< double > oomph::NavierStokesEquations< DIM >::Default_Gravity_vector [static, private]

Navier-Stokes equations default gravity vector.

Definition at line 101 of file navier_stokes_elements.h.

Referenced by oomph::NavierStokesEquations< DIM >::NavierStokesEquations().

template<unsigned DIM>
double oomph::NavierStokesEquations< DIM >::Default_Physical_Constant_Value = 0.0 [static, private]

Navier--Stokes equations static data.

Definition at line 95 of file navier_stokes_elements.h.

Referenced by oomph::NavierStokesEquations< DIM >::NavierStokesEquations().

template<unsigned DIM>
double oomph::NavierStokesEquations< DIM >::Default_Physical_Ratio_Value = 1.0 [static, private]

Navier--Stokes equations static data.

Definition at line 98 of file navier_stokes_elements.h.

Referenced by oomph::NavierStokesEquations< DIM >::NavierStokesEquations().

template<unsigned DIM>
double* oomph::NavierStokesEquations< DIM >::Density_Ratio_pt [protected]

Pointer to the density ratio (relative to the density used in the definition of the Reynolds number).

Definition at line 113 of file navier_stokes_elements.h.

Referenced by oomph::NavierStokesEquations< DIM >::density_ratio(), oomph::NavierStokesEquations< DIM >::density_ratio_pt(), oomph::RefineableNavierStokesEquations< DIM >::further_build(), and oomph::NavierStokesEquations< DIM >::NavierStokesEquations().

template<unsigned DIM>
Vector<double>* oomph::NavierStokesEquations< DIM >::G_pt [protected]

Pointer to global gravity Vector.

Definition at line 128 of file navier_stokes_elements.h.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::further_build(), oomph::NavierStokesEquations< DIM >::g(), oomph::NavierStokesEquations< DIM >::g_pt(), and oomph::NavierStokesEquations< DIM >::NavierStokesEquations().

template<unsigned DIM>
Vector< double > oomph::NavierStokesEquations< DIM >::Gamma [static]

Navier--Stokes equations static data.

Definition at line 323 of file navier_stokes_elements.h.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), oomph::NavierStokesEquations< DIM >::fill_in_generic_residual_contribution_nst(), and oomph::NavierStokesEquations< DIM >::get_dresidual_dnodal_coordinates().

template<unsigned DIM>
int oomph::NavierStokesEquations< DIM >::Pressure_not_stored_at_node = -100 [static, private]

Static "magic" number that indicates that the pressure is not stored at a node.

"Magic" negative number that indicates that the pressure is not stored at a node. This cannot be -1 because that represents the positional hanging scheme in the hanging_pt object of nodes

Definition at line 92 of file navier_stokes_elements.h.

Referenced by oomph::NavierStokesEquations< DIM >::p_nodal_index_nst().

template<unsigned DIM>
double* oomph::NavierStokesEquations< DIM >::Re_pt [protected]

Pointer to global Reynolds number.

Definition at line 118 of file navier_stokes_elements.h.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::further_build(), oomph::NavierStokesEquations< DIM >::NavierStokesEquations(), oomph::NavierStokesEquations< DIM >::re(), and oomph::NavierStokesEquations< DIM >::re_pt().

template<unsigned DIM>
double* oomph::NavierStokesEquations< DIM >::ReInvFr_pt [protected]

Pointer to global Reynolds number x inverse Froude number (= Bond number / Capillary number).

Definition at line 125 of file navier_stokes_elements.h.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::further_build(), oomph::NavierStokesEquations< DIM >::NavierStokesEquations(), oomph::NavierStokesEquations< DIM >::re_invfr(), and oomph::NavierStokesEquations< DIM >::re_invfr_pt().

template<unsigned DIM>
double* oomph::NavierStokesEquations< DIM >::ReSt_pt [protected]

Pointer to global Reynolds number x Strouhal number (=Womersley).

Definition at line 121 of file navier_stokes_elements.h.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::further_build(), oomph::NavierStokesEquations< DIM >::NavierStokesEquations(), oomph::NavierStokesEquations< DIM >::re_st(), and oomph::NavierStokesEquations< DIM >::re_st_pt().

template<unsigned DIM>
NavierStokesSourceFctPt oomph::NavierStokesEquations< DIM >::Source_fct_pt [protected]

Pointer to volumetric source function.

Definition at line 134 of file navier_stokes_elements.h.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::further_build(), oomph::NavierStokesEquations< DIM >::get_source_nst(), and oomph::NavierStokesEquations< DIM >::source_fct_pt().

template<unsigned DIM>
double* oomph::NavierStokesEquations< DIM >::Viscosity_Ratio_pt [protected]

Pointer to the viscosity ratio (relative to the viscosity used in the definition of the Reynolds number).

Definition at line 109 of file navier_stokes_elements.h.

Referenced by oomph::RefineableNavierStokesEquations< DIM >::further_build(), oomph::NavierStokesEquations< DIM >::NavierStokesEquations(), oomph::NavierStokesEquations< DIM >::viscosity_ratio(), and oomph::NavierStokesEquations< DIM >::viscosity_ratio_pt().


The documentation for this class was generated from the following files:
Generated on Mon Aug 10 11:23:57 2009 by  doxygen 1.4.7