31 #ifndef OOMPH_COLLAPSIBLE_CHANNEL_DOMAIN_HEADER 32 #define OOMPH_COLLAPSIBLE_CHANNEL_DOMAIN_HEADER 35 #include "../generic/quadtree.h" 36 #include "../generic/domain.h" 37 #include "../generic/geom_objects.h" 56 const unsigned&
ndown,
59 const double& lcollapsible,
81 for (
unsigned i=0;
i<nmacro;
i++)
212 const unsigned& imacro,
213 const unsigned& idirect,
224 const unsigned& imacro,
225 const unsigned& part);
231 const unsigned& imacro,
232 const unsigned& part);
238 const unsigned& imacro,
239 const unsigned& part);
245 const unsigned& imacro,
246 const unsigned& part );
253 const unsigned& imacro);
260 const unsigned& imacro);
267 const unsigned& imacro );
274 const unsigned& imacro );
336 const unsigned& imacro,
337 const unsigned& idirect,
341 using namespace QuadTreeNames;
343 #ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES 346 "Order of function arguments has changed between versions 0.8 and 0.85",
347 "CollapsibleChannelDomain::macro_element_boundary(...)",
348 OOMPH_EXCEPTION_LOCATION);
358 if ((imacro%n_x)<
Nup)
374 std::ostringstream error_stream;
375 error_stream <<
"Never get here! imacro, idirect: " << imacro
376 <<
" " << idirect << std::endl;
380 OOMPH_CURRENT_FUNCTION,
381 OOMPH_EXCEPTION_LOCATION);
387 if ((imacro%n_x)<
Nup)
403 std::ostringstream error_stream;
404 error_stream <<
"Never get here! imacro, idirect: " << imacro
405 <<
" " << idirect << std::endl;
409 OOMPH_CURRENT_FUNCTION,
410 OOMPH_EXCEPTION_LOCATION);
416 if ((imacro%n_x)<
Nup)
432 std::ostringstream error_stream;
433 error_stream <<
"Never get here! imacro, idirect: " << imacro
434 <<
" " << idirect << std::endl;
438 OOMPH_CURRENT_FUNCTION,
439 OOMPH_EXCEPTION_LOCATION);
446 if ((imacro%n_x)<
Nup)
462 std::ostringstream error_stream;
463 error_stream <<
"Never get here! imacro, idirect: " << imacro
464 <<
" " << idirect << std::endl;
468 OOMPH_CURRENT_FUNCTION,
469 OOMPH_EXCEPTION_LOCATION);
485 const unsigned& imacro,
486 const unsigned& part)
500 r[1]=(double(y)+(0.5*(1.0+zeta[0])))*(
Ly/
double(
Ny));
512 r[1]=(double(y)+(0.5*(1.0+zeta[0])))*(
Ly/
double(
Ny));
521 std::ostringstream error_stream;
522 error_stream <<
"Never get here! part=" << part << std::endl;
525 OOMPH_CURRENT_FUNCTION,
526 OOMPH_EXCEPTION_LOCATION);
540 const unsigned& imacro,
541 const unsigned& part)
556 r[1]=(double(y)+(0.5*(1.0+zeta[0])))*(
Ly/
double(
Ny));
568 r[1]=(double(y)+(0.5*(1.0+zeta[0])))*(
Ly/
double(
Ny));
578 std::ostringstream error_stream;
579 error_stream <<
"Never get here! part=" << part << std::endl;
582 OOMPH_CURRENT_FUNCTION,
583 OOMPH_EXCEPTION_LOCATION);
594 const unsigned& imacro,
595 const unsigned& part)
611 r[1]=(double(y)+1.0)*(
Ly/double(
Ny));
622 (0.5*(1.0+zeta[0])))*
624 r[1]=(double(y)+1.0)*(
Ly/double(
Ny));
634 std::ostringstream error_stream;
635 error_stream <<
"Never get here! part=" << part << std::endl;
638 OOMPH_CURRENT_FUNCTION,
639 OOMPH_EXCEPTION_LOCATION);
651 const unsigned& imacro,
652 const unsigned& part )
667 r[1]=double(y)*(
Ly/double(
Ny));
680 r[1]=double(y)*(
Ly/double(
Ny));
690 std::ostringstream error_stream;
691 error_stream <<
"Never get here! part=" << part << std::endl;
694 OOMPH_CURRENT_FUNCTION,
695 OOMPH_EXCEPTION_LOCATION);
712 const unsigned& imacro)
729 double fract=(double(y)+(0.5*(1.0+zeta[0])))/
double(
Ny);
736 r[0]=
Lup+xi[0]+(r_wall[0]-(xi[0]+
Lup))*fract;
739 r[1]=r_wall[1]*fract;
752 const unsigned& imacro)
768 double fract=(double(y)+(0.5*(1.0+zeta[0])))/
double(
Ny);
775 r[0]=
Lup+xi[0]+(r_wall[0]-(xi[0]+
Lup))*fract;
778 r[1]=r_wall[1]*fract;
790 const unsigned& imacro)
806 double fract=(double(y)+1.0)/double(
Ny);
813 r[0]=
Lup+xi[0]+(r_wall[0]-(xi[0]+
Lup))*fract;
816 r[1]=r_wall[1]*fract;
828 const unsigned& imacro)
844 double fract=double(y)/double(
Ny);
851 r[0]=
Lup+xi[0]+(r_wall[0]-(xi[0]+
Lup))*fract;
854 r[1]=r_wall[1]*fract;
void r_E_straight(const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro, const unsigned &part)
Eastern boundary of the macro element imacro in the upstream (part=0) or downstream (part=1) sections...
unsigned Ny
Number of macro elements across channel.
GeomObject * wall_pt() const
Access to pointer to the geometric object that parametrises the collapsible wall (const version) ...
double s_squash(const double &s)
Function that squashes the macro elements near the wall. Input argument should vary between 0 and 1; ...
double l_down()
Length of downstream section.
void r_S_collapsible(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro)
Southern boundary of the macro element imacro in the collapsible section.
void r_W_straight(const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro, const unsigned &part)
Western boundary of the macro element imacro in the upstream (part=0) or downstream (part=1) sections...
unsigned Ndown
Number of vertical element columns in downstream section.
unsigned ndown()
Number of vertical columns of macro elements in the downstream section.
Vector< MacroElement * > Macro_element_pt
Vector of pointers to macro elements.
CollapsibleChannelDomain(const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, GeomObject *wall_pt)
Constructor: Pass the number of (macro-)elements, the domain lengths in the x- and y-direction and th...
static double default_BL_squash_fct(const double &s)
Default for function that squashes the macro elements near the walls. Identity.
double l_collapsible()
Length of collapsible segment.
BLSquashFctPt BL_squash_fct_pt
Function pointer for function that squashes the macro elements near the walls.
void r_W_collapsible(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro)
Western boundary of the macro element imacro in the collapsible section.
virtual void position(const Vector< double > &zeta, Vector< double > &r) const =0
Parametrised position on object at current time: r(zeta).
BLSquashFctPt & bl_squash_fct_pt()
Function pointer for function that squashes the macro elements near wall. Default mapping (identity) ...
void r_N_collapsible(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro)
Northern boundary of the macro element imacro in the collapsible section.
double Lcollapsible
x-length in the "collapsible" part of the channel
unsigned Nup
Number of vertical element columns in upstream section.
unsigned ncollapsible()
Number of vertical clumns of macro elements in the "collapsible" segment.
Collapsible channel domain.
unsigned Ncollapsible
Number of vertical element columns in "collapsible" section.
double(* AxialSpacingFctPt)(const double &xi)
Typedef for function pointer for function that implements axial spacing of macro elements.
double(* BLSquashFctPt)(const double &s)
Typedef for function pointer for function that squashes the macro elements near the wall to help reso...
unsigned ny()
Number of macro-elements across the channel.
void macro_element_boundary(const unsigned &t, const unsigned &imacro, const unsigned &idirect, const Vector< double > &zeta, Vector< double > &r)
Vector representation of the imacro-th macro element boundary idirect (N/S/W/E) at time level t (t=0:...
double Lup
x-length in the upstream part of the channel
static double default_axial_spacing_fct(const double &xi)
Default for function that implements axial spacing of macro elements.
unsigned nup()
Number of vertical columns of macro elements the upstream section.
AxialSpacingFctPt & axial_spacing_fct_pt()
Function pointer for function that implements axial spacing of macro elements.
void r_N_straight(const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro, const unsigned &part)
Northern boundary of the macro element imacro in the upstream (part=0) or downstream (part=1) section...
double l_y()
Width of channel.
double l_up()
Length of upstream section.
~CollapsibleChannelDomain()
Destructor.
GeomObject *& wall_pt()
Access to pointer to the geometric object that parametrises the collapsible wall. ...
void r_E_collapsible(const unsigned &t, const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro)
Eastern boundary of the macro element imacro in the collapsible section.
Base class for Domains with curvilinear and/or time-dependent boundaries. Domain boundaries are typic...
void r_S_straight(const Vector< double > &zeta, Vector< double > &r, const unsigned &imacro, const unsigned &part)
Southern boundary of the macro element imacro in the upstream (part=0) or downstream (part=1) section...
double Ldown
x-length in the downstream part of the channel
GeomObject * Wall_pt
Pointer to the geometric object that parametrises the collapsible wall.
AxialSpacingFctPt Axial_spacing_fct_pt
Function pointer for function that implements axial spacing of macro elements.
double axial_spacing_fct(const double &xi)
Function that implements axial spacing of macro elements.