Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
HeatTransfer< dim > Class Template Reference

#include <heat_transfer.h>

Inheritance diagram for HeatTransfer< dim >:
[legend]

Public Member Functions

 HeatTransfer (MultiphysicsInterface< dim > *multiphysics_interface, const SimulationParameters< dim > &p_simulation_parameters, const std::shared_ptr< parallel::DistributedTriangulationBase< dim > > &p_triangulation, std::shared_ptr< SimulationControl > p_simulation_control)
void assemble_matrix_and_rhs ()
void assemble_rhs ()
void assemble_nitsche_heat_restriction (const bool assemble_matrix)
std::vector< OutputStruct< dim, GlobalVectorType > > gather_output_hook () override
double calculate_delta_T_ref (double minimum_delta_T_ref=1.)
double calculate_L2_error ()
void finish_simulation () override
void percolate_time_vectors () override
void postprocess (bool first_iteration) override
void output_per_iteration_timer () override
void pre_mesh_adaptation () override
void post_mesh_adaptation () override
void compute_error_estimate (const std::pair< const Variable, Parameters::MultipleAdaptationParameters > &ivar, dealii::Vector< float > &estimated_error_per_cell) override
void compute_kelly (dealii::Vector< float > &estimated_error_per_cell, const ComponentMask &component_mask)
void write_checkpoint () override
void read_checkpoint () override
std::vector< OutputStructTableHandler > gather_tables () override
void setup_dofs () override
void set_initial_conditions () override
void update_boundary_conditions () override
void solve_linear_system () override
void setup_ilu ()
void setup_amg ()
const DoFHandler< dim > & get_dof_handler () override
GlobalVectorType & get_evaluation_point () override
GlobalVectorType & get_local_evaluation_point () override
GlobalVectorType & get_newton_update () override
GlobalVectorType & get_present_solution () override
GlobalVectorType & get_system_rhs () override
AffineConstraints< double > & get_nonzero_constraints () override
void output_newton_update_norms () override
double get_residual_rescale_metric () const override
Public Member Functions inherited from AuxiliaryPhysics< dim, GlobalVectorType >
 AuxiliaryPhysics (const Parameters::NonLinearSolver non_linear_solver_parameters)
virtual ~AuxiliaryPhysics ()=default
virtual void modify_solution ()
void setup_preconditioner () override
virtual bool should_solve_auxiliary_physics ()
Public Member Functions inherited from PhysicsSolver< GlobalVectorType >
 PhysicsSolver (const Parameters::NonLinearSolver non_linear_solver_parameters)
virtual ~PhysicsSolver ()
void solve_governing_system ()
virtual void apply_constraints ()
virtual double get_current_residual ()
virtual bool allow_skip_linear_solve_when_residual_is_below_tolerance () const
unsigned int get_current_newton_iteration () const

Private Member Functions

void verify_consistency_of_boundary_conditions ()
void assemble_system_matrix () override
void assemble_system_rhs () override
virtual void assemble_local_system_matrix (const typename DoFHandler< dim >::active_cell_iterator &cell, HeatTransferScratchData< dim > &scratch_data, StabilizedMethodsCopyData &copy_data)
virtual void assemble_local_system_rhs (const typename DoFHandler< dim >::active_cell_iterator &cell, HeatTransferScratchData< dim > &scratch_data, StabilizedMethodsCopyData &copy_data)
virtual void setup_assemblers ()
virtual void copy_local_matrix_to_global_matrix (const StabilizedMethodsCopyData &copy_data)
virtual void copy_local_rhs_to_global_rhs (const StabilizedMethodsCopyData &copy_data)
void postprocess_temperature_statistics (const bool gather_cls, const Parameters::FluidIndicator monitored_fluid, const std::string &domain_name, const bool time_average)
void write_temperature_statistics (const std::string &domain_name)
void postprocess_algebraic_melt_volume ()
void write_algebraic_melt_volume ()
void postprocess_geometric_melt_volume_and_surface ()
void write_geometric_melt_volume ()
template<typename VectorType>
void postprocess_heat_flux_on_bc (const bool gather_cls, const VectorType &current_solution_fd)
void postprocess_heat_flux_on_nitsche_ib ()
template<typename VectorType>
void postprocess_thermal_energy_in_fluid (const bool gather_cls, const Parameters::FluidIndicator monitored_fluid, const std::string &domain_name, const VectorType &current_solution_fd)
void write_heat_flux (const std::string &domain_name)
std::pair< double, bool > set_phase_coefficient (const bool gather_cls, const Parameters::FluidIndicator monitored_fluid, const double phase_value_q)

Private Attributes

