39#include "axisym_navier_stokes.h"
42#include "fluid_interface.h"
45#include "constitutive.h"
48#include "meshes/rectangular_quadmesh.h"
87 double Alpha = 0.8537;
141template<
class ELEMENT>
218 const double &
W,
const double &
J)
227 const double k = this->
k();
366 const unsigned dim = this->dim();
381 for(
unsigned i=0;
i<2;
i++)
412template<
class ELEMENT,
class TIMESTEPPER>
438 for(
unsigned i=0;
i<3;
i++)
469 const unsigned n_dim = 1;
576template<
class ELEMENT,
class TIMESTEPPER>
591 Interface_mesh_pt =
new Mesh;
600 unsigned n_element = Bulk_mesh_pt->nboundary_element(3);
607 Bulk_mesh_pt->boundary_element_pt(3,
e));
610 int face_index = Bulk_mesh_pt->face_index_at_boundary(3,
e);
624 Document_node_pt = Bulk_mesh_pt->node_pt(0);
642 unsigned n_node = this->Bulk_mesh_pt->nnode();
645 this->Bulk_mesh_pt->node_pt(
n)->pin(2);
646 this->Bulk_mesh_pt->node_pt(
n)->pin_position(1);
656 Bulk_mesh_pt->boundary_node_pt(
ibound,
n)->set_value(4,1.0);
660 const unsigned n_boundary = Bulk_mesh_pt->nboundary();
666 const unsigned n_node = Bulk_mesh_pt->nboundary_node(
b);
672 Bulk_mesh_pt->boundary_node_pt(
b,
n)->pin(2);
677 Bulk_mesh_pt->boundary_node_pt(
b,
n)->pin(0);
678 Bulk_mesh_pt->boundary_node_pt(
b,
n)->pin(1);
679 Bulk_mesh_pt->boundary_node_pt(
b,
n)->pin_position(0);
684 Bulk_mesh_pt->boundary_node_pt(
b,
n)->pin(1);
695 const unsigned n_bulk = Bulk_mesh_pt->nelement();
717 el_pt->constitutive_law_pt() = Constitutive_law_pt;
745 (Interface_mesh_pt->element_pt(
e));
780template<
class ELEMENT,
class TIMESTEPPER>
787 cout <<
"Time is now " <<
t << std::endl;
790 Trace_file <<
time_pt()->time() <<
" "
791 << Document_node_pt->x(0)
792 <<
" " << this->compute_total_mass() << std::endl;
798 const unsigned npts = 5;
849template<
class ELEMENT,
class TIMESTEPPER>
875 Trace_file <<
"time" <<
", "
876 <<
"edge spine height" <<
", "
877 <<
"mass " <<
", " << std::endl;
883 set_initial_condition();
924 Bulk_mesh_pt->set_lagrangian_nodal_coordinates();
950 double t_max = 1000.0;
953 const double dt = 0.1;
956 if(CommandLineArgs::Argc>1)
962 const unsigned n_r = 10;
965 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,...
Interface class to handle the mass transport between bulk and surface as well as the surfactant trans...
double *& alpha_pt()
Access function for pointer to adsorption 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...
unsigned C_bulk_index
Storage for the index at which the bulk concentration is stored.
ElasticAxisymmetricSolubleSurfactantTransportInterfaceElement(FiniteElement *const &element_pt, const int &face_index)
Constructor that passes the bulk element and face index down to the underlying.
void output(std::ostream &outfile, const unsigned &n_plot)
Overload the output function.
double * K_pt
Pointer to solubility number.
double alpha()
Return the adsorption number.
double *& k_pt()
Access function for pointer to solubility number.
double * Alpha_pt
Pointer to adsorption number.
double dc_bulk_dt_surface(const unsigned &l) const
The time derivative of the bulk surface concentration.
double k()
Return the solubility nubmer.
double interpolated_C_bulk(const Vector< double > &s)
Get the bulk surfactant concentration.
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.
ConstitutiveLaw * Constitutive_law_pt
Pointer to the constitutive law.
double global_temporal_error_norm()
The global temporal error norm, based on the movement of the nodes in the radial direction only (beca...
Node * Document_node_pt
Pointer to a node for documentation purposes.
~InterfaceProblem()
Destructor (empty)
double compute_total_mass()
Compute the total mass of the insoluble surfactant.
void unsteady_run(const double &t_max, const double &dt)
Do unsteady run up to maximum time t_max with given timestep dt.
InterfaceProblem(const unsigned &n_r, const unsigned &n_z, const double &l_z)
Constructor: Pass the number of elements in radial and axial directions and the length of the domain ...
ElasticRectangularQuadMesh< ELEMENT > * Bulk_mesh_pt
Access function for the specific mesh.
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...
Specialise to the Axisymmetric geometry.
double interpolated_u(const Vector< double > &s, const unsigned &i)
Calculate the i-th velocity component at the local coordinate s.
double sigma(const Vector< double > &s)
The surface tension function is linear in the concentration with constant of proportionality equal to...
Vector< unsigned > C_index
Index at which the surfactant concentration is stored at the nodes.
double interpolated_C(const Vector< double > &s)
Get the surfactant concentration.
static double Default_Physical_Constant_Value
Default value of the physical constants.
Namepspace for global parameters, chosen from Campana et al. as in the axisymmetric problem.
double Alpha_absorption
Alpha for absorption kinetics.
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)
double Nu
Pseudo-solid Poisson ratio.
ofstream Pvd_file
Pvd file – a wrapper for all the different vtu output files plus information about continuous time to...
double Pe_reference_scale
double Ca
Capillary number.
double Peclet_S
Surface Peclet number.
double K
K parameter that describes solubility 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.