38#include "axisym_navier_stokes.h"
41#include "fluid_interface.h"
44#include "meshes/horizontal_single_layer_spine_mesh.h"
114template<
class ELEMENT>
208 double Beta = this->
beta();
210 return (1.0 - Beta*(
C-1.0));
284 const double &
W,
const double &
J)
360 for(
unsigned i=0;
i<2;
i++)
368 for(
unsigned i=0;
i<2;
i++)
394 for(
unsigned i=0;
i<2;
i++)
412 for(
unsigned i=0;
i<2;
i++)
586 const unsigned dim = this->dim();
601 for(
unsigned i=0;
i<2;
i++)
668 for(
unsigned i=0;
i<2;
i++)
694template<
class ELEMENT>
708template <
class ELEMENT>
710 public HorizontalSingleLayerSpineMesh<ELEMENT>
723 &Mesh::Default_TimeStepper) :
749template<
class ELEMENT,
class TIMESTEPPER>
784 for(
unsigned i=0;
i<3;
i++)
813 const unsigned n_dim = 1;
914template<
class ELEMENT,
class TIMESTEPPER>
929 Interface_mesh_pt =
new Mesh;
938 unsigned n_element = Bulk_mesh_pt->nboundary_element(3);
945 Bulk_mesh_pt->boundary_element_pt(3,
e));
948 int face_index = Bulk_mesh_pt->face_index_at_boundary(3,
e);
975 unsigned n_node = this->Bulk_mesh_pt->nnode();
978 this->Bulk_mesh_pt->node_pt(
n)->pin(2);
988 Bulk_mesh_pt->boundary_node_pt(
ibound,
n)->set_value(3,1.0);
992 const unsigned n_boundary = Bulk_mesh_pt->nboundary();
998 const unsigned n_node = Bulk_mesh_pt->nboundary_node(
b);
1004 Bulk_mesh_pt->boundary_node_pt(
b,
n)->pin(2);
1009 Bulk_mesh_pt->boundary_node_pt(
b,
n)->pin(0);
1010 Bulk_mesh_pt->boundary_node_pt(
b,
n)->pin(1);
1015 Bulk_mesh_pt->boundary_node_pt(
b,
n)->pin(1);
1025 const unsigned n_bulk = Bulk_mesh_pt->nelement();
1066 (Interface_mesh_pt->element_pt(
e));
1095template<
class ELEMENT,
class TIMESTEPPER>
1102 cout <<
"Time is now " <<
t << std::endl;
1105 Trace_file <<
time_pt()->time() <<
" "
1106 << Bulk_mesh_pt->spine_pt(0)->height()
1107 <<
" " << this->compute_total_mass() << std::endl;
1113 const unsigned npts = 5;
1164template<
class ELEMENT,
class TIMESTEPPER>
1190 Trace_file <<
"time" <<
", "
1191 <<
"edge spine height" <<
", "
1192 <<
"contact angle left" <<
", "
1193 <<
"contact angle right" <<
", " << std::endl;
1199 set_initial_condition();
1262 double t_max = 1000.0;
1265 const double dt = 0.1;
1268 if(CommandLineArgs::Argc>1)
1274 const unsigned n_r = 10;
1277 const unsigned n_z = 80;
int main(int argc, char *argv[])
Driver code for unsteady two-layer fluid problem. If there are any command line arguments,...
Single fluid interface problem including transport of an insoluble surfactant.
void set_initial_condition()
Set initial conditions: Set all nodal velocities to zero and initialise the previous velocities to co...
void unsteady_run(const unsigned &nstep)
Run an unsteady simulation with specified number of steps.
InterfaceProblem(const unsigned &n_r, const unsigned &n_y, const unsigned &n_theta, const double &r_min, const double &r_max, const double &l_y, const double &theta_max)
Constructor: Pass number of elements in x and y directions. Also lengths of the domain in x- and y-di...
AnnularSpineMesh< ELEMENT > * Bulk_mesh_pt
Pointer to bulk mesh.
void deform_free_surface(const double &epsilon)
Deform the mesh/free surface to a prescribed function.
ofstream Trace_file
Trace file.
void doc_solution(DocInfo &doc_info)
Doc the solution.
double global_temporal_error_norm()
The global temporal error norm, based on the movement of the nodes in the radial direction only (beca...
MyHorizontalSingleLayerSpineMesh< ELEMENT > * Bulk_mesh_pt
Access function for the specific mesh.
~InterfaceProblem()
Destructor (empty)
double compute_total_mass()
Compute the total mass of the insoluble surfactant.
void actions_before_newton_convergence_check()
Spine heights/lengths are unknowns in the problem so their values get corrected during each Newton st...
Mesh * Interface_mesh_pt
Mesh for the free surface (interface) elements.
Deform the existing cubic spine mesh into a annular section with spines directed radially inwards fro...
Vector< unsigned > U_index_interface
Nodal index at which the i-th velocity component is stored.
double interpolated_u(const Vector< double > &s, const unsigned &i)
Calculate the i-th velocity component at the local coordinate s.
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....
Inherit from the standard Horizontal single-layer SpineMesh and modify the spine_node_update() functi...
MyHorizontalSingleLayerSpineMesh(const unsigned &nx, const unsigned &ny, const double &lx, const double &ly, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements in x-direction, number of elements in y-direction,...
virtual void spine_node_update(SpineNode *spine_node_pt)
Node update function assumed spines rooted at the wall fixed to be at r=1 and directed inwards to r=0...
Spine-based Marangoni surface tension elements that add a linear dependence on concentration of a sur...
double * Beta_pt
Pointer to an Elasticity number.
double peclet_strouhal_s()
Return the surface peclect strouhal number.
double *& peclet_s_pt()
Access function for pointer to the surface Peclet number.
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)
Overload the Helper function to calculate the residuals and jacobian entries. This particular functio...
static double Default_Physical_Constant_Value
Default value of the physical constants.
double peclet_s()
Return the surface peclect number.
double * Peclet_S_pt
Pointer to Surface Peclet number.
double sigma(const Vector< double > &s)
The surface tension function is linear in the concentration with constant of proportionality equal to...
double dcdt_surface(const unsigned &l) const
The time derivative of the surface concentration.
unsigned C_index
Index at which the surfactant concentration is stored at the nodes.
double beta()
Return the Elasticity number.
double * Peclet_Strouhal_S_pt
Pointer to the surface Peclect Strouhal number.
double *& peclet_strouhal_s_pt()
Access function for pointer to the surface Peclet x Strouhal number.
double interpolated_C(const Vector< double > &s)
Get the surfactant concentration.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Fill in the contribution to the residuals Calculate the contribution to the jacobian.
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.
void output(std::ostream &outfile, const unsigned &n_plot)
SpineAxisymmetricMarangoniSurfactantFluidInterfaceElement(FiniteElement *const &element_pt, const int &face_index)
Constructor that passes the bulk element and face index down to the underlying.
double *& beta_pt()
Access function for pointer to the Elasticity number.
double integrate_c() const
Compute the concentration intergated over the area.
Namepspace for global parameters, chosen from Campana et al. as in the axisymmetric problem.
double P_ext
External pressure.
double ReSt
Womersley = Reynolds times Strouhal.
double Epsilon
Free surface cosine deformation parameter.
double Beta
Surface Elasticity number (weak case)
ofstream Pvd_file
Pvd file – a wrapper for all the different vtu output files plus information about continuous time to...
double Ca
Capillary number.
double Peclet_S
Surface Peclet number.
double Alpha
Wavelength of the domain.
double ReInvFr
Product of Reynolds and Froude number.
double Re
Reynolds number.
double Peclet_St_S
Sufrace Peclet number multiplied by Strouhal number.
Vector< double > G(3)
Direction of gravity.