MultiphysicsInterface< dim > * multiphysics
TimerOutput computing_timer
const SimulationParameters< dim > & simulation_parameters
std::shared_ptr< parallel::DistributedTriangulationBase< dim > > triangulation
std::shared_ptr< SimulationControl > simulation_control
std::shared_ptr< DoFHandler< dim > > dof_handler
std::shared_ptr< FiniteElement< dim > > fe
ConvergenceTable error_table
std::shared_ptr< Mapping< dim > > temperature_mapping
std::shared_ptr< Quadrature< dim > > cell_quadrature
std::shared_ptr< Quadrature< dim - 1 > > face_quadrature
IndexSet locally_owned_dofs
IndexSet locally_relevant_dofs
GlobalVectorType evaluation_point
GlobalVectorType local_evaluation_point
GlobalVectorType newton_update
std::shared_ptr< GlobalVectorType > present_solution
GlobalVectorType system_rhs
AffineConstraints< double > nonzero_constraints
AffineConstraints< double > zero_constraints
TrilinosWrappers::SparseMatrix system_matrix
std::shared_ptr< TrilinosWrappers::PreconditionILU > ilu_preconditioner
std::shared_ptr< TrilinosWrappers::PreconditionAMG > amg_preconditioner
std::shared_ptr< std::vector< GlobalVectorType > > previous_solutions
std::shared_ptr< SolutionTransfer< dim, GlobalVectorType > > solution_transfer
std::vector< SolutionTransfer< dim, GlobalVectorType > > previous_solutions_transfer
const bool GGLS = true
std::vector< std::shared_ptr< HeatTransferAssemblerBase< dim > > > assemblers
TableHandler statistics_table
TableHandler heat_flux_table
std::vector< std::shared_ptr< ThermalConductivityModel > > thermal_conductivity_models
std::shared_ptr< AverageScalar< dim > > average_temperature
GlobalVectorType average_temperature_to_output
std::vector< HeatFluxPostprocessor< dim > > heat_flux_postprocessors
std::vector< HeatFluxPostprocessor< dim > > average_heat_flux_postprocessors
TableHandler melt_volume_alge_table
TableHandler melt_volume_geo_table
std::vector< TableHandler > temperature_isocontour_bounding_values_tables

Additional Inherited Members

Public Attributes inherited from PhysicsSolver< GlobalVectorType >
ConditionalOStream pcout
Parameters::SimulationControl::TimeSteppingMethod time_stepping_method

Detailed Description

template<int dim>
class HeatTransfer< dim >

Implementation of heat transfer as an auxiliary physics. The heat equation is weakly coupled to the velocity field. Equation solved: \( \rho C_p \cdot \left( \frac{dT}{dt} + u \cdot \nabla T \right) = k \cdot \nabla^2 T + \tau : \nabla u \).

Definition at line 58 of file heat_transfer.h.

Constructor & Destructor Documentation

◆ HeatTransfer()

template<int dim>
HeatTransfer< dim >::HeatTransfer ( MultiphysicsInterface< dim > * multiphysics_interface,
const SimulationParameters< dim > & p_simulation_parameters,
const std::shared_ptr< parallel::DistributedTriangulationBase< dim > > & p_triangulation,
std::shared_ptr< SimulationControl > p_simulation_control )
inline

Constructor of the HeatTransfer object.

Parameters
multiphysics_interfaceMap of the auxiliary physics that will be solved on top of a computational fluid dynamic simulation.
p_simulation_parametersContain the simulation parameter file information.
p_triangulationContain the mesh information. In a parallel::DistributedTriangulationBase<dim> not every detail may be known on each processor. The mesh is distributed between the processors.
p_simulation_controlObject responsible for the control of steady-state and transient simulations. Contains all the information related to time stepping and the stopping criteria.

Definition at line 79 of file heat_transfer.h.

References AuxiliaryPhysics< dim, GlobalVectorType >::AuxiliaryPhysics(), average_temperature, cell_quadrature, computing_timer, dof_handler, face_quadrature, fe, heat_transfer, maximum_number_of_previous_solutions(), multiphysics, PhysicsSolver< GlobalVectorType >::pcout, PhysicsSolver< GlobalVectorType >::physics_solving_strategy, present_solution, previous_solutions, previous_solutions_transfer, simulation_control, simulation_parameters, solution_transfer, temperature_isocontour_bounding_values_tables, temperature_mapping, thermal_conductivity_models, and triangulation.

Member Function Documentation

◆ assemble_local_system_matrix()

template<int dim>
void HeatTransfer< dim >::assemble_local_system_matrix ( const typename DoFHandler< dim >::active_cell_iterator & cell,
HeatTransferScratchData< dim > & scratch_data,
StabilizedMethodsCopyData & copy_data )
privatevirtual

Assemble the local matrix for a given cell.

Use the WorkStream class to assemble the system matrix. It is a thread safe function.

Parameters
cellThe cell for which the local matrix is assembled.
scratch_dataThe scratch data which is used to store the calculated finite element information at the gauss point. See the documentation for HeatTransferScratchData for more information
copy_dataThe copy data which is used to store the results of the assembly over a cell

Definition at line 488 of file heat_transfer.cc.

References assemblers, HeatTransferScratchData< dim >::calculate_physical_properties(), StabilizedMethodsCopyData::cell_is_local, CLS, electromagnetics, evaluation_point, fluid_dynamics, StabilizedMethodsCopyData::local_dof_indices, multiphysics, previous_solutions, HeatTransferScratchData< dim >::reinit(), HeatTransferScratchData< dim >::reinit_cls(), HeatTransferScratchData< dim >::reinit_fluid_dynamics(), HeatTransferScratchData< dim >::reinit_time_harmonic_maxwell(), StabilizedMethodsCopyData::reset(), simulation_control, simulation_parameters, and triangulation.

◆ assemble_local_system_rhs()

template<int dim>
void HeatTransfer< dim >::assemble_local_system_rhs ( const typename DoFHandler< dim >::active_cell_iterator & cell,
HeatTransferScratchData< dim > & scratch_data,
StabilizedMethodsCopyData & copy_data )
privatevirtual

Assemble the local rhs for a given cell.

Parameters
cellThe cell for which the local matrix is assembled.
scratch_dataThe scratch data which is used to store the calculated finite element information at the gauss point. See the documentation for HeatTransferScratchData for more information
copy_dataThe copy data which is used to store the results of the assembly over a cell

