PseudoSolidCapProblem< ELEMENT > Class Template Reference
+ Inheritance diagram for PseudoSolidCapProblem< ELEMENT >:

Public Member Functions

 PseudoSolidCapProblem (const bool &hijack_internal)
 
 ~PseudoSolidCapProblem ()
 Destructor: clean up memory allocated by the object. More...
 
void parameter_study (const string &dir_name)
 
void doc_solution (DocInfo &doc_info)
 Doc the solution. More...
 
 PseudoSolidCapProblem (const bool &hijack_internal)
 
 ~PseudoSolidCapProblem ()
 Destructor: clean up memory allocated by the object. More...
 
void parameter_study (const string &dir_name)
 
void doc_solution (DocInfo &doc_info)
 Doc the solution. More...
 
 PseudoSolidCapProblem (const unsigned &Nx, const unsigned &Nh1, const unsigned &Nh2)
 
 ~PseudoSolidCapProblem ()
 Destructor: clean up memory allocated by the object. More...
 
void parameter_study (const string &dir_name)
 
void doc_solution (DocInfo &doc_info)
 Doc the solution. 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
 
virtual void actions_before_adapt ()
 
virtual void actions_after_adapt ()
 Actions that are to be performed after a mesh adaptation. More...
 
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 ()
 

Private Member Functions

void create_free_surface_elements ()
 Create the free surface elements. More...
 
void create_volume_constraint_elements ()
 Create the volume constraint elements. More...
 
void create_contact_angle_element ()
 Create the contact angle element. More...
 
void create_free_surface_elements ()
 Create the free surface elements. More...
 
void create_volume_constraint_elements ()
 Create the volume constraint elements. More...
 
void create_contact_angle_element ()
 Create the contact angle element. More...
 
void create_free_surface_elements ()
 Create the free surface elements. More...
 
void create_volume_constraint_elements ()
 Create the volume constraint elements. More...
 
void create_contact_angle_element ()
 Create the contact angle element. More...
 

Private Attributes

double Ca
 The Capillary number. More...
 
double Volume
 The prescribed volume of the fluid. More...
 
double Pext
 The external pressure. More...
 
double Angle
 The contact angle. More...
 
ConstitutiveLawConstitutive_law_pt
 Constitutive law used to determine the mesh deformation. More...
 
DataExternal_pressure_data_pt
 Data object whose single value stores the external pressure. More...
 
DataTraded_pressure_data_pt
 
ofstream Trace_file
 Trace file. More...
 
MeshBulk_mesh_pt
 Storage for the bulk mesh. More...
 
MeshFree_surface_mesh_pt
 Storage for the free surface mesh. More...
 
MeshFree_surface_bounding_mesh_pt
 Storage for the element bounding the free surface. More...
 
MeshVolume_computation_mesh_pt
 Storage for the elements that compute the enclosed volume. More...
 
MeshVolume_constraint_mesh_pt
 Storage for the volume constraint. More...
 
ElasticTwoLayerMesh< ELEMENT > * Bulk_mesh_pt
 Storage for the bulk mesh. More...
 

Additional Inherited Members

- Public Types inherited from oomph::Problem
typedef void(* SpatialErrorEstimatorFctPt) (Mesh *&mesh_pt, Vector< double > &elemental_error)
 Function pointer for spatial error estimator. More...
 
typedef void(* SpatialErrorEstimatorWithDocFctPt) (Mesh *&mesh_pt, Vector< double > &elemental_error, DocInfo &doc_info)
 Function pointer for spatial error estimator with doc. More...
 
- Public Attributes inherited from oomph::Problem
bool Shut_up_in_newton_solve
 
- Static Public Attributes inherited from oomph::Problem
static bool Suppress_warning_about_actions_before_read_unstructured_meshes
 
- Protected Types inherited from oomph::Problem
enum  Assembly_method {
  Perform_assembly_using_vectors_of_pairs , Perform_assembly_using_two_vectors , Perform_assembly_using_maps , Perform_assembly_using_lists ,
  Perform_assembly_using_two_arrays
}
 Enumerated flags to determine which sparse assembly method is used. More...
 
- Protected 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_solve ()
 
virtual void actions_after_newton_solve ()
 
virtual void actions_before_newton_convergence_check ()
 
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 void set_initial_condition ()
 
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 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
 
- 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 PseudoSolidCapProblem< ELEMENT >

A class that solves the Navier–Stokes equations to compute the shape of a static interface in a rectangular container with imposed contact angle at the boundary.

A class that solves the Navier–Stokes equations to compute the shape of a static interface between two fluids in a rectangular container with an imposed contact angle at the boundary.

Constructor & Destructor Documentation

◆ PseudoSolidCapProblem() [1/3]

template<class ELEMENT >
PseudoSolidCapProblem< ELEMENT >::PseudoSolidCapProblem ( const bool hijack_internal)

Constructor: Boolean flag indicates if volume constraint is applied by hijacking internal or external pressure

Constructor: Pass boolean flag to indicate if the volume constraint is applied by hijacking an internal pressure or the external pressure

592  :
593  Ca(2.1), //Initialise value of Ca to some random value
594  Volume(0.125), //Initialise the value of the volume
595  // the physical volume divided by 2pi
596  Pext(1.23), //Initialise the external pressure to some random value
597  Angle(0.5*MathematicalConstants::Pi) //Initialise the contact angle
598 {
599  //Set the wall normal
603 
604  // Number of elements in the horizontal direction
605  unsigned nx=4;
606 
607  // Number of elements in the vertical direction
608  unsigned nh=4;
609 
610  // Halfwidth of domain
611  double half_width=0.5;
612 
613  //Construct mesh
614  Bulk_mesh_pt = new ElasticRectangularQuadMesh<ELEMENT>(nx,nh,half_width,1.0);
615 
616  //Create a Data object whose single value stores the
617  //external pressure
619 
620  // Set external pressure
622 
623  // Which pressure are we trading for the volume constraint: We
624  // can either hijack an internal pressure or use the external pressure.
625  if (hijack_internal)
626  {
627  // The external pressure is pinned -- the external pressure
628  // sets the pressure throughout the domain -- we do not have
629  // the liberty to fix another pressure value!
631 
632  //Hijack one of the pressure values in the fluid and use it
633  //as the pressure whose value is determined by the volume constraint.
634  //(Its value will affect the residual of that element but it will not
635  //be determined by it, i.e. it's hijacked).
636  Traded_pressure_data_pt = dynamic_cast<ELEMENT*>(
637  Bulk_mesh_pt->element_pt(0))->hijack_internal_value(0,0);
638  }
639  else
640  {
641  // Regard the external pressure is an unknown and add
642  // it to the problem's global data so it gets included
643  // in the equation numbering. Note that, at the moment,
644  // there's no equation that determines its value!
646 
647  // Declare the external pressure to be the pressure determined
648  // by the volume constraint, i.e. the pressure that's "traded":
650 
651  // Since the external pressure is "traded" for the volume constraint,
652  // it no longer sets the overall pressure, and we
653  // can add an arbitrary constant to all pressures. To make
654  // the solution unique, we pin a single pressure value in the bulk:
655  // We arbitrarily set the pressure dof 0 in element 0 to zero.
656  dynamic_cast<ELEMENT*>(Bulk_mesh_pt->element_pt(0))->fix_pressure(0,0.0);
657  }
658 
659  //Set the constituive law
662 
663  //Loop over the elements to set the consitutive law and jacobian
664  unsigned n_bulk = Bulk_mesh_pt->nelement();
665  for(unsigned e=0;e<n_bulk;e++)
666  {
667  ELEMENT* el_pt =
668  dynamic_cast<ELEMENT*>(Bulk_mesh_pt->element_pt(e));
669 
670  el_pt->constitutive_law_pt() = Constitutive_law_pt;
671  }
672 
673  //Set the boundary conditions
674 
675  //Fluid velocity conditions
676  //Pin the velocities on all boundaries apart from the free surface
677  //(boundary 2) where all velocities are free, and apart from the symmetry
678  //line (boundary 3) where only the horizontal velocity is pinned
679  unsigned n_bound=Bulk_mesh_pt->nboundary();
680  for (unsigned b=0;b<n_bound;b++)
681  {
682  if (b!=2)
683  {
684  //Find the number of nodes on the boundary
685  unsigned n_boundary_node = Bulk_mesh_pt->nboundary_node(b);
686  //Loop over the nodes on the boundary
687  for(unsigned n=0;n<n_boundary_node;n++)
688  {
691  if (b!=3)
692  {
694  }
695  }
696  }
697  } //end_of_fluid_boundary_conditions
698 
699  //PesudoSolid boundary conditions
700  for (unsigned b=0;b<n_bound;b++)
701  {
702  if (b!=2)
703  {
704  //Find the number of nodes on the boundary
705  unsigned n_boundary_node = Bulk_mesh_pt->nboundary_node(b);
706  //Loop over the nodes on the boundary
707  for(unsigned n=0;n<n_boundary_node;n++)
708  {
709  //Pin vertical displacement on the bottom
710  if(b==0)
711  {
712  static_cast<SolidNode*>(Bulk_mesh_pt->boundary_node_pt(b,n))
713  ->pin_position(1);
714  }
715  if((b==1) || (b==3))
716  {
717  //Pin horizontal displacement on the sizes
718  static_cast<SolidNode*>(Bulk_mesh_pt->boundary_node_pt(b,n))
719  ->pin_position(0);
720  }
721  }
722  } //end_of_solid_boundary_conditions
723  }
724 
725  //Constrain all nodes only to move vertically (not horizontally)
726  {
727  unsigned n_node = Bulk_mesh_pt->nnode();
728  for(unsigned n=0;n<n_node;n++)
729  {
730  static_cast<SolidNode*>(Bulk_mesh_pt->node_pt(n))->pin_position(0);
731  }
732  } //end_of_constraint
733 
734  //Create the free surface elements
736 
737  //Create the volume constraint elements
739 
740  //Need to make the bounding element
742 
743  //Now need to add all the meshes
744  this->add_sub_mesh(Bulk_mesh_pt);
749 
750  //and build the global mesh
751  this->build_global_mesh();
752 
753  //Setup all the equation numbering and look-up schemes
754  cout << "Number of unknowns: " << assign_eqn_numbers() << std::endl;
755 
756 } //end_of_constructor
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Scalar * b
Definition: benchVecAdd.cpp:17
void create_volume_constraint_elements()
Create the volume constraint elements.
Definition: axi_static_cap.cc:852
Mesh * Volume_computation_mesh_pt
Storage for the elements that compute the enclosed volume.
Definition: axi_static_cap.cc:577
double Volume
The prescribed volume of the fluid.
Definition: axi_static_cap.cc:545
double Angle
The contact angle.
Definition: axi_static_cap.cc:551
Data * Traded_pressure_data_pt
Definition: axi_static_cap.cc:562
Mesh * Volume_constraint_mesh_pt
Storage for the volume constraint.
Definition: axi_static_cap.cc:580
Data * External_pressure_data_pt
Data object whose single value stores the external pressure.
Definition: axi_static_cap.cc:557
Mesh * Bulk_mesh_pt
Storage for the bulk mesh.
Definition: axi_static_cap.cc:568
void create_contact_angle_element()
Create the contact angle element.
Definition: axi_static_cap.cc:898
ConstitutiveLaw * Constitutive_law_pt
Constitutive law used to determine the mesh deformation.
Definition: axi_static_cap.cc:554
Mesh * Free_surface_bounding_mesh_pt
Storage for the element bounding the free surface.
Definition: axi_static_cap.cc:574
void create_free_surface_elements()
Create the free surface elements.
Definition: axi_static_cap.cc:805
Mesh * Free_surface_mesh_pt
Storage for the free surface mesh.
Definition: axi_static_cap.cc:571
double Ca
The Capillary number.
Definition: axi_static_cap.cc:542
double Pext
The external pressure.
Definition: axi_static_cap.cc:548
Definition: nodes.h:86
void pin(const unsigned &i)
Pin the i-th stored variable.
Definition: nodes.h:385
void set_value(const unsigned &i, const double &value_)
Definition: nodes.h:271
Definition: rectangular_quadmesh.template.h:423
Definition: constitutive_laws.h:699
unsigned long nboundary_node(const unsigned &ibound) const
Return number of nodes on a particular boundary.
Definition: mesh.h:833
unsigned nboundary() const
Return number of boundaries.
Definition: mesh.h:827
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
Node *& node_pt(const unsigned long &n)
Return pointer to global node n.
Definition: mesh.h:436
Node *& boundary_node_pt(const unsigned &b, const unsigned &n)
Return pointer to node n on boundary b.
Definition: mesh.h:493
unsigned long nelement() const
Return number of elements in the mesh.
Definition: mesh.h:590
unsigned add_sub_mesh(Mesh *const &mesh_pt)
Definition: problem.h:1330
void add_global_data(Data *const &global_data_pt)
Definition: problem.h:1654
void build_global_mesh()
Definition: problem.cc:1493
unsigned long assign_eqn_numbers(const bool &assign_local_eqn_numbers=true)
Definition: problem.cc:1989
Definition: nodes.h:1686
double Pi
Definition: two_d_biharmonic.cc:235
double Nu
Poisson's ratio.
Definition: TwenteMeshGluing.cpp:71
Vector< double > Wall_normal
Direction of the wall normal vector.
Definition: axi_static_cap.cc:59
const unsigned nx
Definition: ConstraintElementsUnitTest.cpp:30

References oomph::Problem::add_global_data(), oomph::Problem::add_sub_mesh(), oomph::Problem::assign_eqn_numbers(), b, oomph::Mesh::boundary_node_pt(), oomph::Problem::build_global_mesh(), PseudoSolidCapProblem< ELEMENT >::Bulk_mesh_pt, PseudoSolidCapProblem< ELEMENT >::Constitutive_law_pt, PseudoSolidCapProblem< ELEMENT >::create_contact_angle_element(), PseudoSolidCapProblem< ELEMENT >::create_free_surface_elements(), PseudoSolidCapProblem< ELEMENT >::create_volume_constraint_elements(), e(), oomph::Mesh::element_pt(), PseudoSolidCapProblem< ELEMENT >::External_pressure_data_pt, PseudoSolidCapProblem< ELEMENT >::Free_surface_bounding_mesh_pt, PseudoSolidCapProblem< ELEMENT >::Free_surface_mesh_pt, n, oomph::Mesh::nboundary(), oomph::Mesh::nboundary_node(), oomph::Mesh::nelement(), oomph::Mesh::nnode(), oomph::Mesh::node_pt(), Global_Physical_Variables::Nu, Mesh_Parameters::nx, PseudoSolidCapProblem< ELEMENT >::Pext, oomph::Data::pin(), oomph::Data::set_value(), PseudoSolidCapProblem< ELEMENT >::Traded_pressure_data_pt, PseudoSolidCapProblem< ELEMENT >::Volume_computation_mesh_pt, PseudoSolidCapProblem< ELEMENT >::Volume_constraint_mesh_pt, and Global_Physical_Variables::Wall_normal.

◆ ~PseudoSolidCapProblem() [1/3]

template<class ELEMENT >
PseudoSolidCapProblem< ELEMENT >::~PseudoSolidCapProblem

Destructor: clean up memory allocated by the object.

Destructor. Make sure to clean up all allocated memory, so that multiple instances of the problem don't lead to excessive memory usage.

765 {
766  //Delete the contact angle element
770  //Delete the volume constraint mesh
772  //Delete the surface volume computation elements
773  unsigned n_element = Volume_computation_mesh_pt->nelement();
774  for(unsigned e=0;e<n_element;e++)
776  //Now flush the storage
778  //Now delete the mesh
780  //Delete the free surface elements
781  n_element = Free_surface_mesh_pt->nelement();
782  for(unsigned e=0;e<n_element;e++)
783  {delete Free_surface_mesh_pt->element_pt(e);}
784  //Now flush the storage
786  //Now delete the mesh
787  delete Free_surface_mesh_pt;
788 
789  //Delete the constitutive law
790  delete Constitutive_law_pt;
791 
792  //If not the same as the external pressure, delete the traded pressure
794  {delete Traded_pressure_data_pt;}
795  //Next delete the external data
797  //Then delete the bulk mesh
798  delete Bulk_mesh_pt;
799 }
void flush_element_and_node_storage()
Definition: mesh.h:407

References Constitutive::Constitutive_law_pt, and e().

◆ PseudoSolidCapProblem() [2/3]

template<class ELEMENT >
PseudoSolidCapProblem< ELEMENT >::PseudoSolidCapProblem ( const bool hijack_internal)

Constructor: Boolean flag indicates if volume constraint is applied by hijacking internal or external pressure

◆ ~PseudoSolidCapProblem() [2/3]

template<class ELEMENT >
PseudoSolidCapProblem< ELEMENT >::~PseudoSolidCapProblem ( )

Destructor: clean up memory allocated by the object.

◆ PseudoSolidCapProblem() [3/3]

template<class ELEMENT >
PseudoSolidCapProblem< ELEMENT >::PseudoSolidCapProblem ( const unsigned Nx,
const unsigned Nh1,
const unsigned Nh2 
)

Constructor: Pass boolean flag to indicate if the volume constraint is applied by hijacking an internal pressure or the external pressure

829  :
830  Ca(2.1), //Initialise value of Ca to some random value
831  Volume(0.5), //Initialise the value of the volume
832  Pext(1.23), //Initialise the external pressure to some random value
833  Angle(0.5*MathematicalConstants::Pi) //Initialise the contact angle
834 {
835  //Set the wall normal
839 
840  //Construct mesh
841  Bulk_mesh_pt = new ElasticTwoLayerMesh<ELEMENT>(Nx,Nh1,Nh2,0.5,1.0,1.0);
842 
843  //Hijack one of the pressure values in the fluid and use it
844  //as the pressure whose value is determined by the volume constraint.
845  //(Its value will affect the residual of that element but it will not
846  //be determined by it, i.e. it's hijacked).
847  Traded_pressure_data_pt = dynamic_cast<ELEMENT*>(
848  Bulk_mesh_pt->upper_layer_element_pt(0))->hijack_internal_value(0,0);
849 
850  //Set the constituive law
853 
854  //Loop over the elements to set the consitutive law
855  unsigned n_bulk = Bulk_mesh_pt->nelement();
856  for(unsigned e=0;e<n_bulk;e++)
857  {
858  ELEMENT* el_pt =
859  dynamic_cast<ELEMENT*>(Bulk_mesh_pt->element_pt(e));
860 
861  el_pt->constitutive_law_pt() = Constitutive_law_pt;
862  }
863 
864  //Set the boundary conditions
865 
866  //Fluid velocity conditions
867  //Pin the velocities on all external boundaries apart from the symmetry
868  //line boundaries 4 and 5) where only the horizontal velocity is pinned
869  for (unsigned b=0;b<6;b++)
870  {
871  //Find the number of nodes on the boundary
872  unsigned n_boundary_node = Bulk_mesh_pt->nboundary_node(b);
873  //Loop over the nodes on the boundary
874  for(unsigned n=0;n<n_boundary_node;n++)
875  {
877  if((b!=4) && (b!=5))
878  {
880  }
881  }
882  } //end_of_fluid_boundary_conditions
883 
884  //PesudoSolid boundary conditions,
885  for(unsigned b=0;b<6;b++)
886  {
887  //Find the number of nodes on the boundary
888  unsigned n_boundary_node = Bulk_mesh_pt->nboundary_node(b);
889  //Loop over the nodes on the boundary
890  for(unsigned n=0;n<n_boundary_node;n++)
891  {
892  //Pin vertical displacement on the bottom and top
893  if((b==0) || (b==3))
894  {
895  static_cast<SolidNode*>(Bulk_mesh_pt->boundary_node_pt(b,n))
896  ->pin_position(1);
897  }
898  //Pin horizontal displacement on the sides
899  if((b==1) || (b==2) || (b==4) || (b==5))
900  {
901  static_cast<SolidNode*>(Bulk_mesh_pt->boundary_node_pt(b,n))
902  ->pin_position(0);
903  }
904  }
905  } //end_of_solid_boundary_conditions
906 
907  //Constrain all nodes only to move vertically (not horizontally)
908  {
909  unsigned n_node = Bulk_mesh_pt->nnode();
910  for(unsigned n=0;n<n_node;n++)
911  {
912  static_cast<SolidNode*>(Bulk_mesh_pt->node_pt(n))->pin_position(0);
913  }
914  } //end_of_constraint
915 
916  // Pin a single pressure value in the lower fluid:
917  // Set the pressure dof 0 in element 0 to zero.
918  dynamic_cast<ELEMENT*>(Bulk_mesh_pt->element_pt(0))->fix_pressure(0,0.0);
919 
920  //Create the free surface elements
922 
923  //Create the volume constraint elements
925 
926  //Need to make the bounding element
928 
929  //Now need to add all the meshes
930  this->add_sub_mesh(Bulk_mesh_pt);
935 
936  //and build the global mesh
937  this->build_global_mesh();
938 
939  //Setup all the equation numbering and look-up schemes
940  cout << "Number of unknowns: " << assign_eqn_numbers() << std::endl;
941 
942 } //end_of_constructor
Definition: static_two_layer.cc:454
unsigned Nx
Number of elements in each direction (used by SimpleCubicMesh)
Definition: structured_cubic_point_source.cc:114

References oomph::Problem::add_sub_mesh(), oomph::Problem::assign_eqn_numbers(), b, oomph::Mesh::boundary_node_pt(), oomph::Problem::build_global_mesh(), PseudoSolidCapProblem< ELEMENT >::Bulk_mesh_pt, PseudoSolidCapProblem< ELEMENT >::Constitutive_law_pt, PseudoSolidCapProblem< ELEMENT >::create_contact_angle_element(), PseudoSolidCapProblem< ELEMENT >::create_free_surface_elements(), PseudoSolidCapProblem< ELEMENT >::create_volume_constraint_elements(), e(), oomph::Mesh::element_pt(), PseudoSolidCapProblem< ELEMENT >::Free_surface_bounding_mesh_pt, PseudoSolidCapProblem< ELEMENT >::Free_surface_mesh_pt, n, oomph::Mesh::nboundary_node(), oomph::Mesh::nelement(), oomph::Mesh::nnode(), oomph::Mesh::node_pt(), Global_Physical_Variables::Nu, GlobalParameters::Nx, oomph::Data::pin(), PseudoSolidCapProblem< ELEMENT >::Traded_pressure_data_pt, PseudoSolidCapProblem< ELEMENT >::Volume_computation_mesh_pt, PseudoSolidCapProblem< ELEMENT >::Volume_constraint_mesh_pt, and Global_Physical_Variables::Wall_normal.

◆ ~PseudoSolidCapProblem() [3/3]

template<class ELEMENT >
PseudoSolidCapProblem< ELEMENT >::~PseudoSolidCapProblem ( )

Destructor: clean up memory allocated by the object.

Member Function Documentation

◆ create_contact_angle_element() [1/3]

template<class ELEMENT >
void PseudoSolidCapProblem< ELEMENT >::create_contact_angle_element
private

Create the contact angle element.

899 {
901 
902  //Find the element at the end of the free surface
903  //The elements are assigned in order of increasing x coordinate
904  unsigned n_free_surface = Free_surface_mesh_pt->nelement();
905 
906  //Make the bounding element for the contact angle constraint
907  //which works because the order of elements in the mesh is known
910  (Free_surface_mesh_pt->element_pt(n_free_surface-1))->
911  make_bounding_element(1);
912 
913  //Set the contact angle (strong imposition)
914  el_pt->set_contact_angle(&Angle);
915 
916  //Set the capillary number
917  el_pt->ca_pt() = &Ca;
918 
919  //Set the wall normal of the external boundary
920  el_pt->wall_unit_normal_fct_pt()
922 
923  //Add the element to the mesh
925 
926 } //end_of_create_contact_angle_element
Specialise the Elastic update case to axisymmetric equations.
Definition: specific_node_update_interface_elements.h:1257
Definition: interface_elements.h:54
WallUnitNormalFctPt & wall_unit_normal_fct_pt()
Access function: Pointer to wall unit normal function.
Definition: interface_elements.h:141
double *& ca_pt()
Access function to the pointer specifying the capillary number.
Definition: interface_elements.h:172
void set_contact_angle(double *const &angle_pt, const bool &strong=true)
Definition: interface_elements.cc:47
Definition: mesh.h:67
void add_element_pt(GeneralisedElement *const &element_pt)
Add a (pointer to) an element to the mesh.
Definition: mesh.h:617
void wall_unit_normal_fct(const Vector< double > &x, Vector< double > &normal)
Function that specifies the wall unit normal.
Definition: axi_static_cap.cc:62

References Global_Physical_Variables::Angle, Global_Physical_Variables::Ca, oomph::FluidInterfaceBoundingElement::ca_pt(), oomph::Mesh::nelement(), oomph::FluidInterfaceBoundingElement::set_contact_angle(), Global_Physical_Variables::wall_unit_normal_fct(), and oomph::FluidInterfaceBoundingElement::wall_unit_normal_fct_pt().

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

◆ create_contact_angle_element() [2/3]

template<class ELEMENT >
void PseudoSolidCapProblem< ELEMENT >::create_contact_angle_element ( )
private

Create the contact angle element.

◆ create_contact_angle_element() [3/3]

template<class ELEMENT >
void PseudoSolidCapProblem< ELEMENT >::create_contact_angle_element ( )
private

Create the contact angle element.

◆ create_free_surface_elements() [1/3]

template<class ELEMENT >
void PseudoSolidCapProblem< ELEMENT >::create_free_surface_elements
private

Create the free surface elements.

806 {
807  //Allocate storage for the free surface mesh
809 
810  //Loop over boundary 2 and create the interface elements
811  unsigned b=2;
812 
813  // How many bulk fluid elements are adjacent to boundary b?
814  unsigned n_element = Bulk_mesh_pt->nboundary_element(b);
815 
816  // Loop over the bulk fluid elements adjacent to boundary b?
817  for(unsigned e=0;e<n_element;e++)
818  {
819  // Get pointer to the bulk fluid element that is
820  // adjacent to boundary b
821  ELEMENT* bulk_elem_pt = dynamic_cast<ELEMENT*>(
823 
824  //Find the index of the face of element e along boundary b
825  int face_index = Bulk_mesh_pt->face_index_at_boundary(b,e);
826 
827  // Create new element
830  bulk_elem_pt,face_index);
831 
832  // Add it to the mesh
834 
835  //Add the appropriate boundary number
837 
838  //Add the capillary number
839  el_pt->ca_pt() = &Ca;
840 
841  //Add the external pressure data
843  }
844 
845 }
void set_boundary_number_in_bulk_mesh(const unsigned &b)
Set function for the boundary number in bulk mesh.
Definition: elements.h:4482
double *& ca_pt()
Pointer to the Capillary number.
Definition: interface_elements.h:492
void set_external_pressure_data(Data *external_pressure_data_pt)
Definition: interface_elements.h:539
int face_index_at_boundary(const unsigned &b, const unsigned &e) const
Definition: mesh.h:896
unsigned nboundary_element(const unsigned &b) const
Return number of finite elements that are adjacent to boundary b.
Definition: mesh.h:878
FiniteElement * boundary_element_pt(const unsigned &b, const unsigned &e) const
Return pointer to e-th finite element on boundary b.
Definition: mesh.h:840

References b, Global_Physical_Variables::Ca, oomph::FluidInterfaceElement::ca_pt(), e(), oomph::FaceElement::set_boundary_number_in_bulk_mesh(), and oomph::FluidInterfaceElement::set_external_pressure_data().

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

◆ create_free_surface_elements() [2/3]

template<class ELEMENT >
void PseudoSolidCapProblem< ELEMENT >::create_free_surface_elements ( )
private

Create the free surface elements.

◆ create_free_surface_elements() [3/3]

template<class ELEMENT >
void PseudoSolidCapProblem< ELEMENT >::create_free_surface_elements ( )
private

Create the free surface elements.

◆ create_volume_constraint_elements() [1/3]

template<class ELEMENT >
void PseudoSolidCapProblem< ELEMENT >::create_volume_constraint_elements
private

Create the volume constraint elements.

853 {
854  //Build the single volume constraint element
856  VolumeConstraintElement* vol_constraint_element =
858  Volume_constraint_mesh_pt->add_element_pt(vol_constraint_element);
859 
860  //Now create the volume computation elements
862 
863  //Loop over all boundaries
864  for(unsigned b=0;b<4;b++)
865  {
866  // How many bulk fluid elements are adjacent to boundary b?
867  unsigned n_element = Bulk_mesh_pt->nboundary_element(b);
868 
869  // Loop over the bulk fluid elements adjacent to boundary b?
870  for(unsigned e=0;e<n_element;e++)
871  {
872  // Get pointer to the bulk fluid element that is
873  // adjacent to boundary b
874  ELEMENT* bulk_elem_pt = dynamic_cast<ELEMENT*>(
876 
877  //Find the index of the face of element e along boundary b
878  int face_index = Bulk_mesh_pt->face_index_at_boundary(b,e);
879 
880  // Create new element
883  bulk_elem_pt,face_index);
884 
885  //Set the "master" volume control element
886  el_pt->set_volume_constraint_element(vol_constraint_element);
887 
888  // Add it to the mesh
890  }
891  }
892 } //end_of_create_volume_constraint_elements
Definition: constrained_volume_elements.h:605
void set_volume_constraint_element(VolumeConstraintElement *const &vol_constraint_el_pt, const bool &check_nodal_data=true)
Definition: constrained_volume_elements.h:261
Definition: constrained_volume_elements.h:66

References b, e(), oomph::Mesh::nboundary_element(), oomph::VolumeConstraintBoundingElement::set_volume_constraint_element(), and Global_Physical_Variables::Volume.

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

◆ create_volume_constraint_elements() [2/3]

template<class ELEMENT >
void PseudoSolidCapProblem< ELEMENT >::create_volume_constraint_elements ( )
private

Create the volume constraint elements.

◆ create_volume_constraint_elements() [3/3]

template<class ELEMENT >
void PseudoSolidCapProblem< ELEMENT >::create_volume_constraint_elements ( )
private

Create the volume constraint elements.

◆ doc_solution() [1/3]

template<class ELEMENT >
void PseudoSolidCapProblem< ELEMENT >::doc_solution ( DocInfo doc_info)

Doc the solution.

978 {
979  //Output stream
980  ofstream some_file;
981  char filename[100];
982 
983  // Number of plot points
984  unsigned npts=5;
985 
986  //Output domain
987  sprintf(filename,"%s/soln%i.dat",doc_info.directory().c_str(),
988  doc_info.number());
989  some_file.open(filename);
990  Bulk_mesh_pt->output(some_file,npts);
991  some_file.close();
992 
993 
994  // Number of interface elements
995  unsigned ninterface=Free_surface_mesh_pt->nelement();
996  //Find number of nodes in the last interface element
997  unsigned np = Free_surface_mesh_pt->finite_element_pt(ninterface-1)->nnode();
998  // Document the contact angle (in degrees), the height of the interface at
999  // the centre of the container, the height at the wall, the computed
1000  // pressure drop across the interface and
1001  // the analytic prediction of the pressure drop.
1004  ->node_pt(0)->x(1)
1005  << " "
1006  << Free_surface_mesh_pt->finite_element_pt(ninterface-1)
1007  ->node_pt(np-1)->x(1);
1008  Trace_file << " "
1009  <<
1010  dynamic_cast<ELEMENT*>(Bulk_mesh_pt->element_pt(0))->p_axi_nst(0)-
1012  Trace_file << " " << -4.0*cos(Angle)/Ca;
1013  Trace_file << std::endl;
1014 
1015 } //end_of_doc_solution
AnnoyingScalar cos(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:136
ofstream Trace_file
Trace file.
Definition: axi_static_cap.cc:565
double value(const unsigned &i) const
Definition: nodes.h:293
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
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
FiniteElement * finite_element_pt(const unsigned &e) const
Definition: mesh.h:473
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
string filename
Definition: MergeRestartFiles.py:39

References Global_Physical_Variables::Angle, Global_Physical_Variables::Ca, cos(), oomph::DocInfo::directory(), MergeRestartFiles::filename, oomph::DocInfo::number(), BiharmonicTestFunctions2::Pi, and oomph::Problem_Parameter::Trace_file.

◆ doc_solution() [2/3]

template<class ELEMENT >
void PseudoSolidCapProblem< ELEMENT >::doc_solution ( DocInfo doc_info)

Doc the solution.

◆ doc_solution() [3/3]

template<class ELEMENT >
void PseudoSolidCapProblem< ELEMENT >::doc_solution ( DocInfo doc_info)

Doc the solution.

◆ parameter_study() [1/3]

template<class ELEMENT >
void PseudoSolidCapProblem< ELEMENT >::parameter_study ( const string &  dir_name)

Peform a parameter study: Solve problem for a range of contact angles Pass name of output directory as a string

Perform a parameter study. Pass name of output directory as a string

936 {
937  // Create DocInfo object (allows checking if output directory exists)
938  DocInfo doc_info;
939  doc_info.set_directory(dir_name);
940  doc_info.number()=0;
941 
942  // Open trace file
943  char filename[100];
944  sprintf(filename,"%s/trace.dat",doc_info.directory().c_str());
945  Trace_file.open(filename);
946  Trace_file << "VARIABLES=\"<greek>a</greek><sub>prescribed</sub>\",";
947  Trace_file << "\"h<sub>left</sub>\",\"h<sub>right</sub>\",";
948  Trace_file << "\"p<sub>fluid</sub>-p<sub>ext</sub>\",";
949  Trace_file << "\"<greek>D</greek>p<sub>exact</sub>\"";
950  Trace_file << std::endl;
951 
952  //Solve the problem for six different contact angles
953  for(unsigned i=0;i<6;i++)
954  {
955  //Solve the problem
957 
958  //Output result
959  doc_solution(doc_info);
960 
961  // Bump up counter
962  doc_info.number()++;
963 
964  //Decrease the contact angle
965  Angle -= 5.0*MathematicalConstants::Pi/180.0;
966  }
967 
968 }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
void doc_solution(DocInfo &doc_info)
Doc the solution.
Definition: axi_static_cap.cc:977
Definition: oomph_utilities.h:499
void set_directory(const std::string &directory)
Definition: oomph_utilities.cc:298
void steady_newton_solve(unsigned const &max_adapt=0)
Definition: problem.cc:9292

References Global_Physical_Variables::Angle, oomph::DocInfo::directory(), MergeRestartFiles::filename, i, oomph::DocInfo::number(), BiharmonicTestFunctions2::Pi, oomph::DocInfo::set_directory(), and oomph::Problem_Parameter::Trace_file.

◆ parameter_study() [2/3]

template<class ELEMENT >
void PseudoSolidCapProblem< ELEMENT >::parameter_study ( const string &  dir_name)

Peform a parameter study: Solve problem for a range of contact angles Pass name of output directory as a string

◆ parameter_study() [3/3]

template<class ELEMENT >
void PseudoSolidCapProblem< ELEMENT >::parameter_study ( const string &  dir_name)

Peform a parameter study: Solve problem for a range of contact angles Pass name of output directory as a string

Member Data Documentation

◆ Angle

template<class ELEMENT >
double PseudoSolidCapProblem< ELEMENT >::Angle
private

The contact angle.

◆ Bulk_mesh_pt [1/2]

template<class ELEMENT >
Mesh * PseudoSolidCapProblem< ELEMENT >::Bulk_mesh_pt
private

Storage for the bulk mesh.

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

◆ Bulk_mesh_pt [2/2]

template<class ELEMENT >
ElasticTwoLayerMesh<ELEMENT>* PseudoSolidCapProblem< ELEMENT >::Bulk_mesh_pt
private

Storage for the bulk mesh.

◆ Ca

template<class ELEMENT >
double PseudoSolidCapProblem< ELEMENT >::Ca
private

The Capillary number.

◆ Constitutive_law_pt

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

Constitutive law used to determine the mesh deformation.

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

◆ External_pressure_data_pt

template<class ELEMENT >
Data * PseudoSolidCapProblem< ELEMENT >::External_pressure_data_pt
private

Data object whose single value stores the external pressure.

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

◆ Free_surface_bounding_mesh_pt

template<class ELEMENT >
Mesh * PseudoSolidCapProblem< ELEMENT >::Free_surface_bounding_mesh_pt
private

Storage for the element bounding the free surface.

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

◆ Free_surface_mesh_pt

template<class ELEMENT >
Mesh * PseudoSolidCapProblem< ELEMENT >::Free_surface_mesh_pt
private

Storage for the free surface mesh.

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

◆ Pext

template<class ELEMENT >
double PseudoSolidCapProblem< ELEMENT >::Pext
private

The external pressure.

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

◆ Trace_file

template<class ELEMENT >
ofstream PseudoSolidCapProblem< ELEMENT >::Trace_file
private

Trace file.

◆ Traded_pressure_data_pt

template<class ELEMENT >
Data * PseudoSolidCapProblem< ELEMENT >::Traded_pressure_data_pt
private

◆ Volume

template<class ELEMENT >
double PseudoSolidCapProblem< ELEMENT >::Volume
private

The prescribed volume of the fluid.

◆ Volume_computation_mesh_pt

template<class ELEMENT >
Mesh * PseudoSolidCapProblem< ELEMENT >::Volume_computation_mesh_pt
private

Storage for the elements that compute the enclosed volume.

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

◆ Volume_constraint_mesh_pt

template<class ELEMENT >
Mesh * PseudoSolidCapProblem< ELEMENT >::Volume_constraint_mesh_pt
private

Storage for the volume constraint.

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


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