26 #ifndef OOMPH_BRETHERTON_SPINE_MESH_HEADER
27 #define OOMPH_BRETHERTON_SPINE_MESH_HEADER
44 template<
class ELEMENT,
class INTERFACE_ELEMENT>
69 const unsigned& nhalf,
73 const double& zeta_start,
74 const double& zeta_transition_start,
75 const double& zeta_transition_end,
76 const double& zeta_end,
122 const double& zeta_lo_transition_end,
123 const double& zeta_up_transition_start,
124 const double& zeta_up_transition_end);
130 unsigned n_spine = this->
nspine();
131 for (
unsigned i = 0;
i < n_spine;
i++)
174 std::ostringstream error_message;
175 error_message <<
"Incorrect spine update id " <<
id << std::endl;
213 double h = spine_node_pt->
h();
224 spine_node_pt->
x(0) = r_wall_lo[0];
225 spine_node_pt->
x(1) = r_wall_lo[1] +
w * h;
236 double h = spine_node_pt->
h();
258 spine_centre[0] = 0.5 * (r_transition_lo[0] + r_transition_up[0]);
266 N[0] = spine_centre[0] - r_wall_lo[0];
267 N[1] = spine_centre[1] - r_wall_lo[1];
268 double inv_length = 1.0 /
sqrt(
N[0] *
N[0] +
N[1] *
N[1]);
270 spine_node_pt->
x(0) = r_wall_lo[0] +
w * h *
N[0] * inv_length;
271 spine_node_pt->
x(1) = r_wall_lo[1] +
w * h *
N[1] * inv_length;
282 double h = spine_node_pt->
h();
299 S0[0] = r_lo[0] + vertical_fraction * (r_up[0] - r_lo[0]);
300 S0[1] = r_lo[1] + vertical_fraction * (r_up[1] - r_lo[1]);
315 spine_centre[0] = 0.5 * (r_transition_lo[0] + r_transition_up[0]);
323 N[0] = spine_centre[0] -
S0[0];
324 N[1] = spine_centre[1] -
S0[1];
326 double inv_length = 1.0 /
sqrt(
N[0] *
N[0] +
N[1] *
N[1]);
328 spine_node_pt->
x(0) =
S0[0] +
w * h *
N[0] * inv_length;
329 spine_node_pt->
x(1) =
S0[1] +
w * h *
N[1] * inv_length;
340 double h = spine_node_pt->
h();
357 S0[0] = r_lo[0] + vertical_fraction * (r_up[0] - r_lo[0]);
358 S0[1] = r_lo[1] + vertical_fraction * (r_up[1] - r_lo[1]);
373 spine_centre[0] = 0.5 * (r_transition_lo[0] + r_transition_up[0]);
381 N[0] = spine_centre[0] -
S0[0];
382 N[1] = spine_centre[1] -
S0[1];
384 double inv_length = 1.0 /
sqrt(
N[0] *
N[0] +
N[1] *
N[1]);
386 spine_node_pt->
x(0) =
S0[0] +
w * h *
N[0] * inv_length;
387 spine_node_pt->
x(1) =
S0[1] +
w * h *
N[1] * inv_length;
398 double h = spine_node_pt->
h();
420 spine_centre[0] = 0.5 * (r_transition_lo[0] + r_transition_up[0]);
428 N[0] = spine_centre[0] - r_wall_up[0];
429 N[1] = spine_centre[1] - r_wall_up[1];
430 double inv_length = 1.0 /
sqrt(
N[0] *
N[0] +
N[1] *
N[1]);
433 spine_node_pt->
x(0) = r_wall_up[0] +
w * h *
N[0] * inv_length;
434 spine_node_pt->
x(1) = r_wall_up[1] +
w * h *
N[1] * inv_length;
445 double h = spine_node_pt->
h();
456 spine_node_pt->
x(0) = r_wall_up[0];
457 spine_node_pt->
x(1) = r_wall_up[1] -
w * h;
480 spine_node_pt->
x(0) = r_lo[0] +
w * (r_up[0] - r_lo[0]);
481 spine_node_pt->
x(1) = r_lo[1] +
w * (r_up[1] - r_lo[1]);
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
int i
Definition: BiCGSTAB_step_by_step.cpp:9
RowVector3d w
Definition: Matrix_resize_int.cpp:3
Definition: bretherton_spine_mesh.template.h:46
void spine_node_update_film_lower(SpineNode *spine_node_pt)
Definition: bretherton_spine_mesh.template.h:208
GeomObject * Lower_wall_pt
Pointer to geometric object that represents the lower wall.
Definition: bretherton_spine_mesh.template.h:517
void spine_node_update_horizontal_transition_lower(SpineNode *spine_node_pt)
Definition: bretherton_spine_mesh.template.h:231
void reposition_spines(const double &zeta_lo_transition_start, const double &zeta_lo_transition_end, const double &zeta_up_transition_start, const double &zeta_up_transition_end)
Reposition the spines in response to changes in geometry.
Definition: bretherton_spine_mesh.template.cc:1158
BrethertonSpineMesh(const unsigned &nx1, const unsigned &nx2, const unsigned &nx3, const unsigned &nh, const unsigned &nhalf, const double &h, GeomObject *lower_wall_pt, GeomObject *upper_wall_pt, const double &zeta_start, const double &zeta_transition_start, const double &zeta_transition_end, const double &zeta_end, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Definition: bretherton_spine_mesh.template.cc:58
double Zeta_start
Start coordinate on wall.
Definition: bretherton_spine_mesh.template.h:520
double Zeta_transition_end
Wall coordinate of end of transition region.
Definition: bretherton_spine_mesh.template.h:529
unsigned Nhalf
Definition: bretherton_spine_mesh.template.h:505
GeomObject * Upper_wall_pt
Pointer to geometric object that represents the upper wall.
Definition: bretherton_spine_mesh.template.h:514
Vector< FiniteElement * > Bulk_element_pt
Vector of pointers to element in the fluid layer.
Definition: bretherton_spine_mesh.template.h:543
unsigned Nx2
Number of elements along wall in horizontal transition region.
Definition: bretherton_spine_mesh.template.h:498
unsigned Nx3
Number of elements along wall in channel region.
Definition: bretherton_spine_mesh.template.h:501
double Default_spine_centre_fraction
Default spine fraction.
Definition: bretherton_spine_mesh.template.h:535
void set_spine_centre_fraction_pt(double *const &fraction_pt)
Set the pointer to the spine centre's vertial fraction.
Definition: bretherton_spine_mesh.template.h:200
void spine_node_update_film_upper(SpineNode *spine_node_pt)
Definition: bretherton_spine_mesh.template.h:440
double H
Thickness of deposited film.
Definition: bretherton_spine_mesh.template.h:511
unsigned long nbulk() const
Number of elements in bulk.
Definition: bretherton_spine_mesh.template.h:99
unsigned Nh
Number of elements across the deposited film.
Definition: bretherton_spine_mesh.template.h:508
void pin_all_spines()
Definition: bretherton_spine_mesh.template.h:128
void initial_element_reorder()
Definition: bretherton_spine_mesh.template.cc:1028
void spine_node_update_channel(SpineNode *spine_node_pt)
Definition: bretherton_spine_mesh.template.h:464
double spine_centre_fraction() const
Read the value of the spine centre's vertical fraction.
Definition: bretherton_spine_mesh.template.h:194
void spine_node_update_vertical_transition_upper(SpineNode *spine_node_pt)
Definition: bretherton_spine_mesh.template.h:335
Vector< FiniteElement * > Interface_element_pt
Vector of pointers to interface elements.
Definition: bretherton_spine_mesh.template.h:546
ELEMENT * Control_element_pt
Definition: bretherton_spine_mesh.template.h:540
FiniteElement *& interface_element_pt(const unsigned long &i)
Access functions for pointers to interface elements.
Definition: bretherton_spine_mesh.template.h:81
FiniteElement *& bulk_element_pt(const unsigned long &i)
Access functions for pointers to elements in bulk.
Definition: bretherton_spine_mesh.template.h:93
void spine_node_update(SpineNode *spine_node_pt)
Definition: bretherton_spine_mesh.template.h:140
ELEMENT * control_element_pt()
Definition: bretherton_spine_mesh.template.h:187
void spine_node_update_vertical_transition_lower(SpineNode *spine_node_pt)
Definition: bretherton_spine_mesh.template.h:277
void spine_node_update_horizontal_transition_upper(SpineNode *spine_node_pt)
Definition: bretherton_spine_mesh.template.h:393
double Zeta_end
Wall coordinate of end of liquid filled region (inflow)
Definition: bretherton_spine_mesh.template.h:523
double find_distance_to_free_surface(GeomObject *const &fs_geom_object_pt, Vector< double > &initial_zeta, const Vector< double > &spine_base, const Vector< double > &spine_end)
Recalculate the spine lengths after repositioning.
Definition: bretherton_spine_mesh.template.cc:1066
unsigned nfree_surface_spines()
Definition: bretherton_spine_mesh.template.h:107
unsigned long ninterface_element() const
Number of elements on interface.
Definition: bretherton_spine_mesh.template.h:87
double * Spine_centre_fraction_pt
Pointer to vertical fraction of the spine centre.
Definition: bretherton_spine_mesh.template.h:532
unsigned Nx1
Number of elements along wall in deposited film region.
Definition: bretherton_spine_mesh.template.h:495
double Zeta_transition_start
Wall coordinate of start of the transition region.
Definition: bretherton_spine_mesh.template.h:526
void pin(const unsigned &i)
Pin the i-th stored variable.
Definition: nodes.h:385
Definition: elements.h:1313
virtual unsigned nnode_1d() const
Definition: elements.h:2218
Definition: geom_objects.h:101
virtual void position(const Vector< double > &zeta, Vector< double > &r) const =0
Parametrised position on object at current time: r(zeta).
static Steady< 0 > Default_TimeStepper
The Steady Timestepper.
Definition: mesh.h:75
FiniteElement * finite_element_pt(const unsigned &e) const
Definition: mesh.h:473
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
Definition: oomph_definitions.h:222
Definition: single_layer_spine_mesh.template.h:47
unsigned long nspine() const
Return the number of spines in the mesh.
Definition: spines.h:635
Spine *& spine_pt(const unsigned long &i)
Return the i-th spine in the mesh.
Definition: spines.h:623
double & h()
Access function to spine height.
Definition: spines.h:397
Spine *& spine_pt()
Access function to spine.
Definition: spines.h:372
unsigned & node_update_fct_id()
Access function to ID of node update function (within specific mesh)
Definition: spines.h:384
double & fraction()
Set reference to fraction along spine.
Definition: spines.h:378
GeomObject *& geom_object_pt(const unsigned &i)
Definition: spines.h:244
double & geom_parameter(const unsigned &i)
Definition: spines.h:287
Data *& spine_height_pt()
Access function to Data object that stores the spine height.
Definition: spines.h:156
Definition: timesteppers.h:231
@ N
Definition: constructor.cpp:22
double S0
Strength of source function in inner region.
Definition: stefan_boltzmann.cc:148
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86