Definition at line 685 of file heat_transfer.cc.

References assemblers, HeatTransferScratchData< dim >::calculate_physical_properties(), StabilizedMethodsCopyData::cell_is_local, CLS, electromagnetics, evaluation_point, fluid_dynamics, StabilizedMethodsCopyData::local_dof_indices, multiphysics, previous_solutions, HeatTransferScratchData< dim >::reinit(), HeatTransferScratchData< dim >::reinit_cls(), HeatTransferScratchData< dim >::reinit_fluid_dynamics(), HeatTransferScratchData< dim >::reinit_time_harmonic_maxwell(), HeatTransferScratchData< dim >::reinit_velocity_gradient(), StabilizedMethodsCopyData::reset(), simulation_control, simulation_parameters, and triangulation.

◆ assemble_matrix_and_rhs()

template<int dim>
void HeatTransfer< dim >::assemble_matrix_and_rhs ( )

Call for the assembly of the matrix and the right-hand side.

Deprecated
This function is to be deprecated when the new assembly mechanism is integrated to this solver.

Definition at line 32 of file heat_transfer.cc.

References assemble_nitsche_heat_restriction(), assemble_system_matrix(), assemble_system_rhs(), and simulation_parameters.

◆ assemble_nitsche_heat_restriction()

template<int dim>
void HeatTransfer< dim >::assemble_nitsche_heat_restriction ( const bool assemble_matrix)

Call for the assembly of the matrix and the right-hand side of the Nitsche restriction for the heat transfer equation.

Parameters
assemble_matrixBoolean that is true for matrix assembly, and false for rhs assembly.

std::pow(h_cell * h_cell, double(dim) / double(dim));

Definition at line 53 of file heat_transfer.cc.

References dof_handler, evaluation_point, fe, multiphysics, simulation_parameters, system_matrix, system_rhs, and zero_constraints.

◆ assemble_rhs()

template<int dim>
void HeatTransfer< dim >::assemble_rhs ( )

Call for the assembly of the right-hand side.

Deprecated
This function is to be deprecated when the new assembly mechanism is integrated to this solver.

Definition at line 44 of file heat_transfer.cc.

References assemble_nitsche_heat_restriction(), assemble_system_rhs(), and simulation_parameters.

◆ assemble_system_matrix()

template<int dim>
void HeatTransfer< dim >::assemble_system_matrix ( )
overrideprivatevirtual

◆ assemble_system_rhs()

template<int dim>
void HeatTransfer< dim >::assemble_system_rhs ( )
overrideprivatevirtual

◆ calculate_delta_T_ref()

template<int dim>
double HeatTransfer< dim >::calculate_delta_T_ref ( double minimum_delta_T_ref = 1.)

Calculate delta_T_ref for the DCDD shock capture mechanism. delta_T_ref = T_max - T_min.

Parameters
minimum_delta_T_refMinimum temperature value acceptable as reference to calculate the DCDD shock capture stabilization term. DCDD shock capture elements are divided by delta_T_ref. Limiting delta_T_ref prevents overestimation of the virtual diffusivity at simulations with low differences between minimum and maximum temperatures.
Returns
The difference between the maximal temperature and the minimal temperature in the whole domain.

Definition at line 945 of file heat_transfer.cc.

References is_steady(), present_solution, previous_solutions, and simulation_parameters.

◆ calculate_L2_error()

template<int dim>
double HeatTransfer< dim >::calculate_L2_error ( )

Calculate the L2 error of the solution.

Definition at line 971 of file heat_transfer.cc.

References cell_quadrature, dof_handler, fe, present_solution, simulation_control, simulation_parameters, temperature_mapping, and triangulation.

◆ compute_error_estimate()

template<int dim>
void HeatTransfer< dim >::compute_error_estimate ( const std::pair< const Variable, Parameters::MultipleAdaptationParameters > & ivar,
dealii::Vector< float > & estimated_error_per_cell )
overridevirtual

Compute the error estimator for mesh refinement.

Parameters
[in]ivarThe current element of the map simulation_parameters.mesh_adaptation.variables
[in,out]estimated_error_per_cellThe deal.II vector of estimated_error_per_cell

Implements AuxiliaryPhysics< dim, GlobalVectorType >.

Definition at line 1326 of file heat_transfer.cc.

References compute_kelly(), fe, Parameters::MultipleAdaptationParameters::kelly, and temperature.

◆ compute_kelly()

template<int dim>
void HeatTransfer< dim >::compute_kelly ( dealii::Vector< float > & estimated_error_per_cell,
const ComponentMask & component_mask )

Compute the Kelly error estimator on the temperature variable for mesh refinement. See : https://www.dealii.org/current/doxygen/deal.II/classKellyErrorEstimator.html for more information on the Kelly error estimator.

Parameters
[in,out]estimated_error_per_cellThe deal.II vector of estimated_error_per_cell
[in]component_maskThe component mask corresponding to the temperature variable

Definition at line 1350 of file heat_transfer.cc.

References dof_handler, face_quadrature, present_solution, and temperature_mapping.

◆ copy_local_matrix_to_global_matrix()

template<int dim>
void HeatTransfer< dim >::copy_local_matrix_to_global_matrix ( const StabilizedMethodsCopyData & copy_data)
privatevirtual

◆ copy_local_rhs_to_global_rhs()

template<int dim>
void HeatTransfer< dim >::copy_local_rhs_to_global_rhs ( const StabilizedMethodsCopyData & copy_data)
privatevirtual

◆ finish_simulation()

