![]() |
OpenLB 1.8.1
|
Conversion between physical and lattice units, as well as discretization specialized for thermal applications with boussinesq approximation. More...
#include <thermalUnitConverter.h>
Inheritance diagram for olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >:
Collaboration diagram for olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >:Public Member Functions | |
| constexpr | ThermalUnitConverter (T physDeltaX, T physDeltaT, T charPhysLength, T charPhysVelocity, T physViscosity, T physDensity, T physThermalConductivity, T physSpecificHeatCapacity, T physThermalExpansionCoefficient, T charPhysLowTemperature, T charPhysHighTemperature, T charPhysPressure=0) |
| Documentation of constructor: TODO: Extend constructur documentation. | |
| constexpr T | getLatticeThermalRelaxationTime () const |
| return thermal relaxation time in lattice units | |
| constexpr T | getLatticeThermalRelaxationFrequency () const |
| return thermal relaxation frequency in lattice units | |
| constexpr T | getCharPhysLowTemperature () const |
| return characteristic low temperature in physical units | |
| constexpr T | getCharPhysHighTemperature () const |
| return characteristic high temperature in physical units | |
| constexpr T | getCharPhysTemperatureDifference () const |
| return characteristic temperature difference in physical units | |
| constexpr T | getPhysThermalExpansionCoefficient () const |
| return thermal expansion coefficient in physical units | |
| constexpr T | getPhysThermalDiffusivity () const |
| return thermal diffusivity in physical units | |
| constexpr T | getPhysSpecificHeatCapacity () const |
| return specific heat capacity in physical units | |
| constexpr T | getThermalConductivity () const |
| return thermal conductivity in physical units | |
| constexpr T | getPhysTemperature (T latticeTemperature) const |
| conversion from lattice to physical temperature | |
| constexpr T | getLatticeTemperature (T physTemperature) const |
| conversion from physical to lattice temperature | |
| constexpr T | getConversionFactorTemperature () const |
| access (read-only) to private member variable | |
| constexpr T | getPhysThermalDiffusivity (T latticeThermalDiffusivity) const |
| conversion from lattice to physical thermal diffusivity | |
| constexpr T | getLatticeThermalDiffusivity (T physThermalDiffusivity) const |
| conversion from physical to lattice thermal diffusivity | |
| constexpr T | getConversionFactorThermalDiffusivity () const |
| access (read-only) to private member variable | |
| constexpr T | getPhysSpecificHeatCapacity (T latticeSpecificHeatCapacity) const |
| conversion from lattice to physical specific heat capacity | |
| constexpr T | getLatticeSpecificHeatCapacity (T physSpecificHeatCapacity) const |
| conversion from physical to lattice specific heat capacity | |
| constexpr T | getConversionFactorSpecificHeatCapacity () const |
| access (read-only) to private member variable | |
| constexpr T | getPhysThermalConductivity (T latticeThermalConductivity) const |
| conversion from lattice to physical thermal conductivity | |
| constexpr T | getLatticeThermalConductivity (T physThermalConductivity) const |
| conversion from physical to lattice thermal conductivity | |
| constexpr T | getConversionFactorThermalConductivity () const |
| access (read-only) to private member variable | |
| constexpr T | getPhysHeatFlux (T latticeHeatFlux) const |
| conversion from lattice to physical heat flux | |
| constexpr T | getLatticeHeatFlux (T physHeatFlux) const |
| conversion from physical to lattice heat flux | |
| constexpr T | getConversionFactorHeatFlux () const |
| access (read-only) to private member variable | |
| constexpr T | getPrandtlNumber () const |
| constexpr T | getRayleighNumber () const |
| 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 | getCharCFLnumber () const |
| return characteristic CFL number | |
| 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 | |
| template<unsigned D> | |
| constexpr Vector< T, D > | getLatticeVelocity (Vector< T, D > physU) 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 | |
| template<unsigned D> | |
| constexpr Vector< T, D > | getPhysForce (Vector< T, D > latticeForce) const |
| conversion from lattice to physical force vector | |
| 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 | |
| template<unsigned D> | |
| constexpr Vector< T, D > | getPhysTorque (Vector< T, D > latticeTorque) const |
| conversion from lattice to physical force vector | |
| 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 | _conversionTemperature |
| const T | _conversionThermalDiffusivity |
| const T | _conversionSpecificHeatCapacity |
| const T | _conversionThermalConductivity |
| const T | _conversionHeatFlux |
| const T | _charPhysLowTemperature |
| const T | _charPhysHighTemperature |
| const T | _charPhysTemperatureDifference |
| const T | _physThermalExpansionCoefficient |
| const T | _physThermalDiffusivity |
| const T | _physSpecificHeatCapacity |
| const T | _physThermalConductivity |
| const T | _latticeThermalRelaxationTime |
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 specialized for thermal applications with boussinesq approximation.
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 pressure and temperature we first shift the physical values by a characteristic value to asure a lattice pressure and between 0 and 1, e.g. physPressure - charPhysPressure = conversionPressure * latticePressure. For the temperature we set lattice values between 0.5 and 1.5 by __latticeTemperature = (physTemperature - charPhysLowTemperature) / conversionTemperature + 0.5 with conversionTemperature = charPhysHighTemperature - charPhysLowTemperature = charPhysTemperatureDifference
TODO: Extend documentation for ThermalUnitConverter
Definition at line 54 of file thermalUnitConverter.h.
|
inlineconstexpr |
Documentation of constructor: TODO: Extend constructur documentation.
Definition at line 59 of file thermalUnitConverter.h.
|
inlineconstexpr |
return characteristic high temperature in physical units
Definition at line 109 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_charPhysHighTemperature.
|
inlineconstexpr |
return characteristic low temperature in physical units
Definition at line 104 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_charPhysLowTemperature.
|
inlineconstexpr |
return characteristic temperature difference in physical units
Definition at line 114 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_charPhysTemperatureDifference.
|
inlineconstexpr |
access (read-only) to private member variable
Definition at line 215 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_conversionHeatFlux.
|
inlineconstexpr |
access (read-only) to private member variable
Definition at line 183 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_conversionSpecificHeatCapacity.
|
inlineconstexpr |
access (read-only) to private member variable
Definition at line 150 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_conversionTemperature.
|
inlineconstexpr |
access (read-only) to private member variable
Definition at line 199 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_conversionThermalConductivity.
|
inlineconstexpr |
access (read-only) to private member variable
Definition at line 166 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_conversionThermalDiffusivity.
|
inlineconstexpr |
conversion from physical to lattice heat flux
Definition at line 210 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_conversionHeatFlux.
|
inlineconstexpr |
conversion from physical to lattice specific heat capacity
Definition at line 178 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_conversionSpecificHeatCapacity.
|
inlineconstexpr |
conversion from physical to lattice temperature
Definition at line 145 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_charPhysLowTemperature, and olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_conversionTemperature.
|
inlineconstexpr |
conversion from physical to lattice thermal conductivity
Definition at line 194 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_conversionThermalConductivity.
|
inlineconstexpr |
conversion from physical to lattice thermal diffusivity
Definition at line 161 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_conversionThermalDiffusivity.
|
inlineconstexpr |
return thermal relaxation frequency in lattice units
Definition at line 98 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_latticeThermalRelaxationTime.
|
inlineconstexpr |
return thermal relaxation time in lattice units
Definition at line 93 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_latticeThermalRelaxationTime.
|
inlineconstexpr |
conversion from lattice to physical heat flux
Definition at line 205 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_conversionHeatFlux.
|
inlineconstexpr |
return specific heat capacity in physical units
Definition at line 129 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_physSpecificHeatCapacity.
|
inlineconstexpr |
conversion from lattice to physical specific heat capacity
Definition at line 173 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_conversionSpecificHeatCapacity.
|
inlineconstexpr |
conversion from lattice to physical temperature
Definition at line 140 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_charPhysLowTemperature, and olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_conversionTemperature.
|
inlineconstexpr |
conversion from lattice to physical thermal conductivity
Definition at line 189 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_conversionThermalConductivity.
|
inlineconstexpr |
return thermal diffusivity in physical units
Definition at line 124 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_physThermalDiffusivity.
|
inlineconstexpr |
conversion from lattice to physical thermal diffusivity
Definition at line 156 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_conversionThermalDiffusivity.
|
inlineconstexpr |
return thermal expansion coefficient in physical units
Definition at line 119 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_physThermalExpansionCoefficient.
|
inlineconstexpr |
Definition at line 219 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_physThermalDiffusivity, and olb::UnitConverter< T, DESCRIPTOR >::_physViscosity.
|
inlineconstexpr |
Definition at line 223 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_charPhysHighTemperature, olb::UnitConverter< T, DESCRIPTOR >::_charPhysLength, olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_charPhysLowTemperature, olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_physThermalDiffusivity, olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_physThermalExpansionCoefficient, olb::UnitConverter< T, DESCRIPTOR >::_physViscosity, and olb::util::pow().
Here is the call graph for this function:
|
inlineconstexpr |
return thermal conductivity in physical units
Definition at line 134 of file thermalUnitConverter.h.
References olb::ThermalUnitConverter< T, DESCRIPTOR, ThermalLattice >::_physThermalConductivity.
|
overridevirtual |
nice terminal output for conversion factors, characteristical and physical data
Reimplemented from olb::UnitConverter< T, DESCRIPTOR >.
Definition at line 38 of file thermalUnitConverter.hh.
|
protected |
Definition at line 242 of file thermalUnitConverter.h.
|
protected |
Definition at line 241 of file thermalUnitConverter.h.
|
protected |
Definition at line 243 of file thermalUnitConverter.h.
|
protected |
Definition at line 238 of file thermalUnitConverter.h.
|
protected |
Definition at line 236 of file thermalUnitConverter.h.
|
protected |
Definition at line 234 of file thermalUnitConverter.h.
|
protected |
Definition at line 237 of file thermalUnitConverter.h.
|
protected |
Definition at line 235 of file thermalUnitConverter.h.
|
protected |
Definition at line 250 of file thermalUnitConverter.h.
|
protected |
Definition at line 246 of file thermalUnitConverter.h.
|
protected |
Definition at line 247 of file thermalUnitConverter.h.
|
protected |
Definition at line 245 of file thermalUnitConverter.h.
|
protected |
Definition at line 244 of file thermalUnitConverter.h.