Public Member Functions | List of all members
oomph::AxisymmetricQAdvectionCrouzeixRaviartElement Class Reference

A class that solves the Boussinesq approximation of the Navier–Stokes and energy equations by coupling two pre-existing classes. The QAdvectionDiffusionReactionElement with bi-quadratic interpolation for the scalar variables (temperature and concentration) and QCrouzeixRaviartElement which solves the Navier–Stokes equations using bi-quadratic interpolation for the velocities and a discontinuous bi-linear interpolation for the pressure. Note that we are free to choose the order in which we store the variables at the nodes. In this case we choose to store the variables in the order fluid velocities followed by temperature. We must, therefore, overload the function AdvectionDiffusionReactionEquations<2,DIM>::u_index_adv_diff_react() to indicate that the temperature is stored at the DIM-th position not the 0-th. We do not need to overload the corresponding function in the NavierStokesEquations<DIM> class because the velocities are stored first. More...

#include <axisymmetric_advection_navier_stokes_elements.h>

Inheritance diagram for oomph::AxisymmetricQAdvectionCrouzeixRaviartElement:

Public Member Functions

 AxisymmetricQAdvectionCrouzeixRaviartElement ()
 Constructor: call the underlying constructors and initialise the pointer to the Rayleigh number to point to the default value of 0.0. More...
 
unsigned required_nvalue (const unsigned &n) const
 The required number of values stored at the nodes is the sum of the required values of the two single-physics elements. Note that this step is generic for any multi-physics element of this type. More...
 
void disable_ALE ()
 Final override for disable ALE. More...
 
void enable_ALE ()
 Final override for enable ALE. More...
 
unsigned nscalar_paraview () const
 Number of scalars/fields output by this element. Reimplements broken virtual function in base class. More...
 
void scalar_value_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot) const
 Write values of the i-th scalar field at the plot points. Needs to be implemented for each new specific element type. More...
 
std::string scalar_name_paraview (const unsigned &i) const
 
void output (std::ostream &outfile)
 Overload the standard output function with the broken default. More...
 
void output (std::ostream &outfile, const unsigned &nplot)
 Output function:
Output x, y, u, v, p, theta at Nplot^DIM plot points. More...
 
void output (FILE *file_pt)
 C-style output function: Broken default. More...
 
void output (FILE *file_pt, const unsigned &n_plot)
 C-style output function: Broken default. More...
 