template<int dim>
void HeatTransfer< dim >::finish_simulation ( )
overridevirtual

◆ gather_output_hook()

template<int dim>
std::vector< OutputStruct< dim, GlobalVectorType > > HeatTransfer< dim >::gather_output_hook ( )
overridevirtual

Gather and return vector of output structs that are particular to some applications.

Returns
Vector of OutputStructs that will be used to write the output results as VTU files.

Reimplemented from AuxiliaryPhysics< dim, GlobalVectorType >.

Definition at line 826 of file heat_transfer.cc.

References average_heat_flux_postprocessors, average_temperature, average_temperature_to_output, dof_handler, heat_flux_postprocessors, present_solution, simulation_parameters, and thermal_conductivity_models.

◆ gather_tables()

template<int dim>
std::vector< OutputStructTableHandler > HeatTransfer< dim >::gather_tables ( )
overridevirtual

Returns a vector of references to TableHandler objects that needs to be serialized/deserialized for the Heat Transfer solver.

Returns
Structure containing a vector of references to TableHandler objects that needs to be serialized/deserialized for the Heat Transfer solver, and their corresponding file names.

Implements AuxiliaryPhysics< dim, GlobalVectorType >.

Definition at line 1366 of file heat_transfer.cc.

References error_table, heat_flux_table, melt_volume_alge_table, melt_volume_geo_table, simulation_parameters, statistics_table, temperature, and temperature_isocontour_bounding_values_tables.

◆ get_dof_handler()

template<int dim>
const DoFHandler< dim > & HeatTransfer< dim >::get_dof_handler ( )
inlineoverridevirtual

Getter method to access the private attribute dof_handler for the physic currently solved. NB : dof_handler is now passed to the multiphysics interface at the end of the setup_dofs method.

Returns
A list of the indices of the degrees of freedom.

Implements AuxiliaryPhysics< dim, GlobalVectorType >.

Definition at line 349 of file heat_transfer.h.

References dof_handler.

◆ get_evaluation_point()

template<int dim>
GlobalVectorType & HeatTransfer< dim >::get_evaluation_point ( )
inlineoverridevirtual

Getter method to access the private attribute evaluation_point for the physic currently solved.

Returns
The vector at which the evaluation is performed.

Implements PhysicsSolver< GlobalVectorType >.

Definition at line 361 of file heat_transfer.h.

References evaluation_point.

◆ get_local_evaluation_point()

template<int dim>
GlobalVectorType & HeatTransfer< dim >::get_local_evaluation_point ( )
inlineoverridevirtual

Getter method to access the private attribute local_evaluation_point for the physic currently solved.

Returns
The local evaluation point. Ghosts cells are not considered in this evaluation.

Implements PhysicsSolver< GlobalVectorType >.

Definition at line 374 of file heat_transfer.h.

References local_evaluation_point.

◆ get_newton_update()

template<int dim>
GlobalVectorType & HeatTransfer< dim >::get_newton_update ( )
inlineoverridevirtual

Getter method to access the private attribute newton_update for the physic currently solved.

Returns
The direction used to perform the newton iteration.

Implements PhysicsSolver< GlobalVectorType >.

Definition at line 386 of file heat_transfer.h.

References newton_update.

◆ get_nonzero_constraints()

template<int dim>
AffineConstraints< double > & HeatTransfer< dim >::get_nonzero_constraints ( )
inlineoverridevirtual

Getter method to access the private attribute nonzero_constraints for the physic currently solved.

Returns
Store the nonzero constraints that arise from several sources such as boundary conditions and hanging nodes in the mesh. See the deal.II documentation on constraints on degrees of freedom for more information.

Implements PhysicsSolver< GlobalVectorType >.

Definition at line 426 of file heat_transfer.h.

References nonzero_constraints.

◆ get_present_solution()

template<int dim>
GlobalVectorType & HeatTransfer< dim >::get_present_solution ( )
inlineoverridevirtual

Getter method to access the private attribute present_solution for the physic currently solved. NB : present_solution is now passed to the multiphysics interface at the end of the setup_dofs method.

Returns
A vector containing all the values of the solution.

Implements PhysicsSolver< GlobalVectorType >.

Definition at line 400 of file heat_transfer.h.

References present_solution.

◆ get_residual_rescale_metric()

template<int dim>
double HeatTransfer< dim >::get_residual_rescale_metric ( ) const
inlineoverridevirtual

Return the metric for residual rescaling. By default, should return 1. If the rescale_residual_by_volume is set to true, the method returns the global volume of the triangulation.

Returns
Rescale metric.

Implements PhysicsSolver< GlobalVectorType >.

Definition at line 451 of file heat_transfer.h.

References heat_transfer, simulation_parameters, temperature_mapping, and triangulation.

◆ get_system_rhs()

template<int dim>
GlobalVectorType & HeatTransfer< dim >::get_system_rhs ( )
inlineoverridevirtual

Getter method to access the private attribute system_rhs for the physic currently solved.

Returns
Right hand side vector.

Implements PhysicsSolver< GlobalVectorType >.

Definition at line 412 of file heat_transfer.h.

References system_rhs.

◆ output_newton_update_norms()

template<int dim>
void HeatTransfer< dim >::output_newton_update_norms ( )
inlineoverridevirtual

Output the L2 and Linfty norms of the correction vector.

Implements PhysicsSolver< GlobalVectorType >.

Definition at line 435 of file heat_transfer.h.

References newton_update, and PhysicsSolver< GlobalVectorType >::pcout.

