FSICollapsibleChannelProblem< ELEMENT > Class Template Reference

Problem class. More...

#include <fsi_chan_problem.h>

+ Inheritance diagram for FSICollapsibleChannelProblem< ELEMENT >:

Public Member Functions

 FSICollapsibleChannelProblem (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 bool &displ_control, const bool &steady_flag)
 Constructor for the collapsible channel problem. More...
 
 ~FSICollapsibleChannelProblem ()
 Destructor. More...
 
virtual void steady_run ()
 Steady run. More...
 
virtual void unsteady_run (const double &dt=0.1)
 Unsteady run. Specify timestep or use default of 0.1. More...
 
AlgebraicCollapsibleChannelMesh< ELEMENT > * bulk_mesh_pt ()
 Access function for the specific bulk (fluid) mesh. More...
 
OneDLagrangianMesh< FSIHermiteBeamElement > * wall_mesh_pt ()
 Access function for the wall mesh. More...
 
void actions_before_newton_solve ()
 Actions before solve. Reset counter for number of Newton iterations. More...
 
void actions_after_newton_solve ()
 Update the problem after solve (empty) More...
 
void actions_before_newton_convergence_check ()
 
virtual void doc_solution_steady (DocInfo &doc_info, ofstream &trace_file, const double &cpu, const unsigned &niter)
 Doc the steady solution. More...
 
virtual void doc_solution_unsteady (DocInfo &doc_info, ofstream &trace_file, const double &cpu, const unsigned &niter)
 Doc the unsteady solution. More...
 
void set_initial_condition ()
 Apply initial conditions. More...
 
 FSICollapsibleChannelProblem (const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly)
 Constructor for the collapsible channel problem. More...
 
 ~FSICollapsibleChannelProblem ()
 Destructor (empty) More...
 
AlgebraicCollapsibleChannelMesh< ELEMENT > * bulk_mesh_pt ()
 Access function for the specific bulk (fluid) mesh. More...
 
OneDLagrangianMesh< FSIHermiteBeamElement > * wall_mesh_pt ()
 Access function for the wall 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 ()
 
void doc_solution (DocInfo &doc_info, ofstream &trace_file)
 Doc the solution. More...
 
void set_initial_condition ()
 Apply initial conditions. More...
 
 FSICollapsibleChannelProblem (const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly)
 
 ~FSICollapsibleChannelProblem ()
 Destructor (empty) More...
 
RefineableAlgebraicCollapsibleChannelMesh< ELEMENT > * bulk_mesh_pt ()
 Access function for the specific bulk (fluid) mesh. More...
 
OneDLagrangianMesh< FSIHermiteBeamElement > * wall_mesh_pt ()
 Access function for the wall mesh. 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 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 ()
 
void doc_solution (DocInfo &doc_info, ofstream &trace_file)
 Doc the solution. More...
 
void set_initial_condition ()
 Apply initial conditions. More...
 
 FSICollapsibleChannelProblem (const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly)
 
 ~FSICollapsibleChannelProblem ()
 Destructor (empty) More...
 
ElasticCollapsibleChannelMesh< ELEMENT > * bulk_mesh_pt ()
 Access function for the specific bulk (fluid) mesh. More...
 
OneDLagrangianMesh< FSIHermiteBeamElement > * wall_mesh_pt ()
 Access function for the wall 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 doc_solution (DocInfo &doc_info, ofstream &trace_file)
 Doc the solution. More...
 
void set_initial_condition ()
 Apply initial conditions. More...
 
 FSICollapsibleChannelProblem (const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly)
 
 ~FSICollapsibleChannelProblem ()
 Destructor (empty) More...
 
ElasticRefineableCollapsibleChannelMesh< ELEMENT > * bulk_mesh_pt ()
 Access function for the specific bulk (fluid) mesh. More...
 
OneDLagrangianMesh< FSIHermiteBeamElement > * wall_mesh_pt ()
 Access function for the wall mesh. More...
 
void actions_before_adapt ()
 Actions before adapt: Wipe the mesh of prescribed traction elements. More...
 
void actions_after_adapt ()
 
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 doc_solution (DocInfo &doc_info, ofstream &trace_file)
 Doc the solution. More...
 
void set_initial_condition ()
 Apply initial conditions. More...
 
 FSICollapsibleChannelProblem (const unsigned &nup, const unsigned &ncollapsible, const unsigned &ndown, const unsigned &ny, const double &lup, const double &lcollapsible, const double &ldown, const double &ly)
 
 ~FSICollapsibleChannelProblem ()
 Destructor (empty) More...
 
RefineableAlgebraicCollapsibleChannelMesh< ELEMENT > * bulk_mesh_pt ()
 Access function for the specific bulk (fluid) mesh. More...
 
OneDLagrangianMesh< FSIHermiteBeamElement > *& wall_mesh_pt ()
 Access function for the wall mesh. More...
 
void actions_before_adapt ()
 Actions before adapt: Wipe the mesh of prescribed traction elements. More...
 
void actions_after_adapt ()
 
void actions_before_distribute ()
 Actions before distribute: wipe the mesh of prescribed traction elements. More...
 
void actions_after_distribute ()
 Actions after distribute: create traction elements and reset FSI. 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 ()
 
void doc_solution (DocInfo &doc_info, ofstream &trace_file)
 Doc the solution. More...
 
void set_initial_condition ()
 Apply initial conditions. More...
 
 FSICollapsibleChannelProblem (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 bool &wall_jacobian_ignores_fluid_shear_stress_data, const bool &wall_jacobian_ignores_geometric_data, const bool &fluid_jacobian_ignores_geometric_data)
 Constructor for the collapsible channel problem. More...
 
 ~FSICollapsibleChannelProblem ()
 Destructor (empty) More...
 
AlgebraicCollapsibleChannelMesh< ELEMENT > * bulk_mesh_pt ()
 Access function for the specific bulk (fluid) mesh. More...
 
OneDLagrangianMesh< FSIHermiteBeamElement > * wall_mesh_pt ()
 Access function for the wall 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 ()
 
void doc_solution (DocInfo &doc_info, ofstream &trace_file)
 Doc the solution. More...
 
void set_initial_condition ()
 Apply initial conditions. 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
 
OomphCommunicatorcommunicator_pt ()
 access function to the oomph-lib communicator More...
 
const OomphCommunicatorcommunicator_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 ()
 
LinearSolvermass_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...
 
Timetime_pt () const
 Return a pointer to the global time object (const version). More...
 
doubletime ()
 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 TimeSteppertime_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...
 
doubleminimum_dt ()
 Access function to min timestep in adaptive timestepping. More...
 
doublemaximum_dt ()
 Access function to max timestep in adaptive timestepping. More...
 
unsignedmax_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...
 
doublemax_residuals ()
 
booltime_adaptive_newton_crash_on_solve_fail ()
 Access function for Time_adaptive_newton_crash_on_solve_fail. More...
 
doublenewton_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...
 
doubleglobal_dof_pt (const unsigned &i)
 
doubledof (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...
 
doubledof_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...
 
booluse_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 Problemmake_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 ()
 
doublebifurcation_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 ()
 
intsign_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 dump_it (ofstream &dump_file)
 Dump problem to disk to allow for restart. More...
 
void restart (ifstream &restart_file)
 Read problem for restart from specified restart file. 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_before_implicit_timestep ()
 
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)
 
doubledof_derivative (const unsigned &i)
 
doubledof_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 ()
 

Protected 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...
 
AlgebraicCollapsibleChannelMesh< ELEMENT > * Bulk_mesh_pt
 Pointer to the "bulk" mesh. More...
 
Mesh * Displ_control_mesh_pt
 Pointer to the mesh that contains the displacement control element. More...
 
bool Displ_control
 Use displacement control? More...
 
OneDLagrangianMesh< FSIHermiteBeamElement > * Wall_mesh_pt
 Pointer to the "wall" mesh. More...
 
Node * Left_node_pt
 Pointer to the left control node. More...
 
Node * Right_node_pt
 Pointer to right control node. More...
 
Node * Wall_node_pt
 Pointer to control node on the wall. More...
 
bool Steady_flag
 Flag for steady run. More...
 
GeomObject * Ctrl_geom_obj_pt
 
Vector< doubleS_displ_ctrl
 
MeshAsGeomObject * Wall_geom_object_pt
 Geometric object incarnation of the wall mesh. More...
 
unsigned Newton_iter
 Counter for Newton iterations. More...
 
DocInfo Doc_info
 DocInfo object. More...
 
- Protected Attributes inherited from oomph::Problem
Vector< Problem * > Copy_of_problem_pt
 
std::map< double *, boolCalculate_dparameter_analytic
 
bool Calculate_hessian_products_analytic
 
LinearAlgebraDistributionDof_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< doubleMax_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< doubleDof_derivative
 Storage for the derivative of the problem variables wrt arc-length. More...
 
Vector< doubleDof_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
 
OomphCommunicatorCommunicator_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
 

Private Member Functions

void create_traction_elements (const unsigned &b, Mesh *const &bulk_mesh_pt, Mesh *const &traction_mesh_pt)
 Create the prescribed traction elements on boundary b. More...
 
void create_traction_elements (const unsigned &b, Mesh *const &bulk_mesh_pt, Mesh *const &traction_mesh_pt)
 Create the prescribed traction elements on boundary b. More...
 
void delete_traction_elements (Mesh *const &traction_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 &traction_mesh_pt)
 Create the prescribed traction elements on boundary b. More...
 
