StefanBoltzmannProblem< ELEMENT > Class Template Reference

Problem class. More...

+ Inheritance diagram for StefanBoltzmannProblem< ELEMENT >:

Public Member Functions

 StefanBoltzmannProblem ()
 Constructor. More...
 
 ~StefanBoltzmannProblem ()
 Destructor (empty) More...
 
void actions_before_newton_solve ()
 Update the problem specs before solve (empty) More...
 
void actions_after_newton_solve ()
 Update the problem specs after solve (empty) More...
 
void doc_solution (DocInfo &doc_info)
 Doc the solution: doc_info contains labels/output directory etc. More...
 
 StefanBoltzmannProblem ()
 Constructor. More...
 
 ~StefanBoltzmannProblem ()
 Destructor (empty) More...
 
void actions_before_newton_solve ()
 
void actions_after_newton_solve ()
 Update the problem specs after solve (empty) More...
 
void actions_before_implicit_timestep ()
 
void setup_sb_radiation ()
 Setup Stefan Boltzmann radiation. More...
 
void create_sb_elements ()
 Create the Stefan Boltzmann elements. More...
 
void create_melt_elements ()
 
void doc_solution ()
 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 Attributes

TriangleMesh< ELEMENT > * Bulk_mesh_pt
 Pointer to the "bulk" mesh. More...
 
MeshUnsteady_heat_flux_mesh_pt
 Pointer to mesh of radiative flux elements. More...
 
ofstream Trace_file
 Trace file. More...
 
RefineableSolidTriangleMesh< ELEMENT > * Bulk_mesh_pt
 Pointer to the "bulk" mesh. More...
 
MeshSurface_melt_mesh_pt
 Pointer to the surface melt mesh. More...
 
unsigned Ipt_leftmost_outer
 Integration point of leftmost point on outer boundary. More...
 
StefanBoltzmannUnsteadyHeatFluxElement< ELEMENT > * Leftmost_outer_el_pt
 Element containing leftmost point on outer boundary. More...
 
unsigned Ipt_rightmost_inner
 Integration point of rightmost point on inner boundary. More...
 
StefanBoltzmannUnsteadyHeatFluxElement< ELEMENT > * Rightmost_inner_el_pt
 Element containing rightmost point on inner boundary. More...
 
DocInfo Doc_info
 DocInfo object stores flags/labels for where the output gets written to. 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_convergence_check ()
 
virtual void actions_before_newton_step ()
 
virtual void actions_after_newton_step ()
 
virtual void actions_after_implicit_timestep ()
 
virtual void actions_after_implicit_timestep_and_error_estimation ()
 
virtual void actions_before_explicit_timestep ()
 Actions that should be performed before each explicit time step. More...
 
virtual void actions_after_explicit_timestep ()
 Actions that should be performed after each explicit time step. More...
 
virtual void actions_before_read_unstructured_meshes ()
 
virtual void actions_after_read_unstructured_meshes ()
 
virtual void actions_after_change_in_global_parameter (double *const &parameter_pt)
 
virtual void actions_after_change_in_bifurcation_parameter ()
 
virtual void actions_after_parameter_increase (double *const &parameter_pt)
 
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 StefanBoltzmannProblem< ELEMENT >

Problem class.

////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////

Constructor & Destructor Documentation

◆ StefanBoltzmannProblem() [1/2]

template<class ELEMENT >
StefanBoltzmannProblem< ELEMENT >::StefanBoltzmannProblem

Constructor.

Identify outer annulus as region 1