◆ output_per_iteration_timer()

template<int dim>
void HeatTransfer< dim >::output_per_iteration_timer ( )
overridevirtual

Output the per iteration wallclock times.

Implements AuxiliaryPhysics< dim, GlobalVectorType >.

Definition at line 1266 of file heat_transfer.cc.

References announce_string(), computing_timer, and PhysicsSolver< GlobalVectorType >::pcout.

◆ percolate_time_vectors()

template<int dim>
void HeatTransfer< dim >::percolate_time_vectors ( )
overridevirtual

Rearrange vector solution correctly for transient simulations.

Implements AuxiliaryPhysics< dim, GlobalVectorType >.

Definition at line 1052 of file heat_transfer.cc.

References present_solution, and previous_solutions.

◆ post_mesh_adaptation()

template<int dim>
void HeatTransfer< dim >::post_mesh_adaptation ( )
overridevirtual

◆ postprocess()

◆ postprocess_algebraic_melt_volume()

template<int dim>
void HeatTransfer< dim >::postprocess_algebraic_melt_volume ( )
private

Compute the algebraic (phase indicator and liquid fraction weighted) melt volume (3D) or surface (2D) in a domain. The monitored fluid must be selected with Parameters::PostProcessing::monitored_fluid_with_phase_change.

Remarks
For CLS multiphase flow, only one of the fluids can be monitored.

Definition at line 2181 of file heat_transfer.cc.

References calculate_liquid_fraction(), cell_quadrature, CLS, dof_handler, fe, Parameters::fluid_0, Parameters::fluid_1, melt_volume_alge_table, multiphysics, PhysicsSolver< GlobalVectorType >::pcout, present_solution, simulation_control, simulation_parameters, temperature_mapping, triangulation, and Parameters::verbose.

◆ postprocess_geometric_melt_volume_and_surface()

template<int dim>
void HeatTransfer< dim >::postprocess_geometric_melt_volume_and_surface ( )
private

Compute the geometric melt volume (3D) or surface (2D) and the contour surface area (3D) or length (2D) in a domain. The melt region is delimited by the Parameters::PostProcessing::melting_temperature isosurface (3D) or isocurve (2D) within the subdomain occupied by the fluid selected with Parameters::PostProcessing::monitored_fluid_with_phase_change.

Remarks
For CLS multiphase flow, only one of the fluids can be monitored. The volume is computed as the geometrical volume with respect to the phase indicator isocurve (isosurface) of value 0.5.

Definition at line 2356 of file heat_transfer.cc.

References CLS, dof_handler, fe, Parameters::fluid_1, InterfaceTools::integrate_volume_and_surface(), melt_volume_geo_table, multiphysics, PhysicsSolver< GlobalVectorType >::pcout, present_solution, simulation_control, simulation_parameters, and Parameters::verbose.

◆ postprocess_heat_flux_on_bc()

template<int dim>
template<typename VectorType>
template void HeatTransfer< dim >::postprocess_heat_flux_on_bc< GlobalBlockVectorType > ( const bool gather_cls,
const VectorType & current_solution_fd )
private

Post-processing. Calculate the heat flux at heat transfer boundary conditions.

Parameters
gather_clsboolean true when CLS=true (multiphase flow), used to gather CLS information
current_solution_fdcurrent solution for the fluid dynamics, parsed by postprocess

Definition at line 2506 of file heat_transfer.cc.

References calculate_point_property(), CLS, dof_handler, face_quadrature, fluid_dynamics, heat_flux_table, multiphysics, PhysicsSolver< GlobalVectorType >::pcout, present_solution, simulation_control, simulation_parameters, temperature_mapping, thermal_conductivity_models, triangulation, and Parameters::verbose.

◆ postprocess_heat_flux_on_nitsche_ib()

template<int dim>
void HeatTransfer< dim >::postprocess_heat_flux_on_nitsche_ib ( )
private

Post-processing. Calculate the heat flux in the Nitsche immersed boundary.

Definition at line 174 of file heat_transfer.cc.

References dof_handler, fe, heat_flux_table, multiphysics, PhysicsSolver< GlobalVectorType >::pcout, present_solution, simulation_parameters, triangulation, and Parameters::verbose.

◆ postprocess_temperature_statistics()

template<int dim>
void HeatTransfer< dim >::postprocess_temperature_statistics ( const bool gather_cls,
const Parameters::FluidIndicator monitored_fluid,
const std::string & domain_name,
const bool time_average )
private

Post-processing. Calculate temperature statistics on the domain : Max, min, average and standard-deviation.

Parameters
gather_clsBoolean true when CLS=true (multiphase flow), used to gather CLS information.
monitored_fluidFluid indicator (fluid_0 or fluid_1 or both) corresponding to the phase of interest.
domain_nameString indicating the monitored_fluid in the output filename.
time_averageBoolean true when calculating the spacial average of the time-averaged temperature solution.

Definition at line 1954 of file heat_transfer.cc.

References average_temperature, cell_quadrature, CLS, dof_handler, fe, multiphysics, PhysicsSolver< GlobalVectorType >::pcout, present_solution, set_phase_coefficient(), simulation_control, simulation_parameters, statistics_table, temperature_mapping, triangulation, and Parameters::verbose.

◆ postprocess_thermal_energy_in_fluid()

template<int dim>
template<typename VectorType>
template void HeatTransfer< dim >::postprocess_thermal_energy_in_fluid< GlobalBlockVectorType > ( const bool gather_cls,
const Parameters::FluidIndicator monitored_fluid,
const std::string & domain_name,
const VectorType & current_solution_fd )
private

Post-processing. Calculate the thermal energy \( (\rho \cdot C_p \cdot T) \) in a fluid domain.

Parameters
gather_clsBoolean true when CLS=true (multiphase flow), used to gather CLS information.
monitored_fluidFluid indicator (fluid_0 or fluid_1 or both) corresponding to the phase of interest.
domain_nameString indicating the monitored_fluid in the console output, table and filename.
current_solution_fdCurrent solution for the fluid dynamics, parsed by postprocess.

Definition at line 2786 of file heat_transfer.cc.

References calculate_point_property(), cell_quadrature, CLS, dof_handler, fluid_dynamics, heat_flux_table, multiphysics, PhysicsSolver< GlobalVectorType >::pcout, present_solution, set_phase_coefficient(), simulation_parameters, temperature_mapping, triangulation, and Parameters::verbose.

◆ pre_mesh_adaptation()

template<int dim>
void HeatTransfer< dim >::pre_mesh_adaptation ( )
overridevirtual

Prepare the auxiliary physics variables for a mesh refinement/coarsening.

Implements AuxiliaryPhysics< dim, GlobalVectorType >.

Definition at line 1277 of file heat_transfer.cc.

References average_temperature, present_solution, previous_solutions, previous_solutions_transfer, simulation_parameters, and solution_transfer.

◆ read_checkpoint()

template<int dim>
void HeatTransfer< dim >::read_checkpoint ( )
overridevirtual

◆ set_initial_conditions()

template<int dim>
void HeatTransfer< dim >::set_initial_conditions ( )
overridevirtual

Set up the initial conditions associated with the physics. heat_transfer allows a temperature function initial condition over the the domain.

Implements AuxiliaryPhysics< dim, GlobalVectorType >.

Definition at line 1755 of file heat_transfer.cc.

References dof_handler, newton_update, nonzero_constraints, percolate_time_vectors(), present_solution, simulation_parameters, and temperature_mapping.

◆ set_phase_coefficient()

template<int dim>
std::pair< double, bool > HeatTransfer< dim >::set_phase_coefficient ( const bool gather_cls,
const Parameters::FluidIndicator monitored_fluid,
const double phase_value_q )
private

Set a phase_coefficient that is used in the postprocessing, to account for multiphase flow.

Returns

  • a double: phase_coefficient from 0 to 1, see the documentation on CLS for more information,
  • a boolean: point_is_in_postprocessed_fluid, true if the quadrature point is in the postprocessed_fluid (used for min_max_temperature calculation)
Parameters
gather_clsboolean true when CLS=true (multiphase flow), used to gather CLS information
monitored_fluidFluid indicator (fluid_0 or fluid_1 or both) corresponding to the phase of interest.
phase_value_qdouble corresponding to the phase value at this quadrature point

Definition at line 3014 of file heat_transfer.cc.

References Parameters::fluid_0, and Parameters::fluid_1.

◆ setup_amg()

template<int dim>
void HeatTransfer< dim >::setup_amg ( )

Set up the AMG preconditioner stored in amg_preconditioner.

Definition at line 1791 of file heat_transfer.cc.

References amg_preconditioner, computing_timer, dof_handler, fe, heat_transfer, simulation_parameters, and system_matrix.

◆ setup_assemblers()

template<int dim>
void HeatTransfer< dim >::setup_assemblers ( )
privatevirtual

Set up the vector of assembler functions.

Definition at line 276 of file heat_transfer.cc.

References assemblers, Parameters::none, simulation_control, simulation_parameters, time_stepping_is_bdf(), and time_stepping_is_sdirk().

◆ setup_dofs()

◆ setup_ilu()

template<int dim>
void HeatTransfer< dim >::setup_ilu ( )

Set up the ILU preconditioner stored in ilu_preconditioner.

Definition at line 1768 of file heat_transfer.cc.

References computing_timer, heat_transfer, ilu_preconditioner, simulation_parameters, and system_matrix.

◆ solve_linear_system()

◆ update_boundary_conditions()

template<int dim>
void HeatTransfer< dim >::update_boundary_conditions ( )
overridevirtual

◆ verify_consistency_of_boundary_conditions()

template<int dim>
void HeatTransfer< dim >::verify_consistency_of_boundary_conditions ( )
inlineprivate

Verify consistency of the input parameters for boundary conditions to ensure that for every boundary condition within the triangulation, a boundary condition has been specified in the input file.

Definition at line 467 of file heat_transfer.h.

References simulation_parameters, and triangulation.

◆ write_algebraic_melt_volume()

template<int dim>
void HeatTransfer< dim >::write_algebraic_melt_volume ( )
private

Post-processing. Write the algebraic melt volume to an output file.

Definition at line 2337 of file heat_transfer.cc.

References melt_volume_alge_table, simulation_parameters, and triangulation.

◆ write_checkpoint()

template<int dim>
void HeatTransfer< dim >::write_checkpoint ( )
overridevirtual

◆ write_geometric_melt_volume()

template<int dim>
void HeatTransfer< dim >::write_geometric_melt_volume ( )
private

Write the geometric melt volume to an output file.

Definition at line 2486 of file heat_transfer.cc.

References melt_volume_geo_table, simulation_parameters, and triangulation.

◆ write_heat_flux()

template<int dim>
void HeatTransfer< dim >::write_heat_flux ( const std::string & domain_name)
private

Post-processing. Write the heat transfer values to an output file.

Parameters
domain_namestring indicating the postprocessed_fluid in the console output, table and filename.

