CollapsibleChannelProblem< ELEMENT > Class Template Reference

Problem class. More...

+ Inheritance diagram for CollapsibleChannelProblem< ELEMENT >:

Public Member Functions

 CollapsibleChannelProblem (const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, const double &amplitude, const double &period)
 Constructor for the collapsible channel problem. More...
 
 ~CollapsibleChannelProblem ()
 Empty destructor. More...
 
RefineableCollapsibleChannelMesh< ELEMENT > * bulk_mesh_pt ()
 Access function for the specific mesh. More...
 
void actions_before_newton_solve ()
 Update the problem specs before solve (empty) More...
 
void actions_after_newton_solve ()
 Update the problem after solve (empty) More...
 
void actions_before_implicit_timestep ()
 Update the velocity boundary condition on the moving wall. More...
 
void actions_before_adapt ()
 Actions before adapt: Wipe the mesh of prescribed traction elements. More...
 
void actions_after_adapt ()
 Actions after adapt: Rebuild the mesh of prescribed traction elements. More...
 
void set_initial_condition ()
 Apply initial conditions. More...
 
void doc_solution (DocInfo &doc_info, ofstream &trace_file)
 Doc the solution. More...
 
 CollapsibleChannelProblem (const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, const double &amplitude, const double &period)
 
 ~CollapsibleChannelProblem ()
 Empty destructor. More...
 
MyAlgebraicCollapsibleChannelMesh< ELEMENT > * bulk_mesh_pt ()
 Access function for the specific mesh. More...
 
void actions_before_newton_solve ()
 Update the problem specs before solve (empty) More...
 
void actions_after_newton_solve ()
 Update the problem after solve (empty) More...
 
void actions_before_implicit_timestep ()
 Update the velocity boundary condition on the moving wall. More...
 
void actions_before_adapt ()
 Actions before adapt: Wipe the mesh of prescribed traction elements. More...
 
void actions_after_adapt ()
 Actions after adapt: Rebuild the mesh of prescribed traction elements. More...
 
void set_initial_condition ()
 Apply initial conditions. More...
 
void doc_solution (DocInfo &doc_info, ofstream &trace_file)
 Doc the solution. More...
 
 CollapsibleChannelProblem (const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, const double &limpedance, const double &amplitude, const double &period, const unsigned &outflow)
 Constructor for the collapsible channel problem. More...
 
 ~CollapsibleChannelProblem ()
 Empty destructor. More...
 
RefineableCollapsibleChannelMesh< ELEMENT > * bulk_mesh_pt ()
 Access function for the fluid bulk mesh. More...
 
Mesh *& outflow_impedance_master_mesh_pt ()
 
void doc_solution (DocInfo &doc_info, ofstream &trace_file)
 Doc the solution. More...
 
void unsteady_run (string directory_for_data, double nstep, const bool &validation_run=false)
 Run unsteady problem. More...
 
void refine_elements_based_on_x_coord (const double &x_min, const double &x_max)
 
void switch_off_wall_oscillations ()
 Function to switch off wall oscillations. More...
 
Mesh * create_mesh_for_navier_stokes_preconditioner ()
 Create a mesh for the NavierStokes Preconditioner. More...
 
 CollapsibleChannelProblem (const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, const double &amplitude, const double &period)
 
 ~CollapsibleChannelProblem ()
 Empty destructor. More...
 
RefineableCollapsibleChannelMesh< ELEMENT > * bulk_mesh_pt ()
 Access function for the specific mesh. More...
 
void actions_before_newton_solve ()
 Update the problem specs before solve (empty) More...
 
void actions_after_newton_solve ()
 Update the problem after solve (empty) More...
 
void actions_before_newton_convergence_check ()
 Update no slip before Newton convergence check. More...
 
void actions_before_implicit_timestep ()
 Update the velocity boundary condition on the moving wall. More...
 
void actions_before_adapt ()
 Actions before adapt: Wipe the mesh of prescribed traction elements. More...
 
void actions_after_adapt ()
 Actions after adapt: Rebuild the mesh of prescribed traction elements. More...
 
void set_initial_condition ()
 Apply initial conditions. More...
 
void doc_solution (DocInfo &doc_info, ofstream &trace_file)
 Doc the solution. More...
 
 CollapsibleChannelProblem (const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly, const double &limpedance, const double &amplitude, const double &period, const unsigned &outflow)
 
 ~CollapsibleChannelProblem ()
 Empty destructor. More...
 
RefineableCollapsibleChannelMesh< ELEMENT > * bulk_mesh_pt ()
 Access function for the fluid bulk mesh. More...
 
Mesh *& outflow_impedance_master_mesh_pt ()
 
void doc_solution (DocInfo &doc_info, ofstream &trace_file)
 Doc the solution. More...
 
void unsteady_run (string directory_for_data, double nstep, const bool &validation_run=false)
 Run unsteady problem. More...
 
void refine_elements_based_on_x_coord (const double &x_min, const double &x_max)
 
void switch_off_wall_oscillations ()
 Function to switch off wall oscillations. More...
 
Mesh * create_mesh_for_navier_stokes_preconditioner ()
 Create a mesh for the NavierStokesSchurComplementPreconditioner. More...
 
- Public Member Functions inherited from oomph::Problem
virtual void debug_hook_fct (const unsigned &i)
 
void set_analytic_dparameter (double *const &parameter_pt)
 
void unset_analytic_dparameter (double *const &parameter_pt)
 
bool is_dparameter_calculated_analytically (double *const &parameter_pt)
 
void set_analytic_hessian_products ()
 
void unset_analytic_hessian_products ()
 
bool are_hessian_products_calculated_analytically ()
 
void set_pinned_values_to_zero ()
 
bool distributed () const
 
OomphCommunicator * communicator_pt ()
 access function to the oomph-lib communicator More...
 
const OomphCommunicator * communicator_pt () const
 access function to the oomph-lib communicator, const version More...
 
 Problem ()
 
 Problem (const Problem &dummy)=delete
 Broken copy constructor. More...
 
void operator= (const Problem &)=delete
 Broken assignment operator. More...
 
virtual ~Problem ()
 Virtual destructor to clean up memory. More...
 
Mesh *& mesh_pt ()
 Return a pointer to the global mesh. More...
 
Mesh *const & mesh_pt () const
 Return a pointer to the global mesh (const version) More...
 
Mesh *& mesh_pt (const unsigned &imesh)
 
Mesh *const & mesh_pt (const unsigned &imesh) const
 Return a pointer to the i-th submesh (const version) More...
 
unsigned nsub_mesh () const
 Return number of submeshes. More...
 
unsigned add_sub_mesh (Mesh *const &mesh_pt)
 
void flush_sub_meshes ()
 
void build_global_mesh ()
 
void rebuild_global_mesh ()
 
LinearSolver *& linear_solver_pt ()
 Return a pointer to the linear solver object. More...
 
LinearSolver *const & linear_solver_pt () const
 Return a pointer to the linear solver object (const version) More...
 
LinearSolver *& mass_matrix_solver_for_explicit_timestepper_pt ()
 
LinearSolver * mass_matrix_solver_for_explicit_timestepper_pt () const
 
EigenSolver *& eigen_solver_pt ()
 Return a pointer to the eigen solver object. More...
 
EigenSolver *const & eigen_solver_pt () const
 Return a pointer to the eigen solver object (const version) More...
 
Time *& time_pt ()
 Return a pointer to the global time object. More...
 
Time * time_pt () const
 Return a pointer to the global time object (const version). More...
 
double & time ()
 Return the current value of continuous time. More...
 
double time () const
 Return the current value of continuous time (const version) More...
 
TimeStepper *& time_stepper_pt ()
 
const TimeStepper * time_stepper_pt () const
 
TimeStepper *& time_stepper_pt (const unsigned &i)
 Return a pointer to the i-th timestepper. More...
 
ExplicitTimeStepper *& explicit_time_stepper_pt ()
 Return a pointer to the explicit timestepper. More...
 
unsigned long set_timestepper_for_all_data (TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data=false)
 
virtual void shift_time_values ()
 Shift all values along to prepare for next timestep. More...
 
AssemblyHandler *& assembly_handler_pt ()
 Return a pointer to the assembly handler object. More...
 
AssemblyHandler *const & assembly_handler_pt () const
 Return a pointer to the assembly handler object (const version) More...
 
double & minimum_dt ()
 Access function to min timestep in adaptive timestepping. More...
 
double & maximum_dt ()
 Access function to max timestep in adaptive timestepping. More...
 
unsigned & max_newton_iterations ()
 Access function to max Newton iterations before giving up. More...
 
void problem_is_nonlinear (const bool &prob_lin)
 Access function to Problem_is_nonlinear. More...
 
double & max_residuals ()
 
bool & time_adaptive_newton_crash_on_solve_fail ()
 Access function for Time_adaptive_newton_crash_on_solve_fail. More...
 
double & newton_solver_tolerance ()
 
void add_time_stepper_pt (TimeStepper *const &time_stepper_pt)
 
void set_explicit_time_stepper_pt (ExplicitTimeStepper *const &explicit_time_stepper_pt)
 
void initialise_dt (const double &dt)
 
void initialise_dt (const Vector< double > &dt)
 
Data *& global_data_pt (const unsigned &i)
 Return a pointer to the the i-th global data object. More...
 
void add_global_data (Data *const &global_data_pt)
 
void flush_global_data ()
 
LinearAlgebraDistribution *const & dof_distribution_pt () const
 Return the pointer to the dof distribution (read-only) More...
 
unsigned long ndof () const
 Return the number of dofs. More...
 
unsigned ntime_stepper () const
 Return the number of time steppers. More...
 
unsigned nglobal_data () const
 Return the number of global data values. More...
 
unsigned self_test ()
 Self-test: Check meshes and global data. Return 0 for OK. More...
 
void enable_store_local_dof_pt_in_elements ()
 
void disable_store_local_dof_pt_in_elements ()
 
unsigned long assign_eqn_numbers (const bool &assign_local_eqn_numbers=true)
 
void describe_dofs (std::ostream &out= *(oomph_info.stream_pt())) const
 
void enable_discontinuous_formulation ()
 
void disable_discontinuous_formulation ()
 
void get_dofs (DoubleVector &dofs) const
 
void get_dofs (const unsigned &t, DoubleVector &dofs) const
 Return vector of the t'th history value of all dofs. More...
 
void set_dofs (const DoubleVector &dofs)
 Set the values of the dofs. More...
 
void set_dofs (const unsigned &t, DoubleVector &dofs)
 Set the history values of the dofs. More...
 
void set_dofs (const unsigned &t, Vector< double * > &dof_pt)
 
void add_to_dofs (const double &lambda, const DoubleVector &increment_dofs)
 Add lambda x incremenet_dofs[l] to the l-th dof. More...
 
double * global_dof_pt (const unsigned &i)
 
double & dof (const unsigned &i)
 i-th dof in the problem More...
 
double dof (const unsigned &i) const
 i-th dof in the problem (const version) More...
 
double *& dof_pt (const unsigned &i)
 Pointer to i-th dof in the problem. More...
 
double * dof_pt (const unsigned &i) const
 Pointer to i-th dof in the problem (const version) More...
 
virtual void get_inverse_mass_matrix_times_residuals (DoubleVector &Mres)
 
virtual void get_dvaluesdt (DoubleVector &f)
 
virtual void get_residuals (DoubleVector &residuals)
 Get the total residuals Vector for the problem. More...
 
virtual void get_jacobian (DoubleVector &residuals, DenseDoubleMatrix &jacobian)
 
virtual void get_jacobian (DoubleVector &residuals, CRDoubleMatrix &jacobian)
 
virtual void get_jacobian (DoubleVector &residuals, CCDoubleMatrix &jacobian)
 
virtual void get_jacobian (DoubleVector &residuals, SumOfMatrices &jacobian)
 
void get_fd_jacobian (DoubleVector &residuals, DenseMatrix< double > &jacobian)
 Get the full Jacobian by finite differencing. More...
 
void get_derivative_wrt_global_parameter (double *const &parameter_pt, DoubleVector &result)
 
void get_hessian_vector_products (DoubleVectorWithHaloEntries const &Y, Vector< DoubleVectorWithHaloEntries > const &C, Vector< DoubleVectorWithHaloEntries > &product)
 
void solve_eigenproblem (const unsigned &n_eval, Vector< std::complex< double >> &eigenvalue, Vector< DoubleVector > &eigenvector, const bool &steady=true)
 Solve the eigenproblem. More...
 
void solve_eigenproblem (const unsigned &n_eval, Vector< std::complex< double >> &eigenvalue, const bool &steady=true)
 
virtual void get_eigenproblem_matrices (CRDoubleMatrix &mass_matrix, CRDoubleMatrix &main_matrix, const double &shift=0.0)
 
void assign_eigenvector_to_dofs (DoubleVector &eigenvector)
 Assign the eigenvector passed to the function to the dofs. More...
 
void add_eigenvector_to_dofs (const double &epsilon, const DoubleVector &eigenvector)
 
void store_current_dof_values ()
 Store the current values of the degrees of freedom. More...
 
void restore_dof_values ()
 Restore the stored values of the degrees of freedom. More...
 
void enable_jacobian_reuse ()
 
void disable_jacobian_reuse ()
 Disable recycling of Jacobian in Newton iteration. More...
 
bool jacobian_reuse_is_enabled ()
 Is recycling of Jacobian in Newton iteration enabled? More...
 
bool & use_predictor_values_as_initial_guess ()
 
void newton_solve ()
 Use Newton method to solve the problem. More...
 
void enable_globally_convergent_newton_method ()
 enable globally convergent Newton method More...
 
