OpenLB 1.7
|
Conversion between physical and lattice units, as well as discretization for multiple component lattices. More...
#include <multiPhaseUnitConverter.h>
Public Member Functions | |
constexpr | MultiPhaseUnitConverter (size_t resolution, T charPhysLength, T charPhysVelocity, T physViscosity, T physEoSa, T latticeEoSa, T physEoSb, T physMolarMass, T physSurfaceTension, T charPhysTemperature, T charPhysPressure) |
Documentation of constructor: TODO: Extend constructur documentation. | |
constexpr T | getCharPhysTemperature () const |
return characteristic temperature in physical units | |
constexpr T | getPhysEoSa () const |
return equation of state parameter a in physical units | |
constexpr T | getPhysEoSb () const |
return equation of state parameter b in physical units | |
constexpr T | getPhysMolarMass () const |
return molar mass in physical units | |
constexpr T | getPhysSurfaceTension () const |
return surface tension in physical units | |
constexpr T | getPhysTemperature () const |
return characteristic temperature in physical units | |
constexpr T | getConversionFactorEoSa () const |
access (read-only) to private member variable | |
constexpr T | getConversionFactorEoSb () const |
access (read-only) to private member variable | |
constexpr T | getConversionFactorMolarMass () const |
access (read-only) to private member variable | |
constexpr T | getConversionFactorGasConstant () const |
access (read-only) to private member variable | |
constexpr T | getConversionFactorSurfaceTension () const |
access (read-only) to private member variable | |
constexpr T | getConversionFactorTemperature () const |
access (read-only) to private member variable | |
constexpr T | getLatticeSurfaceTension () const |
return lattice surface tension for parameter fitting | |
void | print () const override |
nice terminal output for conversion factors, characteristical and physical data | |
Public Member Functions inherited from olb::UnitConverter< T, DESCRIPTOR > | |
constexpr | UnitConverter (T physDeltaX, T physDeltaT, T charPhysLength, T charPhysVelocity, T physViscosity, T physDensity, T charPhysPressure=0) |
Documentation of constructor: | |
virtual | ~UnitConverter ()=default |
constexpr int | getResolution () const |
return resolution | |
constexpr T | getLatticeRelaxationTime () const |
return relaxation time in lattice units | |
constexpr T | getLatticeRelaxationFrequency () const |
return relaxation frequency in lattice units | |
template<typename DESCRIPTOR_ > | |
constexpr T | getLatticeRelaxationFrequencyFromDiffusivity (const T physDiffusivity) const |
return relaxation frequency in lattice units computed from given physical diffusivity in m^2 / s | |
constexpr T | getCharPhysLength () const |
return characteristic length in physical units | |
constexpr T | getCharPhysVelocity () const |
return characteristic velocity in physical units | |
constexpr T | getCharLatticeVelocity () const |
return characteristic velocity in lattice units | |
constexpr T | getPhysViscosity () const |
return viscosity in physical units | |
constexpr T | getPhysDensity () const |
return density in physical units | |
constexpr T | getCharPhysPressure () const |
return characteristic pressure in physical units | |
constexpr T | getReynoldsNumber () const |
return Reynolds number | |
constexpr T | getMachNumber () const |
return Mach number | |
constexpr T | getKnudsenNumber () const |
return Knudsen number | |
constexpr T | getPhysLength (int latticeLength) const |
conversion from lattice to physical length | |
constexpr int | getLatticeLength (T physLength) const |
conversion from physical to lattice length, returns number of voxels for given physical length | |
constexpr T | getConversionFactorLength () const |
access (read-only) to private member variable | |
constexpr T | getPhysDeltaX () const |
returns grid spacing (voxel length) in m | |
constexpr T | getPhysTime (size_t latticeTime) const |
conversion from lattice to physical time | |
constexpr size_t | getLatticeTime (T physTime) const |
conversion from physical to lattice time | |
constexpr T | getConversionFactorTime () const |
access (read-only) to private member variable | |
constexpr T | getPhysDeltaT () const |
returns time spacing (timestep length) in s | |
constexpr T | getPhysVelocity (T latticeVelocity) const |
conversion from lattice to physical velocity | |
constexpr T | getLatticeVelocity (T physVelocity) const |
conversion from physical to lattice velocity | |
constexpr T | getConversionFactorVelocity () const |
access (read-only) to private member variable | |
constexpr T | getPhysDensity (T latticeDensity) const |
conversion from lattice to physical density | |
constexpr T | getLatticeDensity (T physDensity) const |
conversion from physical to lattice density | |
constexpr T | getLatticeDensityFromPhysPressure (T physPressure) const |
constexpr T | getConversionFactorDensity () const |
access (read-only) to private member variable | |
constexpr T | getPhysMass (T latticeMass) const |
conversion from lattice to physical mass | |
constexpr T | getLatticeMass (T physMass) const |
conversion from physical to lattice mass | |
constexpr T | getConversionFactorMass () const |
access (read-only) to private member variable | |
constexpr T | getPhysViscosity (T latticeViscosity) const |
conversion from lattice to physical viscosity | |
constexpr T | getLatticeViscosity () const |
conversion from physical to lattice viscosity | |
constexpr T | getConversionFactorViscosity () const |
access (read-only) to private member variable | |
constexpr T | getPhysForce (T latticeForce) const |
conversion from lattice to physical force | |
constexpr T | getLatticeForce (T physForce) const |
conversion from physical to lattice force | |
constexpr T | getConversionFactorForce () const |
access (read-only) to private member variable | |
constexpr T | getPhysTorque (T latticeTorque) const |
conversion from lattice to physical torque | |
constexpr T | getLatticeTorque (T physTorque) const |
conversion from physical to lattice torque | |
constexpr T | getConversionFactorTorque () const |
access (read-only) to private member variable | |
constexpr T | getPhysPressure (T latticePressure) const |
conversion from lattice to physical pressure | |
constexpr T | getLatticePressure (T physPressure) const |
conversion from physical to lattice pressure | |
constexpr T | getConversionFactorPressure () const |
access (read-only) to private member variable | |
void | print (std::ostream &fout) const |
void | write (std::string const &fileName="unitConverter") const |
Public Member Functions inherited from olb::UnitConverterBase | |
virtual | ~UnitConverterBase ()=default |
Protected Attributes | |
const T | _conversionEoSa |
const T | _conversionEoSb |
const T | _conversionMolarMass |
const T | _conversionGasConstant = 8.314462618 |
const T | _conversionSurfaceTension |
const T | _conversionTemperature |
const T | _physEoSa |
const T | _physEoSb |
const T | _physMolarMass |
const T | _physSurfaceTension |
const T | _charPhysTemperature |
const T | _latticeSurfaceTension |
Protected Attributes inherited from olb::UnitConverter< T, DESCRIPTOR > | |
const T | _conversionLength |
const T | _conversionTime |
const T | _conversionVelocity |
const T | _conversionDensity |
const T | _conversionMass |
const T | _conversionViscosity |
const T | _conversionForce |
const T | _conversionTorque |
const T | _conversionPressure |
const T | _charPhysLength |
const T | _charPhysVelocity |
const T | _physViscosity |
const T | _physDensity |
const T | _charPhysPressure |
const size_t | _resolution |
const T | _latticeRelaxationTime |
const T | _charLatticeVelocity |
Conversion between physical and lattice units, as well as discretization for multiple component lattices.
Be aware of the nomenclature: We distingish between physical (dimensioned) and lattice (dimensionless) values. A specific conversion factor maps the two different scopes, e.g. physLength = conversionLength * latticeLength
For the basic units of length L, time T, mass M, particle number N and temperature theta, 5 elemental conversion factors are deduced from EoS parameters a,b and R, molar mass M and surface tension sigma. For multiple components, the conversion factors are computed for the lightest condensable component.
TODO: Extend documentation for MultiPhaseUnitConverter
Definition at line 56 of file multiPhaseUnitConverter.h.
|
inlineconstexpr |
Documentation of constructor: TODO: Extend constructur documentation.
Definition at line 61 of file multiPhaseUnitConverter.h.
|
inlineconstexpr |
return characteristic temperature in physical units
Definition at line 97 of file multiPhaseUnitConverter.h.
References olb::MultiPhaseUnitConverter< T, DESCRIPTOR >::_charPhysTemperature.
|
inlineconstexpr |
access (read-only) to private member variable
Definition at line 128 of file multiPhaseUnitConverter.h.
References olb::MultiPhaseUnitConverter< T, DESCRIPTOR >::_conversionEoSa.
|
inlineconstexpr |
access (read-only) to private member variable
Definition at line 134 of file multiPhaseUnitConverter.h.
References olb::MultiPhaseUnitConverter< T, DESCRIPTOR >::_conversionEoSb.
|
inlineconstexpr |
access (read-only) to private member variable
Definition at line 146 of file multiPhaseUnitConverter.h.
References olb::MultiPhaseUnitConverter< T, DESCRIPTOR >::_conversionGasConstant.
|
inlineconstexpr |
access (read-only) to private member variable
Definition at line 140 of file multiPhaseUnitConverter.h.
References olb::MultiPhaseUnitConverter< T, DESCRIPTOR >::_conversionMolarMass.
|
inlineconstexpr |
access (read-only) to private member variable
Definition at line 152 of file multiPhaseUnitConverter.h.
References olb::MultiPhaseUnitConverter< T, DESCRIPTOR >::_conversionSurfaceTension.
|
inlineconstexpr |
access (read-only) to private member variable
Definition at line 158 of file multiPhaseUnitConverter.h.
References olb::MultiPhaseUnitConverter< T, DESCRIPTOR >::_conversionTemperature.
|
inlineconstexpr |
return lattice surface tension for parameter fitting
Definition at line 164 of file multiPhaseUnitConverter.h.
References olb::MultiPhaseUnitConverter< T, DESCRIPTOR >::_latticeSurfaceTension.
|
inlineconstexpr |
return equation of state parameter a in physical units
Definition at line 102 of file multiPhaseUnitConverter.h.
References olb::MultiPhaseUnitConverter< T, DESCRIPTOR >::_physEoSa.
|
inlineconstexpr |
return equation of state parameter b in physical units
Definition at line 107 of file multiPhaseUnitConverter.h.
References olb::MultiPhaseUnitConverter< T, DESCRIPTOR >::_physEoSb.
|
inlineconstexpr |
return molar mass in physical units
Definition at line 112 of file multiPhaseUnitConverter.h.
References olb::MultiPhaseUnitConverter< T, DESCRIPTOR >::_physMolarMass.
|
inlineconstexpr |
return surface tension in physical units
Definition at line 117 of file multiPhaseUnitConverter.h.
References olb::MultiPhaseUnitConverter< T, DESCRIPTOR >::_physSurfaceTension.
|
inlineconstexpr |
return characteristic temperature in physical units
Definition at line 122 of file multiPhaseUnitConverter.h.
References olb::MultiPhaseUnitConverter< T, DESCRIPTOR >::_charPhysTemperature.
|
overridevirtual |
nice terminal output for conversion factors, characteristical and physical data
Reimplemented from olb::UnitConverter< T, DESCRIPTOR >.
Definition at line 38 of file multiPhaseUnitConverter.hh.
|
protected |
Definition at line 188 of file multiPhaseUnitConverter.h.
|
protected |
Definition at line 176 of file multiPhaseUnitConverter.h.
|
protected |
Definition at line 177 of file multiPhaseUnitConverter.h.
|
protected |
Definition at line 179 of file multiPhaseUnitConverter.h.
|
protected |
Definition at line 178 of file multiPhaseUnitConverter.h.
|
protected |
Definition at line 180 of file multiPhaseUnitConverter.h.
|
protected |
Definition at line 181 of file multiPhaseUnitConverter.h.
|
protected |
Definition at line 191 of file multiPhaseUnitConverter.h.
|
protected |
Definition at line 184 of file multiPhaseUnitConverter.h.
|
protected |
Definition at line 185 of file multiPhaseUnitConverter.h.
|
protected |
Definition at line 186 of file multiPhaseUnitConverter.h.
|
protected |
Definition at line 187 of file multiPhaseUnitConverter.h.