////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// More...
#include <boussinesq_elements.h>
Public Member Functions | |
RefineableBuoyantQCrouzeixRaviartElement () | |
Constructor: call the underlying constructors and initialise the pointer to the Rayleigh number to address 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. This step is generic for any composed element of this type. More... | |
const double & | ra () const |
Access function for the Rayleigh number (const version) More... | |
double *& | ra_pt () |
Access function for the pointer to the Rayleigh number. 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. Broken virtual. Needs to be implemented for each new specific element type. Temporary dummy. 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. Broken virtual. Needs to be implemented for each new specific element type. Temporary dummy. More... | |
std::string | scalar_name_paraview (const unsigned &i) const |
Name of the i-th scalar field. Default implementation returns V1 for the first one, V2 for the second etc. Can (should!) be overloaded with more meaningful names. More... | |
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: x,y,u or x,y,z,u 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_adv_diff () const |
Overload the index at which the temperature variable is stored. We choose to store is after the fluid velocities. More... | |
unsigned | nvertex_node () const |
Number of vertex nodes in the element is obtained from the geometric element. More... | |
Node * | vertex_node_pt (const unsigned &j) const |
Pointer to the j-th vertex node in the element, Call the geometric element's function. More... | |
unsigned | ncont_interpolated_values () const |
The total number of continously interpolated values is DIM+1 (DIM fluid velocities and one temperature). More... | |
void | get_interpolated_values (const Vector< double > &s, Vector< double > &values) |
Get the continuously interpolated values at the local coordinate s. We choose to put the fluid velocities first, followed by the temperature. More... | |
void | get_interpolated_values (const unsigned &t, const Vector< double > &s, Vector< double > &values) |
Get all continuously interpolated values at the local coordinate s at time level t (t=0: present; t>0: previous). We choose to put the fluid velocities first, followed by the temperature. More... | |
void | further_setup_hanging_nodes () |
The additional hanging node information must be set up for both single-physics elements. More... | |
void | rebuild_from_sons (Mesh *&mesh_pt) |
Call the rebuild_from_sons functions for each of the constituent multi-physics elements. More... | |
void | further_build () |
Call the underlying single-physics element's further_build() functions and make sure that the pointer to the Rayleigh number is passed to the sons. More... | |
unsigned | nrecovery_order () |
The recovery order is that of the NavierStokes elements. More... | |
unsigned | num_Z2_flux_terms () |
The number of Z2 flux terms is the same as that in the fluid element plus that in the advection-diffusion element. More... | |
void | get_Z2_flux (const Vector< double > &s, Vector< double > &flux) |
Get the Z2 flux by concatenating the fluxes from the fluid and the advection diffusion elements. More... | |
unsigned | ncompound_fluxes () |
The number of compound fluxes is two (one for the fluid and one for the temperature) More... | |
void | get_Z2_compound_flux_indices (Vector< unsigned > &flux_index) |
Fill in which flux components are associated with the fluid measure and which are associated with the temperature measure. More... | |
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 Overload to 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 Overload to broken default. More... | |
void | get_wind_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 | get_body_force_nst (const double &time, const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &result) |
Overload the body force in the navier-stokes equations This provides the coupling from the advection-diffusion equations to the Navier–Stokes equations, the body force is the temperature multiplied by the Rayleigh number acting in the direction opposite to gravity. More... | |
void | fill_in_contribution_to_residuals (Vector< double > &residuals) |
Fill in the constituent elements' contribution to the residual vector. More... | |
void | fill_in_contribution_to_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian) |
Compute the element's residual Vector and the jacobian matrix using full finite differences, the default implementation. 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... | |
void | fill_in_off_diagonal_jacobian_blocks_analytic (Vector< double > &residuals, DenseMatrix< double > &jacobian) |
Compute the contribution of the off-diagonal blocks analytically. More... | |
Private Member Functions | |
double | Default_Physical_Constant_Value |
Set the default value of the Rayleigh number to be zero. More... | |
double | Default_Physical_Constant_Value |
Private Attributes | |
double * | Ra_pt |
Pointer to a new physical variable, the Rayleigh number. More... | |
Static Private Attributes | |
static double | Default_Physical_Constant_Value |
The static default value of the Rayleigh number. More... | |
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
A RefineableElement class that solves the Boussinesq approximation of the Navier–Stokes and energy equations by coupling two pre-existing classes. The RefineableQAdvectionDiffusionElement with bi-quadratic interpolation for the scalar variable (temperature) and RefineableQCrouzeixRaviartElement 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 AdvectionDiffusionEquations<DIM>::u_index_adv_diff() 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. Finally, we choose to use the flux-recovery calculation from the fluid velocities to provide the error used in the mesh adaptation.
Definition at line 800 of file boussinesq_elements.h.
|
inline |
Constructor: call the underlying constructors and initialise the pointer to the Rayleigh number to address the default value of 0.0.
Definition at line 815 of file boussinesq_elements.h.
References oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >::Default_Physical_Constant_Value, and oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >::Ra_pt.
|
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 Overload to broken default.
Definition at line 1205 of file boussinesq_elements.h.
|
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 Overload to broken default.
Definition at line 1191 of file boussinesq_elements.h.
|
private |
Set the default value of the Rayleigh number to be zero.
Definition at line 1589 of file boussinesq_elements.h.
|
private |
Definition at line 1593 of file boussinesq_elements.h.
|
inline |
Final override for disable ALE.
Definition at line 845 of file boussinesq_elements.h.
|
inline |
Final override for enable ALE.
Definition at line 853 of file boussinesq_elements.h.
|
inline |
Compute the element's residual Vector and the jacobian matrix using full finite differences, the default implementation.
Definition at line 1266 of file boussinesq_elements.h.
References oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >::fill_in_off_diagonal_jacobian_blocks_analytic().
|
inline |
Add the element's contribution to its residuals vector, jacobian matrix and mass matrix.
Definition at line 1289 of file boussinesq_elements.h.
|
inline |
Fill in the constituent elements' contribution to the residual vector.
Definition at line 1252 of file boussinesq_elements.h.
|
inline |
Compute the contribution of the off-diagonal blocks analytically.
Definition at line 1301 of file boussinesq_elements.h.
References oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >::ra(), and oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >::u_index_adv_diff().
Referenced by oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >::fill_in_contribution_to_jacobian().
|
inline |
Call the underlying single-physics element's further_build() functions and make sure that the pointer to the Rayleigh number is passed to the sons.
Definition at line 1091 of file boussinesq_elements.h.
References oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >::ra_pt().
|
inline |
The additional hanging node information must be set up for both single-physics elements.
Definition at line 1071 of file boussinesq_elements.h.
|
inline |
Overload the body force in the navier-stokes equations This provides the coupling from the advection-diffusion equations to the Navier–Stokes equations, the body force is the temperature multiplied by the Rayleigh number acting in the direction opposite to gravity.
Definition at line 1231 of file boussinesq_elements.h.
References oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >::ra().
|
inline |
Get all continuously interpolated values at the local coordinate s at time level t (t=0: present; t>0: previous). We choose to put the fluid velocities first, followed by the temperature.
Definition at line 1039 of file boussinesq_elements.h.
|
inline |
Get the continuously interpolated values at the local coordinate s. We choose to put the fluid velocities first, followed by the temperature.
Definition at line 1007 of file boussinesq_elements.h.
|
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 1216 of file boussinesq_elements.h.
|
inline |
Fill in which flux components are associated with the fluid measure and which are associated with the temperature measure.
Definition at line 1160 of file boussinesq_elements.h.
|
inline |
Get the Z2 flux by concatenating the fluxes from the fluid and the advection diffusion elements.
Definition at line 1126 of file boussinesq_elements.h.
|
inline |
The number of compound fluxes is two (one for the fluid and one for the temperature)
Definition at line 1153 of file boussinesq_elements.h.
|
inline |
The total number of continously interpolated values is DIM+1 (DIM fluid velocities and one temperature).
Definition at line 998 of file boussinesq_elements.h.
|
inline |
The recovery order is that of the NavierStokes elements.
Definition at line 1109 of file boussinesq_elements.h.
|
inline |
Number of scalars/fields output by this element. Broken virtual. Needs to be implemented for each new specific element type. Temporary dummy.
Definition at line 864 of file boussinesq_elements.h.
|
inline |
The number of Z2 flux terms is the same as that in the fluid element plus that in the advection-diffusion element.
Definition at line 1116 of file boussinesq_elements.h.
|
inline |
Number of vertex nodes in the element is obtained from the geometric element.
Definition at line 984 of file boussinesq_elements.h.
|
inline |
C-style output function: Broken default.
Definition at line 945 of file boussinesq_elements.h.
|
inline |
C-style output function: Broken default.
Definition at line 951 of file boussinesq_elements.h.
|
inline |
Overload the standard output function with the broken default.
Definition at line 898 of file boussinesq_elements.h.
|
inline |
Output function: x,y,u or x,y,z,u at Nplot^DIM plot points.
Definition at line 905 of file boussinesq_elements.h.
|
inline |
Output function for a time-dependent exact solution. Broken default.
Definition at line 967 of file boussinesq_elements.h.
|
inline |
Output function for an exact solution: Broken default.
Definition at line 957 of file boussinesq_elements.h.
|
inline |
Access function for the Rayleigh number (const version)
Definition at line 832 of file boussinesq_elements.h.
References oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >::Ra_pt.
Referenced by oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >::fill_in_off_diagonal_jacobian_blocks_analytic(), and oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >::get_body_force_nst().
|
inline |
Access function for the pointer to the Rayleigh number.
Definition at line 838 of file boussinesq_elements.h.
References oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >::Ra_pt.
Referenced by oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >::further_build().
|
inline |
Call the rebuild_from_sons functions for each of the constituent multi-physics elements.
Definition at line 1081 of file boussinesq_elements.h.
|
inline |
The required number of values stored at the nodes is the sum of the required values of the two single-physics elements. This step is generic for any composed element of this type.
Definition at line 825 of file boussinesq_elements.h.
|
inline |
Name of the i-th scalar field. Default implementation returns V1 for the first one, V2 for the second etc. Can (should!) be overloaded with more meaningful names.
Definition at line 892 of file boussinesq_elements.h.
|
inline |
Write values of the i-th scalar field at the plot points. Broken virtual. Needs to be implemented for each new specific element type. Temporary dummy.
Definition at line 878 of file boussinesq_elements.h.
|
inline |
Overload the index at which the temperature variable is stored. We choose to store is after the fluid velocities.
Definition at line 977 of file boussinesq_elements.h.
Referenced by oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >::fill_in_off_diagonal_jacobian_blocks_analytic().
|
inline |
Pointer to the j-th vertex node in the element, Call the geometric element's function.
Definition at line 991 of file boussinesq_elements.h.
|
staticprivate |
The static default value of the Rayleigh number.
Definition at line 809 of file boussinesq_elements.h.
Referenced by oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >::RefineableBuoyantQCrouzeixRaviartElement().
|
private |
Pointer to a new physical variable, the Rayleigh number.
Definition at line 806 of file boussinesq_elements.h.
Referenced by oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >::ra(), oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >::ra_pt(), and oomph::RefineableBuoyantQCrouzeixRaviartElement< DIM >::RefineableBuoyantQCrouzeixRaviartElement().