void disable_globally_convergent_newton_method ()
 disable globally convergent Newton method More...
 
void newton_solve (unsigned const &max_adapt)
 
void steady_newton_solve (unsigned const &max_adapt=0)
 
void copy (Problem *orig_problem_pt)
 
virtual Problem * make_copy ()
 
virtual void read (std::ifstream &restart_file, bool &unsteady_restart)
 
virtual void read (std::ifstream &restart_file)
 
virtual void dump (std::ofstream &dump_file) const
 
void dump (const std::string &dump_file_name) const
 
void delete_all_external_storage ()
 
virtual void symmetrise_eigenfunction_for_adaptive_pitchfork_tracking ()
 
double * bifurcation_parameter_pt () const
 
void get_bifurcation_eigenfunction (Vector< DoubleVector > &eigenfunction)
 
void activate_fold_tracking (double *const &parameter_pt, const bool &block_solve=true)
 
void activate_bifurcation_tracking (double *const &parameter_pt, const DoubleVector &eigenvector, const bool &block_solve=true)
 
void activate_bifurcation_tracking (double *const &parameter_pt, const DoubleVector &eigenvector, const DoubleVector &normalisation, const bool &block_solve=true)
 
void activate_pitchfork_tracking (double *const &parameter_pt, const DoubleVector &symmetry_vector, const bool &block_solve=true)
 
void activate_hopf_tracking (double *const &parameter_pt, const bool &block_solve=true)
 
void activate_hopf_tracking (double *const &parameter_pt, const double &omega, const DoubleVector &null_real, const DoubleVector &null_imag, const bool &block_solve=true)
 
void deactivate_bifurcation_tracking ()
 
void reset_assembly_handler_to_default ()
 Reset the system to the standard non-augemented state. More...
 
double arc_length_step_solve (double *const &parameter_pt, const double &ds, const unsigned &max_adapt=0)
 
double arc_length_step_solve (Data *const &data_pt, const unsigned &data_index, const double &ds, const unsigned &max_adapt=0)
 
void reset_arc_length_parameters ()
 
int & sign_of_jacobian ()
 
void explicit_timestep (const double &dt, const bool &shift_values=true)
 Take an explicit timestep of size dt. More...
 
void unsteady_newton_solve (const double &dt)
 
void unsteady_newton_solve (const double &dt, const bool &shift_values)
 
void unsteady_newton_solve (const double &dt, const unsigned &max_adapt, const bool &first, const bool &shift=true)
 
double doubly_adaptive_unsteady_newton_solve (const double &dt, const double &epsilon, const unsigned &max_adapt, const bool &first, const bool &shift=true)
 
double doubly_adaptive_unsteady_newton_solve (const double &dt, const double &epsilon, const unsigned &max_adapt, const unsigned &suppress_resolve_after_spatial_adapt_flag, const bool &first, const bool &shift=true)
 
double adaptive_unsteady_newton_solve (const double &dt_desired, const double &epsilon)
 
double adaptive_unsteady_newton_solve (const double &dt_desired, const double &epsilon, const bool &shift_values)
 
void assign_initial_values_impulsive ()
 
void assign_initial_values_impulsive (const double &dt)
 
void calculate_predictions ()
 Calculate predictions. More...
 
void enable_mass_matrix_reuse ()
 
void disable_mass_matrix_reuse ()
 
bool mass_matrix_reuse_is_enabled ()
 Return whether the mass matrix is being reused. More...
 
void refine_uniformly (const Vector< unsigned > &nrefine_for_mesh)
 
void refine_uniformly (const Vector< unsigned > &nrefine_for_mesh, DocInfo &doc_info)
 
void refine_uniformly_and_prune (const Vector< unsigned > &nrefine_for_mesh)
 
void refine_uniformly_and_prune (const Vector< unsigned > &nrefine_for_mesh, DocInfo &doc_info)
 
void refine_uniformly (DocInfo &doc_info)
 
void refine_uniformly_and_prune (DocInfo &doc_info)
 
void refine_uniformly ()
 
void refine_uniformly (const unsigned &i_mesh, DocInfo &doc_info)
 Do uniform refinement for submesh i_mesh with documentation. More...
 
void refine_uniformly (const unsigned &i_mesh)
 Do uniform refinement for submesh i_mesh without documentation. More...
 
void p_refine_uniformly (const Vector< unsigned > &nrefine_for_mesh)
 
void p_refine_uniformly (const Vector< unsigned > &nrefine_for_mesh, DocInfo &doc_info)
 
void p_refine_uniformly_and_prune (const Vector< unsigned > &nrefine_for_mesh)
 
void p_refine_uniformly_and_prune (const Vector< unsigned > &nrefine_for_mesh, DocInfo &doc_info)
 
void p_refine_uniformly (DocInfo &doc_info)
 
void p_refine_uniformly_and_prune (DocInfo &doc_info)
 
void p_refine_uniformly ()
 
void p_refine_uniformly (const unsigned &i_mesh, DocInfo &doc_info)
 Do uniform p-refinement for submesh i_mesh with documentation. More...
 
void p_refine_uniformly (const unsigned &i_mesh)
 Do uniform p-refinement for submesh i_mesh without documentation. More...
 
void refine_selected_elements (const Vector< unsigned > &elements_to_be_refined)
 
void refine_selected_elements (const Vector< RefineableElement * > &elements_to_be_refined_pt)
 
void refine_selected_elements (const unsigned &i_mesh, const Vector< unsigned > &elements_to_be_refined)
 
void refine_selected_elements (const unsigned &i_mesh, const Vector< RefineableElement * > &elements_to_be_refined_pt)
 
void refine_selected_elements (const Vector< Vector< unsigned >> &elements_to_be_refined)
 
void refine_selected_elements (const Vector< Vector< RefineableElement * >> &elements_to_be_refined_pt)
 
void p_refine_selected_elements (const Vector< unsigned > &elements_to_be_refined)
 
void p_refine_selected_elements (const Vector< PRefineableElement * > &elements_to_be_refined_pt)
 
void p_refine_selected_elements (const unsigned &i_mesh, const Vector< unsigned > &elements_to_be_refined)
 
void p_refine_selected_elements (const unsigned &i_mesh, const Vector< PRefineableElement * > &elements_to_be_refined_pt)
 
void p_refine_selected_elements (const Vector< Vector< unsigned >> &elements_to_be_refined)
 
void p_refine_selected_elements (const Vector< Vector< PRefineableElement * >> &elements_to_be_refined_pt)
 
unsigned unrefine_uniformly ()
 
unsigned unrefine_uniformly (const unsigned &i_mesh)
 
void p_unrefine_uniformly (DocInfo &doc_info)
 
void p_unrefine_uniformly (const unsigned &i_mesh, DocInfo &doc_info)
 Do uniform p-unrefinement for submesh i_mesh without documentation. More...
 
void adapt (unsigned &n_refined, unsigned &n_unrefined)
 
void adapt ()
 
void p_adapt (unsigned &n_refined, unsigned &n_unrefined)
 
void p_adapt ()
 
void adapt_based_on_error_estimates (unsigned &n_refined, unsigned &n_unrefined, Vector< Vector< double >> &elemental_error)
 
void adapt_based_on_error_estimates (Vector< Vector< double >> &elemental_error)
 
void get_all_error_estimates (Vector< Vector< double >> &elemental_error)
 
void doc_errors (DocInfo &doc_info)
 Get max and min error for all elements in submeshes. More...
 
void doc_errors ()
 Get max and min error for all elements in submeshes. More...
 
void enable_info_in_newton_solve ()
 
void disable_info_in_newton_solve ()
 Disable the output of information when in the newton solver. More...
 
- Public Member Functions inherited from oomph::ExplicitTimeSteppableObject
 ExplicitTimeSteppableObject ()
 Empty constructor. More...
 
 ExplicitTimeSteppableObject (const ExplicitTimeSteppableObject &)=delete
 Broken copy constructor. More...
 
void operator= (const ExplicitTimeSteppableObject &)=delete
 Broken assignment operator. More...
 
virtual ~ExplicitTimeSteppableObject ()
 Empty destructor. More...
 
virtual void actions_before_explicit_stage ()
 
virtual void actions_after_explicit_stage ()
 

Protected Member Functions

void set_poiseuille_outflow ()
 Apply Poiseuille flow on outlet. More...
 
void set_parallel_outflow ()
 Apply parallel flow on outlet. More...
 
void actions_before_newton_solve ()
 Update the problem specs before solve. More...
 
void actions_after_newton_solve ()
 Update the problem after solve (empty) More...
 
void actions_before_implicit_timestep ()
 Update the velocity boundary condition on the moving wall. More...
 
void actions_before_adapt ()
 Actions before adapt: Wipe the mesh of prescribed traction elements. More...
 
void actions_after_adapt ()
 Actions after adapt: Rebuild the mesh of prescribed traction elements. More...
 
void set_initial_condition ()
 Apply initial conditions. More...
 
void set_poiseuille_outflow ()
 Apply Poiseuille flow on outlet. More...
 
void set_parallel_outflow ()
 Apply parallel flow on outlet. More...
 
void actions_before_newton_solve ()
 Update the problem specs before solve. More...
 
void actions_after_newton_solve ()
 Update the problem after solve (empty) More...
 
void actions_before_implicit_timestep ()
 Update the velocity boundary condition on the moving wall. More...
 
void actions_before_adapt ()
 Actions before adapt: Wipe the mesh of prescribed traction elements. More...
 
void actions_after_adapt ()
 Actions after adapt: Rebuild the mesh of prescribed traction elements. More...
 
void set_initial_condition ()
 Apply initial conditions. More...
 
- Protected Member Functions inherited from oomph::Problem
unsigned setup_element_count_per_dof ()
 
virtual void sparse_assemble_row_or_column_compressed (Vector< int * > &column_or_row_index, Vector< int * > &row_or_column_start, Vector< double * > &value, Vector< unsigned > &nnz, Vector< double * > &residual, bool compressed_row_flag)
 
virtual void actions_before_newton_step ()
 
virtual void actions_after_newton_step ()
 
virtual void actions_after_implicit_timestep ()
 
virtual void actions_after_implicit_timestep_and_error_estimation ()
 
virtual void actions_before_explicit_timestep ()
 Actions that should be performed before each explicit time step. More...
 
virtual void actions_after_explicit_timestep ()
 Actions that should be performed after each explicit time step. More...
 
virtual void actions_before_read_unstructured_meshes ()
 
virtual void actions_after_read_unstructured_meshes ()
 
virtual void actions_after_change_in_global_parameter (double *const &parameter_pt)
 
virtual void actions_after_change_in_bifurcation_parameter ()
 
virtual void actions_after_parameter_increase (double *const &parameter_pt)
 
double & dof_derivative (const unsigned &i)
 
double & dof_current (const unsigned &i)
 
virtual double global_temporal_error_norm ()
 
unsigned newton_solve_continuation (double *const &parameter_pt)
 
unsigned newton_solve_continuation (double *const &parameter_pt, DoubleVector &z)
 
void calculate_continuation_derivatives (double *const &parameter_pt)
 
void calculate_continuation_derivatives (const DoubleVector &z)
 
void calculate_continuation_derivatives_fd (double *const &parameter_pt)
 
bool does_pointer_correspond_to_problem_data (double *const &parameter_pt)
 
void set_consistent_pinned_values_for_continuation ()
 

Private Member Functions

void create_traction_elements (const unsigned &b, Mesh *const &bulk_mesh_pt, Mesh *const &surface_mesh_pt)
 Create the traction elements. More...
 
void delete_traction_elements (Mesh *const &surface_mesh_pt)
 Delete prescribed traction elements from the surface mesh. More...
 
void create_traction_elements (const unsigned &b, Mesh *const &bulk_mesh_pt, Mesh *const &surface_mesh_pt)
 
void delete_traction_elements (Mesh *const &surface_mesh_pt)
 Delete prescribed traction elements from the surface mesh. More...
 
void delete_outflow_flux_control_elements ()
 Delete flux control elements from outflow boundary. More...
 
void setup_outflow_flux_control_elements ()
 Attach flux control elements to outflow boundary. More...
 
void setup_inflow_traction_elements ()
 Create the prescribed traction elements on the inflow. More...
 
void delete_inflow_traction_elements ()
 Delete prescribed traction elements from the surface mesh. More...
 
void delete_outflow_impedance_elements ()
 Delete impedance elements from outflow boundary. More...
 
void setup_outflow_impedance_elements ()
 Attach impedance elements to outflow boundary. More...
 
void create_traction_elements (const unsigned &b, Mesh *const &bulk_mesh_pt, Mesh *const &surface_mesh_pt)
 
void delete_traction_elements (Mesh *const &surface_mesh_pt)
 Delete prescribed traction elements from the surface mesh. More...
 
void create_lagrange_multiplier_elements ()
 Create elements that impose the prescribed boundary displacement. More...
 
void delete_lagrange_multiplier_elements ()
 
void delete_outflow_flux_control_elements ()
 Delete flux control elements from outflow boundary. More...
 
void setup_outflow_flux_control_elements ()
 Attach flux control elements to outflow boundary. More...
 
void setup_inflow_traction_elements ()
 Create the prescribed traction elements on the inflow. More...
 
void delete_inflow_traction_elements ()
 Delete prescribed traction elements from the surface mesh. More...
 
void delete_outflow_impedance_elements ()
 
void setup_outflow_impedance_elements ()
 

Private Attributes

unsigned Nup
 Number of elements in the x direction in the upstream part of the channel. More...
 
unsigned Ncollapsible
 
