13#include <deal.II/base/exceptions.h>
17#define _unused(x) ((void)(x))
20 ThermalBuoyancyWithoutFluidDynamicsError,
22 << std::boolalpha <<
"Thermal buoyancy force is activated (" << arg1
23 <<
"), while fluid dynamics is not activated (false)." << std::endl
24 <<
"Thermal buoyancy force cannot be activated without activating fluid dynamics.");
27 ThermalBuoyancyWithoutHeatTransferError,
29 << std::boolalpha <<
"Thermal buoyancy force is activated (" << arg1
30 <<
"), while heat transfer is not activated (false)." << std::endl
31 <<
"Thermal buoyancy force cannot be activated without activating heat transfer.");
34 MicrowaveHeatingWithoutElectromagneticsError,
36 << std::boolalpha <<
"Microwave heating is activated (" << arg1
37 <<
"), while electromagnetics is not activated (false)." << std::endl
38 <<
"Microwave heating cannot be activated without activating electromagnetics.");
41 MarangoniWithoutFluidDynamicsError,
43 << std::boolalpha <<
"Marangoni effect is activated (" << arg1
44 <<
"), while fluid dynamics is not activated (false)." << std::endl
45 <<
"Marangoni effect cannot be activated without activating fluid dynamics.");
48 MarangoniWithoutHeatTransferError,
50 << std::boolalpha <<
"Marangoni effect is activated (" << arg1
51 <<
"), while heat transfer is not activated (false)." << std::endl
52 <<
"Marangoni effect cannot be activated without activating heat transfer.");
55 MarangoniWithoutSurfaceTensionForceError,
57 << std::boolalpha <<
"Marangoni effect is activated (" << arg1
58 <<
"), while surface tension force is not activated (false)." << std::endl
59 <<
"Marangoni effect cannot be activated without activating surface tension force.");
62 SurfaceTensionForceWithoutCLSError,
64 << std::boolalpha <<
"Surface tension force is activated (" << arg1
65 <<
"), while CLS is not activated (false)." << std::endl
66 <<
"Surface tension force cannot be activated without activating CLS.");
69 MarangoniWithoutCLSError,
71 << std::boolalpha <<
"Marangoni effect is activated (" << arg1
72 <<
"), while CLS is not activated (false)." << std::endl
73 <<
"Marangoni effect cannot be activated without activating CLS.");
76 InterfaceSharpeningWithoutCLSError,
78 << std::boolalpha <<
"Interface sharpening is activated (" << arg1
79 <<
"), while CLS is not activated (false)." << std::endl
80 <<
"Interface sharpening cannot be activated without activating CLS.");
83 "Cahn-Hilliard and heat transfer are both activated. "
84 "This combination is not currently supported.");
87 "Cahn-Hilliard and thermal buoyancy force are both activated. "
88 "This combination is not currently supported.");
91 PhysicsVANSFormNotImplementedError,
94 <<
"\" auxiliary physics is enabled together with the VANS "
95 "(volume-averaged Navier-Stokes) fluid dynamics solver, but a "
96 "volume-averaged form of this physics is not yet implemented "
97 "in Lethe. Disable this physics in the multiphysics subsection, "
98 "or use a solver of the standard Navier-Stokes equations "
99 "(e.g. lethe-fluid).");
104 const std::shared_ptr<parallel::DistributedTriangulationBase<dim>>
106 std::shared_ptr<SimulationControl> p_simulation_control,
107 ConditionalOStream &p_pcout,
113 nsparam.post_processing.probing_points,
114 nsparam.post_processing.output_frequency,
130 PhysicsVANSFormNotImplementedError(
"Heat transfer"));
140 this, nsparam, p_triangulation, p_simulation_control);
146 PhysicsVANSFormNotImplementedError(
"Tracer"));
156 this, nsparam, p_triangulation, p_simulation_control);
162 PhysicsVANSFormNotImplementedError(
"CLS"));
172 this, nsparam, p_triangulation, p_simulation_control);
179 PhysicsVANSFormNotImplementedError(
"Cahn-Hilliard"));
189 this, nsparam, p_triangulation, p_simulation_control);
205 std::make_shared<TimeHarmonicMaxwell<dim>>(
this,
208 p_simulation_control);
216 ContinuumSolidDynamicsWithoutVANSError());
227 std::make_shared<ContinuumSolidDynamics<dim>>(
this,
230 p_simulation_control);
237#ifndef LETHE_WITH_QMOMKIT
238 AssertThrow(
false, QMOMWithoutQMOMKitError());
241 ExcMessage(
"The \"qmom\" physics is enabled in the "
242 "multiphysics subsection, but its solver is not "
243 "implemented yet. Only its parameters are "
244 "available. Set \"qmom\" to false."));
283const DoFHandler<dim> &
300const DoFHandler<dim> &
317std::shared_ptr<Shape<dim>>
338 bool thermal_buoyancy_force_enabled =
340 bool heat_transfer_enabled = nsparam.
multiphysics.heat_transfer;
341 bool microwave_heating_enabled = nsparam.
multiphysics.microwave_heating;
342 bool marangoni_effect_enabled =
343 nsparam.
multiphysics.cls_parameters.surface_tension_force
344 .enable_marangoni_effect;
345 bool surface_tension_force_enabled =
346 nsparam.
multiphysics.cls_parameters.surface_tension_force.enable;
347 bool fluid_dynamics_enabled = nsparam.
multiphysics.fluid_dynamics;
348 bool interface_sharpening_enabled =
349 nsparam.
multiphysics.cls_parameters.reinitialization_method.sharpening
352 bool cahn_hilliard_enabled = nsparam.
multiphysics.cahn_hilliard;
353 bool electromagnetics_enabled = nsparam.
multiphysics.electromagnetics;
356 _unused(thermal_buoyancy_force_enabled && heat_transfer_enabled &&
357 marangoni_effect_enabled && surface_tension_force_enabled &&
358 fluid_dynamics_enabled && interface_sharpening_enabled &&
359 CLS_enabled && cahn_hilliard_enabled && electromagnetics_enabled);
362 AssertThrow(!(thermal_buoyancy_force_enabled ==
true &&
363 fluid_dynamics_enabled ==
false),
364 ThermalBuoyancyWithoutFluidDynamicsError(
365 thermal_buoyancy_force_enabled));
369 !(thermal_buoyancy_force_enabled ==
true && heat_transfer_enabled ==
false),
370 ThermalBuoyancyWithoutHeatTransferError(thermal_buoyancy_force_enabled));
373 AssertThrow(!(marangoni_effect_enabled ==
true &&
374 fluid_dynamics_enabled ==
false),
375 MarangoniWithoutFluidDynamicsError(marangoni_effect_enabled));
378 AssertThrow(!(marangoni_effect_enabled ==
true &&
379 heat_transfer_enabled ==
false),
380 MarangoniWithoutHeatTransferError(marangoni_effect_enabled));
383 AssertThrow(!(marangoni_effect_enabled ==
true &&
384 surface_tension_force_enabled ==
false),
385 MarangoniWithoutSurfaceTensionForceError(
386 marangoni_effect_enabled));
389 AssertThrow(!(surface_tension_force_enabled ==
true && CLS_enabled ==
false),
390 SurfaceTensionForceWithoutCLSError(
391 surface_tension_force_enabled));
394 AssertThrow(!(marangoni_effect_enabled ==
true && CLS_enabled ==
false),
395 MarangoniWithoutCLSError(marangoni_effect_enabled));
398 AssertThrow(!(interface_sharpening_enabled ==
true && CLS_enabled ==
false),
399 InterfaceSharpeningWithoutCLSError(interface_sharpening_enabled));
402 AssertThrow(!(cahn_hilliard_enabled ==
true && heat_transfer_enabled ==
true),
403 CahnHilliardWithHeatTransferError());
406 AssertThrow(!(cahn_hilliard_enabled ==
true &&
407 thermal_buoyancy_force_enabled ==
true),
408 CahnHilliardWithThermalBuoyancyForceError());
412 !(microwave_heating_enabled ==
true &&
413 (electromagnetics_enabled ==
false || heat_transfer_enabled ==
false)),
414 MicrowaveHeatingWithoutElectromagneticsError(microwave_heating_enabled));
442 const Mapping<2> &mapping,
443 const DoFHandler<2> &dof_handler,
446 const ConditionalOStream &pcout);
449 const Mapping<3> &mapping,
450 const DoFHandler<3> &dof_handler,
453 const ConditionalOStream &pcout);
456 const Mapping<2> &mapping,
457 const DoFHandler<2> &dof_handler,
460 const ConditionalOStream &pcout);
463 const Mapping<3> &mapping,
464 const DoFHandler<3> &dof_handler,
467 const ConditionalOStream &pcout);
472 const Mapping<2> &mapping,
473 const DoFHandler<2> &dof_handler,
474 const LinearAlgebra::distributed::Vector<double> &present_solution,
476 const ConditionalOStream &pcout);
479 const Mapping<3> &mapping,
480 const DoFHandler<3> &dof_handler,
481 const LinearAlgebra::distributed::Vector<double> &present_solution,
483 const ConditionalOStream &pcout);
std::map< PhysicsID, std::shared_ptr< AuxiliaryPhysics< dim, GlobalVectorType > > > physics
std::vector< PhysicsID > active_physics
const GlobalVectorType & get_projected_phase_indicator_gradient_solution()
Request the reference to the present solution vector of the projected phase indicator gradient (PIG).
const FluidDynamicsFormulation fluid_dynamics_formulation
bool is_field_available(const PhysicsID physics_id) const
Return true if the fields of physics_id are registered in the interface: either the physics is active...
bool particle_void_fraction_field_enabled
const DoFHandler< dim > & get_curvature_dof_handler()
Request the reference to the projected curvature DOF handler.
void set_immersed_solid_shape(const std::shared_ptr< Shape< dim > > &shape)
Share immersed solid shape.
PostprocessingProbes< dim > probe_postprocessor
Probe postprocessing object.
const GlobalVectorType & get_curvature_solution()
Request the reference to the present solution of the curvature.
std::shared_ptr< Shape< dim > > get_immersed_solid_shape()
Request shared pointer to immersed solid shape.
void postprocess_probes(const Mapping< dim > &mapping, const DoFHandler< dim > &dof_handler, const VectorType &present_solution, const Variable variable, const ConditionalOStream &pcout)
Checks validity of the variable and if valid, calls the appropriate PostprocessingProbes::postprocess...
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 ...
void inspect_multiphysics_models_dependencies(const SimulationParameters< dim > &nsparam)
Checks the required dependencies between multiphase models and handles the corresponding assertions.
const DoFHandler< dim > & get_projected_phase_indicator_gradient_dof_handler()
Request the reference to the projected phase indicator gradient (PIG) DOF handler.
bool particle_temperature_field_enabled
std::shared_ptr< Shape< dim > > immersed_solid_shape
Shared pointer to immersed solid shapes to be used by auxiliary physics.
std::map< PhysicsID, Parameters::Verbosity > verbosity
const Parameters::Multiphysics< dim > multiphysics_parameters
A base class used to represent geometrical entities. Its main uses are to return signed distance and ...
Parameters::Multiphysics< dim > multiphysics
std::map< PhysicsID, Parameters::LinearSolver > linear_solver
std::map< PhysicsID, Parameters::NonLinearSolver > physics_solving_strategy
Auxiliary physics for the solid phase of the Euler-Euler (two-fluid) model.
Variable
Solution fields of the different physics that are used as an indicator for multiple purposes (e....
FluidDynamicsFormulation
Formulation of the fluid dynamics equations solved by a Navier-Stokes solver.
@ VANS
Volume-averaged Navier-Stokes (VANS) equations.
@ standard
Standard Navier-Stokes equations.
PhysicsID
Unique identifiers for each physics module in Lethe.
@ fluid_dynamics
Fluid Dynamics (Velocity,Pressure).
@ tracer
Passive scalar tracer (Tracer).
@ continuum_solid_dynamics
Euler-Euler solid phase (solid velocity, solid volume fraction).
@ electromagnetics
Time-harmonic electromagnetics (Electric field, Magnetic field).
@ heat_transfer
Heat transfer (Temperature).
@ cahn_hilliard
Cahn-Hilliard (Phase indicator, Potential).
DeclExceptionMsg(CahnHilliardWithHeatTransferError, "Cahn-Hilliard and heat transfer are both activated. " "This combination is not currently supported.")
DeclException1(ThermalBuoyancyWithoutFluidDynamicsError, bool,<< std::boolalpha<< "Thermal buoyancy force is activated ("<< arg1<< "), while fluid dynamics is not activated (false)."<< std::endl<< "Thermal buoyancy force cannot be activated without activating fluid dynamics.")
Vector-valued function of the fields of the quadrature method of moments (QMOM) physics: the scalars ...
dealii::TrilinosWrappers::MPI::Vector GlobalVectorType
dealii::TrilinosWrappers::MPI::BlockVector GlobalBlockVectorType