33#include "navier_stokes.h"
36#include "fluid_interface.h"
39#include "meshes/two_layer_spine_mesh.h"
90template <
class ELEMENT,
class TIMESTEPPER>
101 const unsigned &
n_y2,
const double &
l_x,
102 const double &
h1,
const double &
h2);
142 const unsigned &
pdof,
169template <
class ELEMENT,
class TIMESTEPPER>
172 const unsigned &
n_y2,
const double &
l_x,
173 const double&
h1,
const double &
h2) : Lx(
l_x)
187 for(
unsigned i=0;
i<
n_x;
i++)
207 for(
unsigned b=0;
b<5;
b++)
324template <
class ELEMENT,
class TIMESTEPPER>
328 const unsigned n_node = Bulk_mesh_pt->nnode();
334 for(
unsigned i=0;
i<2;
i++)
337 Bulk_mesh_pt->node_pt(
n)->set_value(
i,0.0);
354template <
class ELEMENT,
class TIMESTEPPER>
359 for(
unsigned b=0;
b<5;
b++)
362 const unsigned n_node = Bulk_mesh_pt->nboundary_node(
b);
368 Bulk_mesh_pt->boundary_node_pt(
b,
n)->set_value(0,0.0);
374 Bulk_mesh_pt->boundary_node_pt(
b,
n)->set_value(1,0.0);
386template <
class ELEMENT,
class TIMESTEPPER>
391 const unsigned n_spine = Bulk_mesh_pt->nspine();
397 double x_value = Bulk_mesh_pt->boundary_node_pt(0,
i)->x(0);
400 Bulk_mesh_pt->spine_pt(
i)->height() =
405 Bulk_mesh_pt->node_update();
414template <
class ELEMENT,
class TIMESTEPPER>
419 cout <<
"Time is now " <<
time_pt()->time() << std::endl;
424 << Bulk_mesh_pt->spine_pt(0)->height() <<
" " << std::endl;
430 const unsigned npts = 5;
451template <
class ELEMENT,
class TIMESTEPPER>
480 Trace_file <<
"time, free surface height" << std::endl;
486 set_initial_condition();
538 const double dt = 0.0025;
544 const unsigned n_x = 12;
547 const unsigned n_y1 = 12;
550 const unsigned n_y2 = 12;
553 const double l_x = 1.0;
556 const double h1 = 1.0;
559 const double h2 = 1.0;
/////////////////////////////////////////////////////////////////////// /////////////////////////////...
ElasticRefineableTwoLayerMesh(const unsigned &nx, const unsigned &ny1, const unsigned &ny2, const double &lx, const double &h1, const double &h2, const bool &periodic_in_x, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor: Pass number of elements in x-direction, number of elements in y-direction in bottom and ...
/////////////////////////////////////////////////////////////////////// /////////////////////////////...
Mesh * Surface_mesh_pt
Pointer to the "surface" mesh.
void set_initial_condition()
Set initial conditions.
TwoLayerSpineMesh< ELEMENT > * Bulk_mesh_pt
Pointer to the specific bulk mesh.
void deform_free_surface(const double &epsilon, const unsigned &n_periods)
Deform the mesh/free surface to a prescribed function.
ofstream Trace_file
Trace file.
void doc_solution(DocInfo &doc_info)
Doc the solution.
InterfaceProblem()
Constructor.
void set_boundary_conditions()
Set boundary conditions.
~InterfaceProblem()
Destructor (empty)
double Lx
Width of domain.
void fix_pressure(const unsigned &e, const unsigned &pdof, const double &pvalue)
Fix pressure in element e at pressure dof pdof and set to pvalue.
void actions_before_newton_convergence_check()
Spine heights/lengths are unknowns in the problem so their values get corrected during each Newton st...
ElasticRefineableTwoLayerMesh< ELEMENT > * Bulk_mesh_pt
Pointer to the (specific) "bulk" mesh.
void actions_before_newton_solve()
No actions required before solve step.
void unsteady_run(const double &t_max, const double &dt)
Do unsteady run up to maximum time t_max with given timestep dt.
void actions_after_newton_solve()
Update after solve can remain empty, because the update is performed automatically after every Newton...
Namespace for physical parameters.
double ReSt
Womersley number (Reynolds x Strouhal)
Vector< double > G(2)
Direction of gravity.
double St
Strouhal number.
double Density_Ratio
Ratio of density in upper fluid to density in lower fluid. Reynolds number etc. is based on density i...
double Ca
Capillary number.
double ReInvFr
Product of Reynolds number and inverse of Froude number.
double Re
Reynolds number.
double Viscosity_Ratio
Ratio of viscosity in upper fluid to viscosity in lower fluid. Reynolds number etc....
ofstream Trace_file
Trace file.
int main(int argc, char *argv[])
/////////////////////////////////////////////////////////////////////// /////////////////////////////...