unsigned Ndown
 Number of elements in the x direction in the downstream part of the channel. More...
 
unsigned Ny
 Number of elements across the channel. More...
 
double Lup
 x-length in the upstream part of the channel More...
 
double Lcollapsible
 x-length in the "collapsible" part of the channel More...
 
double Ldown
 x-length in the downstream part of the channel More...
 
double Ly
 Transverse length. More...
 
OscillatingWall * Wall_pt
 Pointer to the geometric object that parametrises the "collapsible" wall. More...
 
RefineableCollapsibleChannelMesh< ELEMENT > * Bulk_mesh_pt
 Pointer to the "bulk" mesh. More...
 
Mesh * Surface_mesh_pt
 
Node * Left_node_pt
 Pointer to the left control node. More...
 
Node * Right_node_pt
 Pointer to right control node. More...
 
MyAlgebraicCollapsibleChannelMesh< ELEMENT > * Bulk_mesh_pt
 Pointer to the "bulk" mesh. More...
 
Mesh * Inflow_traction_mesh_pt
 
Mesh * Outflow_flux_control_master_mesh_pt
 Pointer to mesh containing the net flux control element (only!) More...
 
Mesh * Outflow_flux_control_sub_mesh_pt
 Pointer to mesh of flux control elements at outflow. More...
 
WomersleyOutflowImpedanceTube< QWomersleyElement< 1, 3 >, 1 > * Womersley_impedance_tube_pt
 Pointer to impendance tube. More...
 
Mesh * Outflow_impedance_mesh_pt
 Pointer to the impedance mesh. More...
 
Mesh * Outflow_impedance_master_mesh_pt
 Pointer to the master impedance mesh when using flux control elements. More...
 
double L_impedance
 Length of optional impedance tube. More...
 
double Prescribed_volume_flux
 Prescribed volume flux: set to -1 for value consistent with Re. More...
 
double Period
 Period of oscillation. More...
 
double Amplitude
 Amplitude of osciallation. More...
 
unsigned Outflow_type
 
unsigned Bulk_mesh_id
 Id of the fluid bulk mesh. More...
 
ElasticRefineableCollapsibleChannelMesh< ELEMENT > * Bulk_mesh_pt
 Pointer to the "bulk" mesh. More...
 
SolidMesh * Lagrange_multiplier_mesh_pt
 Pointers to meshes of Lagrange multiplier elements. More...
 
ConstitutiveLaw * Constitutive_law_pt
 Constitutive law used to determine the mesh deformation. More...
 

Additional Inherited Members

- Public Types inherited from oomph::Problem
typedef void(* SpatialErrorEstimatorFctPt) (Mesh *&mesh_pt, Vector< double > &elemental_error)
 Function pointer for spatial error estimator. More...
 
typedef void(* SpatialErrorEstimatorWithDocFctPt) (Mesh *&mesh_pt, Vector< double > &elemental_error, DocInfo &doc_info)
 Function pointer for spatial error estimator with doc. More...
 
- Public Attributes inherited from oomph::Problem
bool Shut_up_in_newton_solve
 
- Static Public Attributes inherited from oomph::Problem
static bool Suppress_warning_about_actions_before_read_unstructured_meshes
 
- Protected Types inherited from oomph::Problem
enum  Assembly_method {
  Perform_assembly_using_vectors_of_pairs , Perform_assembly_using_two_vectors , Perform_assembly_using_maps , Perform_assembly_using_lists ,
  Perform_assembly_using_two_arrays
}
 Enumerated flags to determine which sparse assembly method is used. More...
 
- Protected Attributes inherited from oomph::Problem
Vector< Problem * > Copy_of_problem_pt
 
std::map< double *, bool > Calculate_dparameter_analytic
 
bool Calculate_hessian_products_analytic
 
LinearAlgebraDistribution * Dof_distribution_pt
 
Vector< double * > Dof_pt
 Vector of pointers to dofs. More...
 
DoubleVectorWithHaloEntries Element_count_per_dof
 
double Relaxation_factor
 
double Newton_solver_tolerance
 
unsigned Max_newton_iterations
 Maximum number of Newton iterations. More...
 
unsigned Nnewton_iter_taken
 
Vector< double > Max_res
 Maximum residuals at start and after each newton iteration. More...
 
double Max_residuals
 
bool Time_adaptive_newton_crash_on_solve_fail
 
bool Jacobian_reuse_is_enabled
 Is re-use of Jacobian in Newton iteration enabled? Default: false. More...
 
bool Jacobian_has_been_computed
 
bool Problem_is_nonlinear
 
bool Pause_at_end_of_sparse_assembly
 
bool Doc_time_in_distribute
 
unsigned Sparse_assembly_method
 
unsigned Sparse_assemble_with_arrays_initial_allocation
 
unsigned Sparse_assemble_with_arrays_allocation_increment
 
Vector< Vector< unsigned > > Sparse_assemble_with_arrays_previous_allocation
 
double Numerical_zero_for_sparse_assembly
 
double FD_step_used_in_get_hessian_vector_products
 
bool Mass_matrix_reuse_is_enabled
 
bool Mass_matrix_has_been_computed
 
bool Discontinuous_element_formulation
 
double Minimum_dt
 Minimum desired dt: if dt falls below this value, exit. More...
 
double Maximum_dt
 Maximum desired dt. More...
 
double DTSF_max_increase
 
double DTSF_min_decrease
 
double Minimum_dt_but_still_proceed
 
bool Scale_arc_length
 Boolean to control whether arc-length should be scaled. More...
 
double Desired_proportion_of_arc_length
 Proportion of the arc-length to taken by the parameter. More...
 
double Theta_squared
 
int Sign_of_jacobian
 Storage for the sign of the global Jacobian. More...
 
double Continuation_direction
 
double Parameter_derivative
 Storage for the derivative of the global parameter wrt arc-length. More...
 
double Parameter_current
 Storage for the present value of the global parameter. More...
 
bool Use_continuation_timestepper
 Boolean to control original or new storage of dof stuff. More...
 
unsigned Dof_derivative_offset
 
unsigned Dof_current_offset
 
Vector< double > Dof_derivative
 Storage for the derivative of the problem variables wrt arc-length. More...
 
Vector< double > Dof_current
 Storage for the present values of the variables. More...
 
double Ds_current
 Storage for the current step value. More...
 
unsigned Desired_newton_iterations_ds
 
double Minimum_ds
 Minimum desired value of arc-length. More...
 
bool Bifurcation_detection
 Boolean to control bifurcation detection via determinant of Jacobian. More...
 
bool Bisect_to_find_bifurcation
 Boolean to control wheter bisection is used to located bifurcation. More...
 
bool First_jacobian_sign_change
 Boolean to indicate whether a sign change has occured in the Jacobian. More...
 
bool Arc_length_step_taken
 Boolean to indicate whether an arc-length step has been taken. More...
 
bool Use_finite_differences_for_continuation_derivatives
 
OomphCommunicator * Communicator_pt
 The communicator for this problem. More...
 
bool Always_take_one_newton_step
 
double Timestep_reduction_factor_after_nonconvergence
 
bool Keep_temporal_error_below_tolerance
 
- Static Protected Attributes inherited from oomph::Problem
static ContinuationStorageScheme Continuation_time_stepper
 Storage for the single static continuation timestorage object. More...
 

Detailed Description

template<class ELEMENT>
class CollapsibleChannelProblem< ELEMENT >

Problem class.

Constructor & Destructor Documentation

◆ CollapsibleChannelProblem() [1/5]

template<class ELEMENT >
CollapsibleChannelProblem< ELEMENT >::CollapsibleChannelProblem ( const unsigned &  nup,
const unsigned &  ncollapsible,
const unsigned &  ndown,
const unsigned &  ny,
const double &  lup,
const double &  lcollapsible,
const double &  ldown,
const double &  ly,
const double &  amplitude,
const double &  period 
)

Constructor for the collapsible channel problem.

Constructor : the arguments are the number of elements, the length of the domain and the amplitude and period of the oscillations

361 {
362  // Number of elements
363  Nup=nup;
364  Ncollapsible=ncollapsible;
365  Ndown=ndown;
366  Ny=ny;
367 
368  // Lengths of domain
369  Lup=lup;
370  Lcollapsible=lcollapsible;
371  Ldown=ldown;
372  Ly=ly;
373 
374  // Overwrite maximum allowed residual to accomodate possibly
375  // poor initial guess for solution
376  Problem::Max_residuals=10000;
377 
378  // Allocate the timestepper -- this constructs the Problem's
379  // time object with a sufficient amount of storage to store the
380  // previous timsteps.
382 
383  // Parameters for wall object
384  double height=ly;
385  double length=lcollapsible;
386  double x_left=lup;
387 
388  //Create the geometric object that represents the wall
389  Wall_pt=new OscillatingWall(height, x_left, length, amplitude, period,
390  time_pt());
391 
392  //Build mesh
394  nup, ncollapsible, ndown, ny,
395  lup, lcollapsible, ldown, ly,
396  Wall_pt,
397  time_stepper_pt());
398 
399 
400  // Enable boundary layer squash function?
401 #ifdef USE_BL_SQUASH_FCT
402 
403  // Set a non-trivial boundary-layer-squash function...
404  Bulk_mesh_pt->bl_squash_fct_pt() = &BL_Squash::squash_fct;
405 
406  // ... and update the nodal positions accordingly
407  Bulk_mesh_pt->node_update();
408 
409 #endif
410  // end of boundary layer squash function
411 
412 
413  // Create "surface mesh" that will contain only the prescribed-traction
414  // elements at the inflow. The default constructor just creates the mesh
415  // without giving it any elements, nodes, etc.
416  Surface_mesh_pt = new Mesh;
417 
418  // Create prescribed-traction elements from all elements that are
419  // adjacent to boundary 5 (inflow boundary), and add them to the surface mesh.
421 
422  // Add the two sub meshes to the problem
425 
426  // Combine all submeshes added so far into a single Mesh
428 
429  //Set errror estimator for bulk mesh
432  (Bulk_mesh_pt)->spatial_error_estimator_pt()=error_estimator_pt;
433 
434 
435  // Loop over the elements to set up element-specific
436  // things that cannot be handled by constructor
437  unsigned n_element=Bulk_mesh_pt->nelement();
438  for(unsigned e=0;e<n_element;e++)
439  {
440  // Upcast from GeneralisedElement to the present element
441  ELEMENT* el_pt = dynamic_cast<ELEMENT*>(Bulk_mesh_pt->element_pt(e));
442 
443  //Set the Reynolds number
444  el_pt->re_pt() = &Global_Physical_Variables::Re;
445 
446  // Set the Womersley number
447  el_pt->re_st_pt() = &Global_Physical_Variables::ReSt;
448 
449  } // end loop over bulk elements
450 
451 
452 
453  // Loop over the traction elements to pass pointer to prescribed
454  // traction function
455  unsigned n_el=Surface_mesh_pt->nelement();
456  for(unsigned e=0;e<n_el;e++)
457  {
458  // Upcast from GeneralisedElement to NavierStokes traction element
460  dynamic_cast< NavierStokesTractionElement<ELEMENT>*>(
462 
463  // Set the pointer to the prescribed traction function
465 
466  } // end loop over applied traction elements
467 
468 
469 
470 
471  //Pin the velocity on the boundaries
472  //x and y-velocities pinned along boundary 0 (bottom boundary) :
473  unsigned ibound=0;
474  unsigned num_nod= bulk_mesh_pt()->nboundary_node(ibound);
475  for (unsigned inod=0;inod<num_nod;inod++)
476  {
477  for(unsigned i=0;i<2;i++)
478  {
479  bulk_mesh_pt()->boundary_node_pt(ibound, inod)->pin(i);
480  }
481  }
482 
483 
484  //x and y-velocities pinned along boundary 2, 3, 4 (top boundaries) :
485  for(unsigned ib=2;ib<5;ib++)
486  {
487  num_nod= bulk_mesh_pt()->nboundary_node(ib);
488  for (unsigned inod=0;inod<num_nod;inod++)
489  {
490  for(unsigned i=0;i<2;i++)
491  {
492  bulk_mesh_pt()->boundary_node_pt(ib, inod)->pin(i);
493  }
494  }
495  }
496 
497  //y-velocity pinned along boundary 1 (right boundary):
498  ibound=1;
499  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
500  for (unsigned inod=0;inod<num_nod;inod++)
501  {
502  bulk_mesh_pt()->boundary_node_pt(ibound, inod)->pin(1);
503  }
504 
505 
506  //y-velocity pinned along boundary 5 (left boundary):
507  ibound=5;
508  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
509  for (unsigned inod=0;inod<num_nod;inod++)
510  {
511  bulk_mesh_pt()->boundary_node_pt(ibound, inod)->pin(1);
512  }// end of pin_velocity
513 
514 
515 
516  //Select control nodes "half way" up the inflow/outflow cross-sections
517  //--------------------------------------------------------------------
518 
519  // Left boundary
520  ibound=5;
521  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
522  unsigned control_nod=num_nod/2;
523  Left_node_pt= bulk_mesh_pt()->boundary_node_pt(ibound, control_nod);
524 
525  // Right boundary
526  ibound=1;
527  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
528  control_nod=num_nod/2;
529  Right_node_pt= bulk_mesh_pt()->boundary_node_pt(ibound, control_nod);
530 
531  // Setup equation numbering scheme
532  cout <<"Number of equations: " << assign_eqn_numbers() << std::endl;
533 
534 } //end of constructor
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Mesh * Surface_mesh_pt
Definition: collapsible_channel.cc:333
Node * Left_node_pt
Pointer to the left control node.
Definition: collapsible_channel.cc:336
RefineableCollapsibleChannelMesh< ELEMENT > * bulk_mesh_pt()
Access function for the specific mesh.
Definition: collapsible_channel.cc:258
double Lcollapsible
x-length in the "collapsible" part of the channel
Definition: collapsible_channel.cc:317
unsigned Nup
Number of elements in the x direction in the upstream part of the channel.
Definition: collapsible_channel.cc:301
OscillatingWall * Wall_pt
Pointer to the geometric object that parametrises the "collapsible" wall.
Definition: collapsible_channel.cc:326
double Lup
x-length in the upstream part of the channel
Definition: collapsible_channel.cc:314
double Ldown
x-length in the downstream part of the channel
Definition: collapsible_channel.cc:320
RefineableCollapsibleChannelMesh< ELEMENT > * Bulk_mesh_pt
Pointer to the "bulk" mesh.
Definition: collapsible_channel.cc:329
void create_traction_elements(const unsigned &b, Mesh *const &bulk_mesh_pt, Mesh *const &surface_mesh_pt)
Create the traction elements.
Definition: collapsible_channel.cc:597
double Ly
Transverse length.
Definition: collapsible_channel.cc:323
unsigned Ncollapsible
Definition: collapsible_channel.cc:305
unsigned Ndown
Number of elements in the x direction in the downstream part of the channel.
Definition: collapsible_channel.cc:308
unsigned Ny
Number of elements across the channel.
Definition: collapsible_channel.cc:311
Node * Right_node_pt
Pointer to right control node.
Definition: collapsible_channel.cc:339
Definition: collapsible_channel.cc:117
Definition: mesh.h:67
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
Definition: mesh.h:448
unsigned long nelement() const
Return number of elements in the mesh.
Definition: mesh.h:590
Definition: fluid_traction_elements.h:55
void(*&)(const double &t, const Vector< double > &x, const Vector< double > &n, Vector< double > &result) traction_fct_pt()
Definition: fluid_traction_elements.h:186
void add_time_stepper_pt(TimeStepper *const &time_stepper_pt)
Definition: problem.cc:1545
unsigned add_sub_mesh(Mesh *const &mesh_pt)
Definition: problem.h:1330
Time *& time_pt()
Return a pointer to the global time object.
Definition: problem.h:1504
void build_global_mesh()
Definition: problem.cc:1493
unsigned long assign_eqn_numbers(const bool &assign_local_eqn_numbers=true)
Definition: problem.cc:1989
TimeStepper *& time_stepper_pt()
Definition: problem.h:1524
Definition: collapsible_channel_mesh.template.h:186
Definition: error_estimator.h:266
double squash_fct(const double &s)
Definition: fsi_chan_problem.h:118
double ReSt
Womersley number.
Definition: rayleigh_instability.cc:56
void prescribed_traction(const double &t, const Vector< double > &x, const Vector< double > &n, Vector< double > &traction)
Traction applied on the fluid at the left (inflow) boundary.
Definition: fsi_collapsible_channel.cc:186
double height(const double &x)
Height of domain.
Definition: simple_spine_channel.cc:429
double Re
Reynolds number.
Definition: fibre.cc:55
Z2ErrorEstimator * error_estimator_pt
Definition: MortaringCantileverCompareToNonMortaring.cpp:190
const double ly
Definition: ConstraintElementsUnitTest.cpp:34
const unsigned ny
Definition: ConstraintElementsUnitTest.cpp:31

