28 #ifndef OOMPH_AXISYMMETRIC_NAVIER_STOKES_ELEMENTS_HEADER
29 #define OOMPH_AXISYMMETRIC_NAVIER_STOKES_ELEMENTS_HEADER
33 #include <oomph-lib-config.h>
37 #include "../generic/Qelements.h"
38 #include "../generic/fsi.h"
39 #include "../generic/projection.h"
187 DShape& dtestdx)
const = 0;
197 DShape& dtestdx)
const = 0;
219 Shape& test)
const = 0;
232 for (
unsigned i = 0;
i < 3;
i++)
240 (*Body_force_fct_pt)(time, x, result);
266 for (
unsigned i = 0;
i < 2;
i++)
270 for (
unsigned j = 0; j < 3; j++)
272 d_body_force_dx(j,
i) =
273 (body_force_pls[j] - body_force[j]) / eps_fd;
319 double source_pls = 0.0;
321 for (
unsigned i = 0;
i < 2;
i++)
325 gradient[
i] = (source_pls - source) / eps_fd;
360 double*
const& parameter_pt,
398 const double&
re()
const
548 for (
unsigned t = 0;
t < n_time;
t++)
576 virtual double p_axi_nst(
const unsigned& n_p)
const = 0;
615 const unsigned& which_one = 0);
628 const unsigned& nplot)
const
635 for (
unsigned iplot = 0; iplot < num_plot_points; iplot++)
653 std::stringstream error_stream;
655 <<
"Axisymmetric Navier-Stokes Elements only store 4 fields "
658 OOMPH_CURRENT_FUNCTION,
659 OOMPH_EXCEPTION_LOCATION);
682 std::stringstream error_stream;
684 <<
"Axisymmetric Navier-Stokes Elements only store 4 fields "
687 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
697 for (
unsigned i = 0;
i < 2;
i++)
703 for (
unsigned i = 0;
i < 3;
i++)
723 void output(std::ostream& outfile,
const unsigned& nplot);
736 void output(FILE* file_pt,
const unsigned& nplot);
742 const unsigned& nplot,
749 const unsigned& nplot,
756 const unsigned& nplot,
810 residuals, jacobian, mass_matrix, 2);
837 double*
const& parameter_pt,
853 double*
const& parameter_pt,
860 parameter_pt, dres_dparam, djac_dparam, dmass_matrix_dparam, 2);
869 unsigned n_node =
nnode();
875 for (
unsigned i = 0;
i < 3;
i++)
882 for (
unsigned l = 0; l < n_node; l++)
891 const unsigned&
i)
const
894 unsigned n_node =
nnode();
904 double interpolated_u = 0.0;
906 for (
unsigned l = 0; l < n_node; l++)
908 interpolated_u +=
nodal_value(l, u_nodal_index) * psi[l];
911 return (interpolated_u);
919 const unsigned&
i)
const
922 unsigned n_node =
nnode();
932 double interpolated_u = 0.0;
934 for (
unsigned l = 0; l < n_node; l++)
936 interpolated_u +=
nodal_value(
t, l, u_nodal_index) * psi[l];
939 return (interpolated_u);
955 unsigned n_node =
nnode();
965 unsigned n_u_dof = 0;
966 for (
unsigned l = 0; l < n_node; l++)
977 du_ddata.resize(n_u_dof, 0.0);
978 global_eqn_number.resize(n_u_dof, 0);
983 for (
unsigned l = 0; l < n_node; l++)
990 global_eqn_number[count] = global_eqn;
992 du_ddata[count] = psi[l];
1011 double interpolated_p = 0.0;
1013 for (
unsigned l = 0; l < n_pres; l++)
1015 interpolated_p +=
p_axi_nst(l) * psi[l];
1018 return (interpolated_p);
1025 const unsigned& j)
const
1028 const unsigned n_node =
nnode();
1033 DShape dpsifds(n_node, 2);
1042 double interpolated_duds = 0.0;
1045 for (
unsigned l = 0; l < n_node; l++)
1047 interpolated_duds +=
nodal_value(l, u_nodal_index) * dpsifds(l, j);
1050 return (interpolated_duds);
1057 const unsigned& j)
const
1060 const unsigned n_node =
nnode();
1065 DShape dpsifdx(n_node, 2);
1074 double interpolated_dudx = 0.0;
1077 for (
unsigned l = 0; l < n_node; l++)
1079 interpolated_dudx +=
nodal_value(l, u_nodal_index) * dpsifdx(l, j);
1082 return (interpolated_dudx);
1088 const unsigned&
i)
const
1091 const unsigned n_node =
nnode();
1100 double interpolated_dudt = 0.0;
1103 for (
unsigned l = 0; l < n_node; l++)
1108 return (interpolated_dudt);
1118 const unsigned& k)
const
1121 const unsigned n_node =
nnode();
1126 DShape dpsifds(n_node, 2);
1153 det, jacobian, djacobian_dX, inverse_jacobian, dpsifds, d_dpsifdx_dX);
1159 double interpolated_d_dudx_dX = 0.0;
1162 for (
unsigned l = 0; l < n_node; l++)
1164 interpolated_d_dudx_dX +=
1165 nodal_value(l, u_nodal_index) * d_dpsifdx_dX(p, q, l, k);
1168 return (interpolated_d_dudx_dX);
1175 double result = 0.0;
1188 const unsigned n_dim =
dim();
1192 for (
unsigned ipt = 0; ipt < n_intpt; ipt++)
1195 for (
unsigned i = 0;
i < n_dim;
i++)
1201 for (
unsigned i = 0;
i < n_dim_eulerian;
i++)
1213 result += x[0] * w * J;
1257 const unsigned& ipt,
1267 const unsigned& ipt,
1339 void output(std::ostream& outfile,
const unsigned& n_plot)
1352 void output(FILE* file_pt,
const unsigned& n_plot)
1371 std::list<std::pair<unsigned long, unsigned>>& dof_lookup_list)
const;
1392 for (
unsigned i = 0;
i < 9;
i++)
1395 dtestdx(
i, 0) = dpsidx(
i, 0);
1396 dtestdx(
i, 1) = dpsidx(
i, 1);
1418 for (
unsigned i = 0;
i < 9;
i++)
1421 dtestdx(
i, 0) = dpsidx(
i, 0);
1422 dtestdx(
i, 1) = dpsidx(
i, 1);
1438 const unsigned& ipt,
1449 ipt, psi, dpsidx, djacobian_dX, d_dpsidx_dX);
1453 for (
unsigned i = 0;
i < 9;
i++)
1457 for (
unsigned k = 0; k < 2; k++)
1459 dtestdx(
i, k) = dpsidx(
i, k);
1461 for (
unsigned p = 0; p < 2; p++)
1463 for (
unsigned q = 0; q < 9; q++)
1465 d_dtestdx_dX(p, q,
i, k) = d_dpsidx_dX(p, q,
i, k);
1493 for (
unsigned i = 0;
i < 3;
i++) test[
i] = psi[
i];
1555 const unsigned& ipt,
1565 const unsigned& ipt,
1641 void output(std::ostream& outfile,
const unsigned& n_plot)
1653 void output(FILE* file_pt,
const unsigned& n_plot)
1673 std::list<std::pair<unsigned long, unsigned>>& dof_lookup_list)
const;
1694 for (
unsigned i = 0;
i < 9;
i++)
1697 dtestdx(
i, 0) = dpsidx(
i, 0);
1698 dtestdx(
i, 1) = dpsidx(
i, 1);
1720 for (
unsigned i = 0;
i < 9;
i++)
1723 dtestdx(
i, 0) = dpsidx(
i, 0);
1724 dtestdx(
i, 1) = dpsidx(
i, 1);
1740 const unsigned& ipt,
1751 ipt, psi, dpsidx, djacobian_dX, d_dpsidx_dX);
1755 for (
unsigned i = 0;
i < 9;
i++)
1759 for (
unsigned k = 0; k < 2; k++)
1761 dtestdx(
i, k) = dpsidx(
i, k);
1763 for (
unsigned p = 0; p < 2; p++)
1765 for (
unsigned q = 0; q < 9; q++)
1767 d_dtestdx_dX(p, q,
i, k) = d_dpsidx_dX(p, q,
i, k);
1784 double psi1[2], psi2[2];
1791 for (
unsigned i = 0;
i < 2;
i++)
1793 for (
unsigned j = 0; j < 2; j++)
1796 psi[2 *
i + j] = psi2[
i] * psi1[j];
1810 for (
unsigned i = 0;
i < 4;
i++) test[
i] = psi[
i];
1840 template<
class TAYLOR_HOOD_ELEMENT>
1860 unsigned nnod = this->
nnode();
1861 for (
unsigned j = 0; j < nnod; j++)
1864 data_values.push_back(std::make_pair(this->
node_pt(j), fld));
1871 unsigned Pconv_size = 3;
1872 for (
unsigned j = 0; j < Pconv_size; j++)
1875 unsigned vertex_index = this->Pconv[j];
1876 data_values.push_back(
1877 std::make_pair(this->
node_pt(vertex_index), fld));
1920 unsigned n_dim = this->
dim();
1921 unsigned n_node = this->
nnode();
1926 this->pshape_axi_nst(
s, psi);
1928 Shape psif(n_node), testf(n_node);
1929 DShape dpsifdx(n_node, n_dim), dtestfdx(n_node, n_dim);
1932 double J = this->dshape_and_dtest_eulerian_axi_nst(
1933 s, psif, dpsifdx, testf, dtestfdx);
1938 Shape testf(n_node);
1939 DShape dpsifdx(n_node, n_dim), dtestfdx(n_node, n_dim);
1942 double J = this->dshape_and_dtest_eulerian_axi_nst(
1943 s, psi, dpsifdx, testf, dtestfdx);
1952 const unsigned& fld,
1955 unsigned n_node = this->
nnode();
1960 return this->interpolated_p_axi_nst(
s);
1966 unsigned u_nodal_index = this->u_index_axi_nst(fld);
1972 this->
shape(s, psi);
1975 double interpolated_u = 0.0;
1978 for (
unsigned l = 0; l < n_node; l++)
1980 interpolated_u += this->
nodal_value(t, l, u_nodal_index) * psi[l];
1982 return interpolated_u;
1992 return this->npres_axi_nst();
1996 return this->
nnode();
2006 return this->p_local_eqn(j);
2010 const unsigned u_nodal_index = this->u_index_axi_nst(fld);
2021 template<
class ELEMENT>
2034 template<
class ELEMENT>
2047 template<
class CROUZEIX_RAVIART_ELEMENT>
2067 const unsigned n_node = this->
nnode();
2068 for (
unsigned n = 0; n < n_node; n++)
2071 data_values.push_back(std::make_pair(this->
node_pt(n), fld));
2078 const unsigned n_press = this->npres_axi_nst();
2080 for (
unsigned j = 0; j < n_press; j++)
2082 data_values.push_back(std::make_pair(
2126 unsigned n_dim = this->
dim();
2127 unsigned n_node = this->
nnode();
2132 this->pshape_axi_nst(
s, psi);
2134 Shape psif(n_node), testf(n_node);
2135 DShape dpsifdx(n_node, n_dim), dtestfdx(n_node, n_dim);
2138 double J = this->dshape_and_dtest_eulerian_axi_nst(
2139 s, psif, dpsifdx, testf, dtestfdx);
2144 Shape testf(n_node);
2145 DShape dpsifdx(n_node, n_dim), dtestfdx(n_node, n_dim);
2148 double J = this->dshape_and_dtest_eulerian_axi_nst(
2149 s, psi, dpsifdx, testf, dtestfdx);
2158 const unsigned& fld,
2167 return this->interpolated_p_axi_nst(
s);
2172 return this->interpolated_u_axi_nst(
t,
s, fld);
2182 return this->npres_axi_nst();
2186 return this->
nnode();
2196 return this->p_local_eqn(j);
2200 const unsigned u_nodal_index = this->u_index_axi_nst(fld);
2225 std::set<std::pair<Data*, unsigned>>& paired_load_data)
2231 unsigned u_index[DIM];
2232 for (
unsigned i = 0;
i < DIM;
i++)
2238 unsigned n_node = this->
nnode();
2239 for (
unsigned n = 0; n < n_node; n++)
2243 for (
unsigned i = 0;
i < DIM;
i++)
2245 paired_load_data.insert(std::make_pair(this->
node_pt(n), u_index[
i]));
2262 std::set<std::pair<Data*, unsigned>>& paired_pressure_data)
2269 for (
unsigned l = 0; l < n_pres; l++)
2273 paired_pressure_data.insert(
2319 template<
class ELEMENT>
2332 template<
class ELEMENT>
A class for elements that solve the unsteady axisymmetric Navier–Stokes equations in cylindrical pola...
double dissipation() const
Return integral of dissipation over element.
void point_output_data(const Vector< double > &s, Vector< double > &data)
Output solution in data vector at local cordinates s: r,z,u_r,u_z,u_phi,p.
static Vector< double > Default_Gravity_vector
Static default value for the gravity vector.
double pressure_integral() const
Integral of pressure over element.
void traction(const Vector< double > &s, const Vector< double > &N, Vector< double > &traction) const
Compute traction (on the viscous scale) at local coordinate s for outer unit normal N.
unsigned nscalar_paraview() const
Number of scalars/fields output by this element. Reimplements broken virtual function in base class.
unsigned u_index_nst(const unsigned &i) const
Return the index at which the i-th unknown velocity component is stored with a common interface for u...
double(* Source_fct_pt)(const double &time, const Vector< double > &x)
Pointer to volumetric source function.
virtual void pshape_axi_nst(const Vector< double > &s, Shape &psi, Shape &test) const =0
Compute the pressure shape and test functions at local coordinate s.
virtual void fill_in_generic_dresidual_contribution_axi_nst(double *const ¶meter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam, unsigned flag)
Compute the derivative of residuals for the Navier–Stokes equations; with respect to a parameeter fla...
Vector< double > * G_pt
Pointer to global gravity Vector.
double interpolated_duds_axi_nst(const Vector< double > &s, const unsigned &i, const unsigned &j) const
Return FE interpolated derivatives of velocity component u[i] w.r.t spatial local coordinate directio...
double interpolated_dudx_axi_nst(const Vector< double > &s, const unsigned &i, const unsigned &j) const
Return FE interpolated derivatives of velocity component u[i] w.r.t spatial global coordinate directi...
const double & density_ratio() const
Density ratio for element: Element's density relative to the viscosity used in the definition of the ...
void fill_in_contribution_to_hessian_vector_products(Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
Compute the hessian tensor vector products required to perform continuation of bifurcations analytica...
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 specif...
virtual double dshape_and_dtest_eulerian_at_knot_axi_nst(const unsigned &ipt, Shape &psi, DShape &dpsidx, RankFourTensor< double > &d_dpsidx_dX, Shape &test, DShape &dtestdx, RankFourTensor< double > &d_dtestdx_dX, DenseMatrix< double > &djacobian_dX) const =0
Shape/test functions and derivs w.r.t. to global coords at integration point ipt; return Jacobian of ...
double * ReInvFr_pt
Pointer to global Reynolds number x inverse Froude number (= Bond number / Capillary number)
const double & re_invro() const
Global Reynolds number multiplied by inverse Rossby number.
double compute_physical_size() const
Compute the volume of the element.
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 time...
virtual double p_axi_nst(const unsigned &n_p) const =0
Pressure at local pressure "node" n_p Uses suitably interpolated value for hanging nodes.
double interpolated_u_axi_nst(const Vector< double > &s, const unsigned &i) const
Return FE interpolated velocity u[i] at local coordinate s.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Compute the element's residual Vector.
double *& re_invro_pt()
Pointer to global inverse Froude number.
std::string scalar_name_paraview(const unsigned &i) const
Name of the i-th scalar field. Default implementation returns V1 for the first one,...
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....
virtual int p_nodal_index_axi_nst() const
Which nodal value represents the pressure?
double interpolated_u_axi_nst(const unsigned &t, const Vector< double > &s, const unsigned &i) const
Return FE interpolated velocity u[i] at local coordinate s.
const double & viscosity_ratio() const
Viscosity ratio for element: Element's viscosity relative to the viscosity used in the definition of ...
const Vector< double > & g() const
Vector of gravitational components.
const double & re() const
Reynolds number.
double *& density_ratio_pt()
Pointer to Density ratio.
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 h...
void output(FILE *file_pt)
Output function: x,y,[z],u,v,[w],p in tecplot format. Default number of plot points.
double * Re_pt
Pointer to global Reynolds number.
virtual void pshape_axi_nst(const Vector< double > &s, Shape &psi) const =0
Compute the pressure shape functions at local coordinate s.
AxisymmetricNavierStokesEquations()
Constructor: NULL the body force and source function.
double *& re_pt()
Pointer to Reynolds number.
virtual void get_viscosity_ratio_axisym_nst(const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, double &visc_ratio)
Calculate the viscosity ratio relative to the viscosity used in the definition of the Reynolds number...
double interpolated_d_dudx_dX_axi_nst(const Vector< double > &s, const unsigned &p, const unsigned &q, const unsigned &i, const unsigned &k) const
Return FE interpolated derivatives w.r.t. nodal coordinates X_{pq} of the spatial derivatives of the ...
void interpolated_u_axi_nst(const Vector< double > &s, Vector< double > &veloc) const
Compute vector of FE interpolated velocity u at local coordinate s.
double *& re_st_pt()
Pointer to product of Reynolds and Strouhal number (=Womersley number)
double * ReSt_pt
Pointer to global Reynolds number x Strouhal number (=Womersley)
void disable_ALE()
Disable ALE, i.e. assert the mesh is not moving – you do this at your own risk!
virtual double dshape_and_dtest_eulerian_at_knot_axi_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 J...
void(*&)(const double &time, const Vector< double > &x, Vector< double > &f) axi_nst_body_force_fct_pt()
Access function for the body-force pointer.
double get_source_fct(const double &time, const unsigned &ipt, const Vector< double > &x)
Calculate the source fct at given time and Eulerian position.
double * Density_Ratio_pt
Pointer to the density ratio (relative to the density used in the definition of the Reynolds number)
static int Pressure_not_stored_at_node
Static "magic" number that indicates that the pressure is not stored at a node.
double du_dt_axi_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.
static double Default_Physical_Ratio_Value
Static default value for the physical ratios (all are initialised to one)
double kin_energy() const
Get integral of kinetic energy over element.
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....
double *& re_invfr_pt()
Pointer to global inverse Froude number.
void(* Body_force_fct_pt)(const double &time, const Vector< double > &x, Vector< double > &result)
Pointer to body force function.
virtual unsigned npres_axi_nst() const =0
Function to return number of pressure degrees of freedom.
double *& viscosity_ratio_pt()
Pointer to Viscosity Ratio.
virtual double dshape_and_dtest_eulerian_axi_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....
static double Default_Physical_Constant_Value
Static default value for the physical constants (all initialised to zero)
double interpolated_dudt_axi_nst(const Vector< double > &s, const unsigned &i) const
Return FE interpolated derivatives of velocity component u[i] w.r.t time at local coordinate s.
double(*&)(const double &time, const Vector< double > &x) source_fct_pt()
Access function for the source-function pointer.
bool ALE_is_disabled
Boolean flag to indicate if ALE formulation is disabled when the time-derivatives are computed....
virtual void fill_in_generic_residual_contribution_axi_nst(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix, unsigned flag)
Compute the residuals for the Navier–Stokes equations; flag=2 or 1 or 0: compute the Jacobian and/or ...
virtual void get_source_fct_gradient(const double &time, const unsigned &ipt, const Vector< double > &x, Vector< double > &gradient)
Get gradient of source term at (Eulerian) position x. Computed via function pointer (if set) or by fi...
unsigned n_u_nst() const
Return the number of velocity components for use in general FluidInterface clas.
void fill_in_contribution_to_dresiduals_dparameter(double *const ¶meter_pt, Vector< double > &dres_dparam)
Compute the element's residual Vector.
void fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter(double *const ¶meter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam)
Add the element's contribution to its residuals vector, jacobian matrix and mass matrix.
const double & re_st() const
Product of Reynolds and Strouhal number (=Womersley number)
const double & re_invfr() const
Global inverse Froude number.
double interpolated_p_axi_nst(const Vector< double > &s) const
Return FE interpolated pressure at local coordinate s.
virtual void get_body_force_gradient_axi_nst(const double &time, const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, DenseMatrix< double > &d_body_force_dx)
Get gradient of body force term at (Eulerian) position x. Computed via function pointer (if set) or b...
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.
double * ReInvRo_pt
Pointer to global Reynolds number x inverse Rossby number (used when in a rotating frame)
void get_pressure_and_velocity_mass_matrix_diagonal(Vector< double > &press_mass_diag, Vector< double > &veloc_mass_diag, const unsigned &which_one=0)
Compute the diagonal of the velocity/pressure mass matrices. If which one=0, both are computed,...
virtual void dinterpolated_u_axi_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 ca...
void enable_ALE()
(Re-)enable ALE, i.e. take possible mesh motion into account when evaluating the time-derivative....
void strain_rate(const Vector< double > &s, DenseMatrix< double > &strain_rate) const
Strain-rate tensor: where (in that order)
virtual int p_local_eqn(const unsigned &n) const =0
Access function for the local equation number information for the pressure. p_local_eqn[n] = local eq...
void fill_in_contribution_to_djacobian_dparameter(double *const ¶meter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
Compute the element's residual Vector and the jacobian matrix Virtual function can be overloaded by h...
virtual void get_body_force_axi_nst(const double &time, const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &result)
Calculate the body force fct at a given time and Eulerian position.
double * Viscosity_Ratio_pt
Pointer to the viscosity ratio (relative to the viscosity used in the definition of the Reynolds numb...
virtual void get_dresidual_dnodal_coordinates(RankThreeTensor< double > &dresidual_dnodal_coordinates)
Compute derivatives of elemental residual vector with respect to nodal coordinates....
Vector< double > *& g_pt()
Pointer to Vector of gravitational components.
virtual unsigned u_index_axi_nst(const unsigned &i) const
Return the index at which the i-th unknown velocity component is stored. The default value,...
void output(std::ostream &outfile)
Output function: x,y,[z],u,v,[w],p in tecplot format. Default number of plot points.
static Vector< double > Gamma
Vector to decide whether the stress-divergence form is used or not.
/////////////////////////////////////////////////////////////////////////// /////////////////////////...
void output(FILE *file_pt, const unsigned &n_plot)
Redirect output to NavierStokesEquations output.
void get_dof_numbers_for_unknowns(std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
Create a list of pairs for all unknowns in this element, so that the first entry in each pair contain...
double dshape_and_dtest_eulerian_axi_nst(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Velocity shape and test functions and their derivs w.r.t. to global coords at local coordinate s (tak...
void get_traction(const Vector< double > &s, const Vector< double > &N, Vector< double > &traction) const
Compute traction at local coordinate s for outer unit normal N.
void fix_pressure(const unsigned &p_dof, const double &pvalue)
Function to fix the internal pressure dof idof_internal.
void pshape_axi_nst(const Vector< double > &s, Shape &psi) const
Pressure shape functions at local coordinate s.
static const unsigned Initial_Nvalue[]
Static array of ints to hold required number of variables at nodes.
double dshape_and_dtest_eulerian_at_knot_axi_nst(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Velocity shape and test functions and their derivs w.r.t. to global coords at ipt-th integation point...
unsigned ndof_types() const
The number of "DOF types" that degrees of freedom in this element are sub-divided into: Velocity (3 c...
void output(FILE *file_pt)
Redirect output to NavierStokesEquations output.
unsigned P_axi_nst_internal_index
Internal index that indicates at which internal data the pressure is stored.
unsigned npres_axi_nst() const
Return number of pressure values.
AxisymmetricQCrouzeixRaviartElement()
Constructor, there are three internal values (for the pressure)
double p_axi_nst(const unsigned &i) const
Return the pressure values at internal dof i_internal (Discontinous pressure interpolation – no need ...
int p_local_eqn(const unsigned &n) const
Overload the access function for the pressure's local equation numbers.
virtual unsigned required_nvalue(const unsigned &n) const
Number of values (pinned or dofs) required at local node n.
void output(std::ostream &outfile)
Redirect output to NavierStokesEquations output.
void output(std::ostream &outfile, const unsigned &n_plot)
Redirect output to NavierStokesEquations output.
/////////////////////////////////////////////////////////////////////////
void fix_pressure(const unsigned &n_p, const double &pvalue)
Fix the pressure at local pressure node n_p.
virtual int p_nodal_index_axi_nst() const
Which nodal value represents the pressure?
static const unsigned Pconv[]
Static array of ints to hold conversion from pressure node numbers to actual node numbers.
double dshape_and_dtest_eulerian_axi_nst(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Velocity shape and test functions and their derivs w.r.t. to global coords at local coordinate s (tak...
void output(FILE *file_pt, const unsigned &n_plot)
Redirect output to NavierStokesEquations output.
int p_local_eqn(const unsigned &n) const
Overload the access function for the pressure's local equation numbers.
unsigned npres_axi_nst() const
Return number of pressure values.
void get_dof_numbers_for_unknowns(std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
Create a list of pairs for all unknowns in this element, so that the first entry in each pair contain...
void output(std::ostream &outfile, const unsigned &n_plot)
Redirect output to NavierStokesEquations output.
virtual unsigned required_nvalue(const unsigned &n) const
Number of values (pinned or dofs) required at node n. Can be overwritten for hanging node version.
void output(FILE *file_pt)
Redirect output to NavierStokesEquations output.
unsigned ndof_types() const
Returns the number of "DOF types" that degrees of freedom in this element are sub-divided into: Veloc...
void output(std::ostream &outfile)
Redirect output to NavierStokesEquations output.
void pshape_axi_nst(const Vector< double > &s, Shape &psi) const
Pressure shape functions at local coordinate s.
double dshape_and_dtest_eulerian_at_knot_axi_nst(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Velocity shape and test functions and their derivs w.r.t. to global coords at local coordinate s (tak...
void get_traction(const Vector< double > &s, const Vector< double > &N, Vector< double > &traction) const
Compute traction at local coordinate s for outer unit normal N.
AxisymmetricQTaylorHoodElement()
Constructor, no internal data points.
static const unsigned Initial_Nvalue[]
Static array of ints to hold number of variables at node.
double p_axi_nst(const unsigned &n_p) const
Access function for the pressure values at local pressure node n_p (const version)
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
A class that represents a collection of data; each Data object may contain many different individual ...
long & eqn_number(const unsigned &i)
Return the equation number of the i-th stored variable.
void pin(const unsigned &i)
Pin the i-th stored variable.
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
void set_value(const unsigned &i, const double &value_)
Set the i-th stored data value to specified value. The only reason that we require an explicit set fu...
double value(const unsigned &i) const
Return i-th stored value. This function is not virtual so that it can be inlined. This means that if ...
unsigned ntstorage() const
Return total number of doubles stored per value to record time history of each value (one for steady ...
Axisymmetric FSI Element.
FSIAxisymmetricQTaylorHoodElement()
Constructor.
void identify_load_data(std::set< std::pair< Data *, unsigned >> &paired_load_data)
Add to the set paired_load_data pairs containing.
void get_load(const Vector< double > &s, const Vector< double > &N, Vector< double > &load)
Compute the load vector that is applied by current element (at its local coordinate s) onto the adjac...
void identify_pressure_data(std::set< std::pair< Data *, unsigned >> &paired_pressure_data)
Add to the set paired_load_data pairs containing.
/////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
A general Finite Element class.
virtual unsigned nplot_points_paraview(const unsigned &nplot) const
Return the number of actual plot points for paraview plot with parameter nplot. Broken virtual; can b...
virtual double J_eulerian(const Vector< double > &s) const
Return the Jacobian of mapping from local to global coordinates at local position s.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
double nodal_value(const unsigned &n, const unsigned &i) const
Return the i-th value stored at local node n. Produces suitably interpolated values for hanging nodes...
virtual double dshape_eulerian_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsidx) const
Return the geometric shape functions and also first derivatives w.r.t. global coordinates at the ipt-...
virtual void shape(const Vector< double > &s, Shape &psi) const =0
Calculate the geometric shape functions at local coordinate s. This function must be overloaded for e...
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Return the local equation number corresponding to the i-th value at the n-th local node.
unsigned dim() const
Return the spatial dimension of the element, i.e. the number of local coordinates required to paramet...
unsigned nnode() const
Return the number of nodes.
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Function pointer for function that computes vector-valued steady "exact solution" as .
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
virtual void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
Get cector of local coordinates of plot point i (when plotting nplot points in each "coordinate direc...
virtual double local_to_eulerian_mapping(const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Calculate the mapping from local to Eulerian coordinates, given the derivatives of the shape function...
double dshape_eulerian(const Vector< double > &s, Shape &psi, DShape &dpsidx) const
Compute the geometric shape functions and also first derivatives w.r.t. global coordinates at local c...
virtual void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Function to compute the geometric shape functions and derivatives w.r.t. local coordinates at local c...
virtual void d_dshape_eulerian_dnodal_coordinates(const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
A template-free interface that calculates the derivative w.r.t. the nodal coordinates of the derivat...
unsigned nodal_dimension() const
Return the required Eulerian dimension of the nodes in this element.
void(* UnsteadyExactSolutionFctPt)(const double &, const Vector< double > &, Vector< double > &)
Function pointer for function that computes Vector-valued time-dependent function as .
virtual void dJ_eulerian_dnodal_coordinates(const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
A template-free interface that calculates the derivative of the jacobian of a mapping with respect to...
static double Default_fd_jacobian_step
Double used for the default finite difference step in elemental jacobian calculations.
unsigned add_internal_data(Data *const &data_pt, const bool &fd=true)
Add a (pointer to an) internal data object to the element and return the index required to obtain it ...
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
static DenseMatrix< double > Dummy_matrix
Empty dense matrix used as a dummy argument to combined residual and jacobian functions in the case w...
int internal_local_eqn(const unsigned &i, const unsigned &j) const
Return the local equation number corresponding to the j-th value stored at the i-th internal data.
TimeStepper *& time_stepper_pt()
Access function for pointer to time stepper: Null if object is not time-dependent.
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
TimeStepper *& position_time_stepper_pt()
Return a pointer to the position timestepper.
An OomphLibError object which should be thrown when an run-time error is encountered....
/////////////////////////////////////////////////////////////////////// /////////////////////////////...
Crouzeix Raviart upgraded to become projectable.
unsigned nvalue_of_field(const unsigned &fld)
Return number of values in field fld.
double get_field(const unsigned &t, const unsigned &fld, const Vector< double > &s)
Return interpolated field fld at local coordinate s, at time level t (t=0: present; t>0: history valu...
unsigned nhistory_values_for_coordinate_projection()
Number of positional history values (includes current value!)
Vector< std::pair< Data *, unsigned > > data_values_of_field(const unsigned &fld)
Specify the values associated with field fld. The information is returned in a vector of pairs which ...
unsigned nhistory_values_for_projection(const unsigned &fld)
Number of history values to be stored for fld-th field. Whatever the timestepper has set up for the v...
unsigned nfields_for_projection()
Number of fields to be projected: dim+1, corresponding to velocity components and pressure.
double jacobian_and_shape_of_field(const unsigned &fld, const Vector< double > &s, Shape &psi)
Return Jacobian of mapping and shape functions of field fld at local coordinate s.
int local_equation(const unsigned &fld, const unsigned &j)
Return local equation number of value j in field fld.
Axisymmetric Taylor Hood upgraded to become projectable.
double jacobian_and_shape_of_field(const unsigned &fld, const Vector< double > &s, Shape &psi)
Return Jacobian of mapping and shape functions of field fld at local coordinate s.
unsigned nvalue_of_field(const unsigned &fld)
Return number of values in field fld.
int local_equation(const unsigned &fld, const unsigned &j)
Return local equation number of value j in field fld.
unsigned nfields_for_projection()
Number of fields to be projected: dim+1, corresponding to velocity components and pressure.
double get_field(const unsigned &t, const unsigned &fld, const Vector< double > &s)
Return interpolated field fld at local coordinate s, at time level t (t=0: present; t>0: history valu...
unsigned nhistory_values_for_coordinate_projection()
Number of positional history values (includes current value!)
Vector< std::pair< Data *, unsigned > > data_values_of_field(const unsigned &fld)
Specify the values associated with field fld. The information is returned in a vector of pairs which ...
unsigned nhistory_values_for_projection(const unsigned &fld)
Number of history values to be stored for fld-th field. Whatever the timestepper has set up for the v...
Wrapper class for projectable elements. Adds "projectability" to the underlying ELEMENT.
/////////////////////////////////////////////////////////////////////// /////////////////////////////...
////////////////////////////////////////////////////////////////// //////////////////////////////////...
////////////////////////////////////////////////////////////////// //////////////////////////////////...
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
////////////////////////////////////////////////////////////////////// //////////////////////////////...
unsigned ntstorage() const
Return the number of doubles required to represent history (one for steady)
virtual double weight(const unsigned &i, const unsigned &j) const
Access function for j-th weight for the i-th derivative.
bool is_steady() const
Flag to indicate if a timestepper has been made steady (possibly temporarily to switch off time-depen...
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
const double Pi
50 digits from maple
void shape< 2 >(const double &s, double *Psi)
1D shape functions specialised to linear order (2 Nodes)
std::string to_string(T object, unsigned float_precision=8)
Conversion function that should work for anything with operator<< defined (at least all basic types).
//////////////////////////////////////////////////////////////////// ////////////////////////////////...