void delete_traction_elements (Mesh *const &traction_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 create_traction_elements (const unsigned &b, Mesh *const &bulk_mesh_pt, Mesh *const &traction_mesh_pt)
 Create the prescribed traction elements on boundary b. More...
 
void delete_traction_elements (Mesh *const &traction_mesh_pt)
 Delete prescribed traction elements from the surface mesh. More...
 
void create_lagrange_multiplier_elements ()
 
void delete_lagrange_multiplier_elements ()
 
void create_traction_elements (const unsigned &b, Mesh *const &bulk_mesh_pt, Mesh *const &traction_mesh_pt)
 Create the prescribed traction elements on boundary b. More...
 
void delete_traction_elements (Mesh *const &traction_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 &traction_mesh_pt)
 Create the prescribed traction elements on boundary b. More...
 

Private Attributes

MeshApplied_fluid_traction_mesh_pt
 
RefineableAlgebraicCollapsibleChannelMesh< ELEMENT > * Bulk_mesh_pt
 Pointer to the "bulk" mesh. More...
 
ElasticCollapsibleChannelMesh< ELEMENT > * Bulk_mesh_pt
 Pointer to the "bulk" mesh. More...
 
SolidMeshLagrange_multiplier_mesh_pt
 Pointers to mesh of Lagrange multiplier elements. More...
 
ConstitutiveLawConstitutive_law_pt
 Constitutive law used to determine the mesh deformation. More...
 
ElasticRefineableCollapsibleChannelMesh< ELEMENT > * Bulk_mesh_pt
 Pointer to the "bulk" mesh. More...
 
MeshDisplacement_control_mesh_pt
 Pointer to mesh containing the displacement control element (only!) More...
 
bool Fluid_jacobian_ignores_geometric_data
 
bool Wall_jacobian_ignores_geometric_data
 
bool Wall_jacobian_ignores_fluid_shear_stress_data
 

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...
 
- 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 FSICollapsibleChannelProblem< ELEMENT >

Problem class.

Constructor & Destructor Documentation

◆ FSICollapsibleChannelProblem() [1/7]

template<class ELEMENT >
FSICollapsibleChannelProblem< ELEMENT >::FSICollapsibleChannelProblem ( 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 bool displ_control,
const bool steady_flag 
)

Constructor for the collapsible channel problem.

Constructor: The arguments are the number of elements and the lengths of the domain.

494 {
495 
496 
497  // Initialise number of Newton iterations
498  Newton_iter=0;
499 
500  // Store problem parameters
501  Nup=nup;
502  Ncollapsible=ncollapsible;
503  Ndown=ndown;
504  Ny=ny;
505  Lup=lup;
506  Lcollapsible=lcollapsible;
507  Ldown=ldown;
508  Ly=ly;
509  Steady_flag=steady_flag;
510 
511  // Displacement control only makes sense for steady problems
512  if (Steady_flag)
513  {
514  Displ_control=displ_control;
515  }
516  else
517  {
518  Displ_control=false;
519  if (displ_control)
520  {
521  std::cout << "Switched off displacement control for unsteady run!"
522  << std::endl;
523  }
524  }
525 
526 
527  // Overwrite maximum allowed residual to accomodate bad initial guesses
528  Problem::Max_residuals=1000.0;
529 
530  // Allocate the timestepper -- this constructs the Problem's
531  // time object with a sufficient amount of storage to store the
532  // previous timsteps. Note: This is appropriate even for
533  // the steady problem as we'll explicitly call the *steady*
534  // Newton solver which disables the timesteppers
535  // during the solve.
536  add_time_stepper_pt(new BDF<2>);
537 
538  // Create a dummy Steady timestepper that stores two history values
539  Steady<2>* wall_time_stepper_pt = new Steady<2>;
540 
541  // Add the wall timestepper to the Problem's collection of timesteppers.
542  add_time_stepper_pt(wall_time_stepper_pt);
543 
544  // Geometric object that represents the undeformed wall:
545  // A straight line at height y=ly; starting at x=lup.
546  UndeformedWall* undeformed_wall_pt=new UndeformedWall(lup,ly);
547 
548  //Create the "wall" mesh with FSI Hermite elements
549  Wall_mesh_pt = new OneDLagrangianMesh<FSIHermiteBeamElement>
550  (Ncollapsible,Lcollapsible,undeformed_wall_pt,wall_time_stepper_pt);
551 
552  // Build a geometric object (one Lagrangian, two Eulerian coordinates)
553  // from the wall mesh
555  new MeshAsGeomObject(Wall_mesh_pt);
556 
557  // Get pointer to/local coordinate in wall geom object that contains
558  // control node -- adjusted for different values of Q, so that
559  // the point is located near the point of strongest collapse.
560  Vector<double> zeta_displ_ctrl(1);
561  zeta_displ_ctrl[0]=3.5;
562  if (std::abs(Global_Physical_Variables::Q-1.0e-3)<1.0e-10)
563  {
564  zeta_displ_ctrl[0]=3.0;
565  }
566  //if (std::abs(Global_Physical_Variables::Q-1.0e-4)<1.0e-10)
567  if (Global_Physical_Variables::Q<=1.0e-4)
568  {
569  zeta_displ_ctrl[0]=2.5;
570  }
571  std::cout << "Wall control point located at zeta=" <<zeta_displ_ctrl[0]
572  << std::endl;
573  S_displ_ctrl.resize(1);
574 
575  // Locate control point (pointer to GeomObject and local coordinate in it)
576  Wall_geom_object_pt->locate_zeta(zeta_displ_ctrl,
578  S_displ_ctrl);
579 
580 
581  // Normal load incrementation or unsteady run
582  //===========================================
583  Displ_control_mesh_pt=new Mesh;
584 
585  // Choose element in which displacement control is applied:
586  SolidFiniteElement* controlled_element_pt=
587  dynamic_cast<SolidFiniteElement*>(Ctrl_geom_obj_pt);
588 
589  // Fix the displacement in the vertical (1) direction...
590  unsigned controlled_direction=1;
591 
592  // Pointer to displacement control element
593  DisplacementControlElement* displ_control_el_pt;
594 
595  // Build displacement control element
596  displ_control_el_pt=
597  new DisplacementControlElement(controlled_element_pt,
598  S_displ_ctrl,
599  controlled_direction,
601 
602  // The constructor of the DisplacementControlElement has created
603  // a new Data object whose one-and-only value contains the
604  // adjustable load: Use this Data object in the load function:
605  Global_Physical_Variables::P_ext_data_pt=displ_control_el_pt->
606  displacement_control_load_pt();
607 
608  // Add the displacement-control element to its own mesh
609  Displ_control_mesh_pt->add_element_pt(displ_control_el_pt);
610 
611 
612  if (!Displ_control)
613  {
614  // Create Data object whose one-and-only value contains the
615  // (in principle) adjustable load
617 
618  //Pin the external pressure because it isn't actually adjustable.
620  }
621 
622  //Build bulk (fluid) mesh
623  Bulk_mesh_pt =
624  new AlgebraicCollapsibleChannelMesh<ELEMENT>
625  (nup, ncollapsible, ndown, ny,
626  lup, lcollapsible, ldown, ly,
628  time_stepper_pt());
629 
630 
631  // Add the sub meshes to the problem
635 
636  // Combine all submeshes into a single Mesh
638 
639 
640  // Complete build of fluid mesh
641  //-----------------------------
642 
643  // Loop over the elements to set up element-specific
644  // things that cannot be handled by constructor
645  unsigned n_element=Bulk_mesh_pt->nelement();
646  for(unsigned e=0;e<n_element;e++)
647  {
648  // Upcast from GeneralisedElement to the present element
649  ELEMENT* el_pt = dynamic_cast<ELEMENT*>(Bulk_mesh_pt->element_pt(e));
650 
651  //Set the Reynolds number
652  el_pt->re_pt() = &Global_Physical_Variables::Re;
653 
654  // Set the Womersley number
655  el_pt->re_st_pt() = &Global_Physical_Variables::ReSt;
656 
657  // Switch off mesh velocity in steady runs
658  if (Flags::Steady_flag)
659  {
660  el_pt->disable_ALE();
661  }
662  else
663  {
664  // Is element in rigid part?
665  bool is_in_rigid_part=true;
666 
667  // Number of nodes
668  unsigned nnod=el_pt->nnode();
669  for (unsigned j=0;j<nnod;j++)
670  {
671  double x=el_pt->node_pt(j)->x(0);
672  if ((x>=Lup)&&(x<=(Lup+Lcollapsible)))
673  {
674  is_in_rigid_part=false;
675  break;
676  }
677  }
678  if (is_in_rigid_part)
679  {
680  el_pt->disable_ALE();
681  }
682  }
683 
684  } // end loop over elements
685 
686 
687 
688  // Apply boundary conditions for fluid
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  //x and y-velocities pinned along boundaries 2, 3, 4 (top boundaries) :
704  for(ibound=2;ibound<5;ibound++)
705  {
706  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
707  for (unsigned inod=0;inod<num_nod;inod++)
708  {
709  for(unsigned i=0;i<2;i++)
710  {
711  bulk_mesh_pt()->boundary_node_pt(ibound, inod)->pin(i);
712  }
713  }
714  }
715 
716  //y-velocity pinned along boundary 1 (right boundary):
717  ibound=1;
718  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
719  for (unsigned inod=0;inod<num_nod;inod++)
720  {
721  bulk_mesh_pt()->boundary_node_pt(ibound, inod)->pin(1);
722  }
723 
724 
725  //Both velocities pinned along boundary 5 (left boundary):
726  ibound=5;
727  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
728  for (unsigned inod=0;inod<num_nod;inod++)
729  {
730  bulk_mesh_pt()->boundary_node_pt(ibound, inod)->pin(0);
731  bulk_mesh_pt()->boundary_node_pt(ibound, inod)->pin(1);
732  }
733 //end of pin_velocity
734 
735 
736  // Complete build of wall elements
737  //--------------------------------
738 
739  //Loop over the elements to set physical parameters etc.
740  n_element = wall_mesh_pt()->nelement();
741  for(unsigned e=0;e<n_element;e++)
742  {
743  // Upcast to the specific element type
744  FSIHermiteBeamElement *elem_pt =
745  dynamic_cast<FSIHermiteBeamElement*>(wall_mesh_pt()->element_pt(e));
746 
747  // Set physical parameters for each element:
748  elem_pt->sigma0_pt() = &Global_Physical_Variables::Sigma0;
749  elem_pt->h_pt() = &Global_Physical_Variables::H;
750 
751  // Set the load vector for each element
752  elem_pt->load_vector_fct_pt() = &Global_Physical_Variables::load;
753 
754  // Function that specifies the load ratios
755  elem_pt->q_pt() = &Global_Physical_Variables::Q;
756 
757  // Set the undeformed shape for each element
758  elem_pt->undeformed_beam_pt() = undeformed_wall_pt;
759 
760  // The normal on the wall elements as computed by the FSIHermiteElements
761  // points away from the fluid rather than into the fluid (as assumed
762  // by default)
763  elem_pt->set_normal_pointing_out_of_fluid();
764 
765  // Displacement control? If so, the load on *all* elements
766  // is affected by an unknown -- the external pressure, stored
767  // as the one-and-only value in a Data object: Add it to the
768  // elements' external Data.
769  if (Displ_control)
770  {
771  //The external pressure is external data for all elements
772  elem_pt->add_external_data(Global_Physical_Variables::P_ext_data_pt);
773  }
774 
775 
776  } // end of loop over elements
777 
778 
779 
780  // Boundary conditions for wall mesh
781  //----------------------------------
782 
783  // Set the boundary conditions: Each end of the beam is fixed in space
784  // Loop over the boundaries (ends of the beam)
785  for(unsigned b=0;b<2;b++)
786  {
787  // Pin displacements in both x and y directions
790  }
791 
792 
793 
794  //Choose control nodes
795  //---------------------
796 
797  // Left boundary
798  ibound=5;
799  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
800  unsigned control_nod=num_nod/2;
801  Left_node_pt= bulk_mesh_pt()->boundary_node_pt(ibound, control_nod);
802 
803  // Right boundary
804  ibound=1;
805  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
806  control_nod=num_nod/2;
807  Right_node_pt= bulk_mesh_pt()->boundary_node_pt(ibound, control_nod);
808 
809 
810  // Set the pointer to the control node on the wall
811  num_nod= wall_mesh_pt()->nnode();
813 
814 
815 
816  // Setup FSI
817  //----------
818 
819  // The velocity of the fluid nodes on the wall (fluid mesh boundary 3)
820  // is set by the wall motion -- hence the no-slip condition must be
821  // re-applied whenever a node update is performed for these nodes.
822  // Such tasks may be performed automatically by the auxiliary node update
823  // function specified by a function pointer:
824  ibound=3;
825  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
826  for (unsigned inod=0;inod<num_nod;inod++)
827  {
828  static_cast<AlgebraicNode*>(
829  bulk_mesh_pt()->boundary_node_pt(ibound, inod))->
830  set_auxiliary_node_update_fct_pt(
832  }
833 
834  // Work out which fluid dofs affect the residuals of the wall elements:
835  // We pass the boundary between the fluid and solid meshes and
836  // pointers to the meshes. The interaction boundary is boundary 3 of the
837  // 2D fluid mesh.
838  FSI_functions::setup_fluid_load_info_for_solid_elements<ELEMENT,2>
839  (this,3,Bulk_mesh_pt,Wall_mesh_pt);
840 
841  // Setup equation numbering scheme
842  cout <<"Total number of equations: " << assign_eqn_numbers() << std::endl;
843 
844 }//end of constructor
AnnoyingScalar abs(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:135
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Scalar * b
Definition: benchVecAdd.cpp:17
double Ldown
x-length in the downstream part of the channel
Definition: fsi_chan_problem.h:427
GeomObject * Ctrl_geom_obj_pt
Definition: fsi_chan_problem.h:458
Node * Left_node_pt
Pointer to the left control node.
Definition: fsi_chan_problem.h:445
Node * Right_node_pt
Pointer to right control node.
Definition: fsi_chan_problem.h:448
Vector< double > S_displ_ctrl
Definition: fsi_chan_problem.h:462
unsigned Nup
Number of elements in the x direction in the upstream part of the channel.
Definition: fsi_chan_problem.h:408
OneDLagrangianMesh< FSIHermiteBeamElement > * Wall_mesh_pt
Pointer to the "wall" mesh.
Definition: fsi_chan_problem.h:442
unsigned Ncollapsible
Definition: fsi_chan_problem.h:412
unsigned Ny
Number of elements across the channel.
Definition: fsi_chan_problem.h:418
unsigned Ndown
Number of elements in the x direction in the downstream part of the channel.
Definition: fsi_chan_problem.h:415
unsigned Newton_iter
Counter for Newton iterations.
Definition: fsi_chan_problem.h:469
double Lup
x-length in the upstream part of the channel
Definition: fsi_chan_problem.h:421
bool Steady_flag
Flag for steady run.
Definition: fsi_chan_problem.h:454
MeshAsGeomObject * Wall_geom_object_pt
Geometric object incarnation of the wall mesh.
Definition: fsi_chan_problem.h:466
AlgebraicCollapsibleChannelMesh< ELEMENT > * bulk_mesh_pt()
Access function for the specific bulk (fluid) mesh.
Definition: fsi_chan_problem.h:347
Mesh * Displ_control_mesh_pt
Pointer to the mesh that contains the displacement control element.
Definition: fsi_chan_problem.h:436
AlgebraicCollapsibleChannelMesh< ELEMENT > * Bulk_mesh_pt
Pointer to the "bulk" mesh.
Definition: fsi_chan_problem.h:433
Node * Wall_node_pt
Pointer to control node on the wall.
Definition: fsi_chan_problem.h:451
double Ly
Transverse length.
Definition: fsi_chan_problem.h:430
double Lcollapsible
x-length in the collapsible part of the channel
Definition: fsi_chan_problem.h:424
OneDLagrangianMesh< FSIHermiteBeamElement > * wall_mesh_pt()
Access function for the wall mesh.
Definition: fsi_chan_problem.h:357
bool Displ_control
Use displacement control?
Definition: fsi_chan_problem.h:439
Definition: fsi_chan_problem.h:156
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
Definition: mesh.h:448
unsigned long nnode() const
Return number of nodes in the mesh.
Definition: mesh.h:596
unsigned long nelement() const
Return number of elements in the mesh.
Definition: mesh.h:590
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
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
SolidNode * node_pt(const unsigned long &n)
Return a pointer to the n-th global SolidNode.
Definition: mesh.h:2594
SolidNode * boundary_node_pt(const unsigned &b, const unsigned &n)
Return n-th SolidNodes on b-th boundary.
Definition: mesh.h:2612
void pin_position(const unsigned &i)
Pin the nodal position.
Definition: nodes.h:1816
unsigned Steady_flag
Steady run (1) or unsteady run (0)
Definition: fsi_chan_problem.h:242
double ReSt
Womersley number.
Definition: rayleigh_instability.cc:56
void load(const Vector< double > &xi, const Vector< double > &x, const Vector< double > &N, Vector< double > &load)
Load function: Apply a constant external pressure to the beam.
Definition: tensioned_string.cc:52
double Sigma0
2nd Piola Kirchhoff pre-stress
Definition: tensioned_string.cc:46
double Q
Ratio of scales.
Definition: elastic_bretherton.cc:131
double Re
Reynolds number.
Definition: fibre.cc:55
Data * P_ext_data_pt
Pointer to Data object that stores external pressure.
Definition: fsi_chan_problem.h:48
double H
Nondim thickness.
Definition: steady_ring.cc:50
double Yprescr
Definition: fsi_chan_problem.h:66
const double ly
Definition: ConstraintElementsUnitTest.cpp:34
const unsigned ny
Definition: ConstraintElementsUnitTest.cpp:31
void apply_no_slip_on_moving_wall(Node *node_pt)
Definition: fsi.cc:48
list x
Definition: plotDoE.py:28
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References abs(), oomph::FSI_functions::apply_no_slip_on_moving_wall(), b, e(), Global_Physical_Variables::H, i, j, Global_Parameters::Ldown, Global_Physical_Variables::load(), Global_Parameters::Lup, Mesh_Parameters::ly, Global_Parameters::Ly, Mesh_Parameters::ny, GlobalParameters::Ny, Global_Physical_Variables::P_ext_data_pt, Global_Physical_Variables::Q, Global_Physical_Variables::Re, Global_Physical_Variables::ReSt, Global_Physical_Variables::Sigma0, Flags::Steady_flag, plotDoE::x, and Global_Physical_Variables::Yprescr.

◆ ~FSICollapsibleChannelProblem() [1/7]

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

Destructor.

334  {
335  // Mesh gets killed in general problem destructor
336  }

◆ FSICollapsibleChannelProblem() [2/7]

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

Constructor for the collapsible channel problem.

Constructor: The arguments are the number of elements and the lengths of the domain.

387 {
388  // Store problem parameters
389  Nup=nup;
390  Ncollapsible=ncollapsible;
391  Ndown=ndown;
392  Ny=ny;
393  Lup=lup;
394  Lcollapsible=lcollapsible;
395  Ldown=ldown;
396  Ly=ly;
397 
398 
399  // Overwrite maximum allowed residual to accomodate bad initial guesses
400  Problem::Max_residuals=1000.0;
401 
402  // Allocate the timestepper -- this constructs the Problem's
403  // time object with a sufficient amount of storage to store the
404  // previous timsteps.
406 
407  // Geometric object that represents the undeformed wall:
408  // A straight line at height y=ly; starting at x=lup.
409  UndeformedWall* undeformed_wall_pt=new UndeformedWall(lup,ly);
410 
411  //Create the "wall" mesh with FSI Hermite elements
413  //(2*Ncollapsible+5,Lcollapsible,undeformed_wall_pt);
414  (Ncollapsible,Lcollapsible,undeformed_wall_pt);
415 
416 
417 
418  // Build a geometric object (one Lagrangian, two Eulerian coordinates)
419  // from the wall mesh
420  MeshAsGeomObject* wall_geom_object_pt=
422 
423 
424 #ifdef MACRO_ELEMENT_NODE_UPDATE
425 
426  //Build bulk (fluid) mesh
427  Bulk_mesh_pt =
429  (nup, ncollapsible, ndown, ny,
430  lup, lcollapsible, ldown, ly,
431  wall_geom_object_pt,
432  time_stepper_pt());
433 
434  // Set a non-trivial boundary-layer-squash function...
435  Bulk_mesh_pt->bl_squash_fct_pt() = &BL_Squash::squash_fct;
436 
437  // ... and update the nodal positions accordingly
438  Bulk_mesh_pt->node_update();
439 
440 #else
441 
442  //Build bulk (fluid) mesh
443  Bulk_mesh_pt =
445  (nup, ncollapsible, ndown, ny,
446  lup, lcollapsible, ldown, ly,
447  wall_geom_object_pt,
449  time_stepper_pt());
450 
451 #endif
452 
453 
454  // Create "surface mesh" that will contain only the prescribed-traction
455  // elements. The constructor just creates the mesh without
456  // giving it any elements, nodes, etc.
458 
459  // Create prescribed-traction elements from all elements that are
460  // adjacent to boundary 5 (left boundary), but add them to a separate mesh.
462 
463  // Add the sub meshes to the problem
467 
468  // Combine all submeshes into a single Mesh
470 
471 
472  // Complete build of fluid mesh
473  //-----------------------------
474 
475  // Loop over the elements to set up element-specific
476  // things that cannot be handled by constructor
477  unsigned n_element=Bulk_mesh_pt->nelement();
478  for(unsigned e=0;e<n_element;e++)
479  {
480  // Upcast from GeneralisedElement to the present element
481  ELEMENT* el_pt = dynamic_cast<ELEMENT*>(Bulk_mesh_pt->element_pt(e));
482 
483  //Set the Reynolds number
484  el_pt->re_pt() = &Global_Physical_Variables::Re;
485 
486  // Set the Womersley number
487  el_pt->re_st_pt() = &Global_Physical_Variables::ReSt;
488 
489  } // end loop over elements
490 
491 
492 
493  // Apply boundary conditions for fluid
494  //------------------------------------
495 
496  //Pin the velocity on the boundaries
497  //x and y-velocities pinned along boundary 0 (bottom boundary) :
498  unsigned ibound=0;
499  unsigned num_nod= bulk_mesh_pt()->nboundary_node(ibound);
500  for (unsigned inod=0;inod<num_nod;inod++)
501  {
502  for(unsigned i=0;i<2;i++)
503  {
504  bulk_mesh_pt()->boundary_node_pt(ibound, inod)->pin(i);
505  }
506  }
507 
508  //x and y-velocities pinned along boundaries 2, 3, 4 (top boundaries) :
509  for(ibound=2;ibound<5;ibound++)
510  {
511  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
512  for (unsigned inod=0;inod<num_nod;inod++)
513  {
514  for(unsigned i=0;i<2;i++)
515  {
516  bulk_mesh_pt()->boundary_node_pt(ibound, inod)->pin(i);
517  }
518  }
519  }
520 
521  //y-velocity pinned along boundary 1 (right boundary):
522  ibound=1;
523  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
524  for (unsigned inod=0;inod<num_nod;inod++)
525  {
526  bulk_mesh_pt()->boundary_node_pt(ibound, inod)->pin(1);
527  }
528 
529 
530  //y-velocity pinned along boundary 5 (left boundary):
531  ibound=5;
532  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
533  for (unsigned inod=0;inod<num_nod;inod++)
534  {
535  bulk_mesh_pt()->boundary_node_pt(ibound, inod)->pin(1);
536  }
537 //end of pin_velocity
538 
539  // Complete build of applied traction elements
540  //--------------------------------------------
541 
542  // Loop over the traction elements to pass pointer to prescribed
543  // traction function
544  unsigned n_el=Applied_fluid_traction_mesh_pt->nelement();
545  for(unsigned e=0;e<n_el;e++)
546  {
547  // Upcast from GeneralisedElement to NavierStokes traction element
549  dynamic_cast< NavierStokesTractionElement<ELEMENT>*>(
551 
552  // Set the pointer to the prescribed traction function
554  }
555 
556 
557 
558 
559  // Complete build of wall elements
560  //--------------------------------
561 
562  //Loop over the elements to set physical parameters etc.
563  n_element = wall_mesh_pt()->nelement();
564  for(unsigned e=0;e<n_element;e++)
565  {
566  // Upcast to the specific element type
567  FSIHermiteBeamElement *elem_pt =
568  dynamic_cast<FSIHermiteBeamElement*>(wall_mesh_pt()->element_pt(e));
569 
570  // Set physical parameters for each element:
572  elem_pt->h_pt() = &Global_Physical_Variables::H;
573 
574  // Set the load vector for each element
576 
577  // Function that specifies the load ratios
578  elem_pt->q_pt() = &Global_Physical_Variables::Q;
579 
580  // Set the undeformed shape for each element
581  elem_pt->undeformed_beam_pt() = undeformed_wall_pt;
582 
583 
584  // The normal on the wall elements as computed by the FSIHermiteElements
585  // points away from the fluid rather than into the fluid (as assumed
586  // by default)
588 
589  } // end of loop over elements
590 
591 
592 
593  // Boundary conditions for wall mesh
594  //----------------------------------
595 
596  // Set the boundary conditions: Each end of the beam is fixed in space
597  // Loop over the boundaries (ends of the beam)
598  for(unsigned b=0;b<2;b++)
599  {
600  // Pin displacements in both x and y directions
603  }
604 
605 
606 
607 
608  //Choose control nodes
609  //---------------------
610 
611  // Left boundary
612  ibound=5;
613  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
614  unsigned control_nod=num_nod/2;
615  Left_node_pt= bulk_mesh_pt()->boundary_node_pt(ibound, control_nod);
616 
617  // Right boundary
618  ibound=1;
619  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
620  control_nod=num_nod/2;
621  Right_node_pt= bulk_mesh_pt()->boundary_node_pt(ibound, control_nod);
622 
623 
624  // Set the pointer to the control node on the wall
626 
627 
628 
629 
630  // Setup FSI
631  //----------
632 
633  // The velocity of the fluid nodes on the wall (fluid mesh boundary 3)
634  // is set by the wall motion -- hence the no-slip condition must be
635  // re-applied whenever a node update is performed for these nodes.
636  // Such tasks may be performed automatically by the auxiliary node update
637  // function specified by a function pointer:
638  ibound=3;
639  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
640  for (unsigned inod=0;inod<num_nod;inod++)
641  {
642  bulk_mesh_pt()->boundary_node_pt(ibound, inod)->
643  set_auxiliary_node_update_fct_pt(
645  }
646 
647 
648  // Work out which fluid dofs affect the residuals of the wall elements:
649  // We pass the boundary between the fluid and solid meshes and
650  // pointers to the meshes. The interaction boundary is boundary 3 of the
651  // 2D fluid mesh.
652  FSI_functions::setup_fluid_load_info_for_solid_elements<ELEMENT,2>
653  (this,3,Bulk_mesh_pt,Wall_mesh_pt);
654 
655  // Setup equation numbering scheme
656  cout <<"Number of equations: " << assign_eqn_numbers() << std::endl;
657 
658 
659 }//end of constructor
Mesh * Applied_fluid_traction_mesh_pt
Definition: fsi_collapsible_channel.cc:355
void create_traction_elements(const unsigned &b, Mesh *const &bulk_mesh_pt, Mesh *const &traction_mesh_pt)
Create the prescribed traction elements on boundary b.
Definition: fsi_collapsible_channel.cc:730
Collapsible channel mesh with algebraic node update.
Definition: collapsible_channel_mesh.template.h:429
Definition: beam_elements.h:352
void set_normal_pointing_out_of_fluid()
Definition: beam_elements.h:384
double *& q_pt()
Definition: fsi.h:248
void(*&)(const Vector< double > &xi, const Vector< double > &x, const Vector< double > &N, Vector< double > &load) load_vector_fct_pt()
Reference to the load vector function pointer.
Definition: beam_elements.h:169
double *& sigma0_pt()
Return a pointer to axial prestress.
Definition: beam_elements.h:233
double *& h_pt()
Return a pointer to non-dim. wall thickness.
Definition: beam_elements.h:240
GeomObject *& undeformed_beam_pt()
Definition: beam_elements.h:253
Definition: collapsible_channel_mesh.template.h:241
Definition: mesh_as_geometric_object.h:93
Definition: mesh.h:67
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
double squash_fct(const double &s)
Definition: fsi_chan_problem.h:118
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

References oomph::FSI_functions::apply_no_slip_on_moving_wall(), b, e(), Global_Physical_Variables::H, oomph::KirchhoffLoveBeamEquations::h_pt(), i, Global_Parameters::Ldown, Global_Physical_Variables::load(), oomph::KirchhoffLoveBeamEquations::load_vector_fct_pt, Global_Parameters::Lup, Mesh_Parameters::ly, Global_Parameters::Ly, Mesh_Parameters::ny, GlobalParameters::Ny, Global_Physical_Variables::prescribed_traction(), Global_Physical_Variables::Q, oomph::FSIWallElement::q_pt(), Global_Physical_Variables::Re, Global_Physical_Variables::ReSt, oomph::FSIHermiteBeamElement::set_normal_pointing_out_of_fluid(), Global_Physical_Variables::Sigma0, oomph::KirchhoffLoveBeamEquations::sigma0_pt(), BL_Squash::squash_fct(), oomph::NavierStokesTractionElement< ELEMENT >::traction_fct_pt, and oomph::KirchhoffLoveBeamEquations::undeformed_beam_pt().

◆ ~FSICollapsibleChannelProblem() [2/7]

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

Destructor (empty)

250 {}

◆ FSICollapsibleChannelProblem() [3/7]

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

Constructor: The arguments are the number of elements and the lengths of the domain.

◆ ~FSICollapsibleChannelProblem() [3/7]

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

Destructor (empty)

249 {}

◆ FSICollapsibleChannelProblem() [4/7]

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

Constructor: The arguments are the number of elements and the lengths of the domain.

◆ ~FSICollapsibleChannelProblem() [4/7]

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

Destructor (empty)

295 {}

◆ FSICollapsibleChannelProblem() [5/7]

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

Constructor: The arguments are the number of elements and the lengths of the domain.

◆ ~FSICollapsibleChannelProblem() [5/7]

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

Destructor (empty)

300 {}

◆ FSICollapsibleChannelProblem() [6/7]

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

Constructor: The arguments are the number of elements and the lengths of the domain.

◆ ~FSICollapsibleChannelProblem() [6/7]

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

Destructor (empty)

250 {}

◆ FSICollapsibleChannelProblem() [7/7]

template<class ELEMENT >
FSICollapsibleChannelProblem< ELEMENT >::FSICollapsibleChannelProblem ( 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 bool wall_jacobian_ignores_fluid_shear_stress_data,
const bool wall_jacobian_ignores_geometric_data,
const bool fluid_jacobian_ignores_geometric_data 
)

Constructor for the collapsible channel problem.

Constructor: The arguments are the number of elements and the lengths of the domain.

410 {
411  // Store problem parameters
412  Nup=nup;
413  Ncollapsible=ncollapsible;
414  Ndown=ndown;
415  Ny=ny;
416  Lup=lup;
417  Lcollapsible=lcollapsible;
418  Ldown=ldown;
419  Ly=ly;
421  wall_jacobian_ignores_fluid_shear_stress_data;
422  Wall_jacobian_ignores_geometric_data=wall_jacobian_ignores_geometric_data;
423  Fluid_jacobian_ignores_geometric_data=fluid_jacobian_ignores_geometric_data;
424 
425  // Overwrite maximum allowed residual to accomodate bad initial guesses
426  Problem::Max_residuals=100000.0;
427 
428  // Allow a few extra Newton iterations
430 
431  // Allocate the timestepper -- this constructs the Problem's
432  // time object with a sufficient amount of storage to store the
433  // previous timsteps.
435 
436  // Geometric object that represents the undeformed wall:
437  // A straight line at height y=ly; starting at x=lup.
438  UndeformedWall* undeformed_wall_pt=new UndeformedWall(lup,ly);
439 
440  //Create the "wall" mesh with FSI Hermite elements
442  //(2*Ncollapsible+5,Lcollapsible,undeformed_wall_pt);
443  (Ncollapsible,Lcollapsible,undeformed_wall_pt);
444 
445 
446  // Build a geometric object (one Lagrangian, two Eulerian coordinates)
447  // from the wall mesh
448  MeshAsGeomObject* wall_geom_object_pt=
450 
451 
452  //Build bulk (fluid) mesh
453  Bulk_mesh_pt =
455  (nup, ncollapsible, ndown, ny,
456  lup, lcollapsible, ldown, ly,
457  wall_geom_object_pt,
459  time_stepper_pt());
460 
461 
462  // Create "surface mesh" that will contain only the prescribed-traction
463  // elements. The constructor just creates the mesh without
464  // giving it any elements, nodes, etc.
466 
467  // Create prescribed-traction elements from all elements that are
468  // adjacent to boundary 5 (left boundary), but add them to a separate mesh
470 
471 
472  // Complete build of fluid mesh
473  //-----------------------------
474 
475  // Loop over the elements to set up element-specific
476  // things that cannot be handled by constructor
477  unsigned n_element=Bulk_mesh_pt->nelement();
478  for(unsigned e=0;e<n_element;e++)
479  {
480  // Upcast from GeneralisedElement to the present element
481  ELEMENT* el_pt = dynamic_cast<ELEMENT*>(Bulk_mesh_pt->element_pt(e));
482 
483  // Set flag which controls whether geometric data is ignored
484  // when calculating the fluid Jacobian
486  {
487  el_pt->enable_bypass_fill_in_jacobian_from_geometric_data();
488  }
489 
490  //Set the Reynolds number
491  el_pt->re_pt() = &Global_Physical_Variables::Re;
492 
493  // Set the Womersley number
494  el_pt->re_st_pt() = &Global_Physical_Variables::ReSt;
495 
496  } // end loop over elements
497 
498 
499 
500  // Apply boundary conditions for fluid
501  //------------------------------------
502 
503  //Pin the velocity on the boundaries
504  //x and y-velocities pinned along boundary 0 (bottom boundary) :
505  unsigned ibound=0;
506  unsigned num_nod= bulk_mesh_pt()->nboundary_node(ibound);
507  for (unsigned inod=0;inod<num_nod;inod++)
508  {
509  for(unsigned i=0;i<2;i++)
510  {
511  bulk_mesh_pt()->boundary_node_pt(ibound, inod)->pin(i);
512  }
513  }
514 
515  //x and y-velocities pinned along boundaries 2, 3, 4 (top boundaries) :
516  for(ibound=2;ibound<5;ibound++)
517  {
518  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
519  for (unsigned inod=0;inod<num_nod;inod++)
520  {
521  for(unsigned i=0;i<2;i++)
522  {
523  bulk_mesh_pt()->boundary_node_pt(ibound, inod)->pin(i);
524  }
525  }
526  }
527 
528  //y-velocity pinned along boundary 1 (right boundary):
529  ibound=1;
530  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
531  for (unsigned inod=0;inod<num_nod;inod++)
532  {
533  bulk_mesh_pt()->boundary_node_pt(ibound, inod)->pin(1);
534  }
535 
536 
537  //y-velocity pinned along boundary 5 (left boundary):
538  ibound=5;
539  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
540  for (unsigned inod=0;inod<num_nod;inod++)
541  {
542  bulk_mesh_pt()->boundary_node_pt(ibound, inod)->pin(1);
543  }
544 //end of pin_velocity
545 
546  // Complete build of applied traction elements
547  //--------------------------------------------
548 
549  // Loop over the traction elements to pass pointer to prescribed
550  // traction function
551  unsigned n_el=Applied_fluid_traction_mesh_pt->nelement();
552  for(unsigned e=0;e<n_el;e++)
553  {
554  // Upcast from GeneralisedElement to NavierStokes traction element
556  dynamic_cast< NavierStokesTractionElement<ELEMENT>*>(
558 
559  // Set the pointer to the prescribed traction function
561  }
562 
563 
564  //-------------------------------------------------------------
565  // Set up displacement control mesh if required for steady run
566  //-------------------------------------------------------------
568 
570  {
571  // Choose element in which displacement control is applied as
572  // halfway along wall
573  unsigned nel_ctrl=Ncollapsible/2;
574 
575  // Deal with even/odd number of wall elements
576  Vector<double> s_displ_control(1);
577  if (n_element%2==1)
578  {
579  s_displ_control[0]=0.0;
580  }
581  else
582  {
583  s_displ_control[0]=-1.0;
584  }
585 
586  // Controlled element
587  FSIHermiteBeamElement* controlled_element_pt=
588  dynamic_cast<FSIHermiteBeamElement*>(Wall_mesh_pt->element_pt(nel_ctrl));
589 
590  // Fix the displacement in the y (1) direction...
591  unsigned controlled_direction=1;
592 
593  // Output control point
594  Vector<double> xi(1);
595  Vector<double> x(2);
596  controlled_element_pt->interpolated_xi(s_displ_control,xi);
597  controlled_element_pt->interpolated_x(s_displ_control,x);
598 
599  oomph_info << "Displacement control for element: "
600  << nel_ctrl << std::endl;
601  oomph_info << "Displacement control applied at xi = ("
602  << xi[0] << ")" << std::endl;
603  oomph_info << "Corresponding to x = ("
604  << x[0] << ", " << x[1] << ")" << std::endl;
605 
606  // Build displacement control element
607  DisplacementControlElement* displ_control_el_pt=
608  new DisplacementControlElement(controlled_element_pt,
609  s_displ_control,
610  controlled_direction,
612 
613  // set Pext_data_pt to point at displacement control load
615  displ_control_el_pt->displacement_control_load_pt();
616 
617  // Create dedicated mesh
619 
620  // Add the displacement-control element to the mesh
621  Displacement_control_mesh_pt->add_element_pt(displ_control_el_pt);
622  }
623  else
624  {
625  // Create Data object whose one-and-only value contains the
626  // (in principle) adjustable load
628 
629  // Pin the external pressure because it isn't actually adjustable.
631 
632  // Set the value of external pressure
634  }
635 
636 
637 
638 
639  // Complete build of wall elements
640  //--------------------------------
641 
642  //Loop over the elements to set physical parameters etc.
643  n_element = wall_mesh_pt()->nelement();
644  for(unsigned e=0;e<n_element;e++)
645  {
646  // Upcast to the specific element type
647  FSIHermiteBeamElement *elem_pt =
648  dynamic_cast<FSIHermiteBeamElement*>(wall_mesh_pt()->element_pt(e));
649 
650  // Do elememts take account of fluid shear stress when calculating Jacobian?
652  {
654  }
655  else
656  {
658  }
659 
660  // Set physical parameters for each element:
662  elem_pt->h_pt() = &Global_Physical_Variables::H;
663 
664  // Set the load vector for each element
666 
667  // Function that specifies the load ratios
668  elem_pt->q_pt() = &Global_Physical_Variables::Q;
669 
670  // Set the undeformed shape for each element
671  elem_pt->undeformed_beam_pt() = undeformed_wall_pt;
672 
673 
674  // The normal on the wall elements as computed by the FSIHermiteElements
675  // points away from the fluid rather than into the fluid (as assumed
676  // by default)
678 
679  // Displacement control for steady problem? If so, the load on *all*
680  // elements is affected by an unknown -- the external pressure, stored
681  // as the one-and-only value in a Data object: Add it to the
682  // elements' external Data.
684  {
685  //The external pressure is external data for all elements
687  }
688 
689  } // end of loop over elements
690 
691 
692 
693  // Boundary conditions for wall mesh
694  //----------------------------------
695 
696  // Set the boundary conditions: Each end of the beam is fixed in space
697  // Loop over the boundaries (ends of the beam)
698  for(unsigned b=0;b<2;b++)
699  {
700  // Pin displacements in both x and y directions
703  }
704 
705  //Choose control nodes
706  //---------------------
707 
708  // Left boundary
709  ibound=5;
710  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
711  unsigned control_nod=num_nod/2;
712  Left_node_pt= bulk_mesh_pt()->boundary_node_pt(ibound, control_nod);
713 
714  // Right boundary
715  ibound=1;
716  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
717  control_nod=num_nod/2;
718  Right_node_pt= bulk_mesh_pt()->boundary_node_pt(ibound, control_nod);
719 
720 
721  // Set the pointer to the control node on the wall
723 
724  // Add the sub meshes to the problem
729  {
731  }
732 
733  // Combine all submeshes into a single Mesh
735 
736  // Setup FSI
737  //----------
738 
739  // The velocity of the fluid nodes on the wall (fluid mesh boundary 3)
740  // is set by the wall motion -- hence the no-slip condition must be
741  // re-applied whenever a node update is performed for these nodes.
742  // Such tasks may be performed automatically by the auxiliary node update
743  // function specified by a function pointer:
744  ibound=3;
745  num_nod= bulk_mesh_pt()->nboundary_node(ibound);
746  for (unsigned inod=0;inod<num_nod;inod++)
747  {
748  static_cast<AlgebraicNode*>(
749  bulk_mesh_pt()->boundary_node_pt(ibound, inod))->
750  set_auxiliary_node_update_fct_pt(
752  }
753 
754 
755  // Work out which fluid dofs affect the residuals of the wall elements:
756  // We pass the boundary between the fluid and solid meshes and
757  // pointers to the meshes. The interaction boundary is boundary 3 of the
758  // 2D fluid mesh.
759  FSI_functions::setup_fluid_load_info_for_solid_elements<ELEMENT,2>
760  (this,3,Bulk_mesh_pt,Wall_mesh_pt);
761 
762 
763  // Setup equation numbering scheme
764  oomph_info <<"Number of equations: " << assign_eqn_numbers() << std::endl;
765 
766 
767 }//end of constructor
bool Wall_jacobian_ignores_fluid_shear_stress_data
Definition: fsi_jacobian_approximation.cc:387
Mesh * Displacement_control_mesh_pt
Pointer to mesh containing the displacement control element (only!)
Definition: fsi_jacobian_approximation.cc:363
bool Wall_jacobian_ignores_geometric_data
Definition: fsi_jacobian_approximation.cc:383
bool Fluid_jacobian_ignores_geometric_data
Definition: fsi_jacobian_approximation.cc:379
Definition: algebraic_elements.h:55
Definition: nodes.h:86
void pin(const unsigned &i)
Pin the i-th stored variable.
Definition: nodes.h:385
Definition: displacement_control_element.h:106
Data * displacement_control_load_pt() const
Definition: displacement_control_element.h:219
void disable_shear_stress_in_jacobian()
Definition: fsi.h:303
void enable_shear_stress_in_jacobian()
Definition: fsi.h:310
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
Definition: elements.cc:3962
unsigned add_external_data(Data *const &data_pt, const bool &fd=true)
Definition: elements.cc:307
void add_element_pt(GeneralisedElement *const &element_pt)
Add a (pointer to) an element to the mesh.
Definition: mesh.h:617
unsigned Max_newton_iterations
Maximum number of Newton iterations.
Definition: problem.h:599
virtual double interpolated_xi(const Vector< double > &s, const unsigned &i) const
Definition: elements.cc:7104
bool Steady_run
Steady run or unsteady run?
Definition: fsi_jacobian_approximation.cc:181
double & external_pressure()
Access function to value of external pressure.
Definition: steady_ring.cc:79
double Prescribed_y
Prescribed position of control point.
Definition: mpi/distribution/clamped_shell/clamped_shell_with_arclength_cont.cc:54
Data * Pext_data_pt
Pointer to pressure load.
Definition: steady_ring.cc:60
OomphInfo oomph_info
Definition: oomph_definitions.cc:319

References oomph::Mesh::add_element_pt(), oomph::GeneralisedElement::add_external_data(), oomph::FSI_functions::apply_no_slip_on_moving_wall(), b, oomph::FSIWallElement::disable_shear_stress_in_jacobian(), oomph::DisplacementControlElement::displacement_control_load_pt(), e(), oomph::FSIWallElement::enable_shear_stress_in_jacobian(), Global_Physical_Variables::external_pressure(), Global_Physical_Variables::H, oomph::KirchhoffLoveBeamEquations::h_pt(), i, oomph::FiniteElement::interpolated_x(), oomph::SolidFiniteElement::interpolated_xi(), Global_Parameters::Ldown, Global_Physical_Variables::load(), oomph::KirchhoffLoveBeamEquations::load_vector_fct_pt, Global_Parameters::Lup, Mesh_Parameters::ly, Global_Parameters::Ly, oomph::Locate_zeta_helpers::Max_newton_iterations, Mesh_Parameters::ny, GlobalParameters::Ny, oomph::oomph_info, Global_Physical_Variables::Pext_data_pt, oomph::Data::pin(), Global_Physical_Variables::prescribed_traction(), Global_Physical_Variables::Prescribed_y, Global_Physical_Variables::Q, oomph::FSIWallElement::q_pt(), Global_Physical_Variables::Re, Global_Physical_Variables::ReSt, oomph::FSIHermiteBeamElement::set_normal_pointing_out_of_fluid(), Global_Physical_Variables::Sigma0, oomph::KirchhoffLoveBeamEquations::sigma0_pt(), BL_Squash::squash_fct(), Control_Flags::Steady_run, oomph::NavierStokesTractionElement< ELEMENT >::traction_fct_pt, oomph::KirchhoffLoveBeamEquations::undeformed_beam_pt(), and plotDoE::x.

◆ ~FSICollapsibleChannelProblem() [7/7]

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

Destructor (empty)

280 {}

Member Function Documentation

◆ actions_after_adapt() [1/3]

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

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

Actions after adapt: Rebuild the mesh of prescribed traction elements and reset FSI

Reimplemented from oomph::Problem.

898 {
899  // Create prescribed-flux elements from all elements that are
900  // adjacent to boundary 5 and add them to surface mesh
902 
903  // Rebuild the global mesh
905 
906  // Unpin all pressure dofs
909 
910  // Pin redundant pressure dofs
913 
914  // Loop over the traction elements to pass pointer to prescribed
915  // traction function
916  unsigned n_element=Applied_fluid_traction_mesh_pt->nelement();
917  for(unsigned e=0;e<n_element;e++)
918  {
919  // Upcast from GeneralisedElement to NavierStokesTractionElement element
923 
924  // Set the pointer to the prescribed traction function
926  }
927 
928  // The functions used to update the no slip boundary conditions
929  // must be set on any new nodes that have been created during the
930  // mesh adaptation process.
931  // There is no mechanism by which auxiliary update functions
932  // are copied to newly created nodes.
933  // (because, unlike boundary conditions, they don't occur exclusively
934  // at boundaries)
935 
936  // The velocity of the fluid nodes on the wall (fluid mesh boundary 3)
937  // is set by the wall motion -- hence the no-slip condition needs to be
938  // re-applied whenever a node update is performed for these nodes.
939  // Such tasks may be performed automatically by the auxiliary node update
940  // function specified by a function pointer:
941  unsigned ibound=3;
942  unsigned num_nod= bulk_mesh_pt()->nboundary_node(ibound);
943  for (unsigned inod=0;inod<num_nod;inod++)
944  {
945  bulk_mesh_pt()->boundary_node_pt(ibound, inod)->
946  set_auxiliary_node_update_fct_pt(
948  }
949 
950  // (Re-)setup fsi: Work out which fluid dofs affect wall elements
951  // the correspondance between wall dofs and fluid elements is handled
952  // during the remeshing, but the "reverse" association must be done
953  // separately. We need to set up the interaction every time because the fluid
954  // element adjacent to a given solid element's integration point may have
955  // changed.We pass the boundary between the fluid and solid meshes and
956  // pointers to the meshes. The interaction boundary is boundary 3 of
957  // the Fluid mesh.
958  FSI_functions::setup_fluid_load_info_for_solid_elements<ELEMENT,2>
959  (this,3,Bulk_mesh_pt,Wall_mesh_pt);
960 
961 
962 } // end of actions_after_adapt
void rebuild_global_mesh()
Definition: problem.cc:1533
Definition: refineable_navier_stokes_elements.h:322

References oomph::FSI_functions::apply_no_slip_on_moving_wall(), oomph::Mesh::boundary_node_pt(), e(), oomph::Mesh::nboundary_node(), Global_Physical_Variables::prescribed_traction(), and oomph::NavierStokesTractionElement< ELEMENT >::traction_fct_pt.

◆ actions_after_adapt() [2/3]

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

Actions after adapt: Rebuild the mesh of prescribed traction elements and reset FSI

Reimplemented from oomph::Problem.

◆ actions_after_adapt() [3/3]

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

Actions after adapt: Rebuild the mesh of prescribed traction elements and reset FSI

Reimplemented from oomph::Problem.

◆ actions_after_distribute()

template<class ELEMENT >
void FSICollapsibleChannelProblem< ELEMENT >::actions_after_distribute ( )
inline

Actions after distribute: create traction elements and reset FSI.

301  {
302  // Just call actions_after_adapt
304  }
void actions_after_adapt()
Actions after adapt: Rebuild the mesh of prescribed traction elements.
Definition: interaction/fsi_collapsible_channel/fsi_collapsible_channel_adapt.cc:897

◆ actions_after_newton_solve() [1/7]

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

Update the problem after solve (empty)

Reimplemented from oomph::Problem.

371 {}

◆ actions_after_newton_solve() [2/7]

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

Update the problem after solve (empty)

Reimplemented from oomph::Problem.

292 {}

◆ actions_after_newton_solve() [3/7]

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

Update the problem after solve (empty)

Reimplemented from oomph::Problem.

297 {}

◆ actions_after_newton_solve() [4/7]

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

Update the problem after solve (empty)

Reimplemented from oomph::Problem.

320 {}

◆ actions_after_newton_solve() [5/7]

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

Update the problem after solve (empty)

Reimplemented from oomph::Problem.

332 {}

◆ actions_after_newton_solve() [6/7]

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

Update the problem after solve (empty)

Reimplemented from oomph::Problem.

310 {}

◆ actions_after_newton_solve() [7/7]

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

Update the problem after solve (empty)

Reimplemented from oomph::Problem.

307 {}

◆ actions_before_adapt() [1/3]

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

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

Reimplemented from oomph::Problem.

882 {
883  // Kill the traction elements and wipe surface mesh
885 
886  // Rebuild the global mesh.
888 
889 } // end of actions_before_adapt
void delete_traction_elements(Mesh *const &traction_mesh_pt)
Delete prescribed traction elements from the surface mesh.
Definition: interaction/fsi_collapsible_channel/fsi_collapsible_channel_adapt.cc:812

◆ actions_before_adapt() [2/3]

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

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

Reimplemented from oomph::Problem.

◆ actions_before_adapt() [3/3]

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

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

Reimplemented from oomph::Problem.

◆ actions_before_distribute()

template<class ELEMENT >
void FSICollapsibleChannelProblem< ELEMENT >::actions_before_distribute ( )
inline

Actions before distribute: wipe the mesh of prescribed traction elements.

294  {
295  // actions_before_adapt does exactly the same thing, so just call it
297  }
void actions_before_adapt()
Actions before adapt: Wipe the mesh of prescribed traction elements.
Definition: interaction/fsi_collapsible_channel/fsi_collapsible_channel_adapt.cc:881

◆ actions_before_newton_convergence_check() [1/7]

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

Update before checking Newton convergence: Update the nodal positions in the fluid mesh in response to possible changes in the wall shape.

Reimplemented from oomph::Problem.

Reimplemented in SegregatedFSICollapsibleChannelProblem< ELEMENT >, and SegregatedFSICollapsibleChannelProblem< ELEMENT >.

378  {
379  // Update mesh
380  Bulk_mesh_pt->node_update();
381 
382  // Increment counter
383  Newton_iter++;
384  }

References FSICollapsibleChannelProblem< ELEMENT >::Bulk_mesh_pt, and FSICollapsibleChannelProblem< ELEMENT >::Newton_iter.

◆ actions_before_newton_convergence_check() [2/7]

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

Update before checking Newton convergence: Update the nodal positions in the fluid mesh in response to possible changes in the wall shape

Reimplemented from oomph::Problem.

298  {
299  Bulk_mesh_pt->node_update();
300  }

◆ actions_before_newton_convergence_check() [3/7]

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

Update before checking Newton convergence: Update the nodal positions in the fluid mesh in response to possible changes in the wall shape

Reimplemented from oomph::Problem.

303  {
304  Bulk_mesh_pt->node_update();
305  }

◆ actions_before_newton_convergence_check() [4/7]

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

Update no slip before Newton convergence check.

Reimplemented from oomph::Problem.

324  {
325  // Moving wall: No slip; this implies that the velocity needs
326  // to be updated in response to wall motion
327  unsigned ibound=3;
328  unsigned num_nod=bulk_mesh_pt()->nboundary_node(ibound);
329  for (unsigned inod=0;inod<num_nod;inod++)
330  {
331  // Which node are we dealing with?
332  Node* node_pt=bulk_mesh_pt()->boundary_node_pt(ibound,inod);
333 
334  // Apply no slip
336  }
337  }
Definition: nodes.h:906

References oomph::FSI_functions::apply_no_slip_on_moving_wall().

◆ actions_before_newton_convergence_check() [5/7]

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

Update no slip before Newton convergence check.

Reimplemented from oomph::Problem.

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

References oomph::FSI_functions::apply_no_slip_on_moving_wall().

◆ actions_before_newton_convergence_check() [6/7]

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

Update before checking Newton convergence: Update the nodal positions in the fluid mesh in response to possible changes in the wall shape

Reimplemented from oomph::Problem.

316  {
317  Bulk_mesh_pt->node_update();
318  }

◆ actions_before_newton_convergence_check() [7/7]

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

Update before checking Newton convergence: Update the nodal positions in the fluid mesh in response to possible changes in the wall shape

Reimplemented from oomph::Problem.

313  {
314  Bulk_mesh_pt->node_update();
315  }

◆ actions_before_newton_solve() [1/7]

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

Actions before solve. Reset counter for number of Newton iterations.

Reimplemented from oomph::Problem.

Reimplemented in SegregatedFSICollapsibleChannelProblem< ELEMENT >.

366  {
367  Newton_iter=0;
368  }

References FSICollapsibleChannelProblem< ELEMENT >::Newton_iter.

◆ actions_before_newton_solve() [2/7]

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

Update the problem specs before solve (empty)

Reimplemented from oomph::Problem.

289 {}

◆ actions_before_newton_solve() [3/7]

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

Update the problem specs before solve (empty)

Reimplemented from oomph::Problem.

294 {}

◆ actions_before_newton_solve() [4/7]

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

Update the problem specs before solve (empty)

Reimplemented from oomph::Problem.

317 {}

◆ actions_before_newton_solve() [5/7]

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

Update the problem specs before solve (empty)

Reimplemented from oomph::Problem.

329 {}

◆ actions_before_newton_solve() [6/7]

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

Update the problem specs before solve (empty)

Reimplemented from oomph::Problem.

307 {}

◆ actions_before_newton_solve() [7/7]

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

Update the problem specs before solve (empty)

Reimplemented from oomph::Problem.

304 {}

◆ bulk_mesh_pt() [1/7]

template<class ELEMENT >
AlgebraicCollapsibleChannelMesh<ELEMENT>* FSICollapsibleChannelProblem< ELEMENT >::bulk_mesh_pt ( )
inline

Access function for the specific bulk (fluid) mesh.

348  {
349  // Upcast from pointer to the Mesh base class to the specific
350  // element type that we're using here.
351  return dynamic_cast<
352  AlgebraicCollapsibleChannelMesh<ELEMENT>*>
353  (Bulk_mesh_pt);
354  }

References FSICollapsibleChannelProblem< ELEMENT >::Bulk_mesh_pt.

◆ bulk_mesh_pt() [2/7]

template<class ELEMENT >
AlgebraicCollapsibleChannelMesh<ELEMENT>* FSICollapsibleChannelProblem< ELEMENT >::bulk_mesh_pt ( )
inline

Access function for the specific bulk (fluid) mesh.

269  {
270  // Upcast from pointer to the Mesh base class to the specific
271  // element type that we're using here.
272  return dynamic_cast<
274  (Bulk_mesh_pt);
275  }

◆ bulk_mesh_pt() [3/7]

template<class ELEMENT >
RefineableAlgebraicCollapsibleChannelMesh<ELEMENT>* FSICollapsibleChannelProblem< ELEMENT >::bulk_mesh_pt ( )
inline

Access function for the specific bulk (fluid) mesh.

267  {
268  // Upcast from pointer to the Mesh base class to the specific
269  // element type that we're using here.
270  return dynamic_cast<
272  (Bulk_mesh_pt);
273  }
Definition: collapsible_channel_mesh.template.h:591

◆ bulk_mesh_pt() [4/7]

template<class ELEMENT >
ElasticCollapsibleChannelMesh<ELEMENT>* FSICollapsibleChannelProblem< ELEMENT >::bulk_mesh_pt ( )
inline

Access function for the specific bulk (fluid) mesh.

299  {
300  // Upcast from pointer to the Mesh base class to the specific
301  // element type that we're using here.
302  return dynamic_cast<
304  (Bulk_mesh_pt);
305  }
Upgrade mesh to solid mesh.
Definition: fsi_pseudo_solid_collapsible_channel.cc:52

◆ bulk_mesh_pt() [5/7]

template<class ELEMENT >
ElasticRefineableCollapsibleChannelMesh<ELEMENT>* FSICollapsibleChannelProblem< ELEMENT >::bulk_mesh_pt ( )
inline

Access function for the specific bulk (fluid) mesh.

304  {
305  // Upcast from pointer to the Mesh base class to the specific
306  // element type that we're using here.
307  return dynamic_cast<
309  (Bulk_mesh_pt);
310  }
Upgrade mesh to solid mesh.
Definition: fsi_pseudo_solid_collapsible_channel_adapt.cc:52

◆ bulk_mesh_pt() [6/7]

template<class ELEMENT >
RefineableAlgebraicCollapsibleChannelMesh<ELEMENT>* FSICollapsibleChannelProblem< ELEMENT >::bulk_mesh_pt ( )
inline

Access function for the specific bulk (fluid) mesh.

268  {
269  // Upcast from pointer to the Mesh base class to the specific
270  // element type that we're using here.
271  return dynamic_cast<
273  (Bulk_mesh_pt);
274  }

◆ bulk_mesh_pt() [7/7]

template<class ELEMENT >
AlgebraicCollapsibleChannelMesh<ELEMENT>* FSICollapsibleChannelProblem< ELEMENT >::bulk_mesh_pt ( )
inline

Access function for the specific bulk (fluid) mesh.

285  {
286  // Upcast from pointer to the Mesh base class to the specific
287  // element type that we're using here.
288  return dynamic_cast<
290  (Bulk_mesh_pt);
291  }

◆ create_lagrange_multiplier_elements() [1/2]

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

Create elements that impose the prescribed boundary displacement.

Create elements that enforce prescribed boundary motion by Lagrange multipliers

878 {
879  // Lagrange multiplier elements are located on boundary 3:
880  unsigned b=3;
881 
882  // How many bulk elements are adjacent to boundary b?
883  unsigned n_element = bulk_mesh_pt()->nboundary_element(b);
884 
885  // Loop over the bulk elements adjacent to boundary b?
886  for(unsigned e=0;e<n_element;e++)
887  {
888  // Get pointer to the bulk element that is adjacent to boundary b
889  ELEMENT* bulk_elem_pt = dynamic_cast<ELEMENT*>(
890  bulk_mesh_pt()->boundary_element_pt(b,e));
891 
892  //Find the index of the face of element e along boundary b
893  int face_index = bulk_mesh_pt()->face_index_at_boundary(b,e);
894 
895  // Create new element and add to mesh
898  bulk_elem_pt,face_index));
899  }
900 
901 
902  // Loop over the elements in the Lagrange multiplier element mesh
903  // for elements on the top boundary (boundary 3)
905  for(unsigned i=0;i<n_element;i++)
906  {
907  //Cast to a Lagrange multiplier element
911 
912  // Set the GeomObject that defines the boundary shape and set
913  // which bulk boundary we are attached to(needed to extract
914  // the boundary coordinate from the bulk nodes)
916 
917  // Loop over the nodes
918  unsigned nnod=el_pt->nnode();
919  for (unsigned j=0;j<nnod;j++)
920  {
921  Node* nod_pt = el_pt->node_pt(j);
922 
923  // Is the node also on boundary 2 or 4?
924  if ((nod_pt->is_on_boundary(2))||(nod_pt->is_on_boundary(4)))
925  {
926  // How many nodal values were used by the "bulk" element
927  // that originally created this node?
928  unsigned n_bulk_value=el_pt->nbulk_value(j);
929 
930  // The remaining ones are Lagrange multipliers and we pin them.
931  unsigned nval=nod_pt->nvalue();
932  for (unsigned j=n_bulk_value;j<nval;j++)
933  {
934  nod_pt->pin(j);
935  }
936  }
937  }
938  }
939 
940 } // end of create_lagrange_multiplier_elements
SolidMesh * Lagrange_multiplier_mesh_pt
Pointers to mesh of Lagrange multiplier elements.
Definition: fsi_pseudo_solid_collapsible_channel.cc:397
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
virtual bool is_on_boundary() const
Definition: nodes.h:1373

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_lagrange_multiplier_elements() [2/2]

template<class ELEMENT >
void FSICollapsibleChannelProblem< ELEMENT >::create_lagrange_multiplier_elements ( )
private

Create elements that enforce prescribed boundary motion by Lagrange multiplilers

◆ create_traction_elements() [1/6]

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

Create the prescribed traction elements on boundary b.

Create the traction elements.

732 {
733 
734  // How many bulk elements are adjacent to boundary b?
735  unsigned n_element = bulk_mesh_pt->nboundary_element(b);
736 
737  // Loop over the bulk elements adjacent to boundary b?
738  for(unsigned e=0;e<n_element;e++)
739  {
740  // Get pointer to the bulk element that is adjacent to boundary b
741  ELEMENT* bulk_elem_pt = dynamic_cast<ELEMENT*>
742  (bulk_mesh_pt->boundary_element_pt(b,e));
743 
744  //What is the index of the face of element e along boundary b
745  int face_index = bulk_mesh_pt->face_index_at_boundary(b,e);
746 
747  // Build the corresponding prescribed-traction element
748  NavierStokesTractionElement<ELEMENT>* flux_element_pt =
749  new NavierStokesTractionElement<ELEMENT>(bulk_elem_pt,face_index);
750 
751  //Add the prescribed-traction element to the surface mesh
752  traction_mesh_pt->add_element_pt(flux_element_pt);
753 
754  } //end of loop over bulk elements adjacent to boundary b
755 
756 } // 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/6]

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

Create the prescribed traction elements on boundary b.

◆ create_traction_elements() [3/6]

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

Create the prescribed traction elements on boundary b.

◆ create_traction_elements() [4/6]

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

Create the prescribed traction elements on boundary b.

◆ create_traction_elements() [5/6]

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

Create the prescribed traction elements on boundary b.

◆ create_traction_elements() [6/6]

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

Create the prescribed traction elements on boundary b.

◆ delete_lagrange_multiplier_elements() [1/2]

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

Delete elements that enforce prescribed boundary motion by Lagrange multipliers

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

952 {
953  // How many surface elements are in the surface mesh
954  unsigned n_element = Lagrange_multiplier_mesh_pt->nelement();
955 
956  // Loop over the surface elements
957  for(unsigned e=0;e<n_element;e++)
958  {
959  // Kill surface element
961  }
962 
963  // Wipe the mesh
965 
966 } // end of delete_lagrange_multiplier_elements
void flush_element_and_node_storage()
Definition: mesh.h:407

References e().

◆ delete_lagrange_multiplier_elements() [2/2]

template<class ELEMENT >
void FSICollapsibleChannelProblem< ELEMENT >::delete_lagrange_multiplier_elements ( )
private

Delete elements that enforce prescribed boundary motion by Lagrange multiplilers

◆ delete_traction_elements() [1/4]

template<class ELEMENT >
void FSICollapsibleChannelProblem< ELEMENT >::delete_traction_elements ( Mesh *const &  traction_mesh_pt)
private

Delete prescribed traction elements from the surface mesh.

Delete traction elements and wipe the surface mesh.

813 {
814  // How many surface elements are in the surface mesh
815  unsigned n_element = surface_mesh_pt->nelement();
816 
817  // Loop over the surface elements
818  for(unsigned e=0;e<n_element;e++)
819  {
820  // Kill surface element
821  delete surface_mesh_pt->element_pt(e);
822  }
823 
824  // Wipe the mesh
825  surface_mesh_pt->flush_element_and_node_storage();
826 
827 } // 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/4]

template<class ELEMENT >
void FSICollapsibleChannelProblem< ELEMENT >::delete_traction_elements ( Mesh *const &  traction_mesh_pt)
private

Delete prescribed traction elements from the surface mesh.

◆ delete_traction_elements() [3/4]

template<class ELEMENT >
void FSICollapsibleChannelProblem< ELEMENT >::delete_traction_elements ( Mesh *const &  traction_mesh_pt)
private

Delete prescribed traction elements from the surface mesh.

◆ delete_traction_elements() [4/4]

template<class ELEMENT >
void FSICollapsibleChannelProblem< ELEMENT >::delete_traction_elements ( Mesh *const &  traction_mesh_pt)
private

Delete prescribed traction elements from the surface mesh.

◆ doc_solution() [1/6]

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

Doc the solution.

670 {
671 
672 
673 #ifdef MACRO_ELEMENT_NODE_UPDATE
674 
675  // Doc fsi
676  if (CommandLineArgs::Argc>1)
677  {
678  FSI_functions::doc_fsi<MacroElementNodeUpdateNode>(Bulk_mesh_pt,Wall_mesh_pt,doc_info);
679  }
680 
681 #else
682 
683  // Doc fsi
684  if (CommandLineArgs::Argc>1)
685  {
686  FSI_functions::doc_fsi<AlgebraicNode>(Bulk_mesh_pt,Wall_mesh_pt,doc_info);
687  }
688 
689 #endif
690 
691  ofstream some_file;
692  char filename[100];
693 
694  // Number of plot points
695  unsigned npts;
696  npts=5;
697 
698  // Output fluid solution
699  sprintf(filename,"%s/soln%i.dat",doc_info.directory().c_str(),
700  doc_info.number());
701  some_file.open(filename);
702  bulk_mesh_pt()->output(some_file,npts);
703  some_file.close();
704 
705  // Document the wall shape
706  sprintf(filename,"%s/beam%i.dat",doc_info.directory().c_str(),
707  doc_info.number());
708  some_file.open(filename);
709  wall_mesh_pt()->output(some_file,npts);
710  some_file.close();
711 
712 
713  // Write trace file
714  trace_file << time_pt()->time() << " "
715  << Wall_node_pt->x(1) << " "
716  << Left_node_pt->value(0) << " "
717  << Right_node_pt->value(0) << " "
719  << std::endl;
720 
721 } // end_of_doc_solution
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
void output(std::ostream &outfile)
Output for all elements.
Definition: mesh.cc:2027
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
double value(const unsigned &i) const
Definition: nodes.cc:2408
Time *& time_pt()
Return a pointer to the global time object.
Definition: problem.h:1504
double & time()
Return the current value of the continuous time.
Definition: timesteppers.h:123
double P_ext
External pressure.
Definition: fibre.cc:64
string filename
Definition: MergeRestartFiles.py:39
int Argc
Number of arguments + 1.
Definition: oomph_utilities.cc:407

References oomph::CommandLineArgs::Argc, oomph::DocInfo::directory(), MergeRestartFiles::filename, oomph::DocInfo::number(), and Global_Physical_Variables::P_ext.

◆ doc_solution() [2/6]

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

Doc the solution.

◆ doc_solution() [3/6]

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

Doc the solution.

◆ doc_solution() [4/6]

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

Doc the solution.

◆ doc_solution() [5/6]

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

Doc the solution.

◆ doc_solution() [6/6]

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

Doc the solution.

◆ doc_solution_steady()

template<class ELEMENT >
void FSICollapsibleChannelProblem< ELEMENT >::doc_solution_steady ( DocInfo &  doc_info,
ofstream &  trace_file,
const double cpu,
const unsigned niter 
)
virtual

Doc the steady solution.

Doc the solution for a steady run.

857 {
858 
859  ofstream some_file;
860  char filename[100];
861 
862  // Number of plot points
863  unsigned npts;
864  npts=5;
865 
866  // Output fluid solution
867  sprintf(filename,"%s/soln%i.dat",Doc_info.directory().c_str(),
868  Doc_info.number());
869  some_file.open(filename);
870  bulk_mesh_pt()->output(some_file,npts);
871  some_file.close();
872 
873  // Document the wall shape
874  sprintf(filename,"%s/beam%i.dat",Doc_info.directory().c_str(),
875  Doc_info.number());
876  some_file.open(filename);
877  wall_mesh_pt()->output(some_file,npts);
878  some_file.close();
879 
880 // Write restart file
881  sprintf(filename,"%s/restart%i.dat",Doc_info.directory().c_str(),
882  Doc_info.number());
883  some_file.open(filename);
884  some_file.precision(16);
885  dump_it(some_file);
886  some_file.close();
887 
888  // Write trace file
889  trace_file << Global_Physical_Variables::P_ext_data_pt->value(0) << " ";
890  trace_file << Global_Physical_Variables::Yprescr << " ";
891 
892  // Write trace file
893  trace_file << Left_node_pt->value(0) << " "
894  << Right_node_pt->value(0) << " "
895  << cpu << " "
896  << Newton_iter << " "
897  << std::endl;
898 
899 
900 } // end_of_doc_solution_steady
void dump_it(ofstream &dump_file)
Dump problem to disk to allow for restart.
Definition: fsi_chan_problem.h:974
DocInfo Doc_info
DocInfo object.
Definition: fsi_chan_problem.h:472

References GlobalParameters::Doc_info, MergeRestartFiles::filename, Global_Physical_Variables::P_ext_data_pt, and Global_Physical_Variables::Yprescr.

◆ doc_solution_unsteady()

template<class ELEMENT >
void FSICollapsibleChannelProblem< ELEMENT >::doc_solution_unsteady ( DocInfo &  doc_info,
ofstream &  trace_file,
const double cpu,
const unsigned niter 
)
virtual

Doc the unsteady solution.

Doc the solution for an unstady run.

919 {
920 
921  ofstream some_file;
922  char filename[100];
923 
924  // Number of plot points
925  unsigned npts;
926  npts=5;
927 
928  // Output fluid solution
929  sprintf(filename,"%s/soln%i.dat",Doc_info.directory().c_str(),
930  Doc_info.number());
931  some_file.open(filename);
932  bulk_mesh_pt()->output(some_file,npts);
933  some_file.close();
934 
935  // Document the wall shape
936  sprintf(filename,"%s/beam%i.dat",Doc_info.directory().c_str(),
937  Doc_info.number());
938  some_file.open(filename);
939  wall_mesh_pt()->output(some_file,npts);
940  some_file.close();
941 
942 // Write restart file
943  sprintf(filename,"%s/restart%i.dat",Doc_info.directory().c_str(),
944  Doc_info.number());
945  some_file.open(filename);
946  dump_it(some_file);
947  some_file.close();
948 
949  // Write trace file
950  trace_file << time_pt()->time() << " ";
951 
952  // Get/doc y-coordinate of control point
953  Vector<double> r(2);
954  Ctrl_geom_obj_pt->position(S_displ_ctrl,r);
955  trace_file << r[1] << " ";
956 
957  // Write trace file
958  trace_file << Left_node_pt->value(0) << " "
959  << Right_node_pt->value(0) << " "
960  << cpu << " "
961  << Newton_iter << " "
962  << std::endl;
963 
964 
965 } // end_of_doc_solution_steady
r
Definition: UniformPSDSelfTest.py:20

References GlobalParameters::Doc_info, MergeRestartFiles::filename, and UniformPSDSelfTest::r.

◆ dump_it()

template<class ELEMENT >
void FSICollapsibleChannelProblem< ELEMENT >::dump_it ( ofstream &  dump_file)
protected

Dump problem to disk to allow for restart.

Dump the solution to disk to allow for restart.

975 {
976 
977  // Number of submeshes must agree when dumping/restarting so
978  // temporarily add displacement control mesh back in before dumping...
979  if (!Displ_control)
980  {
987  }
988 
989  // Write current external pressure
990  dump_file << Global_Physical_Variables::P_ext_data_pt->value(0)
991  << " # external pressure" << std::endl;
992 
993  // Call generic dump()
994  Problem::dump(dump_file);
995 
996  // ...strip displacement control mesh back out after dumping if
997  // we don't actually need it
998  if (!Displ_control)
999  {
1000  flush_sub_meshes();
1005  }
1006 
1007 
1008 } // end of dump_it
void flush_sub_meshes()
Definition: problem.h:1339

References Global_Physical_Variables::P_ext_data_pt.

◆ restart()

template<class ELEMENT >
void FSICollapsibleChannelProblem< ELEMENT >::restart ( ifstream &  restart_file)
protected

Read problem for restart from specified restart file.

Read solution from disk for restart.

1017 {
1018 
1019 
1020 
1021 // Read external pressure
1022 
1023 // Read line up to termination sign
1024  string input_string;
1025  getline(restart_file,input_string,'#');
1026  restart_file.ignore(80,'\n');
1027 
1029  {
1030  std::cout
1031  << "Increasing external pressure from "
1032  << double(atof(input_string.c_str())) << " to "
1033  << double(atof(input_string.c_str()))+Global_Physical_Variables::P_step
1034  << std::endl;
1035  }
1036  else
1037  {
1038  std::cout << "Running with unchanged external pressure of "
1039  << double(atof(input_string.c_str())) << std::endl;
1040  }
1041 
1042  // Set external pressure
1044  set_value(0,double(atof(input_string.c_str()))+
1046 
1047  // Read the generic problem data from restart file
1048  Problem::read(restart_file);
1049 
1050  //Now update the position of the nodes to be consistent with
1051  //the possible precision loss caused by reading in the data from disk
1052  this->Bulk_mesh_pt->node_update();
1053 
1054  // Strip out displacement control mesh if we don't need it
1055  if (!Displ_control)
1056  {
1057  flush_sub_meshes();
1062  }
1063 
1064 
1065 } // end of restart
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::enable_if_t< PacketLoad, PacketType > read(const TensorMapper &tensorMapper, const StorageIndex &NCIndex, const StorageIndex &CIndex, const StorageIndex &ld)
read, a template function used for loading the data from global memory. This function is used to guar...
Definition: TensorContractionSycl.h:162
double P_step
Definition: fsi_chan_problem.h:62

References Global_Physical_Variables::P_ext_data_pt, Global_Physical_Variables::P_step, and Eigen::TensorSycl::internal::read().

◆ set_initial_condition() [1/7]

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

Apply initial conditions.

Reimplemented from oomph::Problem.

1074 {
1075 
1076  // Check that timestepper is from the BDF family
1077  if (!Steady_flag)
1078  {
1079  if (time_stepper_pt()->type()!="BDF")
1080  {
1081  std::ostringstream error_stream;
1082  error_stream << "Timestepper has to be from the BDF family!\n"
1083  << "You have specified a timestepper from the "
1084  << time_stepper_pt()->type() << " family" << std::endl;
1085 
1086  throw OomphLibError(error_stream.str(),
1089  }
1090  }
1091 
1092 
1093  // Pointer to restart file
1094  ifstream* restart_file_pt=0;
1095 
1096  // Restart?
1097  //---------
1098 
1099  if (Flags::Restart_file_name!="")
1100  {
1101  // Open restart file
1102  restart_file_pt= new ifstream(Flags::Restart_file_name.c_str(),
1103  ios_base::in);
1104  if (restart_file_pt!=0)
1105  {
1106  cout << "Have opened " << Flags::Restart_file_name <<
1107  " for restart. " << std::endl;
1108  restart(*restart_file_pt);
1109  return;
1110  }
1111  else
1112  {
1113  std::ostringstream error_stream;
1114  error_stream
1115  << "ERROR while trying to open " << Flags::Restart_file_name <<
1116  " for restart." << std::endl;
1117 
1118  throw OomphLibError(
1119  error_stream.str(),
1122  }
1123  }
1124 
1125 
1126  // No restart
1127  else
1128  {
1129  // Update the mesh
1130  bulk_mesh_pt()->node_update();
1131 
1132  // Loop over the nodes to set initial guess everywhere
1133  unsigned num_nod = bulk_mesh_pt()->nnode();
1134  for (unsigned n=0;n<num_nod;n++)
1135  {
1136  // Get nodal coordinates
1137  Vector<double> x(2);
1138  x[0]=bulk_mesh_pt()->node_pt(n)->x(0);
1139  x[1]=bulk_mesh_pt()->node_pt(n)->x(1);
1140 
1141  // Assign initial condition: Steady Poiseuille flow
1142  bulk_mesh_pt()->node_pt(n)->set_value(0,6.0*(x[1]/Ly)*(1.0-(x[1]/Ly)));
1143  bulk_mesh_pt()->node_pt(n)->set_value(1,0.0);
1144  }
1145 
1146  // Assign initial values for an impulsive start
1147  bulk_mesh_pt()->assign_initial_values_impulsive();
1148  }
1149 
1150 
1151 } // end of set_initial_condition
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
void restart(ifstream &restart_file)
Read problem for restart from specified restart file.
Definition: fsi_chan_problem.h:1016
std::string type() const
Definition: timesteppers.h:490
string Restart_file_name
Name of restart file.
Definition: fsi_chan_problem.h:251
type
Definition: compute_granudrum_aor.py:141
#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, Flags::Restart_file_name, Flags::Steady_flag, compute_granudrum_aor::type, and plotDoE::x.

◆ set_initial_condition() [2/7]

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

Apply initial conditions.

Reimplemented from oomph::Problem.

◆ set_initial_condition() [3/7]

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

Apply initial conditions.

Reimplemented from oomph::Problem.

◆ set_initial_condition() [4/7]

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

Apply initial conditions.

Reimplemented from oomph::Problem.

◆ set_initial_condition() [5/7]

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

Apply initial conditions.

Reimplemented from oomph::Problem.

◆ set_initial_condition() [6/7]

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

Apply initial conditions.

Reimplemented from oomph::Problem.

◆ set_initial_condition() [7/7]

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

Apply initial conditions.

Reimplemented from oomph::Problem.

◆ steady_run()

template<class ELEMENT >
void FSICollapsibleChannelProblem< ELEMENT >::steady_run
virtual

Steady run.

Steady run; virtual so it can be overloaded in derived problem classes

Reimplemented in SegregatedFSICollapsibleChannelProblem< ELEMENT >, and SegregatedFSICollapsibleChannelProblem< ELEMENT >.

1161 {
1162 
1163  // Set initial value for external pressure (on the wall stiffness scale).
1164  // This can be overwritten in set_initial_condition.
1166  set_value(0,Global_Physical_Variables::Pmin);
1167 
1168  // Apply initial condition
1170 
1171  //Set output directory
1172  Doc_info.set_directory("RESLT");
1173 
1174  // Open a trace file
1175  ofstream trace_file;
1176  char filename[100];
1177  sprintf(filename,"%s/trace.dat",Doc_info.directory().c_str());
1178  trace_file.open(filename);
1179 
1180  // Write trace file header
1181  trace_file << "VARIABLES=\"p<sub>ext</sub>\","
1182  << "\"y<sub>ctrl</sub>\",";
1183  trace_file << "\"u_1\","
1184  << "\"u_2\","
1185  << "\"CPU time for solve\","
1186  << "\"Number of Newton iterations\","
1187  << std::endl;
1188 
1189  trace_file << "ZONE T=\"";
1190  trace_file << "Re=" << Global_Physical_Variables::Re << ", ";
1191  trace_file << "Q=" << Global_Physical_Variables::Q << ", ";
1192  trace_file << "resolution factor: " << Flags::Resolution_factor << ". ";
1193  trace_file << Flags::Run_identifier_string << "\" ";
1194  trace_file << std::endl;
1195 
1196  // Output the initial solution (dummy for CPU time)
1197  doc_solution_steady(Doc_info,trace_file,0.0,0);
1198 
1199  // Increment step number
1200  Doc_info.number()++;
1201 
1202 
1203  // Increment for external pressure (on the wall stiffness scale)
1204  double delta_p=(Global_Physical_Variables::Pmax-
1206 
1207  // Initial and final values for control position
1209 
1210  // Steady run
1211  double delta_y=
1213  double(Flags::Nsteps-1);
1214 
1215 
1216  // Parameter study
1217  //----------------
1218  for (unsigned istep=0;istep<Flags::Nsteps;istep++)
1219  {
1220 
1221  // Displacement control?
1222  if (Displ_control)
1223  {
1224  std::cout << "Solving for control displ = "
1226  << std::endl;
1227  }
1228  else
1229  {
1230  std::cout << "Solving for p_ext = "
1232  << std::endl;
1233  }
1234 
1235  // Solve the problem
1236  //------------------
1237  clock_t t_start = clock();
1238 
1239  // Explit call to the steady Newton solve.
1241 
1242  clock_t t_end= clock();
1243  double cpu=double(t_end-t_start)/CLOCKS_PER_SEC;
1244 
1245 
1246  // Outpt the solution
1247  //-------------------
1248  doc_solution_steady(Doc_info,trace_file,cpu,0);
1249 
1250  // Step number
1251  Doc_info.number()++;
1252 
1253  // Adjust control parameter
1254  if (Displ_control)
1255  {
1256  // Increment control position
1258  }
1259  else
1260  {
1261  // Increment external pressure
1262  double old_p=Global_Physical_Variables::P_ext_data_pt->value(0);
1263  Global_Physical_Variables::P_ext_data_pt->set_value(0,old_p+delta_p);
1264  }
1265 
1266  }
1267 
1268  // Close trace file.
1269  trace_file.close();
1270 
1271 }
virtual void doc_solution_steady(DocInfo &doc_info, ofstream &trace_file, const double &cpu, const unsigned &niter)
Doc the steady solution.
Definition: fsi_chan_problem.h:853
void set_initial_condition()
Apply initial conditions.
Definition: fsi_chan_problem.h:1073
void steady_newton_solve(unsigned const &max_adapt=0)
Definition: problem.cc:9292
string Run_identifier_string
String to identify the run type in trace file.
Definition: fsi_chan_problem.h:248
unsigned Resolution_factor
Resolution factor (multiplier for number of elements across channel)
Definition: fsi_chan_problem.h:236
unsigned Nsteps
Number of steps in parameter study.
Definition: fsi_chan_problem.h:245
double Pmax
Definition: fsi_chan_problem.h:58
double Yprescr_min
Definition: fsi_chan_problem.h:71
double Pmin
Definition: fsi_chan_problem.h:53

References GlobalParameters::Doc_info, MergeRestartFiles::filename, Flags::Nsteps, Global_Physical_Variables::P_ext_data_pt, Global_Physical_Variables::Pmax, Global_Physical_Variables::Pmin, Global_Physical_Variables::Q, Global_Physical_Variables::Re, Flags::Resolution_factor, Flags::Run_identifier_string, Global_Physical_Variables::Yprescr, and Global_Physical_Variables::Yprescr_min.

◆ unsteady_run()

template<class ELEMENT >
void FSICollapsibleChannelProblem< ELEMENT >::unsteady_run ( const double dt = 0.1)
virtual

Unsteady run. Specify timestep or use default of 0.1.

Unsteady run; virtual so it can be overloaded in derived problem classes. Specify timestep or use default of 0.1

Reimplemented in SegregatedFSICollapsibleChannelProblem< ELEMENT >.

1283 {
1284 
1285  // Set initial value for external pressure (on the wall stiffness scale).
1286  // Will be overwritten by restart data if a restart file (and pressure
1287  // jump) are specified
1289  set_value(0,Global_Physical_Variables::Pmax);
1290 
1291  // Initialise timestep -- also sets the weights for all timesteppers
1292  // in the problem.
1293  initialise_dt(dt);
1294 
1295  std::cout << "Pressure before set initial: "
1297  << std::endl;
1298 
1299  // Apply initial condition
1301 
1302  std::cout << "Pressure after set initial: "
1304  << std::endl;
1305 
1306  //Set output directory
1307  Doc_info.set_directory("RESLT");
1308 
1309  // Open a trace file
1310  ofstream trace_file;
1311  char filename[100];
1312  sprintf(filename,"%s/trace.dat",Doc_info.directory().c_str());
1313  trace_file.open(filename);
1314 
1315 
1316  // Write trace file header
1317  trace_file << "VARIABLES=\"time\","
1318  << "\"y<sub>ctrl</sub>\",";
1319  trace_file << "\"u_1\","
1320  << "\"u_2\","
1321  << "\"CPU time for solve\","
1322  << "\"Number of Newton iterations\""
1323  << std::endl;
1324 
1325  trace_file << "ZONE T=\"";
1326  trace_file << "Re=" << Global_Physical_Variables::Re << ", ";
1327  trace_file << "Q=" << Global_Physical_Variables::Q << ", ";
1328  trace_file << "resolution factor: " << Flags::Resolution_factor << ". ";
1329  trace_file << Flags::Run_identifier_string << "\" ";
1330  trace_file << std::endl;
1331 
1332  // Output the initial solution (dummy for CPU time)
1333  doc_solution_unsteady(Doc_info,trace_file,0.0,0);
1334 
1335  // Increment step number
1336  Doc_info.number()++;
1337 
1338  // Timestepping loop
1339  //------------------
1340  for (unsigned istep=0;istep<Flags::Nsteps;istep++)
1341  {
1342 
1343  // Solve the problem
1344  //------------------
1345  clock_t t_start = clock();
1346 
1347  // Explit call to the unsteady Newton solve.
1349 
1350  clock_t t_end= clock();
1351  double cpu=double(t_end-t_start)/CLOCKS_PER_SEC;
1352 
1353 
1354  // Output the solution
1355  //--------------------
1356  doc_solution_unsteady(Doc_info,trace_file,cpu,0);
1357 
1358  // Step number
1359  Doc_info.number()++;
1360 
1361  }
1362 
1363  // Close trace file.
1364  trace_file.close();
1365 
1366 }
virtual void doc_solution_unsteady(DocInfo &doc_info, ofstream &trace_file, const double &cpu, const unsigned &niter)
Doc the unsteady solution.
Definition: fsi_chan_problem.h:914
void initialise_dt(const double &dt)
Definition: problem.cc:13231
void unsteady_newton_solve(const double &dt)
Definition: problem.cc:10953

References GlobalParameters::Doc_info, MergeRestartFiles::filename, Flags::Nsteps, Global_Physical_Variables::P_ext_data_pt, Global_Physical_Variables::Pmax, Global_Physical_Variables::Q, Global_Physical_Variables::Re, Flags::Resolution_factor, and Flags::Run_identifier_string.

◆ wall_mesh_pt() [1/7]

template<class ELEMENT >
OneDLagrangianMesh<FSIHermiteBeamElement>* FSICollapsibleChannelProblem< ELEMENT >::wall_mesh_pt ( )
inline

Access function for the wall mesh.

358  {
359  return Wall_mesh_pt;
360 
361  } // end of access to wall mesh

References FSICollapsibleChannelProblem< ELEMENT >::Wall_mesh_pt.

◆ wall_mesh_pt() [2/7]

template<class ELEMENT >
OneDLagrangianMesh<FSIHermiteBeamElement>* FSICollapsibleChannelProblem< ELEMENT >::wall_mesh_pt ( )
inline

Access function for the wall mesh.

282  {
283  return Wall_mesh_pt;
284 
285  } // end of access to wall mesh

◆ wall_mesh_pt() [3/7]

template<class ELEMENT >
OneDLagrangianMesh<FSIHermiteBeamElement>* FSICollapsibleChannelProblem< ELEMENT >::wall_mesh_pt ( )
inline

Access function for the wall mesh.

280  {
281  return Wall_mesh_pt;
282 
283  } // end of access to wall mesh

◆ wall_mesh_pt() [4/7]

template<class ELEMENT >
OneDLagrangianMesh<FSIHermiteBeamElement>* FSICollapsibleChannelProblem< ELEMENT >::wall_mesh_pt ( )
inline

Access function for the wall mesh.

310  {
311  return Wall_mesh_pt;
312 
313  } // end of access to wall mesh

◆ wall_mesh_pt() [5/7]

template<class ELEMENT >
OneDLagrangianMesh<FSIHermiteBeamElement>* FSICollapsibleChannelProblem< ELEMENT >::wall_mesh_pt ( )
inline

Access function for the wall mesh.

315  {
316  return Wall_mesh_pt;
317 
318  } // end of access to wall mesh

◆ wall_mesh_pt() [6/7]

template<class ELEMENT >
OneDLagrangianMesh<FSIHermiteBeamElement>* & FSICollapsibleChannelProblem< ELEMENT >::wall_mesh_pt ( )
inline

Access function for the wall mesh.

281  {
282  return Wall_mesh_pt;
283  } // end of access to wall mesh

◆ wall_mesh_pt() [7/7]

template<class ELEMENT >
OneDLagrangianMesh<FSIHermiteBeamElement>* FSICollapsibleChannelProblem< ELEMENT >::wall_mesh_pt ( )
inline

Access function for the wall mesh.

297  {
298  return Wall_mesh_pt;
299 
300  } // end of access to wall mesh

Member Data Documentation

◆ Applied_fluid_traction_mesh_pt

template<class ELEMENT >
Mesh * FSICollapsibleChannelProblem< ELEMENT >::Applied_fluid_traction_mesh_pt
private

Pointer to the "surface" mesh that applies the traction at the inflow

◆ Bulk_mesh_pt [1/4]

template<class ELEMENT >
AlgebraicCollapsibleChannelMesh< ELEMENT > * FSICollapsibleChannelProblem< ELEMENT >::Bulk_mesh_pt
protected

◆ Bulk_mesh_pt [2/4]

template<class ELEMENT >
RefineableAlgebraicCollapsibleChannelMesh<ELEMENT>* FSICollapsibleChannelProblem< ELEMENT >::Bulk_mesh_pt
private

Pointer to the "bulk" mesh.

◆ Bulk_mesh_pt [3/4]

template<class ELEMENT >
ElasticCollapsibleChannelMesh<ELEMENT>* FSICollapsibleChannelProblem< ELEMENT >::Bulk_mesh_pt
private

Pointer to the "bulk" mesh.

◆ Bulk_mesh_pt [4/4]

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

Pointer to the "bulk" mesh.

◆ Constitutive_law_pt

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

Constitutive law used to determine the mesh deformation.

◆ Ctrl_geom_obj_pt

template<class ELEMENT >
GeomObject* FSICollapsibleChannelProblem< ELEMENT >::Ctrl_geom_obj_pt
protected

Pointer to GeomObject at which displacement control is applied (or at which wall displacement is monitored in unsteady runs)

◆ Displ_control

template<class ELEMENT >
bool FSICollapsibleChannelProblem< ELEMENT >::Displ_control
protected

Use displacement control?

◆ Displ_control_mesh_pt

template<class ELEMENT >
Mesh* FSICollapsibleChannelProblem< ELEMENT >::Displ_control_mesh_pt
protected

Pointer to the mesh that contains the displacement control element.

◆ Displacement_control_mesh_pt

template<class ELEMENT >
Mesh* FSICollapsibleChannelProblem< ELEMENT >::Displacement_control_mesh_pt
private

Pointer to mesh containing the displacement control element (only!)

◆ Doc_info

template<class ELEMENT >
DocInfo FSICollapsibleChannelProblem< ELEMENT >::Doc_info
protected

DocInfo object.

◆ Fluid_jacobian_ignores_geometric_data

template<class ELEMENT >
bool FSICollapsibleChannelProblem< ELEMENT >::Fluid_jacobian_ignores_geometric_data
private

Flag controlling whether geometric data is ignored when the fluid elements calculate their Jacobian contribution

◆ Lagrange_multiplier_mesh_pt

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

Pointers to mesh of Lagrange multiplier elements.

Pointers to meshes of Lagrange multiplier elements.

◆ Lcollapsible

template<class ELEMENT >
double FSICollapsibleChannelProblem< ELEMENT >::Lcollapsible
protected

x-length in the collapsible part of the channel

Referenced by SegregatedFSICollapsibleChannelProblem< ELEMENT >::SegregatedFSICollapsibleChannelProblem().

◆ Ldown

template<class ELEMENT >
double FSICollapsibleChannelProblem< ELEMENT >::Ldown
protected

x-length in the downstream part of the channel

◆ Left_node_pt

template<class ELEMENT >
Node * FSICollapsibleChannelProblem< ELEMENT >::Left_node_pt
protected

Pointer to the left control node.

◆ Lup

template<class ELEMENT >
double FSICollapsibleChannelProblem< ELEMENT >::Lup
protected

x-length in the upstream part of the channel

◆ Ly

template<class ELEMENT >
double FSICollapsibleChannelProblem< ELEMENT >::Ly
protected

Transverse length.

◆ Ncollapsible

template<class ELEMENT >
unsigned FSICollapsibleChannelProblem< ELEMENT >::Ncollapsible
protected

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

◆ Ndown

template<class ELEMENT >
unsigned FSICollapsibleChannelProblem< ELEMENT >::Ndown
protected

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

◆ Newton_iter

◆ Nup

template<class ELEMENT >
unsigned FSICollapsibleChannelProblem< ELEMENT >::Nup
protected

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

◆ Ny

template<class ELEMENT >
unsigned FSICollapsibleChannelProblem< ELEMENT >::Ny
protected

Number of elements across the channel.

◆ Right_node_pt

template<class ELEMENT >
Node * FSICollapsibleChannelProblem< ELEMENT >::Right_node_pt
protected

Pointer to right control node.

◆ S_displ_ctrl

template<class ELEMENT >
Vector<double> FSICollapsibleChannelProblem< ELEMENT >::S_displ_ctrl
protected

Vector of local coordinates of displacement control point in Ctrl_geom_obj_pt

◆ Steady_flag

template<class ELEMENT >
bool FSICollapsibleChannelProblem< ELEMENT >::Steady_flag
protected

Flag for steady run.

◆ Wall_geom_object_pt

template<class ELEMENT >
MeshAsGeomObject * FSICollapsibleChannelProblem< ELEMENT >::Wall_geom_object_pt
protected

Geometric object incarnation of the wall mesh.

Pointer to geometric object (one Lagrangian, two Eulerian coordinates) that will be built from the wall mesh

Referenced by SegregatedFSICollapsibleChannelProblem< ELEMENT >::SegregatedFSICollapsibleChannelProblem().

◆ Wall_jacobian_ignores_fluid_shear_stress_data

template<class ELEMENT >
bool FSICollapsibleChannelProblem< ELEMENT >::Wall_jacobian_ignores_fluid_shear_stress_data
private

Flag controlling whether fluid shear stress is ignored when wall elements calculate their Jacobian contribition

◆ Wall_jacobian_ignores_geometric_data

template<class ELEMENT >
bool FSICollapsibleChannelProblem< ELEMENT >::Wall_jacobian_ignores_geometric_data
private

Flag controlling whether geometric data is ignored when the wall elements calculate their Jacobian contribution

◆ Wall_mesh_pt

template<class ELEMENT >
OneDLagrangianMesh< FSIHermiteBeamElement > * FSICollapsibleChannelProblem< ELEMENT >::Wall_mesh_pt
protected

Pointer to the "wall" mesh.

Referenced by FSICollapsibleChannelProblem< ELEMENT >::wall_mesh_pt().

◆ Wall_node_pt

template<class ELEMENT >
Node * FSICollapsibleChannelProblem< ELEMENT >::Wall_node_pt
protected

Pointer to control node on the wall.


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