void output_fct (std::ostream &outfile, const unsigned &Nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
 Output function for an exact solution: Broken default. More...
 
void output_fct (std::ostream &outfile, const unsigned &Nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
 Output function for a time-dependent exact solution: Broken default. More...
 
unsigned u_index_axi_adv_diff () const
 Overload the index at which the temperature and solute concentration variables are stored. More...
 
void compute_norm (double &norm)
 
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 Call the broken default. More...
 
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 Call the broken default. More...
 
void get_wind_axi_adv_diff (const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &wind) const
 Overload the wind function in the advection-diffusion equations. This provides the coupling from the Navier–Stokes equations to the advection-diffusion equations because the wind is the fluid velocity. More...
 
void fill_in_contribution_to_residuals (Vector< double > &residuals)
 Calculate the element's contribution to the residual vector. Recall that fill_in_* functions MUST NOT initialise the entries in the vector to zero. This allows us to call the fill_in_* functions of the constituent single-physics elements sequentially, without wiping out any previously computed entries. More...
 
void fill_in_contribution_to_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 Compute the element's residual vector and the Jacobian matrix. Jacobian is computed by finite-differencing. More...
 
void fill_in_off_diagonal_jacobian_blocks_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 Helper function to get the off-diagonal blocks of the Jacobian matrix by finite differences. More...
 
void fill_in_contribution_to_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 Compute the element's residual Vector and the Jacobian matrix. Use finite-differencing only for the off-diagonal blocks. More...
 
void fill_in_contribution_to_jacobian_and_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
 Add the element's contribution to its residuals vector, jacobian matrix and mass matrix. More...
 

Detailed Description

A class that solves the Boussinesq approximation of the Navier–Stokes and energy equations by coupling two pre-existing classes. The QAdvectionDiffusionReactionElement with bi-quadratic interpolation for the scalar variables (temperature and concentration) and QCrouzeixRaviartElement which solves the Navier–Stokes equations using bi-quadratic interpolation for the velocities and a discontinuous bi-linear interpolation for the pressure. Note that we are free to choose the order in which we store the variables at the nodes. In this case we choose to store the variables in the order fluid velocities followed by temperature. We must, therefore, overload the function AdvectionDiffusionReactionEquations<2,DIM>::u_index_adv_diff_react() to indicate that the temperature is stored at the DIM-th position not the 0-th. We do not need to overload the corresponding function in the NavierStokesEquations<DIM> class because the velocities are stored first.

Definition at line 57 of file axisymmetric_advection_navier_stokes_elements.h.

Constructor & Destructor Documentation

◆ AxisymmetricQAdvectionCrouzeixRaviartElement()

oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::AxisymmetricQAdvectionCrouzeixRaviartElement ( )
inline

Constructor: call the underlying constructors and initialise the pointer to the Rayleigh number to point to the default value of 0.0.

Definition at line 67 of file axisymmetric_advection_navier_stokes_elements.h.

Member Function Documentation

◆ compute_error() [1/2]

void oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::compute_error ( std::ostream &  outfile,
FiniteElement::SteadyExactSolutionFctPt  exact_soln_pt,
double &  error,
double &  norm 
)
inline

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 Call the broken default.

Definition at line 221 of file axisymmetric_advection_navier_stokes_elements.h.

◆ compute_error() [2/2]

void oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::compute_error ( std::ostream &  outfile,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt,
const double &  time,
double &  error,
double &  norm 
)
inline

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 Call the broken default.

Definition at line 209 of file axisymmetric_advection_navier_stokes_elements.h.

◆ compute_norm()

void oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::compute_norm ( double &  norm)
inline

◆ disable_ALE()

void oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::disable_ALE ( )
inline

Final override for disable ALE.

Definition at line 80 of file axisymmetric_advection_navier_stokes_elements.h.

◆ enable_ALE()

void oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::enable_ALE ( )
inline

Final override for enable ALE.

Definition at line 88 of file axisymmetric_advection_navier_stokes_elements.h.

◆ fill_in_contribution_to_jacobian() [1/2]

void oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::fill_in_contribution_to_jacobian ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
)
inline

Compute the element's residual vector and the Jacobian matrix. Jacobian is computed by finite-differencing.

Definition at line 257 of file axisymmetric_advection_navier_stokes_elements.h.

◆ fill_in_contribution_to_jacobian() [2/2]

void oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::fill_in_contribution_to_jacobian ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
)
inline

Compute the element's residual Vector and the Jacobian matrix. Use finite-differencing only for the off-diagonal blocks.

Definition at line 355 of file axisymmetric_advection_navier_stokes_elements.h.

References fill_in_off_diagonal_jacobian_blocks_by_fd().

◆ fill_in_contribution_to_jacobian_and_mass_matrix()

void oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::fill_in_contribution_to_jacobian_and_mass_matrix ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
DenseMatrix< double > &  mass_matrix 
)
inline

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

Definition at line 377 of file axisymmetric_advection_navier_stokes_elements.h.

References fill_in_off_diagonal_jacobian_blocks_by_fd().

◆ fill_in_contribution_to_residuals()

void oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::fill_in_contribution_to_residuals ( Vector< double > &  residuals)
inline

Calculate the element's contribution to the residual vector. Recall that fill_in_* functions MUST NOT initialise the entries in the vector to zero. This allows us to call the fill_in_* functions of the constituent single-physics elements sequentially, without wiping out any previously computed entries.

Definition at line 242 of file axisymmetric_advection_navier_stokes_elements.h.

◆ fill_in_off_diagonal_jacobian_blocks_by_fd()

void oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::fill_in_off_diagonal_jacobian_blocks_by_fd ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
)
inline

Helper function to get the off-diagonal blocks of the Jacobian matrix by finite differences.

Definition at line 268 of file axisymmetric_advection_navier_stokes_elements.h.

References u_index_axi_adv_diff().

Referenced by fill_in_contribution_to_jacobian(), and fill_in_contribution_to_jacobian_and_mass_matrix().

◆ get_wind_axi_adv_diff()

void oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::get_wind_axi_adv_diff ( const unsigned &  ipt,
const Vector< double > &  s,
const Vector< double > &  x,
Vector< double > &  wind 
) const
inline

Overload the wind function in the advection-diffusion equations. This provides the coupling from the Navier–Stokes equations to the advection-diffusion equations because the wind is the fluid velocity.

Definition at line 229 of file axisymmetric_advection_navier_stokes_elements.h.

◆ nscalar_paraview()

unsigned oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::nscalar_paraview ( ) const
inline

Number of scalars/fields output by this element. Reimplements broken virtual function in base class.

Definition at line 98 of file axisymmetric_advection_navier_stokes_elements.h.

◆ output() [1/4]

void oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::output ( FILE *  file_pt)
inline

C-style output function: Broken default.

Definition at line 168 of file axisymmetric_advection_navier_stokes_elements.h.

◆ output() [2/4]

void oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::output ( FILE *  file_pt,
const unsigned &  n_plot 
)
inline

C-style output function: Broken default.

Definition at line 172 of file axisymmetric_advection_navier_stokes_elements.h.

◆ output() [3/4]

void oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::output ( std::ostream &  outfile)
inline

Overload the standard output function with the broken default.

Definition at line 124 of file axisymmetric_advection_navier_stokes_elements.h.

◆ output() [4/4]

void oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::output ( std::ostream &  outfile,
const unsigned &  nplot 
)
inline

Output function:
Output x, y, u, v, p, theta at Nplot^DIM plot points.

Definition at line 129 of file axisymmetric_advection_navier_stokes_elements.h.

◆ output_fct() [1/2]

void oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::output_fct ( std::ostream &  outfile,
const unsigned &  Nplot,
const double &  time,
FiniteElement::UnsteadyExactSolutionFctPt  exact_soln_pt 
)
inline

Output function for a time-dependent exact solution: Broken default.

Definition at line 184 of file axisymmetric_advection_navier_stokes_elements.h.

◆ output_fct() [2/2]

void oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::output_fct ( std::ostream &  outfile,
const unsigned &  Nplot,
FiniteElement::SteadyExactSolutionFctPt  exact_soln_pt 
)
inline

Output function for an exact solution: Broken default.

Definition at line 176 of file axisymmetric_advection_navier_stokes_elements.h.

◆ required_nvalue()

unsigned oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::required_nvalue ( const unsigned &  n) const
inline

The required number of values stored at the nodes is the sum of the required values of the two single-physics elements. Note that this step is generic for any multi-physics element of this type.

Definition at line 75 of file axisymmetric_advection_navier_stokes_elements.h.

◆ scalar_name_paraview()

std::string oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::scalar_name_paraview ( const unsigned &  i) const
inline

◆ scalar_value_paraview()

void oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::scalar_value_paraview ( std::ofstream &  file_out,
const unsigned &  i,
const unsigned &  nplot 
) const
inline

Write values of the i-th scalar field at the plot points. Needs to be implemented for each new specific element type.

Definition at line 106 of file axisymmetric_advection_navier_stokes_elements.h.

◆ u_index_axi_adv_diff()

unsigned oomph::AxisymmetricQAdvectionCrouzeixRaviartElement::u_index_axi_adv_diff ( ) const
inline

Overload the index at which the temperature and solute concentration variables are stored.

Definition at line 196 of file axisymmetric_advection_navier_stokes_elements.h.

Referenced by fill_in_off_diagonal_jacobian_blocks_by_fd().


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