References e(), MeshRefinement::error_estimator_pt, Global_Physical_Variables::height(), i, Global_Parameters::Ldown, Global_Parameters::Lup, Mesh_Parameters::ly, Global_Parameters::Ly, Mesh_Parameters::ny, GlobalParameters::Ny, Global_Physical_Variables::prescribed_traction(), Global_Physical_Variables::Re, Global_Physical_Variables::ReSt, BL_Squash::squash_fct(), and oomph::NavierStokesTractionElement< ELEMENT >::traction_fct_pt.

◆ ~CollapsibleChannelProblem() [1/5]

template<class ELEMENT >
CollapsibleChannelProblem< ELEMENT >::~CollapsibleChannelProblem ( )
inline

Empty destructor.

255 {}

◆ CollapsibleChannelProblem() [2/5]

template<class ELEMENT >
CollapsibleChannelProblem< ELEMENT >::CollapsibleChannelProblem ( const unsigned &  nup,
const unsigned &  ncollapsible,
const unsigned &  ndown,
const unsigned &  ny,
const double &  lup,
const double &  lcollapsible,
const double &  ldown,
const double &  ly,
const double &  amplitude,
const double &  period 
)

Constructor : the arguments are the number of elements, the length of the domain and the amplitude and period of the oscillations

◆ ~CollapsibleChannelProblem() [2/5]

template<class ELEMENT >
CollapsibleChannelProblem< ELEMENT >::~CollapsibleChannelProblem ( )
inline

Empty destructor.

256 {}

◆ CollapsibleChannelProblem() [3/5]

template<class ELEMENT >
CollapsibleChannelProblem< ELEMENT >::CollapsibleChannelProblem ( const unsigned &  nup,
const unsigned &  ncollapsible,
const unsigned &  ndown,
const unsigned &  ny,
const double &  lup,
const double &  lcollapsible,
const double &  ldown,
const double &  ly,
const double &  limpedance,
const double &  amplitude,
const double &  period,
const unsigned &  outflow 
)

Constructor for the collapsible channel problem.

Constructor : the arguments are the number of elements, the length of the domain and the amplitude and period of the oscillations

Default length of optional impedance tube

487 {
488  // Number of elements
489  Nup=nup;
490  Ncollapsible=ncollapsible;
491  Ndown=ndown;
492  Ny=ny;
493 
494  // Lengths of domain
495  Lup=lup;
496  Lcollapsible=lcollapsible;
497  Ldown=ldown;
498  Ly=ly;
499 
500  // Other input data
501  Period=period;
502  Amplitude=amplitude;
503 
504  // Outflow boundary type
505  // 0: prescribed flux boundary conditions
506  // 1: impedance boundary conditions
507  // 2: impedance boundary conditions using flux control elements
508  // 3: prescribed outflow
509  // Otherwise we have pressure driven flow with zero pressure at outlet
510  Outflow_type = outflow;
511 
513  L_impedance=limpedance;
514 
515  // Overwrite maximum allowed residual to accomodate possibly
516  // poor initial guess for solution
517  Problem::Max_residuals=100000000;
518 
519  // Point optional mesh pointers and other stuff to null
526 
527  // Allocate the timestepper -- this constructs the Problem's
528  // time object with a sufficient amount of storage to store the
529  // previous timsteps.
531 
532  // Parameters for wall object
533  double height=ly;
534  double length=lcollapsible;
535  double x_left=lup;
536 
537  //Create the geometric object that represents the wall
538  Wall_pt=new OscillatingWall(height, x_left, length, amplitude, period,
539  time_pt());
540 
541  //Build mesh
543  nup, ncollapsible, ndown, ny,
544  lup, lcollapsible, ldown, ly,
545  Wall_pt,
546  time_stepper_pt());
547 
548 
549  // Enable boundary layer squash function?
550 #ifdef USE_BL_SQUASH_FCT
551 
552  // Set a non-trivial boundary-layer-squash function...
553  Bulk_mesh_pt->bl_squash_fct_pt() = &BL_Squash::squash_fct;
554 
555  // ... and update the nodal positions accordingly
556  Bulk_mesh_pt->node_update();
557 
558 #endif
559  // end of boundary layer squash function
560 
561  // Add the bulk sub mesh to the problem
563 
564  // Create "surface mesh" that will contain only the prescribed-traction
565  // elements at the inflow. The default constructor just creates the mesh
566  // without giving it any elements, nodes, etc.
568 
569  // Create prescribed-traction elements
571 
572  // Add the new sub mesh to the problem
574 
575  if (Outflow_type==0)
576  {
577  oomph_info << "Flux control flow\n";
578 
579  // Create the flux control meshes
580 
581  // Construct Outflow_flux_control_master_mesh_pt
583 
584  // Construct Outflow_flux_control_sub_mesh_pt
586 
587  // Set up elements for sub meshes
589 
590  // Add new sub meshes
593  }
594  else if (Outflow_type==1)
595  {
596  oomph_info << "Pressure driven flow with impedance tube of length "
597  << L_impedance << "\n";
598 
599  if (L_impedance>0.0)
600  {
601  // Construct the mesh
603 
604  // Set up elements and impedance tube
606 
607  // Add new sub meshes
609  }
610  }
611  else if (Outflow_type==2)
612  {
613  oomph_info << "Pressure driven flow with impedance tube of length "
614  << L_impedance << " using flux control elements\n";
615 
616  if (L_impedance>0.0)
617  {
618  // Construct Outflow_flux_control_sub_mesh_pt
620 
621  // Construct Mesh
623 
624  // Set up elements and impedance tube
626 
627  // Add new sub meshes
630  }
631  }
632  else if (Outflow_type==3)
633  {
634  oomph_info << "Prescribed outflow\n";
635  }
636  else
637  {
638  oomph_info << "Pressure driven flow\n";
639  }
640 
641  // Combine all submeshes added so far into a single Mesh
643 
644  //Set errror estimator for bulk mesh
647  (Bulk_mesh_pt)->spatial_error_estimator_pt()=error_estimator_pt;
648 
649 
650  // Loop over the elements to set up element-specific
651  // things that cannot be handled by constructor
652  unsigned n_element=Bulk_mesh_pt->nelement();
653  for(unsigned e=0;e<n_element;e++)
654  {
655  // Upcast from GeneralisedElement to the present element
656  ELEMENT* el_pt = dynamic_cast<ELEMENT*>(Bulk_mesh_pt->element_pt(e));
657 
658  //Set the Reynolds number
659  el_pt->re_pt() = &Global_Physical_Variables::Re;
660 
661  // Set the Womersley number
662  el_pt->re_st_pt() = &Global_Physical_Variables::ReSt;
663 
664  } // end loop over bulk elements
665 
666  // Pin redudant pressure dofs
669 
670  // Loop over the traction elements to pass pointer to prescribed
671  // traction function
673  {
674  unsigned n_el=Inflow_traction_mesh_pt->nelement();
675  for(unsigned e=0;e<n_el;e++)
676  {
677  // Upcast from GeneralisedElement to NavierStokes traction element
679  dynamic_cast< NavierStokesTractionElement<ELEMENT>*>(
681 
682  // Set the pointer to the prescribed traction function
683  el_pt->traction_fct_pt() =
685 
686  } // end loop over applied traction elements
687  }
688 
689 
690 
691  //Pin the velocity on the boundaries
692  //x and y-velocities pinned along boundary 0 (bottom boundary) :
693  unsigned ibound=0;
694  unsigned num_nod= bulk_mesh_pt()->nboundary_node(ibound);
695  for (unsigned inod=0;inod<num_nod;inod++)
696  {
697  for(unsigned i=0;i<2;i++)
698  {
699  bulk_mesh_pt()->boundary_node_pt(ibound, inod)->pin(i);
700  }
701  }
702 
703 
704  //x and y-velocities pinned along boundary 2, 3, 4 (top boundaries) :
705  for(unsigned ib=2;ib<5;ib++)
706  {
707  num_nod= bulk_mesh_pt()->nboundary_node(ib);
708  for (unsigned inod=0;inod<num_nod;inod++)
709  {
710  for(unsigned i=0;i<2;i++)
711  {
712  bulk_mesh_pt()->boundary_node_pt(ib, inod)->pin(i);
713  }
714  }
715  }
716 
717  //y-velocity pinned along boundary 1 (right boundary) and also x-velocity for
718  //prescribed outflow
719  ibound=1;
720  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
721  for (unsigned inod=0;inod<num_nod;inod++)
722  {
723  bulk_mesh_pt()->boundary_node_pt(ibound, inod)->pin(1);
724  if (Outflow_type==3)
725  {
726  bulk_mesh_pt()->boundary_node_pt(ibound, inod)->pin(0);
727  }
728  }
729 
730  //y-velocity pinned along boundary 5 (left boundary):
731  ibound=5;
732  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
733  for (unsigned inod=0;inod<num_nod;inod++)
734  {
735  bulk_mesh_pt()->boundary_node_pt(ibound, inod)->pin(1);
736  }// end of pin_velocity
737 
738 
739  //Select control nodes "half way" up the inflow/outflow cross-sections
740  //--------------------------------------------------------------------
741 
742  // Left boundary
743  ibound=5;
744  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
745  unsigned control_nod=num_nod/2;
746  Left_node_pt= bulk_mesh_pt()->boundary_node_pt(ibound, control_nod);
747 
748  // Right boundary
749  ibound=1;
750  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
751  control_nod=num_nod/2;
752  Right_node_pt= bulk_mesh_pt()->boundary_node_pt(ibound, control_nod);
753 
754  // Setup equation numbering scheme
755  oomph_info <<"Number of equations: " << assign_eqn_numbers() << std::endl;
756 
757 } //end of constructor
void setup_outflow_flux_control_elements()
Attach flux control elements to outflow boundary.
Definition: flux_control.cc:1162
void setup_outflow_impedance_elements()
Attach impedance elements to outflow boundary.
Definition: flux_control.cc:1276
Mesh * Outflow_flux_control_sub_mesh_pt
Pointer to mesh of flux control elements at outflow.
Definition: flux_control.cc:425
double L_impedance
Length of optional impedance tube.
Definition: flux_control.cc:444
Mesh * Outflow_impedance_mesh_pt
Pointer to the impedance mesh.
Definition: flux_control.cc:432
Mesh * Outflow_flux_control_master_mesh_pt
Pointer to mesh containing the net flux control element (only!)
Definition: flux_control.cc:422
Mesh * Outflow_impedance_master_mesh_pt
Pointer to the master impedance mesh when using flux control elements.
Definition: flux_control.cc:435
Mesh * Inflow_traction_mesh_pt
Definition: flux_control.cc:419
double Period
Period of oscillation.
Definition: flux_control.cc:450
unsigned Outflow_type
Definition: flux_control.cc:460
unsigned Bulk_mesh_id
Id of the fluid bulk mesh.
Definition: flux_control.cc:463
void setup_inflow_traction_elements()
Create the prescribed traction elements on the inflow.
Definition: flux_control.cc:878
double Amplitude
Amplitude of osciallation.
Definition: flux_control.cc:453
WomersleyOutflowImpedanceTube< QWomersleyElement< 1, 3 >, 1 > * Womersley_impedance_tube_pt
Pointer to impendance tube.
Definition: flux_control.cc:429
Definition: refineable_navier_stokes_elements.h:322
OomphInfo oomph_info
Definition: oomph_definitions.cc:319