337 {
338 
339  // Open trace file
340  Trace_file.open((GlobalParameters::Directory+std::string("/trace.dat")).c_str());
341 
342  // Number of segments in (half) the innermost boundary
343  unsigned n_innermost=20;
344 
345  // Scale number of segments for convergence test
346  unsigned n_inner=unsigned(GlobalParameters::Radius_inner/
348  double(n_innermost));
349  unsigned n_outer=20;
350 
351  // Create circle representing outer boundary
353  double x_c=0.0;
354  double y_c=0.0;
355  Circle* outer_circle_pt=new Circle(x_c,y_c,a);
356 
357  // Create circle representing inner boundary
359  x_c=0.0;
360  y_c=0.0;
361  Circle* inner_circle_pt=new Circle(x_c,y_c,a);
362 
363  // Create circle representing boundary of central region
365  Circle* central_circle_pt=new Circle(x_c,y_c,a);
366 
367 
368  // Outer boundary
369  //---------------
370 
371  // Provide storage for pointers to the two parts of the curvilinear boundary
372  Vector<TriangleMeshCurveSection*> outer_curvilinear_boundary_pt(2);
373 
374  // First bit
375  double zeta_start=0.0;
376  double zeta_end=MathematicalConstants::Pi;
377  unsigned boundary_id=0;
378  outer_curvilinear_boundary_pt[0]=new TriangleMeshCurviLine(
379  outer_circle_pt,zeta_start,zeta_end,n_outer,boundary_id);
380 
381  // Second bit
382  zeta_start=MathematicalConstants::Pi;
383  zeta_end=2.0*MathematicalConstants::Pi;
384  boundary_id=1;
385  outer_curvilinear_boundary_pt[1]=new TriangleMeshCurviLine(
386  outer_circle_pt,zeta_start,zeta_end,n_outer,boundary_id);
387 
388  // Combine to curvilinear boundary and define the
389  // outer boundary
390  TriangleMeshClosedCurve* outer_boundary_pt=
391  new TriangleMeshClosedCurve(outer_curvilinear_boundary_pt);
392 
393 
394  // Inner circular boundaries
395  //--------------------------
396  Vector<TriangleMeshCurveSection*> inner_boundary_line_pt(2);
397 
398  // The intrinsic coordinates for the beginning and end of the curve
399  double s_start = 0.0;
400  double s_end = MathematicalConstants::Pi;
401  boundary_id = 2;
402  inner_boundary_line_pt[0]=
403  new TriangleMeshCurviLine(inner_circle_pt,
404  s_start,
405  s_end,
406  n_inner, // hierher
407  boundary_id);
408 
409  // The intrinsic coordinates for the beginning and end of the curve
410  s_start = MathematicalConstants::Pi;
411  s_end = 2.0*MathematicalConstants::Pi;
412  boundary_id = 3;
413  inner_boundary_line_pt[1]=
414  new TriangleMeshCurviLine(inner_circle_pt,
415  s_start,
416  s_end,
417  n_inner,
418  boundary_id);
419 
420  // Combine to hole
421  Vector<TriangleMeshClosedCurve*> internal_closed_curve_pt;
422  Vector<double> hole_coords(2);
423  hole_coords[0]=0.5*(GlobalParameters::Radius_inner+
425  hole_coords[1]=0.0;
426  internal_closed_curve_pt.push_back(
427  new TriangleMeshClosedCurve(inner_boundary_line_pt,
428  hole_coords));
429 
430 
431  // Boundary of innermost region
432  //------------------------------
433  Vector<TriangleMeshCurveSection*> central_boundary_line_pt(2);
434 
435  // The intrinsic coordinates for the beginning and end of the curve
436  s_start = 0.0;
438  boundary_id = 4;
439  central_boundary_line_pt[0]=
440  new TriangleMeshCurviLine(central_circle_pt,
441  s_start,
442  s_end,
443  n_innermost,
444  boundary_id);
445 
446  // The intrinsic coordinates for the beginning and end of the curve
447  s_start = MathematicalConstants::Pi;
448  s_end = 2.0*MathematicalConstants::Pi;
449  boundary_id = 5;
450  central_boundary_line_pt[1]=
451  new TriangleMeshCurviLine(central_circle_pt,
452  s_start,
453  s_end,
454  n_innermost,
455  boundary_id);
456 
457  // Define hole
458  internal_closed_curve_pt.push_back(
459  new TriangleMeshClosedCurve(central_boundary_line_pt));
460 
461  // Use the TriangleMeshParameters object for helping on the manage
462  // of the TriangleMesh parameters. The only parameter that needs to take
463  // is the outer boundary.
464  TriangleMeshParameters triangle_mesh_parameters(outer_boundary_pt);
465 
466  // Specify the closed curve using the TriangleMeshParameters object
467  triangle_mesh_parameters.internal_closed_curve_pt() = internal_closed_curve_pt;
468 
469  // Target element size in bulk mesh
470  triangle_mesh_parameters.element_area() = GlobalParameters::Target_area;
471 
473  Vector<double> outer_annulus_region_coord(2);
474  outer_annulus_region_coord[0]=0.0;
475  outer_annulus_region_coord[1]=0.5*(GlobalParameters::Radius_inner+
477  triangle_mesh_parameters.add_region_coordinates(1,outer_annulus_region_coord);
478 
479  // Allocate the timestepper -- this constructs the Problem's
480  // time object with a sufficient amount of storage to store the
481  // previous timsteps.
483 
484  // Build "bulk" mesh
485  Bulk_mesh_pt=new TriangleMesh<ELEMENT>(triangle_mesh_parameters,
486  time_stepper_pt());
487 
488 
489  // Complete setup of bulk elements
490 
491  // Central region
492  unsigned r=0;
493  unsigned nel=Bulk_mesh_pt->nregion_element(r);
494  for (unsigned e=0;e<nel;e++)
495  {
496  ELEMENT* el_pt = dynamic_cast<ELEMENT*>(
497  Bulk_mesh_pt->region_element_pt(r,e));
498 
499  // Thermal inertia
500  el_pt->alpha_pt()=&GlobalParameters::Alpha0;
501 
502  // Thermal conductivity
503  el_pt->beta_pt()=&GlobalParameters::Beta0;
504 
505  //Set the source function pointer
506  el_pt->source_fct_pt() = &GlobalParameters::get_source;
507  }
508 
509 
510  // Outer annular region
511  r=1;
512  nel=Bulk_mesh_pt->nregion_element(r);
513  for (unsigned e=0;e<nel;e++)
514  {
515  ELEMENT* el_pt = dynamic_cast<ELEMENT*>(
516  Bulk_mesh_pt->region_element_pt(r,e));
517 
518  // Thermal inertia
519  el_pt->alpha_pt()=&GlobalParameters::Alpha1;
520 
521  // Thermal conductivity
522  el_pt->beta_pt()=&GlobalParameters::Beta1;
523 
524  //Set the source function pointer
525  el_pt->source_fct_pt() = &GlobalParameters::get_source;
526  }
527 
528  // Doc use of integration scheme
530  {
531  oomph_info << "Setting new integration scheme with nintpt="
532  << GlobalParameters::Nintpt << std::endl;
533  }
534  else
535  {
536  oomph_info << "Using Gauss scheme" << std::endl;
537  }
538 
539  // Create mesh with heat flux elements
540  //------------------------------------
542 
543  // Face elements on potentially sun-exposed boundaries
544  Vector<FiniteElement*> shielding_face_element_pt;
545 
546  // Boundaries that participate in radiative heat exchange
547  std::set<unsigned> bc_set;
548  bc_set.insert(2);
549  bc_set.insert(3);
550  bc_set.insert(4);
551  bc_set.insert(5);
552  for (std::set<unsigned>::iterator it=bc_set.begin();it!=bc_set.end();it++)
553  {
554  unsigned b=(*it);
555 
556  // How many bulk elements are adjacent to boundary b?
557  unsigned n_element = Bulk_mesh_pt->nboundary_element(b);
558 
559  // Loop over the bulk elements adjacent to boundary b
560  for(unsigned e=0;e<n_element;e++)
561  {
562  // Get pointer to the bulk element that is adjacent to boundary b
563  ELEMENT* bulk_elem_pt = dynamic_cast<ELEMENT*>(
564  Bulk_mesh_pt->boundary_element_pt(b,e));
565 
566  //Find the index of the face of element e along boundary b
567  int face_index = Bulk_mesh_pt->face_index_at_boundary(b,e);
568 
569  // Create flux element
572  face_index);
573 
574  // Set different integration scheme
576  {
578  }
579 
580  // Set non-dim Stefan Boltzmann constant
582 
583  // Set zero-centrigrade offset in Stefan Boltzmann law
585 
586  // Add to mesh
588 
589  // Add to shielding surface
590  shielding_face_element_pt.push_back(el_pt);
591  }
592  }
593 
594 
598 
599  //Setup mutual visibility for all Stefan Boltzmann elements
601  shielding_face_element_pt);
602 
603  // Doc the populated bins
604  ofstream some_file;
605  some_file.open((GlobalParameters::Directory+
606  std::string("/populated_bins.dat")).c_str());
608  some_file.close();
609 
610  // Doc the sample points used to assess visibility
611  some_file.open((GlobalParameters::Directory+
612  std::string("/sample_points.dat")).c_str());
613  StefanBoltzmannHelper::doc_sample_points(some_file,shielding_face_element_pt);
614  some_file.close();
615 
616  // Build the entire mesh from its submeshes
620 
621  // Assign exact solution as initial guess
622  unsigned nnod=Bulk_mesh_pt->nnode();
623  for (unsigned j=0;j<nnod;j++)
624  {
625  Node* nod_pt=Bulk_mesh_pt->node_pt(j);
626  Vector<double> x(2);
627  x[0]=nod_pt->x(0);
628  x[1]=nod_pt->x(1);
629  double time=time_pt()->time();
630  Vector<double> u(1);
632  nod_pt->set_value(0,u[0]);
633  }
634 
635 
636  // Pin boundary values
637  for(unsigned b=0;b<2;b++)
638  {
639  unsigned n_node = Bulk_mesh_pt->nboundary_node(b);
640  for (unsigned n=0;n<n_node;n++)
641  {
642  Node* nod_pt=Bulk_mesh_pt->boundary_node_pt(b,n);
643  nod_pt->pin(0);
644  // oomph_info << "Pinning at r="
645  // << sqrt(pow(nod_pt->x(0),2)+pow(nod_pt->x(1),2))
646  // << std::endl;
647  }
648  }
649 
650  // Setup equation numbering scheme
651  cout <<"Number of equations: " << assign_eqn_numbers() << std::endl;
652 
653 } // 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
Definition: stefan_boltzmann.cc:60
Mesh * Unsteady_heat_flux_mesh_pt
Pointer to mesh of radiative flux elements.
Definition: stefan_boltzmann.cc:323
ofstream Trace_file
Trace file.
Definition: stefan_boltzmann.cc:326
TriangleMesh< ELEMENT > * Bulk_mesh_pt
Pointer to the "bulk" mesh.
Definition: stefan_boltzmann.cc:320
Definition: geom_objects.h:873
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: mesh.h:67
void add_element_pt(GeneralisedElement *const &element_pt)
Add a (pointer to) an element to the mesh.
Definition: mesh.h:617
Definition: nodes.h:906
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
void add_time_stepper_pt(TimeStepper *const &time_stepper_pt)
Definition: problem.cc:1545
unsigned add_sub_mesh(Mesh *const &mesh_pt)
Definition: problem.h:1330
Time *& time_pt()
Return a pointer to the global time object.
Definition: problem.h:1504
void build_global_mesh()
Definition: problem.cc:1493
unsigned long assign_eqn_numbers(const bool &assign_local_eqn_numbers=true)
Definition: problem.cc:1989
TimeStepper *& time_stepper_pt()
Definition: problem.h:1524
double & time()
Return the current value of continuous time.
Definition: problem.cc:11531
double *& sigma_pt()
Pointer to non-dim Stefan Boltzmann constant.
Definition: temporary_stefan_boltzmann_elements.h:1151
double *& theta_0_pt()
Pointer to non-dim zero centrigrade offset in Stefan Boltzmann law.
Definition: temporary_stefan_boltzmann_elements.h:1154
Definition: temporary_stefan_boltzmann_elements.h:1572
void set_integration_scheme(Integral *const &integral_pt)
Definition: temporary_stefan_boltzmann_elements.h:1590
double & time()
Return the current value of the continuous time.
Definition: timesteppers.h:123
Base class defining a closed curve for the Triangle mesh generation.
Definition: unstructured_two_d_mesh_geometry_base.h:1339
Definition: unstructured_two_d_mesh_geometry_base.h:662
Definition: triangle_mesh.template.h:94
Definition: triangle_mesh.template.h:424
Definition: oomph-lib/src/generic/Vector.h:58
const Scalar * a
Definition: level2_cplx_impl.h:32
double Pi
Definition: two_d_biharmonic.cc:235
double Alpha1
Thermal inertia in outer annular region.
Definition: stefan_boltzmann.cc:124
void get_exact_u(const double &time, const Vector< double > &x, Vector< double > &u)
Exact solution as a Vector.
Definition: stefan_boltzmann.cc:169
double Theta_0
Zero degrees Celsius offset in Stefan Boltzmann law.
Definition: stefan_boltzmann.cc:118
double Radius_outer
Outer radius of annular region.
Definition: stefan_boltzmann.cc:142
double Beta0
Thermal conductivity in inner region.
Definition: stefan_boltzmann.cc:127
double Alpha0
Thermal inertia in inner region.
Definition: stefan_boltzmann.cc:121
double Sigma
Non-dim Stefan Boltzmann constant.
Definition: stefan_boltzmann.cc:115
double Radius_inner
Inner radius of annular region.
Definition: stefan_boltzmann.cc:139
double Beta1
Thermal conductivity in outer annular region.
Definition: stefan_boltzmann.cc:130
unsigned Nintpt
Number of integration points for new integration scheme (if used)
Definition: stefan_boltzmann.cc:112
double Radius_innermost
Radius of inner circle.
Definition: stefan_boltzmann.cc:136
void get_source(const double &time, const Vector< double > &x, double &source)
Source function.
Definition: stefan_boltzmann.cc:154
double Target_area
Target element size.
Definition: stefan_boltzmann.cc:133
string Directory
Output directory.
Definition: stefan_boltzmann.cc:109
r
Definition: UniformPSDSelfTest.py:20
bool command_line_flag_has_been_set(const std::string &flag)
Definition: oomph_utilities.cc:501
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
unsigned Nx_bin
Number of bins in x direction.
Definition: temporary_stefan_boltzmann_elements.h:1833
void doc_sample_points(std::ofstream &outfile, const Vector< FiniteElement * > &sb_face_element_pt)
Definition: temporary_stefan_boltzmann_elements.h:2124
unsigned Ny_bin
Number of bins in y direction.
Definition: temporary_stefan_boltzmann_elements.h:1836
unsigned Nsample
Definition: temporary_stefan_boltzmann_elements.h:1840
void doc_bins(std::ofstream &bin_file)
Definition: temporary_stefan_boltzmann_elements.h:2093
void setup_stefan_boltzmann_visibility(const Vector< FiniteElement * > &sb_face_element_pt)
Definition: temporary_stefan_boltzmann_elements.h:2173
OomphInfo oomph_info
Definition: oomph_definitions.cc:319
list x
Definition: plotDoE.py:28
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References a, oomph::TriangleMeshParameters::add_region_coordinates(), GlobalParameters::Alpha0, GlobalParameters::Alpha1, b, GlobalParameters::Beta0, GlobalParameters::Beta1, oomph::CommandLineArgs::command_line_flag_has_been_set(), GlobalParameters::Directory, oomph::StefanBoltzmannHelper::doc_bins(), oomph::StefanBoltzmannHelper::doc_sample_points(), e(), oomph::TriangleMeshParameters::element_area(), GlobalParameters::get_exact_u(), GlobalParameters::get_source(), oomph::TriangleMeshParameters::internal_closed_curve_pt(), j, n, GlobalParameters::Nintpt, oomph::StefanBoltzmannHelper::Nsample, oomph::StefanBoltzmannHelper::Nx_bin, oomph::StefanBoltzmannHelper::Ny_bin, oomph::oomph_info, oomph::MathematicalConstants::Pi, oomph::Data::pin(), UniformPSDSelfTest::r, GlobalParameters::Radius_inner, GlobalParameters::Radius_innermost, GlobalParameters::Radius_outer, oomph::StefanBoltzmannUnsteadyHeatFluxElement< ELEMENT >::set_integration_scheme(), oomph::Data::set_value(), oomph::StefanBoltzmannHelper::setup_stefan_boltzmann_visibility(), GlobalParameters::Sigma, oomph::StefanBoltzmannRadiationBase::sigma_pt(), oomph::Global_string_for_annotation::string(), GlobalParameters::Target_area, GlobalParameters::Theta_0, oomph::StefanBoltzmannRadiationBase::theta_0_pt(), oomph::Problem_Parameter::Trace_file, plotDoE::x, and oomph::Node::x().