Definition at line 2996 of file heat_transfer.cc.

References heat_flux_table, simulation_parameters, and triangulation.

◆ write_temperature_statistics()

template<int dim>
void HeatTransfer< dim >::write_temperature_statistics ( const std::string & domain_name)
private

Post-processing. Write the temperature statistics to an output file.

Parameters
domain_namestring indicating the postprocessed_fluid in the console output, table and filename.

Definition at line 2163 of file heat_transfer.cc.

References simulation_parameters, statistics_table, and triangulation.

Member Data Documentation

◆ amg_preconditioner

template<int dim>
std::shared_ptr<TrilinosWrappers::PreconditionAMG> HeatTransfer< dim >::amg_preconditioner
private

AMG preconditioner used by the iterative linear solver.

Definition at line 832 of file heat_transfer.h.

◆ assemblers

template<int dim>
std::vector<std::shared_ptr<HeatTransferAssemblerBase<dim> > > HeatTransfer< dim >::assemblers
private

Assemblers for the matrix and the right hand side (RHS).

Definition at line 869 of file heat_transfer.h.

◆ average_heat_flux_postprocessors

template<int dim>
std::vector<HeatFluxPostprocessor<dim> > HeatTransfer< dim >::average_heat_flux_postprocessors
private

Compute local average heat flux quantities from temperature field and material properties.

Definition at line 914 of file heat_transfer.h.

◆ average_temperature

template<int dim>
std::shared_ptr<AverageScalar<dim> > HeatTransfer< dim >::average_temperature
private

Compute the average temperature in time.

Definition at line 897 of file heat_transfer.h.

◆ average_temperature_to_output

template<int dim>
GlobalVectorType HeatTransfer< dim >::average_temperature_to_output
private

Locally owned average temperature calculated using the AverageScalar object.

Definition at line 902 of file heat_transfer.h.

◆ cell_quadrature

template<int dim>
std::shared_ptr<Quadrature<dim> > HeatTransfer< dim >::cell_quadrature
private

Approximate an integral by evaluating the integrand at specific points and summing the point values with specific weights.

Definition at line 768 of file heat_transfer.h.

◆ computing_timer

template<int dim>
TimerOutput HeatTransfer< dim >::computing_timer
private

Store information related to the computing time such as CPU times or wall time.

Definition at line 717 of file heat_transfer.h.

◆ dof_handler

template<int dim>
std::shared_ptr<DoFHandler<dim> > HeatTransfer< dim >::dof_handler
private

Given a triangulation and a description of a finite element, this class enumerates degrees of freedom on all vertices, edges, faces, and cells of the triangulation.

Definition at line 744 of file heat_transfer.h.

◆ error_table

template<int dim>
ConvergenceTable HeatTransfer< dim >::error_table
private

Store some convergence data, such as residuals of the cg-method, or some evaluated L2-errors of discrete solutions. Evaluate convergence rates or orders.

Definition at line 755 of file heat_transfer.h.

◆ evaluation_point

template<int dim>
GlobalVectorType HeatTransfer< dim >::evaluation_point
private

The point at which the evaluation is performed.

Definition at line 792 of file heat_transfer.h.

◆ face_quadrature

template<int dim>
std::shared_ptr<Quadrature<dim - 1> > HeatTransfer< dim >::face_quadrature
private

Approximate an integral by evaluating the integrand at specific points and summing the point values with specific weights.

Definition at line 773 of file heat_transfer.h.

◆ fe

template<int dim>
std::shared_ptr<FiniteElement<dim> > HeatTransfer< dim >::fe
private

The base class for finite element.

Definition at line 748 of file heat_transfer.h.

◆ GGLS

template<int dim>
const bool HeatTransfer< dim >::GGLS = true
private

Reference for GGLS https://onlinelibrary.wiley.com/doi/abs/10.1002/nme.2324 Warning, this GGLS implementation is valid only for Linear elements Quad elements will be lacking the third derivative of the diffusion operator Whether this affects or not the final result is unclear to me at the moment. Additionnaly, this formulation does not use the gradient of the source term. The same applies, I have no clue if this is detrimental or not to the solution since anyway the GGLS term scales as h^(order+1).

Definition at line 864 of file heat_transfer.h.

◆ heat_flux_postprocessors

template<int dim>
std::vector<HeatFluxPostprocessor<dim> > HeatTransfer< dim >::heat_flux_postprocessors
private

Compute local heat flux quantities from temperature field and material properties.

Definition at line 908 of file heat_transfer.h.

◆ heat_flux_table

template<int dim>
TableHandler HeatTransfer< dim >::heat_flux_table
private

Contain heat flux information used for post-processing:

  • the total fluxes on a boundary: \((-k \nabla T + u \rho C_p) \cdot n \)
  • the convective heat flux on a boundary: \( h(T-T_{inf}) \)
  • the total fluxes on the nitsche immersed boundaries (if active)

Definition at line 883 of file heat_transfer.h.

◆ ilu_preconditioner

template<int dim>
std::shared_ptr<TrilinosWrappers::PreconditionILU> HeatTransfer< dim >::ilu_preconditioner
private

ILU preconditioner used by the iterative linear solver.

Definition at line 827 of file heat_transfer.h.

◆ local_evaluation_point

template<int dim>
GlobalVectorType HeatTransfer< dim >::local_evaluation_point
private

The local evaluation point. Ghosts cells are not considered in this evaluation.

Definition at line 797 of file heat_transfer.h.

◆ locally_owned_dofs