References GlobalParameters::Amplitude, e(), MeshRefinement::error_estimator_pt, Global_Physical_Variables::height(), i, GlobalPhysicalParameters::L_impedance, Global_Parameters::Ldown, Global_Parameters::Lup, Mesh_Parameters::ly, Global_Parameters::Ly, Mesh_Parameters::ny, GlobalParameters::Ny, oomph::oomph_info, Global_Physical_Variables::Period, Global_Physical_Variables::prescribed_traction(), Global_Physical_Variables::Re, Global_Physical_Variables::ReSt, BL_Squash::squash_fct(), and oomph::NavierStokesTractionElement< ELEMENT >::traction_fct_pt.

◆ ~CollapsibleChannelProblem() [3/5]

template<class ELEMENT >
CollapsibleChannelProblem< ELEMENT >::~CollapsibleChannelProblem ( )
inline

Empty destructor.

298 {}

◆ CollapsibleChannelProblem() [4/5]

template<class ELEMENT >
CollapsibleChannelProblem< ELEMENT >::CollapsibleChannelProblem ( const unsigned &  nup,
const unsigned &  ncollapsible,
const unsigned &  ndown,
const unsigned &  ny,
const double &  lup,
const double &  lcollapsible,
const double &  ldown,
const double &  ly,
const double &  amplitude,
const double &  period 
)

Constructor : the arguments are the number of elements, the length of the domain and the amplitude and period of the oscillations

◆ ~CollapsibleChannelProblem() [4/5]

template<class ELEMENT >
CollapsibleChannelProblem< ELEMENT >::~CollapsibleChannelProblem ( )
inline

Empty destructor.

313 {}

◆ CollapsibleChannelProblem() [5/5]

template<class ELEMENT >
CollapsibleChannelProblem< ELEMENT >::CollapsibleChannelProblem ( const unsigned &  nup,
const unsigned &  ncollapsible,
const unsigned &  ndown,
const unsigned &  ny,
const double &  lup,
const double &  lcollapsible,
const double &  ldown,
const double &  ly,
const double &  limpedance,
const double &  amplitude,
const double &  period,
const unsigned &  outflow 
)

Constructor : the arguments are the number of elements, the length of the domain and the amplitude and period of the oscillations

◆ ~CollapsibleChannelProblem() [5/5]

template<class ELEMENT >
CollapsibleChannelProblem< ELEMENT >::~CollapsibleChannelProblem ( )
inline

Empty destructor.

296 {}

Member Function Documentation