◆ ~StefanBoltzmannProblem() [1/2]

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

Destructor (empty)

305 {}

◆ StefanBoltzmannProblem() [2/2]

template<class ELEMENT >
StefanBoltzmannProblem< ELEMENT >::StefanBoltzmannProblem ( )

Constructor.

◆ ~StefanBoltzmannProblem() [2/2]

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

Destructor (empty)

740 {}

Member Function Documentation

◆ actions_after_newton_solve() [1/2]

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

Update the problem specs after solve (empty)

Reimplemented from oomph::Problem.

311 {}

◆ actions_after_newton_solve() [2/2]

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

Update the problem specs after solve (empty)

Reimplemented from oomph::Problem.

755 {}

◆ actions_before_implicit_timestep()

template<class ELEMENT >
void StefanBoltzmannProblem< ELEMENT >::actions_before_implicit_timestep ( )
inlinevirtual

Update the problem specs before next timestep: Set Dirchlet boundary conditions from exact solution.

Reimplemented from oomph::Problem.

760  {
761  // Update pinned boundary values
762  for(unsigned b=0;b<2;b++) // hierher enumerate
763  {
764  unsigned n_node = Bulk_mesh_pt->nboundary_node(b);
765  for (unsigned n=0;n<n_node;n++)
766  {
767  Node* nod_pt=Bulk_mesh_pt->boundary_node_pt(b,n);
768  Vector<double> x(2);
769  x[0]=nod_pt->x(0);
770  x[1]=nod_pt->x(1);
771  double time=time_pt()->time();
772  Vector<double> u(1);
774  nod_pt->set_value(0,u[0]);
775  }
776  }
777  }

References b, GlobalParameters::get_exact_u(), n, oomph::Data::set_value(), plotDoE::x, and oomph::Node::x().

◆ actions_before_newton_solve() [1/2]

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

Update the problem specs before solve (empty)

Reimplemented from oomph::Problem.

308 {}

◆ actions_before_newton_solve() [2/2]

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

Update the problem specs before solve: Update Stefan Boltzmann radiation

Reimplemented from oomph::Problem.

745  {
746  oomph_info << "Re-setting up Stefan Boltzmann radiation\n";
748 
749  // Re-setup equation numbering scheme
750  cout <<"Number of equations: " << assign_eqn_numbers() << std::endl;
751 
752  }
void setup_sb_radiation()
Setup Stefan Boltzmann radiation.
Definition: stefan_boltzmann_melt.cc:1320

References oomph::oomph_info.

◆ create_melt_elements()

template<class ELEMENT >
void StefanBoltzmannProblem< ELEMENT >::create_melt_elements ( )
inline

Create the melt elements and also identify nodes to be pinned on inner boundary

830  {
831  // Storage for rightmost, leftmost and topmost node on inner boundary
832  double x_min=DBL_MAX;
833  double x_max=-DBL_MAX;
834  double y_max=-DBL_MAX;
835  SolidNode* x_min_node_pt=0;
836  SolidNode* x_max_node_pt=0;
837  SolidNode* y_max_node_pt=0;
838 
839  // Loop over boundaries of inner circle
840  for (unsigned b=4;b<=5;b++) // hierher enumerate
841  {
842  // Loop over the bulk elements adjacent to boundary b?
843  unsigned n_element = Bulk_mesh_pt->nboundary_element(b);
844  for(unsigned e=0;e<n_element;e++)
845  {
846  // Get pointer to the bulk element that is adjacent to boundary b
847  ELEMENT* bulk_elem_pt = dynamic_cast<ELEMENT*>(
848  Bulk_mesh_pt->boundary_element_pt(b,e));
849 
850  //What is the face index of element e along boundary b
851  int face_index = Bulk_mesh_pt->face_index_at_boundary(b,e);
852 
853  // // Build the corresponding melt element
854  // SurfaceMeltElement<ELEMENT>* melt_element_pt = new
855  // SurfaceMeltElement<ELEMENT>(bulk_elem_pt,face_index);
856 
857 
858  // Build the corresponding melt element
859  StefanBoltzmannMeltElement<ELEMENT>* melt_element_pt = new
860  StefanBoltzmannMeltElement<ELEMENT>(bulk_elem_pt,face_index);
861 
862  //Add the melt element to the surface mesh
863  Surface_melt_mesh_pt->add_element_pt(melt_element_pt);
864 
865  // Set melt temperature
866  melt_element_pt->melt_temperature_pt()=
868 
869  // Set different integration scheme
871  {
872  melt_element_pt->set_integration_scheme
874  }
875 
876  // Set non-dim Stefan Boltzmann constant
877  melt_element_pt->sigma_pt()= &GlobalParameters::Sigma;
878 
879  // Set zero-centrigrade offset in Stefan Boltzmann law
880  melt_element_pt->theta_0_pt()= &GlobalParameters::Theta_0;
881 
882  // Find rightmost/leftmost/topmost node on inner boundary
883  if (b==4)
884  {
885  unsigned nnod=melt_element_pt->nnode();
886  for (unsigned j=0;j<nnod;j++)
887  {
888  SolidNode* nod_pt=
889  dynamic_cast<SolidNode*>(melt_element_pt->node_pt(j));
890  double x=nod_pt->x(0);
891  double y=nod_pt->x(1);
892  if (x<x_min)
893  {
894  x_min=x;
895  x_min_node_pt=nod_pt;
896  }
897  if (x>x_max)
898  {
899  x_max=x;
900  x_max_node_pt=nod_pt;
901  }
902  if (y>y_max)
903  {
904  y_max=y;
905  y_max_node_pt=nod_pt;
906  }
907  }
908  }
909  }
910  } //end of loop over bulk elements adjacent to boundary b
911 
912  // Pin to avoid rigid body translation/rotation of inner circle
913  oomph_info << "Pinning vertical displacement at "
914  << x_min_node_pt->x(0) << " "
915  << x_min_node_pt->x(1) << std::endl;
916  x_min_node_pt->pin_position(1);
917  oomph_info << "Pinning vertical displacement at "
918  << x_max_node_pt->x(0) << " "
919  << x_max_node_pt->x(1) << std::endl;
920  x_max_node_pt->pin_position(1);
921  oomph_info << "Pinning horizontal displacement at "
922  << y_max_node_pt->x(0) << " "
923  << y_max_node_pt->x(1) << std::endl;
924  y_max_node_pt->pin_position(0);
925 
926  }
Definition: stefan_boltzmann_melt.cc:68
Mesh * Surface_melt_mesh_pt
Pointer to the surface melt mesh.
Definition: stefan_boltzmann_melt.cc:940
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: nodes.h:1686
void pin_position(const unsigned &i)
Pin the nodal position.
Definition: nodes.h:1816
double *& melt_temperature_pt()
Pointer to (non-default) melt temperature.
Definition: heat_transfer_and_melt_elements.h:2402
Scalar * y
Definition: level1_cplx_impl.h:128
double Melt_temperature
Melt-temperature.
Definition: stefan_boltzmann_melt.cc:188

References b, oomph::CommandLineArgs::command_line_flag_has_been_set(), e(), j, GlobalParameters::Melt_temperature, oomph::SurfaceMeltElement< ELEMENT >::melt_temperature_pt(), GlobalParameters::Nintpt, oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::oomph_info, oomph::SolidNode::pin_position(), oomph::StefanBoltzmannUnsteadyHeatFluxElement< ELEMENT >::set_integration_scheme(), GlobalParameters::Sigma, oomph::StefanBoltzmannRadiationBase::sigma_pt(), GlobalParameters::Theta_0, oomph::StefanBoltzmannRadiationBase::theta_0_pt(), plotDoE::x, oomph::Node::x(), and y.

◆ create_sb_elements()

template<class ELEMENT >
void StefanBoltzmannProblem< ELEMENT >::create_sb_elements ( )
inline

Create the Stefan Boltzmann elements.

784  {
785  // Loop over inner boundaries of outer annulus
786  for (unsigned b=2;b<=3;b++) // hierher enumerate
787  {
788 
789  // How many bulk elements are adjacent to boundary b?
790  unsigned n_element = Bulk_mesh_pt->nboundary_element(b);
791 
792  // Loop over the bulk elements adjacent to boundary b
793  for(unsigned e=0;e<n_element;e++)
794  {
795  // Get pointer to the bulk element that is adjacent to boundary b
796  ELEMENT* bulk_elem_pt = dynamic_cast<ELEMENT*>(
797  Bulk_mesh_pt->boundary_element_pt(b,e));
798 
799  //Find the index of the face of element e along boundary b
800  int face_index = Bulk_mesh_pt->face_index_at_boundary(b,e);
801 
802  // Create flux element
805  face_index);
806 
807  // Set different integration scheme
809  {
812  }
813 
814  // Set non-dim Stefan Boltzmann constant
816 
817  // Set zero-centrigrade offset in Stefan Boltzmann law
819 
820  // Add to mesh
822  }
823  }
824  }

References b, oomph::CommandLineArgs::command_line_flag_has_been_set(), e(), GlobalParameters::Nintpt, oomph::StefanBoltzmannUnsteadyHeatFluxElement< ELEMENT >::set_integration_scheme(), GlobalParameters::Sigma, oomph::StefanBoltzmannRadiationBase::sigma_pt(), GlobalParameters::Theta_0, and oomph::StefanBoltzmannRadiationBase::theta_0_pt().

◆ doc_solution() [1/2]

template<class ELEMENT >
void StefanBoltzmannProblem< ELEMENT >::doc_solution

Doc the solution.

