28 #ifndef OOMPH_INTERFACE_ELEMENTS_HEADER
29 #define OOMPH_INTERFACE_ELEMENTS_HEADER
33 #include <oomph-lib-config.h>
36 #include "../generic/elements.h"
37 #include "../generic/spines.h"
38 #include "../generic/shape.h"
39 #include "../generic/hijacked_elements.h"
59 Vector<double>& unit_normal);
96 (*Wall_unit_normal_fct_pt)(x, normal);
101 throw OomphLibError(
"Wall unit normal fct has not been set",
102 "FluidInterfaceBoundingElement::wall_unit_normal()",
103 OOMPH_EXCEPTION_LOCATION);
114 bulk_element_pt()->node_update();
127 bulk_element_pt()->node_update();
189 throw OomphLibError(
"Capillary number has not been set",
190 "FluidInterfaceBoundingElement::ca()",
191 OOMPH_EXCEPTION_LOCATION);
203 std::string error_message =
"Contact angle not set\n";
205 "Please use FluidInterfaceBoundingElement::set_contact_angle()\n";
207 error_message, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
218 residuals, GeneralisedElement::Dummy_matrix, 0);
223 Vector<double>& residuals,
224 DenseMatrix<double>& jacobian,
236 Vector<double>& residuals,
237 DenseMatrix<double>& jacobian,
238 const unsigned& flag,
240 const DShape& dpsifds,
241 const Vector<double>& interpolated_n,
249 FiniteElement::output(outfile);
253 void output(std::ostream& outfile,
const unsigned& n_plot)
255 FiniteElement::output(outfile, n_plot);
261 FiniteElement::output(file_pt);
265 void output(FILE* file_pt,
const unsigned& n_plot)
267 FiniteElement::output(file_pt, n_plot);
285 Vector<double>& residuals, DenseMatrix<double>& jacobian,
unsigned flag);
305 Vector<double>& residuals, DenseMatrix<double>& jacobian,
unsigned flag);
365 throw OomphLibError(
"No external pressure has been set\n",
366 OOMPH_CURRENT_FUNCTION,
367 OOMPH_EXCEPTION_LOCATION);
380 Vector<double>& residuals, DenseMatrix<double>& jacobian,
unsigned flag);
405 const DShape& dpsids,
406 const DenseMatrix<double>& interpolated_t,
407 const Vector<double>& interpolated_x,
409 DShape& dpsidS_div) = 0;
427 Vector<double>& residuals,
428 DenseMatrix<double>& jacobian,
429 const unsigned& flag,
431 const DShape& dpsifds,
432 const DShape& dpsifdS,
433 const DShape& dpsifdS_div,
434 const Vector<double>& s,
435 const Vector<double>& interpolated_x,
436 const Vector<double>& interpolated_n,
458 virtual double sigma(
const Vector<double>& s_local)
468 residuals, GeneralisedElement::Dummy_matrix, 0);
473 const double&
ca()
const
484 throw OomphLibError(
"Capillary number has not been set",
485 "FluidInterfaceElement::ca()",
486 OOMPH_EXCEPTION_LOCATION);
498 const double&
st()
const
510 double u(
const unsigned& j,
const unsigned& i)
516 double interpolated_u(
const Vector<double>& s,
const unsigned& i);
542 if (external_pressure_data_pt->nvalue() != 1)
544 std::ostringstream error_message;
546 <<
"External pressure Data must only contain a single value!\n"
547 <<
"This one contains " << external_pressure_data_pt->nvalue()
550 throw OomphLibError(error_message.str(),
551 OOMPH_CURRENT_FUNCTION,
552 OOMPH_EXCEPTION_LOCATION);
579 Data* external_pressure_data_pt,
580 const unsigned& index_of_external_pressure_value)
586 if (index_of_external_pressure_value >=
587 external_pressure_data_pt->nvalue())
589 std::ostringstream error_message;
590 error_message <<
"External pressure Data only contains "
591 << external_pressure_data_pt->nvalue() <<
" values\n"
592 <<
"You have declared value "
593 << index_of_external_pressure_value
594 <<
" to be the value representing the pressure\n"
596 throw OomphLibError(error_message.str(),
597 OOMPH_CURRENT_FUNCTION,
598 OOMPH_EXCEPTION_LOCATION);
618 const int& face_index)
620 throw OomphLibError(
"Virtual function not yet implemented",
621 OOMPH_CURRENT_FUNCTION,
622 OOMPH_EXCEPTION_LOCATION);
633 const Vector<unsigned>& bulk_node_number) = 0;
638 FiniteElement::output(outfile);
642 void output(std::ostream& outfile,
const unsigned& n_plot);
647 FiniteElement::output(file_pt);
651 void output(FILE* file_pt,
const unsigned& n_plot);
670 const DShape& dpsids,
671 const DenseMatrix<double>& interpolated_t,
672 const Vector<double>& interpolated_x,
673 DShape& surface_gradient,
674 DShape& surface_divergence);
694 const DShape& dpsids,
695 const DenseMatrix<double>& interpolated_t,
696 const Vector<double>& interpolated_x,
697 DShape& surface_gradient,
698 DShape& surface_divergence);
718 const DShape& dpsids,
719 const DenseMatrix<double>& interpolated_t,
720 const Vector<double>& interpolated_x,
721 DShape& surface_gradient,
722 DShape& surface_divergence);
Class that establishes the surface derivative functions for AxisymmetricInterfaceElements....
double compute_surface_derivatives(const Shape &psi, const DShape &dpsids, const DenseMatrix< double > &interpolated_t, const Vector< double > &interpolated_x, DShape &surface_gradient, DShape &surface_divergence)
Fill in the specific surface derivative calculations.
AxisymmetricDerivatives()
Base class for elements at the boundary of free surfaces or interfaces, used typically to impose cont...
double *& contact_angle_pt()
Access function to the pointer specifying the prescribed contact angle.
Vector< unsigned > U_index_interface_boundary
Index at which the i-th velocity component is stored in the element's nodes.
void(* WallUnitNormalFctPt)(const Vector< double > &x, Vector< double > &unit_normal)
Function pointer to a wall unit normal function. Returns the unit normal on the wall,...
virtual int kinematic_local_eqn(const unsigned &n)=0
Function that is used to determine the local equation number of the kinematic equation associated wit...
void wall_unit_normal(const Vector< double > &x, Vector< double > &normal)
Function that returns the unit normal of the bounding wall directed out of the fluid.
double * Contact_angle_pt
Pointer to the desired value of the contact angle (if any)
WallUnitNormalFctPt wall_unit_normal_fct_pt() const
Access function: Pointer to wall unit normal function. Const version.
WallUnitNormalFctPt & wall_unit_normal_fct_pt()
Access function: Pointer to wall unit normal function.
virtual void add_additional_residual_contributions_interface_boundary(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag, const Shape &psif, const DShape &dpsifds, const Vector< double > &interpolated_n, const double &W)
Empty helper function to calculate the additional contributions arising from the node update strategy...
double & contact_angle()
Return value of the contact angle.
virtual void fill_in_generic_residual_contribution_interface_boundary(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)=0
Calculate the generic residuals contribution.
void reset_after_external_fd()
We require a final node update in the bulk element after all finite differencing.
void reset_in_external_fd(const unsigned &i)
The only external data are these geometric data so We can omit the reset function (relying on the nex...
double *& ca_pt()
Access function to the pointer specifying the capillary number.
void output(std::ostream &outfile)
Overload the output function.
void set_contact_angle(double *const &angle_pt, const bool &strong=true)
Set a pointer to the desired contact angle. Optional boolean (defaults to true) chooses strong imposi...
void output(FILE *file_pt)
Overload the C-style output function.
void update_in_external_fd(const unsigned &i)
The geometric data of the parent element is included as external data and so a (bulk) node update mus...
FluidInterfaceBoundingElement()
Constructor.
WallUnitNormalFctPt Wall_unit_normal_fct_pt
Pointer to a wall normal function that returns the wall unit normal as a function of position in glob...
double * Ca_pt
Pointer to the desired value of the capillary number.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Calculate the residuals.
Vector< unsigned > & u_index_interface_boundary()
Access for nodal index at which the velocity components are stored.
double ca()
Return the value of the capillary number.
void output(FILE *file_pt, const unsigned &n_plot)
C-style Output function.
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
unsigned Contact_angle_flag
Flag used to determine whether the contact angle is to be used (0 if not), and whether it will be app...
Base class establishing common interfaces and functions for all Navier-Stokes-like fluid interface el...
virtual double compute_surface_derivatives(const Shape &psi, const DShape &dpsids, const DenseMatrix< double > &interpolated_t, const Vector< double > &interpolated_x, DShape &dpsidS, DShape &dpsidS_div)=0
Compute the surface gradient and surface divergence operators given the shape functions,...
virtual void add_additional_residual_contributions_interface(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag, const Shape &psif, const DShape &dpsifds, const DShape &dpsifdS, const DShape &dpsifdS_div, const Vector< double > &s, const Vector< double > &interpolated_x, const Vector< double > &interpolated_n, const double &W, const double &J)
Helper function to calculate the additional contributions to the resisuals and Jacobian that arise fr...
const double & st() const
The value of the Strouhal number.
double *& ca_pt()
Pointer to the Capillary number.
unsigned Index_of_external_pressure_value
Which of the values in Pext_data_pt stores the external pressure.
int External_data_number_of_external_pressure
The Data that contains the external pressure is stored as external Data for the element....
virtual FluidInterfaceBoundingElement * make_bounding_element(const int &face_index)
Create a bounding element e.g. to apply a contact angle boundary condition.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Calculate the residuals by calling the generic residual contribution.
FluidInterfaceElement()
Constructor, set the default values of the booleans and pointers (null)
double u(const unsigned &j, const unsigned &i)
Return the i-th velocity component at local node j.
double *& st_pt()
The pointer to the Strouhal number.
virtual int kinematic_local_eqn(const unsigned &n)=0
Access function that returns the local equation number for the (scalar) kinematic equation associated...
Vector< unsigned > U_index_interface
Nodal index at which the i-th velocity component is stored.
void set_external_pressure_data(Data *external_pressure_data_pt)
Set the Data that contains the single pressure value that specifies the "external pressure" for the i...
double pext() const
Return the value of the external pressure.
virtual double sigma(const Vector< double > &s_local)
Virtual function that specifies the non-dimensional surface tension as a function of local position w...
virtual void hijack_kinematic_conditions(const Vector< unsigned > &bulk_node_number)=0
Hijack the kinematic condition at the node numbers passed in the vector. The node numbers correspond ...
void set_external_pressure_data(Data *external_pressure_data_pt, const unsigned &index_of_external_pressure_value)
Set the Data that contains the pressure value that specifies the "external pressure" for the interfac...
double interpolated_u(const Vector< double > &s, const unsigned &i)
Calculate the i-th velocity component at the local coordinate s.
Data * Pext_data_pt
Pointer to the Data item that stores the external pressure.
void output(std::ostream &outfile)
Overload the output function.
const double & ca() const
The value of the Capillary number.
int pext_local_eqn()
Access function for the local equation number that corresponds to the external pressure.
void output(FILE *file_pt)
Overload the C-style output function.
double * Ca_pt
Pointer to the Capillary number.
static double Default_Physical_Constant_Value
Default value for physical constants.
double * St_pt
Pointer to the Strouhal number.
virtual void fill_in_generic_residual_contribution_interface(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
Helper function to calculate the residuals and (if flag==1) the Jacobian of the equations....
Class that establishes the surface derivative functions for LineElements. These are defined in a sepa...
double compute_surface_derivatives(const Shape &psi, const DShape &dpsids, const DenseMatrix< double > &interpolated_t, const Vector< double > &interpolated_x, DShape &surface_gradient, DShape &surface_divergence)
Fill in the specific surface derivative calculations.
Specialisation of the interface boundary constraint to a line.
LineFluidInterfaceBoundingElement()
Constructor.
void fill_in_generic_residual_contribution_interface_boundary(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
Overload the helper function to calculate the residuals and (if flag==true) the Jacobian – this funct...
Specialisation of the interface boundary constraint to a point.
PointFluidInterfaceBoundingElement()
Constructor.
void fill_in_generic_residual_contribution_interface_boundary(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
Overload the helper function to calculate the residuals and (if flag==1) the Jacobian – this function...
Class that establishes the surface derivative functions for SurfaceInterfaceElements (2D surfaces in ...
double compute_surface_derivatives(const Shape &psi, const DShape &dpsids, const DenseMatrix< double > &interpolated_t, const Vector< double > &interpolated_x, DShape &surface_gradient, DShape &surface_divergence)
Fill in the specific surface derivative calculations.