◆ actions_after_adapt() [1/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_after_adapt
virtual

Actions after adapt: Rebuild the mesh of prescribed traction elements.

Reimplemented from oomph::Problem.

742 {
743  // Create prescribed-flux elements from all elements that are
744  // adjacent to boundary 5 and add them to surface mesh
746 
747  // Rebuild the global mesh
749 
750  // Loop over the traction elements to pass pointer to prescribed traction function
751  unsigned n_element=Surface_mesh_pt->nelement();
752  for(unsigned e=0;e<n_element;e++)
753  {
754  // Upcast from GeneralisedElement to NavierStokesTractionElement element
758 
759  // Set the pointer to the prescribed traction function
761  }
762 } // end of actions_after_adapt
void rebuild_global_mesh()
Definition: problem.cc:1533

References e(), Global_Physical_Variables::prescribed_traction(), and oomph::NavierStokesTractionElement< ELEMENT >::traction_fct_pt.

◆ actions_after_adapt() [2/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_after_adapt ( )
virtual

Actions after adapt: Rebuild the mesh of prescribed traction elements.

Reimplemented from oomph::Problem.

◆ actions_after_adapt() [3/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_after_adapt ( )
protectedvirtual

Actions after adapt: Rebuild the mesh of prescribed traction elements.

Reimplemented from oomph::Problem.

◆ actions_after_adapt() [4/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_after_adapt ( )
virtual

Actions after adapt: Rebuild the mesh of prescribed traction elements.

Reimplemented from oomph::Problem.

◆ actions_after_adapt() [5/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_after_adapt ( )
protectedvirtual

Actions after adapt: Rebuild the mesh of prescribed traction elements.

Reimplemented from oomph::Problem.

◆ actions_after_newton_solve() [1/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_after_newton_solve ( )
inlinevirtual

Update the problem after solve (empty)

Reimplemented from oomph::Problem.

272 {}

◆ actions_after_newton_solve() [2/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_after_newton_solve ( )
inlinevirtual

Update the problem after solve (empty)

Reimplemented from oomph::Problem.

292 {}

◆ actions_after_newton_solve() [3/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_after_newton_solve ( )
inlineprotectedvirtual

Update the problem after solve (empty)

Reimplemented from oomph::Problem.

350 {}

◆ actions_after_newton_solve() [4/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_after_newton_solve ( )
inlinevirtual

Update the problem after solve (empty)

Reimplemented from oomph::Problem.

330 {}

◆ actions_after_newton_solve() [5/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_after_newton_solve ( )
inlineprotectedvirtual

Update the problem after solve (empty)

Reimplemented from oomph::Problem.

348 {}

◆ actions_before_adapt() [1/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_before_adapt
virtual

Actions before adapt: Wipe the mesh of prescribed traction elements.

Reimplemented from oomph::Problem.

727 {
728  // Kill the traction elements and wipe surface mesh
730 
731  // Rebuild the global mesh.
733 
734 } // end of actions_before_adapt
void delete_traction_elements(Mesh *const &surface_mesh_pt)
Delete prescribed traction elements from the surface mesh.
Definition: collapsible_channel.cc:630

◆ actions_before_adapt() [2/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_before_adapt ( )
virtual

Actions before adapt: Wipe the mesh of prescribed traction elements.

Reimplemented from oomph::Problem.

◆ actions_before_adapt() [3/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_before_adapt ( )
protectedvirtual

Actions before adapt: Wipe the mesh of prescribed traction elements.

Reimplemented from oomph::Problem.

◆ actions_before_adapt() [4/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_before_adapt ( )
virtual

Actions before adapt: Wipe the mesh of prescribed traction elements.

Reimplemented from oomph::Problem.

◆ actions_before_adapt() [5/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_before_adapt ( )
protectedvirtual

Actions before adapt: Wipe the mesh of prescribed traction elements.

Reimplemented from oomph::Problem.

◆ actions_before_implicit_timestep() [1/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_before_implicit_timestep
virtual

Update the velocity boundary condition on the moving wall.

Execute the actions before timestep: Update the velocity boundary condition on the moving wall

Reimplemented from oomph::Problem.

701 {
702  // Update the domain shape
703  bulk_mesh_pt()->node_update();
704 
705  // Moving wall: No slip; this implies that the velocity needs
706  // to be updated in response to wall motion
707  unsigned ibound=3;
708  unsigned num_nod=bulk_mesh_pt()->nboundary_node(ibound);
709  for (unsigned inod=0;inod<num_nod;inod++)
710  {
711  // Which node are we dealing with?
712  Node* node_pt=bulk_mesh_pt()->boundary_node_pt(ibound,inod);
713 
714  // Apply no slip
716  }
717 } //end of actions_before_implicit_timestep
Definition: nodes.h:906
void apply_no_slip_on_moving_wall(Node *node_pt)
Definition: fsi.cc:48

References oomph::FSI_functions::apply_no_slip_on_moving_wall().

◆ actions_before_implicit_timestep() [2/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_before_implicit_timestep ( )
virtual

Update the velocity boundary condition on the moving wall.

Reimplemented from oomph::Problem.

◆ actions_before_implicit_timestep() [3/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_before_implicit_timestep ( )
protectedvirtual

Update the velocity boundary condition on the moving wall.

Reimplemented from oomph::Problem.

◆ actions_before_implicit_timestep() [4/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_before_implicit_timestep ( )
virtual

Update the velocity boundary condition on the moving wall.

Reimplemented from oomph::Problem.

◆ actions_before_implicit_timestep() [5/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_before_implicit_timestep ( )
protectedvirtual

Update the velocity boundary condition on the moving wall.

Reimplemented from oomph::Problem.

◆ actions_before_newton_convergence_check()

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_before_newton_convergence_check ( )
inlinevirtual

Update no slip before Newton convergence check.

Reimplemented from oomph::Problem.

334  {
335  // Moving wall: No slip; this implies that the velocity needs
336  // to be updated in response to wall motion
337  unsigned ibound=3;
338  unsigned num_nod=bulk_mesh_pt()->nboundary_node(ibound);
339  for (unsigned inod=0;inod<num_nod;inod++)
340  {
341  // Which node are we dealing with?
342  Node* node_pt=bulk_mesh_pt()->boundary_node_pt(ibound,inod);
343 
344  // Apply no slip
346  }
347  }

References oomph::FSI_functions::apply_no_slip_on_moving_wall().

◆ actions_before_newton_solve() [1/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_before_newton_solve
inlinevirtual

Update the problem specs before solve (empty)

Update the inflow and outflow boundary conditioner before solve.

Reimplemented from oomph::Problem.

269 {}

◆ actions_before_newton_solve() [2/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_before_newton_solve ( )
inlinevirtual

Update the problem specs before solve (empty)

Reimplemented from oomph::Problem.

289 {}

◆ actions_before_newton_solve() [3/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_before_newton_solve ( )
protectedvirtual

Update the problem specs before solve.

Reimplemented from oomph::Problem.

◆ actions_before_newton_solve() [4/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_before_newton_solve ( )
inlinevirtual

Update the problem specs before solve (empty)

Reimplemented from oomph::Problem.

327 {}

◆ actions_before_newton_solve() [5/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::actions_before_newton_solve ( )
protectedvirtual

Update the problem specs before solve.

Reimplemented from oomph::Problem.

◆ bulk_mesh_pt() [1/5]

template<class ELEMENT >
RefineableCollapsibleChannelMesh<ELEMENT>* CollapsibleChannelProblem< ELEMENT >::bulk_mesh_pt ( )
inline

Access function for the specific mesh.

259  {
260 
261  // Upcast from pointer to the Mesh base class to the specific
262  // element type that we're using here.
263  return dynamic_cast<RefineableCollapsibleChannelMesh<ELEMENT>*>
264  (Bulk_mesh_pt);
265 
266  } // end of access to bulk mesh

◆ bulk_mesh_pt() [2/5]

template<class ELEMENT >
MyAlgebraicCollapsibleChannelMesh<ELEMENT>* CollapsibleChannelProblem< ELEMENT >::bulk_mesh_pt ( )
inline

Access function for the specific mesh.

276  {
277 
278  // Upcast from pointer to the Mesh base class to the specific
279  // element type that we're using here.
280  return dynamic_cast<MyAlgebraicCollapsibleChannelMesh<ELEMENT>*>
281  (Bulk_mesh_pt);
282 
283  } // end of access to bulk mesh
Collapsible channel mesh with algebraic node update.
Definition: my_alg_channel_mesh.h:51

◆ bulk_mesh_pt() [3/5]

template<class ELEMENT >
RefineableCollapsibleChannelMesh<ELEMENT>* CollapsibleChannelProblem< ELEMENT >::bulk_mesh_pt ( )
inline

Access function for the fluid bulk mesh.

302  {
303  // Upcast from pointer to the Mesh base class to the specific
304  // element type that we're using here.
305  return dynamic_cast<RefineableCollapsibleChannelMesh<ELEMENT>*>
306  (Bulk_mesh_pt);
307 
308  } // end of access to bulk mesh

◆ bulk_mesh_pt() [4/5]

template<class ELEMENT >
RefineableCollapsibleChannelMesh<ELEMENT>* CollapsibleChannelProblem< ELEMENT >::bulk_mesh_pt ( )
inline

Access function for the specific mesh.

317  {
318 
319  // Upcast from pointer to the Mesh base class to the specific
320  // element type that we're using here.
321  return dynamic_cast<RefineableCollapsibleChannelMesh<ELEMENT>*>
322  (Bulk_mesh_pt);
323 
324  } // end of access to bulk mesh

◆ bulk_mesh_pt() [5/5]

template<class ELEMENT >
RefineableCollapsibleChannelMesh<ELEMENT>* CollapsibleChannelProblem< ELEMENT >::bulk_mesh_pt ( )
inline

Access function for the fluid bulk mesh.

300  {
301  // Upcast from pointer to the Mesh base class to the specific
302  // element type that we're using here.
303  return dynamic_cast<RefineableCollapsibleChannelMesh<ELEMENT>*>
304  (Bulk_mesh_pt);
305 
306  } // end of access to bulk mesh

◆ create_lagrange_multiplier_elements()

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::create_lagrange_multiplier_elements
private

Create elements that impose the prescribed boundary displacement.

Create elements that enforce prescribed boundary motion by Lagrange multiplilers

776 {
777  // Lagrange multiplier elements are located on boundary 3:
778  unsigned b=3;
779 
780  // How many bulk elements are adjacent to boundary b?
781  unsigned n_element = bulk_mesh_pt()->nboundary_element(b);
782 
783  // Loop over the bulk elements adjacent to boundary b?
784  for(unsigned e=0;e<n_element;e++)
785  {
786  // Get pointer to the bulk element that is adjacent to boundary b
787  ELEMENT* bulk_elem_pt = dynamic_cast<ELEMENT*>(
788  bulk_mesh_pt()->boundary_element_pt(b,e));
789 
790  //Find the index of the face of element e along boundary b
791  int face_index = bulk_mesh_pt()->face_index_at_boundary(b,e);
792 
793  // Create new element and add to mesh
796  bulk_elem_pt,face_index));
797  }
798 
799 
800  // Loop over the elements in the Lagrange multiplier element mesh
801  // for elements on the top boundary (boundary 3)
803  for(unsigned i=0;i<n_element;i++)
804  {
805  //Cast to a Lagrange multiplier element
809 
810  // Set the GeomObject that defines the boundary shape and
811  // specify which bulk boundary it's attached to
813 
814  // Loop over the nodes
815  unsigned nnod=el_pt->nnode();
816  for (unsigned j=0;j<nnod;j++)
817  {
818  Node* nod_pt = el_pt->node_pt(j);
819 
820  // Is the node also on boundary 2 or 4?
821  if ((nod_pt->is_on_boundary(2))||(nod_pt->is_on_boundary(4)))
822  {
823  // How many nodal values were used by the "bulk" element
824  // that originally created this node?
825  unsigned n_bulk_value=el_pt->nbulk_value(j);
826 
827  // The remaining ones are Lagrange multipliers and we pin them.
828  unsigned nval=nod_pt->nvalue();
829  for (unsigned j=n_bulk_value;j<nval;j++)
830  {
831  nod_pt->pin(j);
832  }
833  }
834  }
835  }
836 
837 } // end of create_lagrange_multiplier_elements
Scalar * b
Definition: benchVecAdd.cpp:17
SolidMesh * Lagrange_multiplier_mesh_pt
Pointers to meshes of Lagrange multiplier elements.
Definition: pseudo_solid_collapsible_channel.cc:419
void pin(const unsigned &i)
Pin the i-th stored variable.
Definition: nodes.h:385
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
Definition: nodes.h:483
unsigned & nbulk_value(const unsigned &n)
Definition: elements.h:4845
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
Definition: solid_traction_elements.h:1107
void set_boundary_shape_geom_object_pt(GeomObject *boundary_shape_geom_object_pt, const unsigned &boundary_number_in_bulk_mesh)
Definition: solid_traction_elements.h:1209
void add_element_pt(GeneralisedElement *const &element_pt)
Add a (pointer to) an element to the mesh.
Definition: mesh.h:617
virtual bool is_on_boundary() const
Definition: nodes.h:1373
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References b, oomph::Mesh::boundary_element_pt(), e(), oomph::Mesh::face_index_at_boundary(), i, oomph::Node::is_on_boundary(), j, oomph::Mesh::nboundary_element(), oomph::FaceElement::nbulk_value(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::Data::nvalue(), oomph::Data::pin(), and oomph::ImposeDisplacementByLagrangeMultiplierElement< ELEMENT >::set_boundary_shape_geom_object_pt().

◆ create_mesh_for_navier_stokes_preconditioner() [1/2]

template<class ELEMENT >
Mesh * CollapsibleChannelProblem< ELEMENT >::create_mesh_for_navier_stokes_preconditioner

Create a mesh for the NavierStokes Preconditioner.

Create a mesh for the NavierStokesSchurComplementPreconditioner.

1113 {
1114  //Vector to hold the meshes
1115  Vector<Mesh*> meshes;
1116 
1117  //Add the bulk mesh
1118  meshes.push_back(Bulk_mesh_pt);
1119 
1120  // Add the flux control master mesh if it exists
1122  {
1123  meshes.push_back(Outflow_flux_control_master_mesh_pt);
1124  }
1125 
1126  // Build "combined" mesh from vector of submeshes
1127  Mesh* mesh_pt = new Mesh(meshes);
1128 
1129  return mesh_pt;
1130 }
Mesh *& mesh_pt()
Return a pointer to the global mesh.
Definition: problem.h:1280

◆ create_mesh_for_navier_stokes_preconditioner() [2/2]

template<class ELEMENT >
Mesh* CollapsibleChannelProblem< ELEMENT >::create_mesh_for_navier_stokes_preconditioner ( )

Create a mesh for the NavierStokesSchurComplementPreconditioner.

◆ create_traction_elements() [1/3]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::create_traction_elements ( const unsigned &  b,
Mesh *const &  bulk_mesh_pt,
Mesh *const &  surface_mesh_pt 
)
private

Create the traction elements.

Create the prescribed traction elements on boundary b of the bulk mesh and stick them into the surface mesh.

599 {
600  // How many bulk elements are adjacent to boundary b?
601  unsigned n_element = bulk_mesh_pt->nboundary_element(b);
602 
603  // Loop over the bulk elements adjacent to boundary b
604  for(unsigned e=0;e<n_element;e++)
605  {
606  // Get pointer to the bulk element that is adjacent to boundary b
607  ELEMENT* bulk_elem_pt = dynamic_cast<ELEMENT*>
608  (bulk_mesh_pt->boundary_element_pt(b,e));
609 
610  //What is the index of the face of element e that lies along boundary b
611  int face_index = bulk_mesh_pt->face_index_at_boundary(b,e);
612 
613  // Build the corresponding prescribed-traction element
614  NavierStokesTractionElement<ELEMENT>* traction_element_pt =
615  new NavierStokesTractionElement<ELEMENT>(bulk_elem_pt,face_index);
616 
617  //Add the prescribed-flux element to the surface mesh
618  surface_mesh_pt->add_element_pt(traction_element_pt);
619 
620  } //end of loop over bulk elements adjacent to boundary b
621 
622 } // end of create_traction_elements

References oomph::Mesh::add_element_pt(), b, oomph::Mesh::boundary_element_pt(), e(), oomph::Mesh::face_index_at_boundary(), and oomph::Mesh::nboundary_element().

◆ create_traction_elements() [2/3]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::create_traction_elements ( const unsigned &  b,
Mesh *const &  bulk_mesh_pt,
Mesh *const &  surface_mesh_pt 
)
private

Create the prescribed traction elements on boundary b of the bulk mesh and stick them into the surface mesh.

◆ create_traction_elements() [3/3]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::create_traction_elements ( const unsigned &  b,
Mesh *const &  bulk_mesh_pt,
Mesh *const &  surface_mesh_pt 
)
private

Create the prescribed traction elements on boundary b of the bulk mesh and stick them into the surface mesh.

◆ delete_inflow_traction_elements() [1/2]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::delete_inflow_traction_elements
private

Delete prescribed traction elements from the surface mesh.

Delete traction elements and wipe the surface mesh.

913 {
914  // How many surface elements are in the surface mesh
915  unsigned n_element = Inflow_traction_mesh_pt->nelement();
916 
917  // Loop over the surface elements
918  for(unsigned e=0;e<n_element;e++)
919  {
920  // Kill element
922  }
923 
924  // Wipe the mesh
926 
927 } // end of delete_traction_elements
void flush_element_and_node_storage()
Definition: mesh.h:407

References e().

◆ delete_inflow_traction_elements() [2/2]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::delete_inflow_traction_elements ( )
private

Delete prescribed traction elements from the surface mesh.

◆ delete_lagrange_multiplier_elements()

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::delete_lagrange_multiplier_elements
private

Delete elements that enforce prescribed boundary motion by Lagrange multiplilers

Delete elements that impose the prescribed boundary displacement and wipe the associated mesh

848 {
849  // How many surface elements are in the surface mesh
850  unsigned n_element = Lagrange_multiplier_mesh_pt->nelement();
851 
852  // Loop over the surface elements
853  for(unsigned e=0;e<n_element;e++)
854  {
855  // Kill surface element
857  }
858 
859  // Wipe the mesh
861 
862 } // end of delete_lagrange_multiplier_elements

References e().

◆ delete_outflow_flux_control_elements() [1/2]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::delete_outflow_flux_control_elements
private

Delete flux control elements from outflow boundary.

1138 {
1139  // Delete the master flux control element
1141 
1142  // Wipe the mesh
1144 
1145  // Loop over all flux control elements at outflow
1146  unsigned n_bound_el=Outflow_flux_control_sub_mesh_pt->nelement();
1147  for (unsigned e=0;e<n_bound_el;e++)
1148  {
1149  //Delete the element
1151  }
1152 
1153  // Wipe the mesh
1155 }

References e().

◆ delete_outflow_flux_control_elements() [2/2]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::delete_outflow_flux_control_elements ( )
private

Delete flux control elements from outflow boundary.

◆ delete_outflow_impedance_elements() [1/2]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::delete_outflow_impedance_elements
private

Delete impedance elements from outflow boundary.

1227 {
1228  if (Outflow_type==1)
1229  {
1230  // Loop over all elements at outflow
1231  unsigned n_bound_el=Outflow_impedance_mesh_pt->nelement();
1232  for (unsigned e=0;e<n_bound_el;e++)
1233  {
1234  //Delete the element
1236  }
1237 
1238  // Wipe the mesh
1240 
1241  // Delete the impedance tube
1244  }
1245  else
1246  {
1247  // Delete the elements in the master mesh
1250 
1251  // Wipe the mesh
1253 
1254  // Loop over all flux control elements at outflow
1255  unsigned n_bound_el=Outflow_flux_control_sub_mesh_pt->nelement();
1256  for (unsigned e=0;e<n_bound_el;e++)
1257  {
1258  //Delete the element
1260  }
1261 
1262  // Wipe the mesh
1264 
1265  // Delete the impedance tube
1268  }
1269 
1270 }

References e().

◆ delete_outflow_impedance_elements() [2/2]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::delete_outflow_impedance_elements ( )
private

◆ delete_traction_elements() [1/3]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::delete_traction_elements ( Mesh *const &  surface_mesh_pt)
private

Delete prescribed traction elements from the surface mesh.

Delete traction elements and wipe the surface mesh.

631 {
632  // How many surface elements are in the surface mesh
633  unsigned n_element = surface_mesh_pt->nelement();
634 
635  // Loop over the surface elements
636  for(unsigned e=0;e<n_element;e++)
637  {
638  // Kill surface element
639  delete surface_mesh_pt->element_pt(e);
640  }
641 
642  // Wipe the mesh
643  surface_mesh_pt->flush_element_and_node_storage();
644 
645 } // end of delete_traction_elements

References e(), oomph::Mesh::element_pt(), oomph::Mesh::flush_element_and_node_storage(), and oomph::Mesh::nelement().

◆ delete_traction_elements() [2/3]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::delete_traction_elements ( Mesh *const &  surface_mesh_pt)
private

Delete prescribed traction elements from the surface mesh.

◆ delete_traction_elements() [3/3]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::delete_traction_elements ( Mesh *const &  surface_mesh_pt)
private

Delete prescribed traction elements from the surface mesh.

◆ doc_solution() [1/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::doc_solution ( DocInfo &  doc_info,
ofstream &  trace_file 
)

Doc the solution.

545 {
546  ofstream some_file;
547  char filename[100];
548 
549  // Number of plot points
550  unsigned npts;
551  npts=5;
552 
553  // Output solution
554  sprintf(filename,"%s/soln%i.dat",doc_info.directory().c_str(),
555  doc_info.number());
556  some_file.open(filename);
557  bulk_mesh_pt()->output(some_file,npts);
558  some_file.close();
559 
560 
561  // Get the position of the midpoint on the geometric object
562  Vector<double> zeta(1);
563  zeta[0]=0.5*Lcollapsible;
564  Vector<double> wall_point(2);
565  Wall_pt->position(zeta,wall_point);
566 
567  // Write trace file
568  trace_file << time_pt()->time() << " "
569  << wall_point[1] << " "
570  << Left_node_pt->value(0) << " "
571  << Right_node_pt->value(0) << " "
572  << std::endl;
573 
574  // Output wall shape
575  sprintf(filename,"%s/wall%i.dat",doc_info.directory().c_str(),
576  doc_info.number());
577  some_file.open(filename);
578  unsigned nplot=100;
579  for (unsigned i=0;i<nplot;i++)
580  {
581  zeta[0]=double(i)/double(nplot-1)*Lcollapsible;
582  Wall_pt->position(zeta,wall_point);
583  some_file << wall_point[0] << " "
584  << wall_point[1] << std::endl;
585  }
586  some_file.close();
587 
588 } // end_of_doc_solution
void position(const unsigned &t, const Vector< double > &zeta, Vector< double > &r) const
Definition: collapsible_channel.cc:142
std::string directory() const
Output directory.
Definition: oomph_utilities.h:524
unsigned & number()
Number used (e.g.) for labeling output files.
Definition: oomph_utilities.h:554
double value(const unsigned &i) const
Definition: nodes.cc:2408
double & time()
Return the current value of the continuous time.
Definition: timesteppers.h:123
EIGEN_STRONG_INLINE const Eigen::CwiseBinaryOp< Eigen::internal::scalar_zeta_op< typename DerivedX::Scalar >, const DerivedX, const DerivedQ > zeta(const Eigen::ArrayBase< DerivedX > &x, const Eigen::ArrayBase< DerivedQ > &q)
Definition: SpecialFunctionsArrayAPI.h:152
string filename
Definition: MergeRestartFiles.py:39

References oomph::DocInfo::directory(), MergeRestartFiles::filename, i, oomph::DocInfo::number(), and Eigen::zeta().

◆ doc_solution() [2/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::doc_solution ( DocInfo &  doc_info,
ofstream &  trace_file 
)

Doc the solution.

◆ doc_solution() [3/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::doc_solution ( DocInfo &  doc_info,
ofstream &  trace_file 
)

Doc the solution.

◆ doc_solution() [4/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::doc_solution ( DocInfo &  doc_info,
ofstream &  trace_file 
)

Doc the solution.

◆ doc_solution() [5/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::doc_solution ( DocInfo &  doc_info,
ofstream &  trace_file 
)

Doc the solution.

◆ outflow_impedance_master_mesh_pt() [1/2]

template<class ELEMENT >
Mesh* & CollapsibleChannelProblem< ELEMENT >::outflow_impedance_master_mesh_pt ( )
inline

Access function to the pointer to the master impedance mesh which is used when using impedance boundary conditions with flux control elements

313  {
315  }

◆ outflow_impedance_master_mesh_pt() [2/2]

template<class ELEMENT >
Mesh* & CollapsibleChannelProblem< ELEMENT >::outflow_impedance_master_mesh_pt ( )
inline

Access function to the pointer to the master impedance mesh which is used when using impedance boundary conditions with flux control elements

311  {
313  }

◆ refine_elements_based_on_x_coord() [1/2]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::refine_elements_based_on_x_coord ( const double &  x_min,
const double &  x_max 
)

Refine any element whoes centre node lies between x coorodinates x_min and x_max

790  {
791  // Vector to store pointers to elements to be refined
792  Vector<RefineableElement*> element_pt;
793 
794  // Get elements we want to refine
795  unsigned n_el = Bulk_mesh_pt->nelement();
796 
797  for (unsigned e=0; e<n_el; e++)
798  {
799  // Get element
800  RefineableElement* el_pt =
801  dynamic_cast<RefineableElement*>(Bulk_mesh_pt->element_pt(e));
802 
803  // Get x-coord of node at centre
804  double x_centre=el_pt->node_pt(4)->x(0);
805 
806  // Add to Vector if to be refined
807  if ((x_centre>=x_min) && (x_centre<=x_max))
808  {
809  element_pt.push_back(el_pt);
810  }
811  }
812 
813  // Refine the elements
814  oomph_info << "Number of elements to refine between x=" << x_min
815  << " & " << x_max << " is "
816  << element_pt.size() << "\n";
818  }
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
void refine_selected_elements(const Vector< unsigned > &elements_to_be_refined)
Definition: problem.cc:14898
Definition: refineable_elements.h:97

References e(), oomph::FiniteElement::node_pt(), oomph::oomph_info, and oomph::Node::x().

◆ refine_elements_based_on_x_coord() [2/2]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::refine_elements_based_on_x_coord ( const double &  x_min,
const double &  x_max 
)

Refine any element whoes centre node lies between x coorodinates x_min and x_max

◆ set_initial_condition() [1/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::set_initial_condition
virtual

Apply initial conditions.

Apply initial conditions: Impulsive start from steady Poiseuille.

Apply initial conditions: Impulsive start from steady Poiseuille flow.

Reimplemented from oomph::Problem.

654 {
655 
656  // Check that timestepper is from the BDF family
657  if (time_stepper_pt()->type()!="BDF")
658  {
659  std::ostringstream error_stream;
660  error_stream
661  << "Timestepper has to be from the BDF family!\n"
662  << "You have specified a timestepper from the "
663  << time_stepper_pt()->type() << " family" << std::endl;
664 
665  throw OomphLibError(error_stream.str(),
668  }
669 
670  // Update the mesh
671  bulk_mesh_pt()->node_update();
672 
673  // Loop over the nodes to set initial guess everywhere
674  unsigned num_nod = bulk_mesh_pt()->nnode();
675  for (unsigned n=0;n<num_nod;n++)
676  {
677  // Get nodal coordinates
678  Vector<double> x(2);
679  x[0]=bulk_mesh_pt()->node_pt(n)->x(0);
680  x[1]=bulk_mesh_pt()->node_pt(n)->x(1);
681 
682  // Assign initial condition: Steady Poiseuille flow
683  bulk_mesh_pt()->node_pt(n)->set_value(0,6.0*(x[1]/Ly)*(1.0-(x[1]/Ly)));
684  bulk_mesh_pt()->node_pt(n)->set_value(1,0.0);
685  }
686 
687  // Assign initial values for an impulsive start
688  bulk_mesh_pt()->assign_initial_values_impulsive();
689 
690 
691 } // end of set_initial_condition
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Definition: oomph_definitions.h:222
std::string type() const
Definition: timesteppers.h:490
type
Definition: compute_granudrum_aor.py:141
list x
Definition: plotDoE.py:28
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References Global_Parameters::Ly, n, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, compute_granudrum_aor::type, and plotDoE::x.

◆ set_initial_condition() [2/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::set_initial_condition ( )
virtual

Apply initial conditions.

Reimplemented from oomph::Problem.

◆ set_initial_condition() [3/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::set_initial_condition ( )
protectedvirtual

Apply initial conditions.

Reimplemented from oomph::Problem.

◆ set_initial_condition() [4/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::set_initial_condition ( )
virtual

Apply initial conditions.

Reimplemented from oomph::Problem.

◆ set_initial_condition() [5/5]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::set_initial_condition ( )
protectedvirtual

Apply initial conditions.

Reimplemented from oomph::Problem.

◆ set_parallel_outflow() [1/2]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::set_parallel_outflow
protected

Apply parallel flow on outlet.

1419 {
1420  // Outflow is boundary 1
1421  unsigned b = 1;
1422 
1423  // Loop over all elements on this boundary
1424  unsigned n_bound_el=Bulk_mesh_pt->nboundary_element(b);
1425  for (unsigned e=0;e<n_bound_el;e++)
1426  {
1427  // Assign parallel flow
1428  bulk_mesh_pt()->node_pt(e)->set_value(1,0.0);
1429  }
1430 }

References b, and e().

◆ set_parallel_outflow() [2/2]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::set_parallel_outflow ( )
protected

Apply parallel flow on outlet.

◆ set_poiseuille_outflow() [1/2]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::set_poiseuille_outflow
protected

Apply Poiseuille flow on outlet.

1394 {
1395  // Outflow is boundary 1
1396  unsigned b = 1;
1397 
1398  // Loop over all elements on this boundary
1399  unsigned n_bound_el=Bulk_mesh_pt->nboundary_element(b);
1400  for (unsigned e=0;e<n_bound_el;e++)
1401  {
1402  // Get nodal coordinates
1403  Vector<double> x(2);
1404  x[0]=bulk_mesh_pt()->node_pt(e)->x(0);
1405  x[1]=bulk_mesh_pt()->node_pt(e)->x(1);
1406 
1407  // Assign Poiseuille flow
1408  bulk_mesh_pt()->node_pt(e)->set_value(0,6.0*(x[1]/Ly)*(1.0-(x[1]/Ly)));
1409  bulk_mesh_pt()->node_pt(e)->set_value(1,0.0);
1410  }
1411 
1412 }

References b, e(), Global_Parameters::Ly, and plotDoE::x.

◆ set_poiseuille_outflow() [2/2]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::set_poiseuille_outflow ( )
protected

Apply Poiseuille flow on outlet.

◆ setup_inflow_traction_elements() [1/2]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::setup_inflow_traction_elements
private

Create the prescribed traction elements on the inflow.

Create the traction elements.

879 {
880  // inflow is boundary 5
881  unsigned b=5;
882 
883  // How many bulk elements are adjacent to boundary b?
884  unsigned n_element = Bulk_mesh_pt->nboundary_element(b);
885 
886  // Loop over the bulk elements adjacent to boundary b
887  for(unsigned e=0;e<n_element;e++)
888  {
889  // Get pointer to the bulk element that is adjacent to boundary b
890  ELEMENT* bulk_elem_pt = dynamic_cast<ELEMENT*>
891  (Bulk_mesh_pt->boundary_element_pt(b,e));
892 
893  //What is the index of the face of element e that lies along boundary b
894  int face_index = Bulk_mesh_pt->face_index_at_boundary(b,e);
895 
896  // Build the corresponding prescribed-traction element
897  NavierStokesTractionElement<ELEMENT>* traction_element_pt =
898  new NavierStokesTractionElement<ELEMENT>(bulk_elem_pt,face_index);
899 
900  //Add the prescribed-flux element to the surface mesh
901  Inflow_traction_mesh_pt->add_element_pt(traction_element_pt);
902 
903  } //end of loop over bulk elements adjacent to boundary b
904 
905 }

References b, and e().

◆ setup_inflow_traction_elements() [2/2]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::setup_inflow_traction_elements ( )
private

Create the prescribed traction elements on the inflow.

◆ setup_outflow_flux_control_elements() [1/2]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::setup_outflow_flux_control_elements
private

Attach flux control elements to outflow boundary.

1163 {
1164  // Attach elements to apply traction on boundary 1
1165  unsigned b = 1;
1166 
1167  // Loop over all elements on this boundary
1168  unsigned n_bound_el=Bulk_mesh_pt->nboundary_element(b);
1169  for (unsigned e=0;e<n_bound_el;e++)
1170  {
1171  // Get pointer to bulk element
1172  ELEMENT* bulk_elem_pt = dynamic_cast<ELEMENT*>(
1173  Bulk_mesh_pt->boundary_element_pt(b,e));
1174 
1175  // Get the index of the face of element e along boundary b
1176  int face_index = Bulk_mesh_pt->face_index_at_boundary(b,e);
1177 
1178  // Build the corresponding flux control element
1179  NavierStokesFluxControlElement<ELEMENT>* flux_element_pt = new
1180  NavierStokesFluxControlElement<ELEMENT>(bulk_elem_pt, face_index);
1181 
1182  //Add the new element to its mesh
1184  }
1185 
1186 
1187  // Build master element
1188  NetFluxControlElement* flux_control_el_pt = new NetFluxControlElement(
1191 
1192 
1193  // Set the block id for the pressure unknown in this element for the
1194  // preconditioning, in 2D the Navier-Stokes pressure is in block 2
1195  flux_control_el_pt->dof_number_for_unknown() = 2;
1196 
1197  // Add NetFluxControlElement to its mesh
1199  add_element_pt(flux_control_el_pt);
1200 
1201  // Get pointer to the outflow pressure data
1203  flux_control_el_pt->pressure_data_pt();
1204 
1205  // Loop over the elements in the sub mesh and pass
1206  // Global_Physical_Variables::Pout_data_pt to the element
1207  unsigned n_el = Outflow_flux_control_sub_mesh_pt->nelement();
1208  for (unsigned e=0; e< n_el; e++)
1209  {
1210  // Get pointer to the element
1211  GeneralisedElement* el_pt =
1213 
1214  // Dynamic cast
1215  dynamic_cast<NavierStokesFluxControlElement<ELEMENT>* >(el_pt)->
1216  add_pressure_data(Global_Physical_Variables::Pout_data_pt);
1217  }
1218 
1219 }
double Prescribed_volume_flux
Prescribed volume flux: set to -1 for value consistent with Re.
Definition: flux_control.cc:447
Definition: elements.h:73
Definition: navier_stokes_flux_control_elements.h:351
Definition: flux_control_elements_bk.h:54
unsigned & dof_number_for_unknown()
Definition: navier_stokes_flux_control_elements.h:229
Data * pressure_data_pt() const
Definition: flux_control_elements_bk.h:104
Data * Pout_data_pt
Pointer to Data holding downstream pressure load.
Definition: flux_control.cc:266

References b, oomph::NetFluxControlElement< ELEMENT >::dof_number_for_unknown(), e(), Global_Physical_Variables::Pout_data_pt, GlobalPhysicalParameters::Prescribed_volume_flux, and oomph::NetFluxControlElement< ELEMENT >::pressure_data_pt().

◆ setup_outflow_flux_control_elements() [2/2]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::setup_outflow_flux_control_elements ( )
private

Attach flux control elements to outflow boundary.

◆ setup_outflow_impedance_elements() [1/2]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::setup_outflow_impedance_elements
private

Attach impedance elements to outflow boundary.

1277 {
1278  // Check we are at time t=0, otherwise this function will not work
1279  // since an ImpedanceTube is contstructed so it's been at steady state
1280  // for all previous time.
1281  if (time_stepper_pt()->time()>0.0)
1282  {
1283  std::ostringstream error_stream;
1284  error_stream
1285  << "Impedance is set up assuming problem has been at rest for all previous "
1286  << "times, \ndid you mean to set up the impedance elements at time="
1287  << time_stepper_pt()->time() << " ?\n";
1288 
1289  throw OomphLibError(error_stream.str(),
1292  }
1293 
1294  // Elements apply traction on boundary 1
1295  unsigned b = 1;
1296 
1297  // Loop over all elements on this boundary
1298  unsigned n_bound_el=Bulk_mesh_pt->nboundary_element(b);
1299 
1300  if (Outflow_type==1)
1301  {
1302  for (unsigned e=0;e<n_bound_el;e++)
1303  {
1304  // Get pointer to bulk element
1305  ELEMENT* bulk_elem_pt = dynamic_cast<ELEMENT*>(
1306  Bulk_mesh_pt->boundary_element_pt(b,e));
1307 
1308  // Get the index of the face of element e along boundary b
1309  int face_index = Bulk_mesh_pt->face_index_at_boundary(b,e);
1310 
1311  // Build the corresponding prescribed traction element
1313  <ELEMENT,QWomersleyElement<1,3>,1>* traction_element_pt =
1315  <ELEMENT,QWomersleyElement<1,3>,1>(bulk_elem_pt,face_index);
1316 
1317  //Add the prescribed traction element to the mesh
1318  Outflow_impedance_mesh_pt->add_element_pt(traction_element_pt);
1319  }
1320 
1321  // fixed coord in bulk mesh which is constant at the outflow
1322  unsigned fixed_coordinate=0;
1323 
1324  // nodal index of velocity component which defines the outflow
1325  unsigned v_index=0;
1326 
1327  // Build Womersley impedance tube and let it provide the
1328  // outflow traction to the elements in the Outflow_traction_mesh_pt.
1331  (L_impedance,
1333  fixed_coordinate,
1334  v_index);
1335  }
1336  else
1337  {
1338  // Loop over all elements on this boundary
1339  unsigned n_bound_el=Bulk_mesh_pt->nboundary_element(b);
1340  for (unsigned e=0;e<n_bound_el;e++)
1341  {
1342  // Get pointer to bulk element
1343  ELEMENT* bulk_elem_pt = dynamic_cast<ELEMENT*>(
1344  Bulk_mesh_pt->boundary_element_pt(b,e));
1345 
1346  // Get the index of the face of element e along boundary b
1347  int face_index = Bulk_mesh_pt->face_index_at_boundary(b,e);
1348 
1349  // Build the corresponding flux control element
1350  NavierStokesFluxControlElement<ELEMENT>* flux_element_pt = new
1351  NavierStokesFluxControlElement<ELEMENT>(bulk_elem_pt, face_index);
1352 
1353  //Add the new element to its mesh
1355  }
1356 
1357  // fixed coord in bulk mesh which is constant at the outflow
1358  unsigned fixed_coordinate=0;
1359 
1360  // nodal index of velocity component which defines the outflow
1361  unsigned v_index=0;
1362 
1363  // Build Womersley impedance tube and let it provide the
1364  // outflow traction to the elements in the Outflow_traction_mesh_pt.
1367  L_impedance,
1369  fixed_coordinate,
1370  v_index);
1371 
1372  // Build the pressure control element and add to the master mesh
1373  NavierStokesWomersleyPressureControlElement* pressure_control_element
1376 
1377  Outflow_impedance_master_mesh_pt->add_element_pt(pressure_control_element);
1378 
1379  // Build the flux control master element and add to the master mesh
1382  (Outflow_flux_control_sub_mesh_pt, pressure_control_element);
1383 
1384  Outflow_impedance_master_mesh_pt->add_element_pt(flux_control_element);
1385  }
1386 }
Definition: womersley_elements.h:1979
Definition: womersley_elements.h:2578
Definition: womersley_elements.h:2733
double & time()
Return the current value of continuous time.
Definition: problem.cc:11531
Definition: womersley_elements.h:632
double & time()
Return current value of continous time.
Definition: timesteppers.h:332
Definition: womersley_elements.h:1828

References b, e(), GlobalPhysicalParameters::L_impedance, OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ setup_outflow_impedance_elements() [2/2]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::setup_outflow_impedance_elements ( )
private

◆ switch_off_wall_oscillations() [1/2]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::switch_off_wall_oscillations ( )
inline

Function to switch off wall oscillations.

330  {
332  }
void enable_remain_steady_at_maximum_amplitude()
Definition: flux_control.cc:153

◆ switch_off_wall_oscillations() [2/2]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::switch_off_wall_oscillations ( )
inline

Function to switch off wall oscillations.

◆ unsteady_run() [1/2]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::unsteady_run ( string  directory_for_data,
double  nstep,
const bool &  validation_run = false 
)

Run unsteady problem.

1438 {
1439  // Set volume flux consistent with Re
1440  Prescribed_volume_flux = 1.0;
1441 
1442  // Pressure/applied traction on the left boundary: This is consistent with
1443  // steady Poiseuille flow
1446 
1447  DocInfo doc_info;
1448  doc_info.set_directory(directory_for_data);
1449 
1450  // Open a trace file
1451  ofstream trace_file;
1452  char filename[100];
1453  sprintf(filename,"%s/trace.dat",doc_info.directory().c_str());
1454  trace_file.open(filename);
1455 
1456  // Number of timesteps per period
1457  unsigned nsteps_per_period=40;
1458 
1459  //Timestep:
1460  double dt=Period/double(nsteps_per_period);
1461 
1462  if (validation_run)
1463  {
1464  nstep=10;
1465  dt=0.25;
1466  }
1467 
1468  oomph_info << "Timestep=" << dt << "\n";
1469 
1470  // Start time
1471  double t_min=0.0;
1472 
1473  // Initialise timestep and set initial conditions
1474  time_pt()->time()=t_min;
1475  initialise_dt(dt);
1477 
1478  // Output the initial solution
1479  doc_solution(doc_info, trace_file);
1480 
1481  // Step number
1482  doc_info.number()++;
1483 
1484  // Set targets for spatial adaptivity
1485  bulk_mesh_pt()->max_permitted_error()=1.0e-3;
1486  bulk_mesh_pt()->min_permitted_error()=1.0e-5;
1487 
1488  // Setup impedance tube so its initial conditions
1489  // correspond to an impulsive start from the current flow rate
1491  {
1492  double q_initial=Womersley_impedance_tube_pt->
1493  total_volume_flux_into_impedance_tube();
1494  oomph_info << "q_initial=" << q_initial << "\n";
1496  dt,
1497  q_initial,
1498  new BDF<2>);
1499  }
1500 
1501  // Timestepping loop
1502  for (unsigned istep=0;istep<nstep;istep++)
1503  {
1504  oomph_info << "\n\nNewton solve: " << istep << "\n";
1505  oomph_info << "-----------------\n";
1506 
1507  // Solve the problem
1509 
1510  // Outpt the solution
1511  doc_solution(doc_info, trace_file);
1512 
1513  // Step number
1514  doc_info.number()++;
1515  }
1516 
1517  trace_file.close();
1518 
1519 }
void set_initial_condition()
Apply initial conditions.
Definition: collapsible_channel.cc:653
void doc_solution(DocInfo &doc_info, ofstream &trace_file)
Doc the solution.
Definition: collapsible_channel.cc:543
Definition: oomph_utilities.h:499
void set_directory(const std::string &directory)
Definition: oomph_utilities.cc:298
void initialise_dt(const double &dt)
Definition: problem.cc:13231
void unsteady_newton_solve(const double &dt)
Definition: problem.cc:10953
void setup()
Definition: womersley_elements.h:1187
double P_up
Default pressure on the left boundary.
Definition: fsi_collapsible_channel.cc:183

References oomph::DocInfo::directory(), MergeRestartFiles::filename, GlobalPhysicalParameters::L_impedance, Global_Parameters::Ldown, Global_Parameters::Lup, oomph::DocInfo::number(), oomph::oomph_info, Global_Physical_Variables::P_up, Global_Physical_Variables::Period, GlobalPhysicalParameters::Prescribed_volume_flux, Global_Physical_Variables::ReSt, and oomph::DocInfo::set_directory().

◆ unsteady_run() [2/2]

template<class ELEMENT >
void CollapsibleChannelProblem< ELEMENT >::unsteady_run ( string  directory_for_data,
double  nstep,
const bool &  validation_run = false 
)

Run unsteady problem.

Member Data Documentation

◆ Amplitude

template<class ELEMENT >
double CollapsibleChannelProblem< ELEMENT >::Amplitude
private

Amplitude of osciallation.

◆ Bulk_mesh_id

template<class ELEMENT >
unsigned CollapsibleChannelProblem< ELEMENT >::Bulk_mesh_id
private

Id of the fluid bulk mesh.

◆ Bulk_mesh_pt [1/3]

template<class ELEMENT >
RefineableCollapsibleChannelMesh< ELEMENT > * CollapsibleChannelProblem< ELEMENT >::Bulk_mesh_pt
private

Pointer to the "bulk" mesh.

◆ Bulk_mesh_pt [2/3]

template<class ELEMENT >
MyAlgebraicCollapsibleChannelMesh<ELEMENT>* CollapsibleChannelProblem< ELEMENT >::Bulk_mesh_pt
private

Pointer to the "bulk" mesh.

◆ Bulk_mesh_pt [3/3]

template<class ELEMENT >
ElasticRefineableCollapsibleChannelMesh<ELEMENT>* CollapsibleChannelProblem< ELEMENT >::Bulk_mesh_pt
private

Pointer to the "bulk" mesh.

◆ Constitutive_law_pt

template<class ELEMENT >
ConstitutiveLaw* CollapsibleChannelProblem< ELEMENT >::Constitutive_law_pt
private

Constitutive law used to determine the mesh deformation.

◆ Inflow_traction_mesh_pt

template<class ELEMENT >
Mesh * CollapsibleChannelProblem< ELEMENT >::Inflow_traction_mesh_pt
private

Pointer to the "surface" mesh that contains the applied traction elements at the inflow

◆ L_impedance

template<class ELEMENT >
double CollapsibleChannelProblem< ELEMENT >::L_impedance
private

Length of optional impedance tube.

◆ Lagrange_multiplier_mesh_pt

template<class ELEMENT >
SolidMesh* CollapsibleChannelProblem< ELEMENT >::Lagrange_multiplier_mesh_pt
private

Pointers to meshes of Lagrange multiplier elements.

◆ Lcollapsible

template<class ELEMENT >
double CollapsibleChannelProblem< ELEMENT >::Lcollapsible
private

x-length in the "collapsible" part of the channel

◆ Ldown

template<class ELEMENT >
double CollapsibleChannelProblem< ELEMENT >::Ldown
private

x-length in the downstream part of the channel

◆ Left_node_pt

template<class ELEMENT >
Node * CollapsibleChannelProblem< ELEMENT >::Left_node_pt
private

Pointer to the left control node.

◆ Lup

template<class ELEMENT >
double CollapsibleChannelProblem< ELEMENT >::Lup
private

x-length in the upstream part of the channel

◆ Ly

template<class ELEMENT >
double CollapsibleChannelProblem< ELEMENT >::Ly
private

Transverse length.

◆ Ncollapsible

template<class ELEMENT >
unsigned CollapsibleChannelProblem< ELEMENT >::Ncollapsible
private

Number of elements in the x direction in the "collapsible" part of the channel

◆ Ndown

template<class ELEMENT >
unsigned CollapsibleChannelProblem< ELEMENT >::Ndown
private

Number of elements in the x direction in the downstream part of the channel.

◆ Nup

template<class ELEMENT >
unsigned CollapsibleChannelProblem< ELEMENT >::Nup
private

Number of elements in the x direction in the upstream part of the channel.

◆ Ny

template<class ELEMENT >
unsigned CollapsibleChannelProblem< ELEMENT >::Ny
private

Number of elements across the channel.

◆ Outflow_flux_control_master_mesh_pt

template<class ELEMENT >
Mesh * CollapsibleChannelProblem< ELEMENT >::Outflow_flux_control_master_mesh_pt
private

Pointer to mesh containing the net flux control element (only!)

◆ Outflow_flux_control_sub_mesh_pt

template<class ELEMENT >
Mesh * CollapsibleChannelProblem< ELEMENT >::Outflow_flux_control_sub_mesh_pt
private

Pointer to mesh of flux control elements at outflow.

◆ Outflow_impedance_master_mesh_pt

template<class ELEMENT >
Mesh * CollapsibleChannelProblem< ELEMENT >::Outflow_impedance_master_mesh_pt
private

Pointer to the master impedance mesh when using flux control elements.

◆ Outflow_impedance_mesh_pt

template<class ELEMENT >
Mesh * CollapsibleChannelProblem< ELEMENT >::Outflow_impedance_mesh_pt
private

Pointer to the impedance mesh.

◆ Outflow_type

template<class ELEMENT >
unsigned CollapsibleChannelProblem< ELEMENT >::Outflow_type
private

Outflow boundary type: 0: prescribed flux boundary conditions 1: impedance boundary conditions 2: prescribed outflow Otherwise we have pressure driven flow with zero pressure at outlet

◆ Period

template<class ELEMENT >
double CollapsibleChannelProblem< ELEMENT >::Period
private

Period of oscillation.

◆ Prescribed_volume_flux

template<class ELEMENT >
double CollapsibleChannelProblem< ELEMENT >::Prescribed_volume_flux
private

Prescribed volume flux: set to -1 for value consistent with Re.

◆ Right_node_pt

template<class ELEMENT >
Node * CollapsibleChannelProblem< ELEMENT >::Right_node_pt
private

Pointer to right control node.

◆ Surface_mesh_pt

template<class ELEMENT >
Mesh * CollapsibleChannelProblem< ELEMENT >::Surface_mesh_pt
private

Pointer to the "surface" mesh that contains the applied traction elements

◆ Wall_pt

template<class ELEMENT >
OscillatingWall * CollapsibleChannelProblem< ELEMENT >::Wall_pt
private

Pointer to the geometric object that parametrises the "collapsible" wall.

◆ Womersley_impedance_tube_pt

template<class ELEMENT >
WomersleyOutflowImpedanceTube< QWomersleyElement< 1, 3 >, 1 > * CollapsibleChannelProblem< ELEMENT >::Womersley_impedance_tube_pt
private

Pointer to impendance tube.


The documentation for this class was generated from the following files: