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

#include <multiphysics_interface.h>

Public Member Functions

 MultiphysicsInterface (const SimulationParameters< dim > &nsparam, const std::shared_ptr< parallel::DistributedTriangulationBase< dim > > &p_triangulation, std::shared_ptr< SimulationControl > p_simulation_control, ConditionalOStream &p_pcout, const FluidDynamicsFormulation p_fluid_dynamics_formulation=FluidDynamicsFormulation::standard)
virtual ~MultiphysicsInterface ()=default
std::vector< PhysicsID > get_active_physics ()
FluidDynamicsFormulation get_fluid_dynamics_formulation () const
void enable_projected_particle_fields (PhysicsID physics_id)
void announce_physics (const PhysicsID physics_id)
void solve (const bool fluid_dynamics_has_been_solved, const Parameters::SimulationControl::TimeSteppingMethod time_stepping_method)
void solve_physics (const PhysicsID physics_id, const Parameters::SimulationControl::TimeSteppingMethod time_stepping_method)
void solve_block_physics (const PhysicsID physics_id, const Parameters::SimulationControl::TimeSteppingMethod time_stepping_method)
std::vector< OutputStruct< dim, GlobalVectorType > > gather_output_hook_global_vector ()
std::vector< OutputStruct< dim, GlobalBlockVectorType > > gather_output_hook_global_block_vector ()
void finish_simulation ()
void percolate_time_vectors (const bool fluid_dynamics_has_been_solved)
void update_boundary_conditions ()
void prepare_for_postprocessing ()
void postprocess (bool first_iteration)
void output_per_iteration_timer ()
void prepare_for_mesh_adaptation ()
void post_mesh_adaptation ()
void setup_dofs ()
void set_initial_conditions ()
void solve_linear_system (const PhysicsID physics_id)
bool fluid_dynamics_is_block () const
const DoFHandler< dim > & get_dof_handler (const PhysicsID physics_id)
const Mapping< dim > & get_mapping (const PhysicsID physics_id)
const GlobalVectorType & get_solution (const PhysicsID physics_id)
const GlobalVectorType & get_filtered_solution (const PhysicsID physics_id)
const GlobalBlockVectorType & get_block_solution (const PhysicsID physics_id)
const GlobalVectorType & get_time_average_solution (const PhysicsID physics_id)
const GlobalBlockVectorType & get_block_time_average_solution (const PhysicsID physics_id)
const std::vector< std::shared_ptr< SolidBase< dim, dim > > > & get_solids (const int number_solids)
const GlobalVectorType & get_projected_phase_indicator_gradient_solution ()
const GlobalVectorType & get_curvature_solution ()
const DoFHandler< dim > & get_curvature_dof_handler ()
const DoFHandler< dim > & get_projected_phase_indicator_gradient_dof_handler ()
std::shared_ptr< Shape< dim > > get_immersed_solid_shape ()
void set_immersed_solid_shape (const std::shared_ptr< Shape< dim > > &shape)
const std::vector< GlobalVectorType > & get_previous_solutions (const PhysicsID physics_id)
const std::vector< GlobalBlockVectorType > & get_block_previous_solutions (const PhysicsID physics_id)
void set_dof_handler (const PhysicsID physics_id, std::shared_ptr< DoFHandler< dim > > dof_handler)
void set_mapping (const PhysicsID physics_id, std::shared_ptr< Mapping< dim > > mapping)
void set_solid (std::shared_ptr< std::vector< std::shared_ptr< SolidBase< dim, dim > > > > solids_input)
void set_solution (const PhysicsID physics_id, std::shared_ptr< GlobalVectorType > solution_vector)
void set_filtered_solution (const PhysicsID physics_id, std::shared_ptr< GlobalVectorType > filtered_solution_vector)
void set_time_average_solution (const PhysicsID physics_id, std::shared_ptr< GlobalVectorType > solution_vector)
void set_block_solution (const PhysicsID physics_id, std::shared_ptr< GlobalBlockVectorType > solution_vector)
void set_block_time_average_solution (const PhysicsID physics_id, std::shared_ptr< GlobalBlockVectorType > solution_vector)
void set_previous_solutions (const PhysicsID physics_id, std::shared_ptr< std::vector< GlobalVectorType > > previous_solutions_vector)
void set_block_previous_solutions (const PhysicsID physics_id, std::shared_ptr< std::vector< GlobalBlockVectorType > > previous_solutions_vector)
virtual void compute_error_estimate (const std::pair< const Variable, Parameters::MultipleAdaptationParameters > &ivar, dealii::Vector< float > &estimated_error_per_cell)
virtual void write_checkpoint ()
virtual void read_checkpoint ()
template<typename VectorType>
void postprocess_probes (const Mapping< dim > &mapping, const DoFHandler< dim > &dof_handler, const VectorType &present_solution, const Variable variable, const ConditionalOStream &pcout)

Private Member Functions

void inspect_multiphysics_models_dependencies (const SimulationParameters< dim > &nsparam)
bool is_field_available (const PhysicsID physics_id) const

Private Attributes

const Parameters::Multiphysics< dim > multiphysics_parameters
std::map< PhysicsID, Parameters::Verbosity > verbosity
ConditionalOStream pcout
const FluidDynamicsFormulation fluid_dynamics_formulation
bool particle_void_fraction_field_enabled = false
bool particle_temperature_field_enabled = false
std::vector< PhysicsID > active_physics
std::map< PhysicsID, bool > solve_pre_fluid
std::map< PhysicsID, std::shared_ptr< AuxiliaryPhysics< dim, GlobalVectorType > > > physics
std::map< PhysicsID, std::shared_ptr< AuxiliaryPhysics< dim, GlobalBlockVectorType > > > block_physics
std::map< PhysicsID, std::shared_ptr< DoFHandler< dim > > > physics_dof_handler
std::map< PhysicsID, std::shared_ptr< Mapping< dim > > > physics_mapping
std::shared_ptr< std::vector< std::shared_ptr< SolidBase< dim, dim > > > > solids
std::map< PhysicsID, std::shared_ptr< GlobalVectorType > > physics_solutions
std::map< PhysicsID, std::shared_ptr< GlobalBlockVectorType > > block_physics_solutions
std::map< PhysicsID, std::shared_ptr< GlobalVectorType > > physics_filtered_solutions
std::map< PhysicsID, std::shared_ptr< GlobalVectorType > > block_physics_filtered_solutions
std::map< PhysicsID, std::shared_ptr< std::vector< GlobalVectorType > > > physics_previous_solutions
std::map< PhysicsID, std::shared_ptr< std::vector< GlobalBlockVectorType > > > block_physics_previous_solutions
std::map< PhysicsID, std::shared_ptr< GlobalVectorType > > physics_time_average_solutions
std::map< PhysicsID, std::shared_ptr< GlobalBlockVectorType > > block_physics_time_average_solutions
std::shared_ptr< Shape< dim > > immersed_solid_shape
std::map< PhysicsID, std::shared_ptr< GlobalVectorType > > physics_solutions_m1
std::map< PhysicsID, std::shared_ptr< GlobalBlockVectorType > > block_physics_solutions_m1
PostprocessingProbes< dim > probe_postprocessor

Detailed Description

template<int dim>
class MultiphysicsInterface< dim >

Definition at line 48 of file multiphysics_interface.h.

Constructor & Destructor Documentation

◆ MultiphysicsInterface()

template<int dim>
MultiphysicsInterface< dim >::MultiphysicsInterface ( const SimulationParameters< dim > & nsparam,
const std::shared_ptr< parallel::DistributedTriangulationBase< dim > > & p_triangulation,
std::shared_ptr< SimulationControl > p_simulation_control,
ConditionalOStream & p_pcout,
const FluidDynamicsFormulation p_fluid_dynamics_formulation = FluidDynamicsFormulation::standard )

Construct the Multiphysics interface from the simulation parameters. Depending on which multiphysics element is enabled, the appropriate auxiliary physics is instantiated. Auxiliary physics that have no volume-averaged (VANS) form yet throw at construction time when p_fluid_dynamics_formulation is FluidDynamicsFormulation::VANS.

Parameters
[in]nsparamSimulation parameters.
[in]p_triangulationDistributed triangulation shared by all physics.
[in]p_simulation_controlSimulation control shared by all physics.
[in]p_pcoutParallel output stream.
[in]p_fluid_dynamics_formulationThe formulation of the fluid dynamics equations. Whether the solver solves the volume-averaged Navier-Stokes (VANS) equations or the standard Navier-Stokes equations.

Definition at line 102 of file multiphysics_interface.cc.

References active_physics, cahn_hilliard, CLS, continuum_solid_dynamics, electromagnetics, fluid_dynamics, fluid_dynamics_formulation, heat_transfer, inspect_multiphysics_models_dependencies(), SimulationParameters< dim >::linear_solver, multiphysics_parameters, pcout, physics, SimulationParameters< dim >::physics_solving_strategy, probe_postprocessor, Parameters::quiet, standard, tracer, VANS, Parameters::verbose, and verbosity.

◆ ~MultiphysicsInterface()

template<int dim>
virtual MultiphysicsInterface< dim >::~MultiphysicsInterface ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ announce_physics()

template<int dim>
void MultiphysicsInterface< dim >::announce_physics ( const PhysicsID physics_id)
inline

Write physic solved in the terminal.

Parameters
physics_idnumber associated with auxiliary physics in multiphysics.h

Definition at line 131 of file multiphysics_interface.h.

References announce_string(), cahn_hilliard, CLS, continuum_solid_dynamics, electromagnetics, heat_transfer, pcout, and tracer.

◆ compute_error_estimate()

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

Compute error estimator for mesh refinement according to the auxiliary physic parameters.

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

Definition at line 949 of file multiphysics_interface.h.

References block_physics, and physics.

◆ enable_projected_particle_fields()

template<int dim>
void MultiphysicsInterface< dim >::enable_projected_particle_fields ( PhysicsID physics_id)
inline

Make a field projected by the particle projector of the VANS solvers available in the interface. The VANS solvers call it in their constructor: always for the void fraction, and for the particle temperature in thermal CFD-DEM simulations (solver type = dem_mp).

Parameters
[in]physics_idThe ID of the projected field to enable.

Definition at line 106 of file multiphysics_interface.h.

References particle_temperature, particle_temperature_field_enabled, particle_void_fraction_field_enabled, and void_fraction.

◆ finish_simulation()

template<int dim>
void MultiphysicsInterface< dim >::finish_simulation ( )
inline

Carry out the operations required to finish a simulation correctly for all auxiliary physics.

Definition at line 313 of file multiphysics_interface.h.

References block_physics, and physics.

◆ fluid_dynamics_is_block()

template<int dim>
bool MultiphysicsInterface< dim >::fluid_dynamics_is_block ( ) const
inline

fluid_dynamics_is_block Verify if the fluid dynamics solution is stored as a block vector or not.

Returns
boolean value indicating the fluid dynamics is stored as a block vector

Definition at line 527 of file multiphysics_interface.h.

References block_physics_solutions, and fluid_dynamics.

◆ gather_output_hook_global_block_vector()

template<int dim>
std::vector< OutputStruct< dim, GlobalBlockVectorType > > MultiphysicsInterface< dim >::gather_output_hook_global_block_vector ( )
inline

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. This is a variant for GlobalBlockVectorType.

Definition at line 293 of file multiphysics_interface.h.

References block_physics.

◆ gather_output_hook_global_vector()

template<int dim>
std::vector< OutputStruct< dim, GlobalVectorType > > MultiphysicsInterface< dim >::gather_output_hook_global_vector ( )
inline

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. This is a variant for GlobalVectorType.

Definition at line 273 of file multiphysics_interface.h.

References physics.

◆ get_active_physics()

template<int dim>
std::vector< PhysicsID > MultiphysicsInterface< dim >::get_active_physics ( )
inline

Definition at line 82 of file multiphysics_interface.h.

References active_physics.

◆ get_block_previous_solutions()

template<int dim>
const std::vector< GlobalBlockVectorType > & MultiphysicsInterface< dim >::get_block_previous_solutions ( const PhysicsID physics_id)
inline

Request the reference to the vector of previous solutions of a given block physics.

Parameters
[in]physics_idThe physics ID of the solution being requested

Definition at line 738 of file multiphysics_interface.h.

References active_physics, and block_physics_previous_solutions.

◆ get_block_solution()

template<int dim>
const GlobalBlockVectorType & MultiphysicsInterface< dim >::get_block_solution ( const PhysicsID physics_id)
inline

Request the reference to the present block solution of a given physics.

Parameters
[in]physics_idThe physics ID of the solution being requested

Definition at line 613 of file multiphysics_interface.h.

References active_physics, and block_physics_solutions.

◆ get_block_time_average_solution()

template<int dim>
const GlobalBlockVectorType & MultiphysicsInterface< dim >::get_block_time_average_solution ( const PhysicsID physics_id)
inline

Request the reference to the present block average solution of a given physics.

Parameters
[in]physics_idThe physics ID of the solution being requested

Definition at line 643 of file multiphysics_interface.h.

References active_physics, and block_physics_time_average_solutions.

◆ get_curvature_dof_handler()

template<int dim>
const DoFHandler< dim > & MultiphysicsInterface< dim >::get_curvature_dof_handler ( )

Request the reference to the projected curvature DOF handler.

Definition at line 284 of file multiphysics_interface.cc.

References active_physics, CLS, get_curvature_dof_handler(), multiphysics_parameters, and physics.

◆ get_curvature_solution()

template<int dim>
const GlobalVectorType & MultiphysicsInterface< dim >::get_curvature_solution ( )

Request the reference to the present solution of the curvature.

Definition at line 267 of file multiphysics_interface.cc.

References active_physics, CLS, get_curvature_solution(), multiphysics_parameters, and physics.

◆ get_dof_handler()

template<int dim>
const DoFHandler< dim > & MultiphysicsInterface< dim >::get_dof_handler ( const PhysicsID physics_id)
inline

Request a DOF handler for a given physics ID.

Parameters
physics_idThe physics of the DOF handler being requested
Returns
Reference to the DOF handler of the requested physics

Definition at line 542 of file multiphysics_interface.h.

References is_field_available(), and physics_dof_handler.

◆ get_filtered_solution()

template<int dim>
const GlobalVectorType & MultiphysicsInterface< dim >::get_filtered_solution ( const PhysicsID physics_id)
inline

Request the reference to the present filtered solution of a given physics (used in CLS or CahnHilliard physics for STF calculation in the momentum balance).

Parameters
[in]physics_idID of the physics for which the filtered solution is being requested
Returns
Reference to the requested filtered solution vector.

Definition at line 598 of file multiphysics_interface.h.

References active_physics, and physics_filtered_solutions.

◆ get_fluid_dynamics_formulation()

template<int dim>
FluidDynamicsFormulation MultiphysicsInterface< dim >::get_fluid_dynamics_formulation ( ) const
inline

Get the formulation of the fluid dynamics solver driving this interface.

Returns
The formulation of the fluid dynamics solver.

Definition at line 92 of file multiphysics_interface.h.

References fluid_dynamics_formulation.

◆ get_immersed_solid_shape()

template<int dim>
std::shared_ptr< Shape< dim > > MultiphysicsInterface< dim >::get_immersed_solid_shape ( )

Request shared pointer to immersed solid shape.

Definition at line 318 of file multiphysics_interface.cc.

References immersed_solid_shape.

◆ get_mapping()

template<int dim>
const Mapping< dim > & MultiphysicsInterface< dim >::get_mapping ( const PhysicsID physics_id)
inline

Request a mapping for a given physics ID.

Parameters
physics_idThe physics of the mapping being requested
Returns
Reference to the mapping of the requested physics

Definition at line 560 of file multiphysics_interface.h.

References is_field_available(), and physics_mapping.

◆ get_previous_solutions()

template<int dim>
const std::vector< GlobalVectorType > & MultiphysicsInterface< dim >::get_previous_solutions ( const PhysicsID physics_id)
inline

Request the reference to the vector of previous solutions of a given physics.

Parameters
[in]physics_idThe physics ID of the solution being requested

Definition at line 721 of file multiphysics_interface.h.

References is_field_available(), and physics_previous_solutions.

◆ get_projected_phase_indicator_gradient_dof_handler()

template<int dim>
const DoFHandler< dim > & MultiphysicsInterface< dim >::get_projected_phase_indicator_gradient_dof_handler ( )

Request the reference to the projected phase indicator gradient (PIG) DOF handler.

Definition at line 301 of file multiphysics_interface.cc.

References active_physics, CLS, get_projected_phase_indicator_gradient_dof_handler(), multiphysics_parameters, and physics.

◆ get_projected_phase_indicator_gradient_solution()

template<int dim>
const GlobalVectorType & MultiphysicsInterface< dim >::get_projected_phase_indicator_gradient_solution ( )

Request the reference to the present solution vector of the projected phase indicator gradient (PIG).

Definition at line 250 of file multiphysics_interface.cc.

References active_physics, CLS, get_projected_phase_indicator_gradient_solution(), multiphysics_parameters, and physics.

◆ get_solids()

template<int dim>
const std::vector< std::shared_ptr< SolidBase< dim, dim > > > & MultiphysicsInterface< dim >::get_solids ( const int number_solids)
inline

Request the solid objects. Used an auxiliary physics needs to apply a boundary condition on a solid through Nitsche immersed boundary method.

Parameters
[in]number_solidsThe number of solids declared in the parameter file. The value is used to ensure that at least one solid has been declared.
Note
The method is called only in HeatTransfer<dim>::assemble_nitsche_heat_restriction, which is itself called only if number_solids > 0

Definition at line 665 of file multiphysics_interface.h.

References solids.

◆ get_solution()

template<int dim>
const GlobalVectorType & MultiphysicsInterface< dim >::get_solution ( const PhysicsID physics_id)
inline

Request the reference to the present solution of a given physics.

Parameters
physics_idThe physics ID of the solution being requested
Returns
Reference to the solution vector of the requested physics

Definition at line 578 of file multiphysics_interface.h.

References is_field_available(), and physics_solutions.

◆ get_time_average_solution()

template<int dim>
const GlobalVectorType & MultiphysicsInterface< dim >::get_time_average_solution ( const PhysicsID physics_id)
inline

Request the reference to the time-average solution of a given physics.

Parameters
[in]physics_idThe physics ID of the solution being requested

Definition at line 628 of file multiphysics_interface.h.

References active_physics, and physics_time_average_solutions.

◆ inspect_multiphysics_models_dependencies()

template<int dim>
void MultiphysicsInterface< dim >::inspect_multiphysics_models_dependencies ( const SimulationParameters< dim > & nsparam)
private

Checks the required dependencies between multiphase models and handles the corresponding assertions.

Parameters
[in]nsparamSimulation parameters.

Definition at line 335 of file multiphysics_interface.cc.

References _unused, and SimulationParameters< dim >::multiphysics.

◆ is_field_available()

template<int dim>
bool MultiphysicsInterface< dim >::is_field_available ( const PhysicsID physics_id) const
private

Return true if the fields of physics_id are registered in the interface: either the physics is active, or it is a field projected under the VANS formulation and enabled with enable_projected_particle_fields().

Parameters
[in]physics_idThe ID of the physics to check.
Returns
true if the fields of physics_id are registered in the interface, false otherwise.

Definition at line 419 of file multiphysics_interface.cc.

References active_physics, fluid_dynamics_formulation, particle_temperature, particle_temperature_field_enabled, particle_void_fraction_field_enabled, VANS, and void_fraction.

◆ output_per_iteration_timer()

template<int dim>
void MultiphysicsInterface< dim >::output_per_iteration_timer ( )
inline

Output the per iteration wallclock times.

Definition at line 421 of file multiphysics_interface.h.

References block_physics, and physics.

◆ percolate_time_vectors()

template<int dim>
void MultiphysicsInterface< dim >::percolate_time_vectors ( const bool fluid_dynamics_has_been_solved)
inline

Rearrange vector solution correctly for transient simulations for all auxiliary physics.

Parameters
fluid_dynamics_has_been_solvedBoolean that states if the fluid dynamics has been already solved or not. See the map solve_pre_fluid to know which subphysics are solved before the fluid dynamics.

Definition at line 334 of file multiphysics_interface.h.

References block_physics, physics, and solve_pre_fluid.

◆ post_mesh_adaptation()

template<int dim>
void MultiphysicsInterface< dim >::post_mesh_adaptation ( )
inline

Interpolate solution onto new mesh.

Definition at line 454 of file multiphysics_interface.h.

References block_physics, and physics.

◆ postprocess()

template<int dim>
void MultiphysicsInterface< dim >::postprocess ( bool first_iteration)
inline

Postprocess the auxiliary physics results. Post-processing this case implies the calculation of all derived quantities using the solution vector of the physics. It does not concern the output of the solution using the DataOutObject, which is accomplished through the attach_solution_to_output function.

Definition at line 403 of file multiphysics_interface.h.

References block_physics, physics, and probe_postprocessor.

◆ postprocess_probes()

template<int dim>
template<typename VectorType>
template void MultiphysicsInterface< dim >::postprocess_probes ( const Mapping< dim > & mapping,
const DoFHandler< dim > & dof_handler,
const VectorType & present_solution,
const Variable variable,
const ConditionalOStream & pcout )
inline

Checks validity of the variable and if valid, calls the appropriate PostprocessingProbes::postprocess_probes() function for the specified variable.

Template Parameters
VectorTypeType of vector of the solution vector.
Parameters
[in]mappingMapping of the domain.
[in]dof_handlerDoF handler associated to the solution field.
[in]present_solutionVector containing the scalar solution field. For distributed meshes, ghost elements must be updated.
[in]variableVariable of interest.
[in]pcoutParallel console output stream.

Definition at line 1015 of file multiphysics_interface.h.

References pcout, and probe_postprocessor.

◆ prepare_for_mesh_adaptation()

template<int dim>
void MultiphysicsInterface< dim >::prepare_for_mesh_adaptation ( )
inline

Prepare the auxiliary physics for mesh adaptation.

Definition at line 438 of file multiphysics_interface.h.

References block_physics, and physics.

◆ prepare_for_postprocessing()

template<int dim>
void MultiphysicsInterface< dim >::prepare_for_postprocessing ( )
inline

Prepares for the postprocessing of the current time step.

Definition at line 388 of file multiphysics_interface.h.

References probe_postprocessor.

◆ read_checkpoint()

template<int dim>
virtual void MultiphysicsInterface< dim >::read_checkpoint ( )
inlinevirtual

Read solution from checkpoint from auxiliary physics.

Definition at line 986 of file multiphysics_interface.h.

References block_physics, physics, and probe_postprocessor.

◆ set_block_previous_solutions()

template<int dim>
void MultiphysicsInterface< dim >::set_block_previous_solutions ( const PhysicsID physics_id,
std::shared_ptr< std::vector< GlobalBlockVectorType > > previous_solutions_vector )
inline

Sets the pointer to the vector of previous solutions of the block physics in the multiphysics interface.

Parameters
[in]physics_idThe physics of the DOF handler
[in]previous_solutions_vectorThe shared pointer to the vector of previous block vector solutions

Definition at line 927 of file multiphysics_interface.h.

References active_physics, and block_physics_previous_solutions.

◆ set_block_solution()

template<int dim>
void MultiphysicsInterface< dim >::set_block_solution ( const PhysicsID physics_id,
std::shared_ptr< GlobalBlockVectorType > solution_vector )
inline

Sets the reference to the solution of the physics in the multiphysics interface.

Parameters
[in]physics_idThe physics ID of the DOF handler being requested
[in]solution_vectorThe shared pointer to the solution vector of the requested physics

Definition at line 867 of file multiphysics_interface.h.

References active_physics, and block_physics_solutions.

◆ set_block_time_average_solution()

template<int dim>
void MultiphysicsInterface< dim >::set_block_time_average_solution ( const PhysicsID physics_id,
std::shared_ptr< GlobalBlockVectorType > solution_vector )
inline

Sets the shared pointer to the time-average solution of the block physics in the multiphysics interface.

Parameters
[in]physics_idThe physics ID of the time averaged block vector solution being set
[in]solution_vectorThe shared pointer to the block solution vector of the physics

Definition at line 887 of file multiphysics_interface.h.

References active_physics, and block_physics_time_average_solutions.

◆ set_dof_handler()

template<int dim>
void MultiphysicsInterface< dim >::set_dof_handler ( const PhysicsID physics_id,
std::shared_ptr< DoFHandler< dim > > dof_handler )
inline

Sets the shared pointer to the DOFHandler of the physics in the multiphysics interface.

Parameters
[in]physics_idThe physics of the DOF handler being requested
[in]dof_handlerShared pointer to the dof handler for which the reference is stored

Definition at line 756 of file multiphysics_interface.h.

References is_field_available(), and physics_dof_handler.

◆ set_filtered_solution()

template<int dim>
void MultiphysicsInterface< dim >::set_filtered_solution ( const PhysicsID physics_id,
std::shared_ptr< GlobalVectorType > filtered_solution_vector )
inline

Sets the shared pointer to the filtered solution of the physics in the multiphysics interface (used in CLS or CahnHilliard physics for STF calculation in the momentum balance).

Parameters
[in]physics_idID of the physics for which the filtered solution is being set
[in]filtered_solution_vectorShared pointer to the filtered solution vector of the physics; this was implemented for CLS and CahnHilliard physics

Definition at line 827 of file multiphysics_interface.h.

References active_physics, and physics_filtered_solutions.

◆ set_immersed_solid_shape()

template<int dim>
void MultiphysicsInterface< dim >::set_immersed_solid_shape ( const std::shared_ptr< Shape< dim > > & shape)

Share immersed solid shape.

Parameters
[in]shapeThe reference to the shared pointer pointing to the immersed solid shape

Definition at line 327 of file multiphysics_interface.cc.

References immersed_solid_shape.

◆ set_initial_conditions()

template<int dim>
void MultiphysicsInterface< dim >::set_initial_conditions ( )
inline

Sets-up the initial conditions associated with the physics. Generally, physics only support imposing nodal values, but some physics additionally support the use of L2 projection or steady-state solutions.

Definition at line 492 of file multiphysics_interface.h.

References block_physics, and physics.

◆ set_mapping()

template<int dim>
void MultiphysicsInterface< dim >::set_mapping ( const PhysicsID physics_id,
std::shared_ptr< Mapping< dim > > mapping )
inline

Sets the shared pointer to the Mapping of the physics in the multiphysics interface.

Parameters
[in]physics_idThe physics of the mapping being requested
[in]mappingShared pointer to the mapping for which the reference is stored

Definition at line 774 of file multiphysics_interface.h.

References is_field_available(), and physics_mapping.

◆ set_previous_solutions()

template<int dim>
void MultiphysicsInterface< dim >::set_previous_solutions ( const PhysicsID physics_id,
std::shared_ptr< std::vector< GlobalVectorType > > previous_solutions_vector )
inline

Sets the pointer to the vector of previous solutions of the physics in the multiphysics interface.

Parameters
[in]physics_idThe physics of the DOF handler
[in]previous_solutions_vectorThe shared pointer to the vector of previous solutions

Definition at line 907 of file multiphysics_interface.h.

References is_field_available(), and physics_previous_solutions.

◆ set_solid()

template<int dim>
void MultiphysicsInterface< dim >::set_solid ( std::shared_ptr< std::vector< std::shared_ptr< SolidBase< dim, dim > > > > solids_input)
inline

Sets the shared pointer to the vector of the SolidBase object. This allows the use of the solid base object in multiple physics at the same time.

Parameters
[in]solids_inputShared pointer to the vector of solidBase object

Definition at line 790 of file multiphysics_interface.h.

References solids.

◆ set_solution()

template<int dim>
void MultiphysicsInterface< dim >::set_solution ( const PhysicsID physics_id,
std::shared_ptr< GlobalVectorType > solution_vector )
inline

Sets the shared pointer to the solution of the physics in the multiphysics interface.

Parameters
[in]physics_idThe physics ID the present solution being set
[in]solution_vectorShared pointer to the solution vector of the physics

Definition at line 806 of file multiphysics_interface.h.

References is_field_available(), and physics_solutions.

◆ set_time_average_solution()

template<int dim>
void MultiphysicsInterface< dim >::set_time_average_solution ( const PhysicsID physics_id,
std::shared_ptr< GlobalVectorType > solution_vector )
inline

Sets the shared pointer to the time-average solution of the physics in the multiphysics interface.

Parameters
[in]physics_idThe physics ID of the time averaged solution being set
[in]solution_vectorThe shared pointer to the time averaged solution vector of the physics

Definition at line 849 of file multiphysics_interface.h.

References active_physics, and physics_time_average_solutions.

◆ setup_dofs()

template<int dim>
void MultiphysicsInterface< dim >::setup_dofs ( )
inline

Set-up the DofHandler and the degree of freedom associated with the physics.

Definition at line 472 of file multiphysics_interface.h.

References block_physics, and physics.

◆ solve()

template<int dim>
void MultiphysicsInterface< dim >::solve ( const bool fluid_dynamics_has_been_solved,
const Parameters::SimulationControl::TimeSteppingMethod time_stepping_method )
inline

Call for the solution of the physics that should be solved.

Parameters
fluid_dynamics_has_been_solvedBoolean that states if the fluid dynamics has been already solved or not. See the map solve_pre_fluid to know which subphysics are solved before the fluid dynamics.
time_stepping_methodTime-Stepping method with which the assembly is called

Definition at line 176 of file multiphysics_interface.h.

References block_physics, physics, solve_block_physics(), solve_physics(), and solve_pre_fluid.

◆ solve_block_physics()

template<int dim>
void MultiphysicsInterface< dim >::solve_block_physics ( const PhysicsID physics_id,
const Parameters::SimulationControl::TimeSteppingMethod time_stepping_method )
inline

Call for the solution of a single block physic.

Parameters
time_stepping_methodTime-Stepping method with which the assembly is called

Definition at line 250 of file multiphysics_interface.h.

References active_physics, announce_physics(), block_physics, Parameters::quiet, and verbosity.

◆ solve_linear_system()

template<int dim>
void MultiphysicsInterface< dim >::solve_linear_system ( const PhysicsID physics_id)
inline

Call for the solution of the linear system of an auxiliary physics.

Definition at line 510 of file multiphysics_interface.h.

References active_physics, and physics.

◆ solve_physics()

template<int dim>
void MultiphysicsInterface< dim >::solve_physics ( const PhysicsID physics_id,
const Parameters::SimulationControl::TimeSteppingMethod time_stepping_method )
inline

Call for the solution of a single physic.

Parameters
time_stepping_methodTime-Stepping method with which the assembly is called

Definition at line 227 of file multiphysics_interface.h.

References active_physics, announce_physics(), physics, Parameters::quiet, and verbosity.

◆ update_boundary_conditions()

template<int dim>
void MultiphysicsInterface< dim >::update_boundary_conditions ( )
inline
Parameters
Updatethe boundary conditions of the auxiliary physics if they are time-dependent

Definition at line 372 of file multiphysics_interface.h.

References block_physics, and physics.

◆ write_checkpoint()

template<int dim>
virtual void MultiphysicsInterface< dim >::write_checkpoint ( )
inlinevirtual

Prepares auxiliary physics to write simulation checkpoint.

Definition at line 968 of file multiphysics_interface.h.

References block_physics, physics, and probe_postprocessor.

Member Data Documentation

◆ active_physics

template<int dim>
std::vector<PhysicsID> MultiphysicsInterface< dim >::active_physics
private

Definition at line 1064 of file multiphysics_interface.h.

◆ block_physics

template<int dim>
std::map<PhysicsID, std::shared_ptr<AuxiliaryPhysics<dim, GlobalBlockVectorType> > > MultiphysicsInterface< dim >::block_physics
private

Definition at line 1083 of file multiphysics_interface.h.

◆ block_physics_filtered_solutions

template<int dim>
std::map<PhysicsID, std::shared_ptr<GlobalVectorType> > MultiphysicsInterface< dim >::block_physics_filtered_solutions
private

Map of physics and shared pointers to their respective filtered solutions. Same as MultiphysicsInterface::physics_filtered_solutions, but used with BlockVector.

Definition at line 1120 of file multiphysics_interface.h.

◆ block_physics_previous_solutions

template<int dim>
std::map<PhysicsID, std::shared_ptr<std::vector<GlobalBlockVectorType> > > MultiphysicsInterface< dim >::block_physics_previous_solutions
private

Map of physics and shared pointers to their respective vector of previous solutions. Same as MultiphysicsInterface::physics_previous_solutions, but used with BlockVector.

Definition at line 1136 of file multiphysics_interface.h.

◆ block_physics_solutions

template<int dim>
std::map<PhysicsID, std::shared_ptr<GlobalBlockVectorType> > MultiphysicsInterface< dim >::block_physics_solutions
private

Map of physics and shared pointers to their respective solutions. Same as MultiphysicsInterface::physics_solutions, but used with BlockVector.

Definition at line 1103 of file multiphysics_interface.h.

◆ block_physics_solutions_m1

template<int dim>
std::map<PhysicsID, std::shared_ptr<GlobalBlockVectorType> > MultiphysicsInterface< dim >::block_physics_solutions_m1
private

Definition at line 1163 of file multiphysics_interface.h.

◆ block_physics_time_average_solutions

template<int dim>
std::map<PhysicsID, std::shared_ptr<GlobalBlockVectorType> > MultiphysicsInterface< dim >::block_physics_time_average_solutions
private

Map of physics and shared pointers to their respective time-averaged solutions. Same as MultiphysicsInterface::physics_time_average_solutions, but used with BlockVector.

Definition at line 1152 of file multiphysics_interface.h.

◆ fluid_dynamics_formulation

template<int dim>
const FluidDynamicsFormulation MultiphysicsInterface< dim >::fluid_dynamics_formulation
private

