Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
multiphysics.h File Reference
#include <deal.II/base/exceptions.h>
#include <algorithm>
#include <string>
Include dependency graph for multiphysics.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  PhysicsID : unsigned int {
  fluid_dynamics = 0 , heat_transfer = 1 , tracer = 2 , CLS = 3 ,
  cahn_hilliard = 4 , void_fraction = 5 , electromagnetics = 6 , continuum_solid_dynamics = 7 ,
  particle_temperature = 8 , qmom = 9
}
enum class  FluidDynamicsFormulation { standard , VANS }
enum class  Variable : unsigned int {
  velocity = 0 , pressure = 1 , phase = 2 , temperature = 3 ,
  phase_cahn_hilliard = 4 , chemical_potential_cahn_hilliard = 5 , tracer = 6 , electric_field = 7 ,
  magnetic_field = 8 , electromagnetic_fields = 9
}

Functions

PhysicsID get_physics_id (const std::string &physics_name)
std::string get_variable_string (Variable variable)
std::string get_variable_string_with_underscores (Variable variable)

Detailed Description

Identifiers for multiphysics modules and their solution fields.

This file defines the enumerations used to identify the different physics modules available in Lethe (fluid dynamics, heat transfer, CLS, etc.) and the solution fields they produce. It also provides a utility function to convert a physics name string into its corresponding PhysicsID.

Definition in file multiphysics.h.

Enumeration Type Documentation

◆ FluidDynamicsFormulation

enum class FluidDynamicsFormulation
strong

Formulation of the fluid dynamics equations solved by a Navier-Stokes solver.

Enumerator
standard 

Standard Navier-Stokes equations.

VANS 

Volume-averaged Navier-Stokes (VANS) equations.

Definition at line 64 of file multiphysics.h.

◆ PhysicsID

enum PhysicsID : unsigned int

Unique identifiers for each physics module in Lethe.

These identifiers are used to index and refer to the different physics solvers throughout the multiphysics framework.

Enumerator
fluid_dynamics 

Fluid Dynamics (Velocity,Pressure).

heat_transfer 

Heat transfer (Temperature).

tracer 

Passive scalar tracer (Tracer).

CLS 

Conservative level-set / Volume-of-Fluid (Phase indicator / phase fraction)

cahn_hilliard 

Cahn-Hilliard (Phase indicator, Potential).

void_fraction 

Void fraction (not an auxiliary physics). Computed by the particle projector of the VANS solvers and registered by them in the multiphysics interface. Only available with the VANS formulation.

electromagnetics 

Time-harmonic electromagnetics (Electric field, Magnetic field).

continuum_solid_dynamics 

Euler-Euler solid phase (solid velocity, solid volume fraction).

particle_temperature 

Projected particle temperature from DEM (not an auxiliary physics). Like the void fraction, it is computed by the particle projector of the VANS solvers and registered by them in the multiphysics interface. Only available with the VANS formulation in thermal CFD-DEM simulations (solver type = dem_mp).

qmom 

Quadrature method of moments (scalars and moments of the particle size distribution)

Definition at line 28 of file multiphysics.h.

◆ Variable

enum class Variable : unsigned int
strong

Solution fields of the different physics that are used as an indicator for multiple purposes (e.g. adaptive mesh refinement, solid domain constraints).

Enumerator
velocity 

Velocity vector field from fluid dynamics.

pressure 

Pressure scalar field from fluid dynamics.

phase 

Phase indicator scalar field from CLS.

temperature 

Temperature scalar field from heat transfer.

phase_cahn_hilliard 

Phase order scalar field from Cahn Hilliard.

chemical_potential_cahn_hilliard 

Chemical potential scalar field from Cahn Hilliard.

tracer 

Tracer scalar field.

electric_field 

Electric field vector field from electromagnetics.

magnetic_field 

Magnetic field vector field from electromagnetics.

electromagnetic_fields 

Combination of both electric and magnetic fields from electromagnetics.

Definition at line 77 of file multiphysics.h.

Function Documentation

◆ get_physics_id()

PhysicsID get_physics_id ( const std::string & physics_name)
inline

Utility function used for parsing physics-based parameters.

Definition at line 106 of file multiphysics.h.

References cahn_hilliard, CLS, continuum_solid_dynamics, electromagnetics, fluid_dynamics, heat_transfer, qmom, tracer, and void_fraction.

◆ get_variable_string()

std::string get_variable_string ( Variable variable)
inline

Gets for every available Variable the string corresponding to the variable.

Parameters
variableVariable of interest.
Returns
String corresponding to the variable specified:
  • "velocity"
  • "pressure"
  • "phase"
  • "temperature"
  • "phase cahn hilliard"
  • "chemical potential cahn hilliard"
  • "tracer"
  • "electric field"
  • "magnetic field"
  • "electromagnetic fields"

Definition at line 150 of file multiphysics.h.

References chemical_potential_cahn_hilliard, electric_field, electromagnetic_fields, magnetic_field, phase, phase_cahn_hilliard, pressure, temperature, tracer, and velocity.

◆ get_variable_string_with_underscores()

std::string get_variable_string_with_underscores ( Variable variable)
inline

Gets for every available Variable the string corresponding to the variable. Words are separated by underscores to form 1-word strings used for example in column names in output .dat files.

Parameters
variableVariable of interest.
Returns
1-word string corresponding to the variable specified:
  • "velocity"
  • "pressure"
  • "phase"
  • "temperature"
  • "phase_cahn_hilliard"
  • "chemical_potential_cahn_hilliard"
  • "tracer"
  • "electric_field"
  • "magnetic_field"
  • "electromagnetic_fields"

Definition at line 197 of file multiphysics.h.

References get_variable_string().