32#include "navier_stokes.h"
117class OscillatingWall :
public GeomObject
126 OscillatingWall(
const double& h,
const double& x_left,
const double& l,
127 const double& a,
const double& period, Time* time_pt) :
128 GeomObject(1,2), H(h), Length(l), X_left(x_left), A(a), B(0.0), T(period),
136 double& amplitude(){
return A;}
139 double& period(){
return T;}
143 void position(
const unsigned& t,
const Vector<double>&zeta,
144 Vector<double>& r)
const
146 using namespace MathematicalConstants;
150 if (Time_pt->time(t)<T)
152 ramp=0.5*(1.0-cos(Pi*Time_pt->time(t)/T));
156 r[0] = zeta[0]+X_left
157 -B*A*sin(2.0*3.14159*zeta[0]/Length)*
158 sin(2.0*Pi*(Time_pt->time(t))/T)*ramp;
160 r[1] = H+A*((Length-zeta[0])*zeta[0])/pow(0.5*Length,2)*
161 sin(2.0*Pi*(Time_pt->time(t))/T)*ramp;
167 void position(
const Vector<double>&zeta, Vector<double>& r)
const
169 position (0, zeta, r);
173 unsigned ngeom_data()
const {
return 0;}
206namespace Global_Physical_Variables
218 void prescribed_traction(
const double& t,
219 const Vector<double>& x,
220 const Vector<double>& n,
221 Vector<double>& traction)
235template <
class ELEMENT>
236class CollapsibleChannelProblem :
public Problem
244 CollapsibleChannelProblem(
const unsigned& nup,
245 const unsigned& ncollapsible,
246 const unsigned& ndown,
249 const double& lcollapsible,
252 const double& amplitude,
253 const double& period);
256 ~CollapsibleChannelProblem() {}
289 void actions_before_newton_solve(){}
292 void actions_after_newton_solve(){}
295 void actions_before_implicit_timestep();
298 void actions_before_adapt();
301 void actions_after_adapt();
304 void set_initial_condition();
307 void doc_solution(DocInfo& doc_info, ofstream& trace_file);
313 void create_traction_elements(
const unsigned &b,
314 Mesh*
const &bulk_mesh_pt,
315 Mesh*
const &surface_mesh_pt);
318 void delete_traction_elements(Mesh*
const &surface_mesh_pt);
325 unsigned Ncollapsible;
346 OscillatingWall* Wall_pt;
353 Mesh* Surface_mesh_pt;
369template <
class ELEMENT>
370CollapsibleChannelProblem<ELEMENT>::CollapsibleChannelProblem(
372 const unsigned& ncollapsible,
373 const unsigned& ndown,
376 const double& lcollapsible,
379 const double& amplitude,
380 const double& period)
384 Ncollapsible=ncollapsible;
390 Lcollapsible=lcollapsible;
396 Problem::Max_residuals=10000;
401 add_time_stepper_pt(
new BDF<2>);
405 double length=lcollapsible;
409 Wall_pt=
new OscillatingWall(height, x_left, length, amplitude, period,
474 el_pt->re_pt() = &Global_Physical_Variables::Re;
477 el_pt->re_st_pt() = &Global_Physical_Variables::ReSt;
494 el_pt->traction_fct_pt() = &Global_Physical_Variables::prescribed_traction;
507 for(
unsigned i=0;
i<2;
i++)
515 for(
unsigned ib=2;
ib<5;
ib++)
520 for(
unsigned i=0;
i<2;
i++)
572template <
class ELEMENT>
626template <
class ELEMENT>
658template<
class ELEMENT>
683template <
class ELEMENT>
692 <<
"Timestepper has to be from the BDF family!\n"
693 <<
"You have specified a timestepper from the "
730template <
class ELEMENT>
746 FSI_functions::apply_no_slip_on_moving_wall(
node_pt);
756template<
class ELEMENT>
771template<
class ELEMENT>
792 el_pt->traction_fct_pt() = &Global_Physical_Variables::prescribed_traction;
812 if (CommandLineArgs::Argc>1)
880 if (CommandLineArgs::Argc>1)
894 problem.set_initial_condition();
905 problem.bulk_mesh_pt()->max_permitted_error()=1.0e-3;
906 problem.bulk_mesh_pt()->min_permitted_error()=1.0e-5;
910 if (CommandLineArgs::Argc>1)
912 problem.bulk_mesh_pt()->max_permitted_error()=1.0e-4;
913 problem.bulk_mesh_pt()->min_permitted_error()=1.0e-6;
Collapsible channel mesh with algebraic node update.
//////////////////////////////////////////////////////////////////////// ////////////////////////////...
Namespace to define the mapping [0,1] -> [0,1] that re-distributes nodal points across the channel wi...
double squash_fct(const double &s)
Mapping [0,1] -> [0,1] that re-distributes nodal points across the channel width.
double Delta
Boundary layer width.
double Fract_in_BL
Fraction of points in boundary layer.
///////////////////////////////////////////////////////////////// ///////////////////////////////////...