1385 {
1386 
1387  oomph_info << "Outputting step " << Doc_info.number()
1388  << " for time " << time_pt()->time() << std::endl;
1389 
1390  ofstream some_file,some_file2;
1391  char filename[100];
1392 
1393  // Number of plot points
1394  unsigned npts;
1395  npts=5;
1396 
1397  // Output solution
1398  //-----------------
1399  sprintf(filename,"%s/soln%i.dat",Doc_info.directory().c_str(),
1400  Doc_info.number());
1401  some_file.open(filename);
1402  Bulk_mesh_pt->output(some_file,npts);
1403  some_file.close();
1404 
1405 
1406  // Output solution
1407  //-----------------
1408  sprintf(filename,"%s/coarse_soln%i.dat",Doc_info.directory().c_str(),
1409  Doc_info.number());
1410  unsigned npts_coarse=2;
1411  some_file.open(filename);
1412  Bulk_mesh_pt->output(some_file,npts_coarse);
1413  some_file.close();
1414 
1415 
1416  // Output Stefan Boltzmann radiation rays on rightmost point
1417  //----------------------------------------------------------
1418  // on inner boundary; leftmost point on outer boundary
1419  //----------------------------------------------------
1420 
1421  // Output rays
1422  sprintf(filename,"%s/stefan_boltzmann_rays_left%i.dat",
1423  Doc_info.directory().c_str(),
1424  Doc_info.number());
1425  some_file.open(filename);
1427  output_stefan_boltzmann_radiation_rays(some_file,Ipt_leftmost_outer);
1428  some_file.close();
1429 
1430 
1431  // Output rays
1432  sprintf(filename,"%s/stefan_boltzmann_rays_right%i.dat",
1433  Doc_info.directory().c_str(),
1434  Doc_info.number());
1435  some_file.open(filename);
1437  output_stefan_boltzmann_radiation_rays(some_file,Ipt_rightmost_inner);
1438  some_file.close();
1439 
1440 
1441  // Output exact outer radius
1442  //--------------------------
1443  double r=GlobalParameters::radius(time_pt()->time());
1444  sprintf(filename,"%s/exact_melt_surface%i.dat",Doc_info.directory().c_str(),
1445  Doc_info.number());
1446  some_file.open(filename);
1447  unsigned np=300;
1448  for (unsigned i=0;i<np;i++)
1449  {
1450  double phi=2.0*MathematicalConstants::Pi*double(i)/double(np-1);
1451  some_file << r*cos(phi) << " " << r*sin(phi) << std::endl;
1452  }
1453  some_file.close();
1454 
1455 
1456 // Output heat flux (x,y,u,flux,n_x,n_y)
1457 //--------------------------------------
1458 sprintf(filename,"%s/flux%i.dat",
1459  Doc_info.directory().c_str(),
1460  Doc_info.number());
1461 some_file.open(filename);
1462 Unsteady_heat_flux_mesh_pt->output(some_file,5);
1463 some_file.close();
1464 
1465 
1466 // Output Stefan Boltzmann radiation (x, y, net incoming, incoming,
1467 //-----------------------------------------------------------------
1468 // outgoing, n_x, n_y)
1469 //--------------------
1470 double av_inc_outer=0.0;
1471 double av_inc_inner=0.0;
1472 double inc_outer_exact=
1474 double inc_inner_exact=
1476 {
1477  double average_incoming_inner=0.0;
1478  double average_incoming_outer=0.0;
1479  unsigned count_inner=0;
1480  unsigned count_outer=0;
1481  Vector<double> s(1);
1482  Vector<double> x(2);
1483  Vector<double> unit_normal(2);
1484  sprintf(filename,"%s/sb_radiation%i.dat",
1485  Doc_info.directory().c_str(),
1486  Doc_info.number());
1487  some_file.open(filename);
1488  unsigned nel=Unsteady_heat_flux_mesh_pt->nelement();
1489  for (unsigned e=0;e<nel;e++)
1490  {
1491  // Get pointer to element
1495 
1496  // Get contribution to avergage (over integration points) of incoming rad
1497  unsigned nintpt=el_pt->integral_pt()->nweight();
1498  for (unsigned ipt=0;ipt<nintpt;ipt++)
1499  {
1500  // Local coordinate of integration point
1501  s[0]=el_pt->integral_pt()->knot(ipt,0);
1502 
1503  // Get Eulerian coordinates
1504  el_pt->interpolated_x(s,x);
1505 
1506  // Outer unit normal
1507  el_pt->outer_unit_normal(s,unit_normal);
1508 
1509  // Get incoming radiation
1510  double my_rate=el_pt->incoming_stefan_boltzmann_radiation(ipt,x,
1511  unit_normal);
1512 
1513  // Add to average
1514  average_incoming_outer+=my_rate;
1515  count_outer++;
1516  }
1517 
1518  // Output
1519  el_pt->output_stefan_boltzmann_radiation(some_file);
1520  }
1522  for (unsigned e=0;e<nel;e++)
1523  {
1524  // Cast to element
1526  dynamic_cast<StefanBoltzmannMeltElement<ELEMENT>*>(
1528 
1529  // Get contribution to avergage (over integration points) of incoming rad
1530  unsigned nintpt=el_pt->integral_pt()->nweight();
1531  for (unsigned ipt=0;ipt<nintpt;ipt++)
1532  {
1533  // Local coordinate of integration point
1534  s[0]=el_pt->integral_pt()->knot(ipt,0);
1535 
1536  // Get Eulerian coordinates
1537  el_pt->interpolated_x(s,x);
1538 
1539  // Outer unit normal
1540  el_pt->outer_unit_normal(s,unit_normal);
1541 
1542  // Get incoming radiation
1543  double my_rate=el_pt->incoming_stefan_boltzmann_radiation(ipt,x,
1544  unit_normal);
1545 
1546  // Add to average
1547  average_incoming_inner+=my_rate;
1548  count_inner++;
1549  }
1550 
1551  // Output
1552  el_pt->output_stefan_boltzmann_radiation(some_file);
1553  }
1554  some_file.close();
1555 
1556  av_inc_inner=average_incoming_inner/double(count_inner);
1557  oomph_info << "Average inc. radiation (inner): " << av_inc_inner
1558  << " ; exact: " << inc_inner_exact
1559  << " ; abs difference: " << fabs(inc_inner_exact-av_inc_inner);
1560  if (std::max(inc_inner_exact,av_inc_inner)!=0)
1561  {
1562  oomph_info
1563  << " ; rel difference: "
1564  << fabs(inc_inner_exact-av_inc_inner)/
1565  double(std::max(inc_inner_exact,av_inc_inner))*100.0
1566  << " % ";
1567  }
1568  oomph_info << std::endl;
1569 
1570  av_inc_outer=average_incoming_outer/double(count_outer);
1571  oomph_info << "Average inc. radiation (outer): " << av_inc_outer
1572  << " ; exact: " << inc_outer_exact
1573  << " ; abs difference: " << fabs(inc_outer_exact-av_inc_outer);
1574  if (std::max(inc_outer_exact,av_inc_outer)!=0)
1575  {
1576  oomph_info
1577  << " ; rel difference: "
1578  << fabs(inc_outer_exact-av_inc_outer)/
1579  double(std::max(inc_outer_exact,av_inc_outer))*100.0
1580  << " % ";
1581  }
1582  oomph_info << std::endl;
1583 
1584 }
1585 
1586 // Output melt (x, y, u, net incoming flux, melt rate, n_x, n_y)
1587 //--------------------------------------------------------------
1588 double av_melt=0.0;
1589 double melt_exact=GlobalParameters::melt_flux(time_pt()->time());
1590 {
1591  double average_melt=0.0;
1592  unsigned count=0;
1593  Vector<double> s(1);
1594  sprintf(filename,"%s/melt%i.dat",
1595  Doc_info.directory().c_str(),
1596  Doc_info.number());
1597  some_file.open(filename);
1598  unsigned nel=Surface_melt_mesh_pt->nelement();
1599  for (unsigned e=0;e<nel;e++)
1600  {
1601  // Get pointer to element
1603  dynamic_cast<StefanBoltzmannMeltElement<ELEMENT>*>(
1605 
1606  // Get contribution to avergage (over integration points) of melt rate
1607  unsigned nintpt=el_pt->integral_pt()->nweight();
1608  for (unsigned ipt=0;ipt<nintpt;ipt++)
1609  {
1610  // Local coordinate of integration point
1611  s[0]=el_pt->integral_pt()->knot(ipt,0);
1612 
1613  // Get melt rate
1614  double my_melt=0.0;
1615  el_pt->interpolated_melt_rate(s,my_melt);
1616 
1617  // Add to average
1618  average_melt+=my_melt;
1619  count++;
1620  }
1621 
1622  // Output
1623  el_pt->output_melt(some_file);
1624 
1625  }
1626  some_file.close();
1627 
1628  av_melt=average_melt/double(count);
1629  oomph_info << "Average melt rate: " << av_melt
1630  << " ; exact: " << melt_exact
1631  << " ; abs difference: " << fabs(melt_exact-av_melt);
1632  if (std::max(melt_exact,av_melt)!=0)
1633  {
1634  oomph_info
1635  << " ; rel difference: "
1636  << fabs(melt_exact-av_melt)/double(std::max(melt_exact,av_melt))*100.0
1637  << " % ";
1638  }
1639  oomph_info << std::endl;
1640 
1641 }
1642 
1643 // Get average radius
1644 double av_radius=0.0;
1645 std::map<Node*,bool> done;
1646 unsigned count=0;
1647 unsigned nel=Surface_melt_mesh_pt->nelement();
1648 for (unsigned e=0;e<nel;e++)
1649  {
1651  unsigned nnod=el_pt->nnode();
1652  for (unsigned j=0;j<nnod;j++)
1653  {
1654  Node* nod_pt=el_pt->node_pt(j);
1655  if (!done[nod_pt])
1656  {
1657  done[nod_pt]=true;
1658  count++;
1659  av_radius+=sqrt(nod_pt->x(0)*nod_pt->x(0)+
1660  nod_pt->x(1)*nod_pt->x(1));
1661  }
1662  }
1663  }
1664 av_radius/=double(count);
1665 
1666 
1667 Trace_file << time_pt()->time() << " "
1668  << av_radius << " "
1669  << GlobalParameters::radius(time_pt()->time()) << " "
1670  << av_inc_outer << " "
1671  << inc_outer_exact << " "
1672  << av_inc_inner << " "
1673  << inc_inner_exact << " "
1674  << av_melt << " "
1675  << melt_exact << " ";
1676 
1677 // Output exact solution
1678 //----------------------
1679 sprintf(filename,"%s/exact_soln%i.dat",Doc_info.directory().c_str(),
1680  Doc_info.number());
1681 some_file.open(filename);
1682 Bulk_mesh_pt->output_fct(some_file,npts,time_pt()->time(),
1684 some_file.close();
1685 
1686 // Doc error
1687 //----------
1688 double error,norm;
1689 sprintf(filename,"%s/error%i.dat",Doc_info.directory().c_str(),
1690  Doc_info.number());
1691 some_file.open(filename);
1692 Bulk_mesh_pt->compute_error(some_file,
1694  time_pt()->time(),
1695  error,norm);
1696 some_file.close();
1697 
1698 // Doc solution and error
1699 //-----------------------
1700 cout << "error: " << error << std::endl;
1701 cout << "norm : " << norm << std::endl << std::endl;
1702 
1703 Trace_file << error<< " "
1704 << norm << " ";
1705 
1706 Trace_file << std::endl;
1707 
1708 //Increment counter for solutions
1709 Doc_info.number()++;
1710 
1711 } // end of doc
AnnoyingScalar cos(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:136
AnnoyingScalar sin(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:137
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
int i
Definition: BiCGSTAB_step_by_step.cpp:9
StefanBoltzmannUnsteadyHeatFluxElement< ELEMENT > * Leftmost_outer_el_pt
Element containing leftmost point on outer boundary.
Definition: stefan_boltzmann_melt.cc:949
StefanBoltzmannUnsteadyHeatFluxElement< ELEMENT > * Rightmost_inner_el_pt
Element containing rightmost point on inner boundary.
Definition: stefan_boltzmann_melt.cc:955
unsigned Ipt_leftmost_outer
Integration point of leftmost point on outer boundary.
Definition: stefan_boltzmann_melt.cc:946
DocInfo Doc_info
DocInfo object stores flags/labels for where the output gets written to.
Definition: stefan_boltzmann_melt.cc:958
unsigned Ipt_rightmost_inner
Integration point of rightmost point on inner boundary.
Definition: stefan_boltzmann_melt.cc:952
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 outer_unit_normal(const Vector< double > &s, Vector< double > &unit_normal) const
Compute outer unit normal at the specified local coordinate.
Definition: elements.cc:6006
double interpolated_x(const Vector< double > &s, const unsigned &i) const
Definition: elements.h:4528
Definition: elements.h:1313
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Definition: elements.h:1963
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
FiniteElement * finite_element_pt(const unsigned &e) const
Definition: mesh.h:473
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
Definition: mesh.h:448
void output(std::ostream &outfile)
Output for all elements.
Definition: mesh.cc:2027
unsigned long nelement() const
Return number of elements in the mesh.
Definition: mesh.h:590
double incoming_stefan_boltzmann_radiation(const unsigned &ipt, const Vector< double > &r_illuminated, const Vector< double > &n_illuminated)
Definition: temporary_stefan_boltzmann_elements.h:1314
void output_stefan_boltzmann_radiation(std::ostream &outfile)
Definition: temporary_stefan_boltzmann_elements.h:1613
void interpolated_melt_rate(const Vector< double > &s, double &melt_flux)
Melt rate at local coordinate s.
Definition: heat_transfer_and_melt_elements.h:2474
void output_melt(std::ostream &outfile)
Definition: heat_transfer_and_melt_elements.h:2509
#define max(a, b)
Definition: datatypes.h:23
RealScalar s
Definition: level1_cplx_impl.h:130
double radius(const double &t)
Exact radius of inner circle.
Definition: stefan_boltzmann_melt.cc:659
double incoming_sb_inside(const double &t)
Incoming sb radiation on inside.
Definition: stefan_boltzmann_melt.cc:677
double incoming_sb_outside(const double &t)
Incoming sb radiation on outside.
Definition: stefan_boltzmann_melt.cc:699
double melt_flux(const double &t)
Definition: stefan_boltzmann_melt.cc:643
string filename
Definition: MergeRestartFiles.py:39
Real fabs(const Real &a)
Definition: boostmultiprec.cpp:117
int error
Definition: calibrate.py:297

References cos(), oomph::DocInfo::directory(), GlobalParameters::Doc_info, e(), calibrate::error, boost::multiprecision::fabs(), MergeRestartFiles::filename, GlobalParameters::get_exact_u(), i, GlobalParameters::incoming_sb_inside(), GlobalParameters::incoming_sb_outside(), oomph::StefanBoltzmannRadiationBase::incoming_stefan_boltzmann_radiation(), oomph::FiniteElement::integral_pt(), oomph::SurfaceMeltElement< ELEMENT >::interpolated_melt_rate(), oomph::FaceElement::interpolated_x(), j, oomph::Integral::knot(), max, GlobalParameters::melt_flux(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::DocInfo::number(), oomph::Integral::nweight(), oomph::oomph_info, oomph::FaceElement::outer_unit_normal(), oomph::SurfaceMeltElement< ELEMENT >::output_melt(), oomph::StefanBoltzmannUnsteadyHeatFluxElement< ELEMENT >::output_stefan_boltzmann_radiation(), oomph::MathematicalConstants::Pi, UniformPSDSelfTest::r, GlobalParameters::radius(), s, sin(), sqrt(), oomph::Problem_Parameter::Trace_file, plotDoE::x, and oomph::Node::x().

◆ doc_solution() [2/2]

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

Doc the solution: doc_info contains labels/output directory etc.

Doc the solution. DocInfo object stores flags/labels for where the output gets written to

662 {
663 
664  ofstream some_file,some_file2;
665  char filename[100];
666 
667  // Number of plot points
668  unsigned npts;
669  npts=5;
670 
671  // Output solution
672  //-----------------
673  sprintf(filename,"%s/soln%i.dat",doc_info.directory().c_str(),
674  doc_info.number());
675  some_file.open(filename);
676  Bulk_mesh_pt->output(some_file,npts);
677  some_file.close();
678 
679 
680  // Output solution
681  //-----------------
682  sprintf(filename,"%s/coarse_soln%i.dat",doc_info.directory().c_str(),
683  doc_info.number());
684  unsigned npts_coarse=2;
685  some_file.open(filename);
686  Bulk_mesh_pt->output(some_file,npts_coarse);
687  some_file.close();
688 
689  // Output Stefan Boltzmann radiation (best suited for tecplot)
690  //------------------------------------------------------------
691  sprintf(filename,"%s/stefan_boltzmann_radiation%i.dat",
692  doc_info.directory().c_str(),
693  doc_info.number());
694  some_file.open(filename);
695  unsigned nel=Unsteady_heat_flux_mesh_pt->nelement();
696  for (unsigned e=0;e<nel;e++)
697  {
700  output_stefan_boltzmann_radiation_rays(some_file);
701  }
702  some_file.close();
703 
704 
705 // Output Stefan Boltzmann radiation rays (best suited for paraview)
706 //------------------------------------------------------------------
707 bool output_rays=true;
708 if (output_rays)
709  {
710  unsigned count=0;
711  unsigned nel=Unsteady_heat_flux_mesh_pt->nelement();
712  for (unsigned e=0;e<nel;e++)
713  {
714  sprintf(filename,"%s/stefan_boltzmann_rays%i_intpt%i.dat",
715  doc_info.directory().c_str(),
716  doc_info.number(),count);
717  some_file.open(filename);
721  unsigned nintpt=el_pt->integral_pt()->nweight();
722  for (unsigned ipt=0;ipt<nintpt;ipt++)
723  {
724  el_pt->output_stefan_boltzmann_radiation_rays(some_file,ipt);
725  }
726  some_file.close();
727  count++;
728  }
729  }
730 
731 
732 // Output heat flux etc.
733 //----------------------
734 sprintf(filename,"%s/flux%i.dat",
735  doc_info.directory().c_str(),
736  doc_info.number());
737 some_file.open(filename);
738 Unsteady_heat_flux_mesh_pt->output(some_file,5);
739 some_file.close();
740 
741 
742 
743 
744  // Output exact solution
745  //----------------------
746  sprintf(filename,"%s/exact_soln%i.dat",doc_info.directory().c_str(),
747  doc_info.number());
748  some_file.open(filename);
749  Bulk_mesh_pt->output_fct(some_file,npts,time_pt()->time(),
751  some_file.close();
752 
753  // Doc error
754  //----------
755  double error,norm;
756  sprintf(filename,"%s/error%i.dat",doc_info.directory().c_str(),
757  doc_info.number());
758  some_file.open(filename);
759  Bulk_mesh_pt->compute_error(some_file,
761  time_pt()->time(),
762  error,norm);
763  some_file.close();
764 
765  // Doc solution and error
766  //-----------------------
767  cout << "error: " << error << std::endl;
768  cout << "norm : " << norm << std::endl << std::endl;
769 
770 
771  // Get norm of solution
772  Bulk_mesh_pt->compute_norm(norm);
773  Trace_file << norm << std::endl;
774 
775 } // end of doc
void output_stefan_boltzmann_radiation_rays(std::ostream &outfile, const unsigned &integration_point=UINT_MAX)
Definition: temporary_stefan_boltzmann_elements.h:1487

References oomph::DocInfo::directory(), e(), calibrate::error, MergeRestartFiles::filename, GlobalParameters::get_exact_u(), oomph::FiniteElement::integral_pt(), oomph::DocInfo::number(), oomph::Integral::nweight(), oomph::StefanBoltzmannRadiationBase::output_stefan_boltzmann_radiation_rays(), and oomph::Problem_Parameter::Trace_file.

◆ setup_sb_radiation()

template<class ELEMENT >
void StefanBoltzmannProblem< ELEMENT >::setup_sb_radiation

Setup Stefan Boltzmann radiation.

1321 {
1322  // Identify face elements on potentially sun-exposed boundaries
1323  Vector<FiniteElement*> shielding_face_element_pt;
1324  unsigned nel=Unsteady_heat_flux_mesh_pt->nelement();
1325  for (unsigned e=0;e<nel;e++)
1326  {
1327  // Add to shielding surface
1328  shielding_face_element_pt.push_back(
1330  }
1332  for (unsigned e=0;e<nel;e++)
1333  {
1334  // Add to shielding surface
1335  shielding_face_element_pt.push_back(
1337  }
1338 
1339  // Doc it?
1340  bool doc_it=false;
1341  if (doc_it)
1342  {
1346  }
1347 
1348  //Setup mutual visibility for all Stefan Boltzmann elements
1350  shielding_face_element_pt);
1351 
1352  // Doc the populated bins
1353  bool doc_bins=true;
1354  if (doc_bins)
1355  {
1356  ofstream some_file;
1357  char filename[100];
1358 
1359  oomph_info << "Docing bins for step " << Doc_info.number() << std::endl;
1360 
1361  sprintf(filename,"%s/populated_bins%i.dat",Doc_info.directory().c_str(),
1362  Doc_info.number());
1363  some_file.open(filename);
1365  some_file.close();
1366 
1367  // Doc the sample points used to assess visibility
1368  sprintf(filename,"%s/sample_points%i.dat",Doc_info.directory().c_str(),
1369  Doc_info.number());
1370  some_file.open(filename);
1372  shielding_face_element_pt);
1373  some_file.close();
1374  }
1375 
1376 }

References oomph::DocInfo::directory(), oomph::StefanBoltzmannHelper::doc_bins(), GlobalParameters::Doc_info, oomph::StefanBoltzmannHelper::doc_sample_points(), e(), MergeRestartFiles::filename, oomph::StefanBoltzmannHelper::Nsample, oomph::DocInfo::number(), oomph::StefanBoltzmannHelper::Nx_bin, oomph::StefanBoltzmannHelper::Ny_bin, oomph::oomph_info, and oomph::StefanBoltzmannHelper::setup_stefan_boltzmann_visibility().

Member Data Documentation

◆ Bulk_mesh_pt [1/2]

template<class ELEMENT >
TriangleMesh<ELEMENT>* StefanBoltzmannProblem< ELEMENT >::Bulk_mesh_pt
private

Pointer to the "bulk" mesh.

◆ Bulk_mesh_pt [2/2]

template<class ELEMENT >
RefineableSolidTriangleMesh<ELEMENT>* StefanBoltzmannProblem< ELEMENT >::Bulk_mesh_pt
private

Pointer to the "bulk" mesh.

◆ Doc_info

template<class ELEMENT >
DocInfo StefanBoltzmannProblem< ELEMENT >::Doc_info
private

DocInfo object stores flags/labels for where the output gets written to.

◆ Ipt_leftmost_outer

template<class ELEMENT >
unsigned StefanBoltzmannProblem< ELEMENT >::Ipt_leftmost_outer
private

Integration point of leftmost point on outer boundary.

◆ Ipt_rightmost_inner

template<class ELEMENT >
unsigned StefanBoltzmannProblem< ELEMENT >::Ipt_rightmost_inner
private

Integration point of rightmost point on inner boundary.

◆ Leftmost_outer_el_pt

template<class ELEMENT >
StefanBoltzmannUnsteadyHeatFluxElement<ELEMENT>* StefanBoltzmannProblem< ELEMENT >::Leftmost_outer_el_pt
private

Element containing leftmost point on outer boundary.

◆ Rightmost_inner_el_pt

template<class ELEMENT >
StefanBoltzmannUnsteadyHeatFluxElement<ELEMENT>* StefanBoltzmannProblem< ELEMENT >::Rightmost_inner_el_pt
private

Element containing rightmost point on inner boundary.

◆ Surface_melt_mesh_pt

template<class ELEMENT >
Mesh* StefanBoltzmannProblem< ELEMENT >::Surface_melt_mesh_pt
private

Pointer to the surface melt mesh.

◆ Trace_file

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

Trace file.

◆ Unsteady_heat_flux_mesh_pt

template<class ELEMENT >
Mesh * StefanBoltzmannProblem< ELEMENT >::Unsteady_heat_flux_mesh_pt
private

Pointer to mesh of radiative flux elements.

Pointer to surface mesh of radiative flux elements.


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