Definition at line 1054 of file multiphysics_interface.h.

◆ immersed_solid_shape

template<int dim>
std::shared_ptr<Shape<dim> > MultiphysicsInterface< dim >::immersed_solid_shape
private

Shared pointer to immersed solid shapes to be used by auxiliary physics.

Definition at line 1155 of file multiphysics_interface.h.

◆ multiphysics_parameters

template<int dim>
const Parameters::Multiphysics<dim> MultiphysicsInterface< dim >::multiphysics_parameters
private

Definition at line 1051 of file multiphysics_interface.h.

◆ particle_temperature_field_enabled

template<int dim>
bool MultiphysicsInterface< dim >::particle_temperature_field_enabled = false
private

Definition at line 1061 of file multiphysics_interface.h.

◆ particle_void_fraction_field_enabled

template<int dim>
bool MultiphysicsInterface< dim >::particle_void_fraction_field_enabled = false
private

Definition at line 1057 of file multiphysics_interface.h.

◆ pcout

template<int dim>
ConditionalOStream MultiphysicsInterface< dim >::pcout
private

Definition at line 1053 of file multiphysics_interface.h.

◆ physics

template<int dim>
std::map<PhysicsID, std::shared_ptr<AuxiliaryPhysics<dim, GlobalVectorType> > > MultiphysicsInterface< dim >::physics
private

Definition at line 1079 of file multiphysics_interface.h.

◆ physics_dof_handler

template<int dim>
std::map<PhysicsID, std::shared_ptr<DoFHandler<dim> > > MultiphysicsInterface< dim >::physics_dof_handler
private

Map of physics and shared pointers to their respective DoFHandler.

Definition at line 1086 of file multiphysics_interface.h.

◆ physics_filtered_solutions

template<int dim>
std::map<PhysicsID, std::shared_ptr<GlobalVectorType> > MultiphysicsInterface< dim >::physics_filtered_solutions
private

Map of physics and shared pointers to their respective filtered solutions. These solutions are used with both CLS and Cahn-Hilliard multiphase flow approaches for surface tension force calculation in the momentum equation.

Definition at line 1112 of file multiphysics_interface.h.

◆ physics_mapping

template<int dim>
std::map<PhysicsID, std::shared_ptr<Mapping<dim> > > MultiphysicsInterface< dim >::physics_mapping
private

Map of physics and shared pointers to their respective Mapping.

Definition at line 1089 of file multiphysics_interface.h.

◆ physics_previous_solutions

template<int dim>
std::map<PhysicsID, std::shared_ptr<std::vector<GlobalVectorType> > > MultiphysicsInterface< dim >::physics_previous_solutions
private

Map of physics and shared pointers to their respective vector of previous solutions.

Definition at line 1127 of file multiphysics_interface.h.

◆ physics_solutions

template<int dim>
std::map<PhysicsID, std::shared_ptr<GlobalVectorType> > MultiphysicsInterface< dim >::physics_solutions
private

Map of physics and shared pointers to their respective solutions.

Definition at line 1095 of file multiphysics_interface.h.

◆ physics_solutions_m1

template<int dim>
std::map<PhysicsID, std::shared_ptr<GlobalVectorType> > MultiphysicsInterface< dim >::physics_solutions_m1
private

Map of physics and shared pointers to their respective previous (n-1) solutions.

Definition at line 1161 of file multiphysics_interface.h.

◆ physics_time_average_solutions

template<int dim>
std::map<PhysicsID, std::shared_ptr<GlobalVectorType> > MultiphysicsInterface< dim >::physics_time_average_solutions
private

Map of physics and shared pointers to their respective time-averaged solutions.

Definition at line 1143 of file multiphysics_interface.h.

◆ probe_postprocessor

template<int dim>
PostprocessingProbes<dim> MultiphysicsInterface< dim >::probe_postprocessor
private

Probe postprocessing object.

Definition at line 1185 of file multiphysics_interface.h.

◆ solids

template<int dim>
std::shared_ptr<std::vector<std::shared_ptr<SolidBase<dim, dim> > > > MultiphysicsInterface< dim >::solids
private

Shared pointer to the vector containing shared pointers to solid objects.

Definition at line 1092 of file multiphysics_interface.h.

◆ solve_pre_fluid

template<int dim>
std::map<PhysicsID, bool> MultiphysicsInterface< dim >::solve_pre_fluid
private
Initial value:
{{fluid_dynamics, false},
{CLS, true},
{heat_transfer, false},
{tracer, false},
{cahn_hilliard, true},
@ fluid_dynamics
Fluid Dynamics (Velocity,Pressure).
@ CLS
@ heat_transfer
Heat transfer (Temperature).

Definition at line 1068 of file multiphysics_interface.h.

◆ verbosity

template<int dim>
std::map<PhysicsID, Parameters::Verbosity> MultiphysicsInterface< dim >::verbosity
private

Definition at line 1052 of file multiphysics_interface.h.


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