template<int dim>
IndexSet HeatTransfer< dim >::locally_owned_dofs
private

Store a subset of the DoF indices that are stored on a particular processor on a distributed architecture.

Definition at line 782 of file heat_transfer.h.

◆ locally_relevant_dofs

template<int dim>
IndexSet HeatTransfer< dim >::locally_relevant_dofs
private

Store a subset of the DoF indices that contains both the locally_owned_dofs and the DoF indices on ghost cells.

Definition at line 787 of file heat_transfer.h.

◆ melt_volume_alge_table

template<int dim>
TableHandler HeatTransfer< dim >::melt_volume_alge_table
private

Liquid fraction in the domain.

Definition at line 925 of file heat_transfer.h.

◆ melt_volume_geo_table

template<int dim>
TableHandler HeatTransfer< dim >::melt_volume_geo_table
private

Evolution of the melt volume in the simulated domain.

Definition at line 930 of file heat_transfer.h.

◆ multiphysics

template<int dim>
MultiphysicsInterface<dim>* HeatTransfer< dim >::multiphysics
private

Definition at line 711 of file heat_transfer.h.

◆ newton_update

template<int dim>
GlobalVectorType HeatTransfer< dim >::newton_update
private

The direction \( \delta u^n \) used to perform the newton iteration in \( u^{n+1} = u^n + \alpha ^n \delta u ^n \). Where \( \alpha ^n \) is the size of the step.

Definition at line 803 of file heat_transfer.h.

◆ nonzero_constraints

template<int dim>
AffineConstraints<double> HeatTransfer< dim >::nonzero_constraints
private

Store the nonzero constraints that arise from several sources such as boundary conditions and hanging nodes in the mesh. See the deal.II documentation on constraints on degrees of freedom for more information.

Definition at line 817 of file heat_transfer.h.

◆ present_solution

template<int dim>
std::shared_ptr<GlobalVectorType> HeatTransfer< dim >::present_solution
private

A vector containing all the values of the solution.

Definition at line 807 of file heat_transfer.h.

◆ previous_solutions

template<int dim>
std::shared_ptr<std::vector<GlobalVectorType> > HeatTransfer< dim >::previous_solutions
private

Previous solution vector.

Definition at line 838 of file heat_transfer.h.

◆ previous_solutions_transfer

template<int dim>
std::vector<SolutionTransfer<dim, GlobalVectorType> > HeatTransfer< dim >::previous_solutions_transfer
private

previous_solutions_transfer occupies the same role as solution_transfer but for solutions at previous time steps.

Definition at line 853 of file heat_transfer.h.

◆ simulation_control

template<int dim>
std::shared_ptr<SimulationControl> HeatTransfer< dim >::simulation_control
private

Responsible for the control of steady-state and transient simulations. Contains all the information related to time stepping and the stopping criteria. See simulation_control abstract class for more information.

Definition at line 738 of file heat_transfer.h.

◆ simulation_parameters

template<int dim>
const SimulationParameters<dim>& HeatTransfer< dim >::simulation_parameters
private

Contain the simulation parameter file information.

Definition at line 722 of file heat_transfer.h.

◆ solution_transfer

template<int dim>
std::shared_ptr<SolutionTransfer<dim, GlobalVectorType> > HeatTransfer< dim >::solution_transfer
private

SolutionTransfer<dim, GlobalVectorType>> is used to implement the transfer of a discrete FE function (e.g. a solution vector) from one mesh to another. This Deal.ii class is used for mesh_refinement and simulation restarts.

Definition at line 846 of file heat_transfer.h.

◆ statistics_table

template<int dim>
TableHandler HeatTransfer< dim >::statistics_table
private

Temperature statistics table used for post-processing. It contains the minimum , maximum, average and standard deviation of the temperature.

Definition at line 875 of file heat_transfer.h.

◆ system_matrix

template<int dim>
TrilinosWrappers::SparseMatrix HeatTransfer< dim >::system_matrix
private

The system matrix.

Definition at line 822 of file heat_transfer.h.

◆ system_rhs

template<int dim>
GlobalVectorType HeatTransfer< dim >::system_rhs
private

The right hand side vector.

Definition at line 811 of file heat_transfer.h.

◆ temperature_isocontour_bounding_values_tables

template<int dim>
std::vector<TableHandler> HeatTransfer< dim >::temperature_isocontour_bounding_values_tables
private

Vector of tables containing evolution of temperature isocontour bounding values.

Definition at line 936 of file heat_transfer.h.

◆ temperature_mapping

template<int dim>
std::shared_ptr<Mapping<dim> > HeatTransfer< dim >::temperature_mapping
private

Transformation which maps point in the reference cell to points in the actual grid cell.

Definition at line 763 of file heat_transfer.h.

◆ thermal_conductivity_models

template<int dim>
std::vector<std::shared_ptr<ThermalConductivityModel> > HeatTransfer< dim >::thermal_conductivity_models
private

Abstract class that allows to calculate the thermal conductivity on each quadrature point using the temperature of the fluid.

Definition at line 892 of file heat_transfer.h.

◆ triangulation

template<int dim>
std::shared_ptr<parallel::DistributedTriangulationBase<dim> > HeatTransfer< dim >::triangulation
private

Collection of cells that cover the domain on which one wants to solve a partial differential equation.

Definition at line 731 of file heat_transfer.h.

◆ zero_constraints

template<int dim>
AffineConstraints<double> HeatTransfer< dim >::zero_constraints
private

Definition at line 818 of file heat_transfer.h.


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