OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
olb::AdsorptionConverter< T, DESCRIPTOR > Class Template Reference

#include <adsorptionConverter.h>

+ Inheritance diagram for olb::AdsorptionConverter< T, DESCRIPTOR >:
+ Collaboration diagram for olb::AdsorptionConverter< T, DESCRIPTOR >:

Public Member Functions

 AdsorptionConverter (T physDeltaX, T physDeltaT, T charPhysLength, T charPhysVelocity, T physDiffusivity, T charConcentration, T particleConcentration, T fluidPhysViscosity)
 Converter for adsorption reactions primarily for ADE lattices based on concentration.
 
constexpr T getPhysDiffusivity () const
 
constexpr T getLatticeDiffusivity () const
 
constexpr T getConversionFactorDiffusivity () const
 
constexpr T getPhysViscosity () const
 
constexpr T getConversionFactorViscosity () const
 
constexpr T getConversionFactorParticleDensity () const
 conversion factor to convert particle density from lattice units to kg/m^3
 
getPhysParticleConcentration (T c)
 
getPhysConcentration (T c)
 
getPhysLoading (T Cq)
 
constexpr T getReynoldsNumber () const
 
constexpr T getSchmidtNumber () const
 
constexpr T getFourierNumber () const
 
void print (std::ostream &clout) const
 
void print () const
 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 _physViscosity
 
const T _conversionViscosity
 
const T _particleConcentration
 
OstreamManager clout
 
- 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
 

Detailed Description

template<typename T, typename DESCRIPTOR>
class olb::AdsorptionConverter< T, DESCRIPTOR >

Definition at line 17 of file adsorptionConverter.h.

Constructor & Destructor Documentation

◆ AdsorptionConverter()

template<typename T , typename DESCRIPTOR >
olb::AdsorptionConverter< T, DESCRIPTOR >::AdsorptionConverter ( T physDeltaX,
T physDeltaT,
T charPhysLength,
T charPhysVelocity,
T physDiffusivity,
T charConcentration,
T particleConcentration,
T fluidPhysViscosity )
inline

Converter for adsorption reactions primarily for ADE lattices based on concentration.

Renames viscosity to diffusivity and also takes fluid parameters.

Parameters
physDeltaX
physDeltaT
charPhysLength
charPhysVelocity
physDiffusivity
charConcentration
particleConcentration
fluidPhysViscosity

Definition at line 37 of file adsorptionConverter.h.

45 : UnitConverter<T, DESCRIPTOR>(physDeltaX,
46 physDeltaT,
47 charPhysLength,
48 charPhysVelocity,
49 physDiffusivity,
50 charConcentration),
51 _physViscosity(fluidPhysViscosity),
52 _conversionViscosity(physDeltaX * physDeltaX / physDeltaT),
53 _particleConcentration(particleConcentration),
54 clout(std::cout, "AdsConverter") {};

Member Function Documentation

◆ getConversionFactorDiffusivity()

template<typename T , typename DESCRIPTOR >
constexpr T olb::AdsorptionConverter< T, DESCRIPTOR >::getConversionFactorDiffusivity ( ) const
inlineconstexpr

Definition at line 66 of file adsorptionConverter.h.

66 {
68 }
constexpr T getConversionFactorViscosity() const
access (read-only) to private member variable

References olb::UnitConverter< T, DESCRIPTOR >::getConversionFactorViscosity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getConversionFactorParticleDensity()

template<typename T , typename DESCRIPTOR >
constexpr T olb::AdsorptionConverter< T, DESCRIPTOR >::getConversionFactorParticleDensity ( ) const
inlineconstexpr

conversion factor to convert particle density from lattice units to kg/m^3

Definition at line 80 of file adsorptionConverter.h.

80 {
82 }

References olb::AdsorptionConverter< T, DESCRIPTOR >::_particleConcentration.

+ Here is the caller graph for this function:

◆ getConversionFactorViscosity()

template<typename T , typename DESCRIPTOR >
constexpr T olb::AdsorptionConverter< T, DESCRIPTOR >::getConversionFactorViscosity ( ) const
inlineconstexpr

Definition at line 75 of file adsorptionConverter.h.

75 {
77 }

References olb::AdsorptionConverter< T, DESCRIPTOR >::_conversionViscosity.

+ Here is the caller graph for this function:

◆ getFourierNumber()

template<typename T , typename DESCRIPTOR >
constexpr T olb::AdsorptionConverter< T, DESCRIPTOR >::getFourierNumber ( ) const
inlineconstexpr

Definition at line 104 of file adsorptionConverter.h.

104 {
105 return this->getPhysDiffusivity()*this->getPhysDeltaT() / this->getPhysDeltaX()/ this->getPhysDeltaX();
106 }
constexpr T getPhysDiffusivity() const
constexpr T getPhysDeltaT() const
returns time spacing (timestep length) in s
constexpr T getPhysDeltaX() const
returns grid spacing (voxel length) in m

References olb::UnitConverter< T, DESCRIPTOR >::getPhysDeltaT(), olb::UnitConverter< T, DESCRIPTOR >::getPhysDeltaX(), and olb::AdsorptionConverter< T, DESCRIPTOR >::getPhysDiffusivity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLatticeDiffusivity()

template<typename T , typename DESCRIPTOR >
constexpr T olb::AdsorptionConverter< T, DESCRIPTOR >::getLatticeDiffusivity ( ) const
inlineconstexpr

Definition at line 62 of file adsorptionConverter.h.

62 {
64 }
constexpr T getLatticeViscosity() const
conversion from physical to lattice viscosity

References olb::UnitConverter< T, DESCRIPTOR >::getLatticeViscosity().

+ Here is the call graph for this function:

◆ getPhysConcentration()

template<typename T , typename DESCRIPTOR >
T olb::AdsorptionConverter< T, DESCRIPTOR >::getPhysConcentration ( T c)
inline

Definition at line 87 of file adsorptionConverter.h.

87 {
88 return c * this->getConversionFactorDensity();
89 }
constexpr T getConversionFactorDensity() const
access (read-only) to private member variable
platform_constant int c[Q][D]

References olb::UnitConverter< T, DESCRIPTOR >::getConversionFactorDensity().

+ Here is the call graph for this function:

◆ getPhysDiffusivity()

template<typename T , typename DESCRIPTOR >
constexpr T olb::AdsorptionConverter< T, DESCRIPTOR >::getPhysDiffusivity ( ) const
inlineconstexpr

Definition at line 58 of file adsorptionConverter.h.

58 {
60 }
constexpr T getPhysViscosity() const
return viscosity in physical units

References olb::UnitConverter< T, DESCRIPTOR >::getPhysViscosity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPhysLoading()

template<typename T , typename DESCRIPTOR >
T olb::AdsorptionConverter< T, DESCRIPTOR >::getPhysLoading ( T Cq)
inline

◆ getPhysParticleConcentration()

template<typename T , typename DESCRIPTOR >
T olb::AdsorptionConverter< T, DESCRIPTOR >::getPhysParticleConcentration ( T c)
inline

◆ getPhysViscosity()

template<typename T , typename DESCRIPTOR >
constexpr T olb::AdsorptionConverter< T, DESCRIPTOR >::getPhysViscosity ( ) const
inlineconstexpr

Definition at line 71 of file adsorptionConverter.h.

71 {
72 return _physViscosity;
73 }

References olb::AdsorptionConverter< T, DESCRIPTOR >::_physViscosity.

+ Here is the caller graph for this function:

◆ getReynoldsNumber()

template<typename T , typename DESCRIPTOR >
constexpr T olb::AdsorptionConverter< T, DESCRIPTOR >::getReynoldsNumber ( ) const
inlineconstexpr

◆ getSchmidtNumber()

template<typename T , typename DESCRIPTOR >
constexpr T olb::AdsorptionConverter< T, DESCRIPTOR >::getSchmidtNumber ( ) const
inlineconstexpr

Definition at line 100 of file adsorptionConverter.h.

100 {
101 return this->getPhysViscosity() / this->getPhysDiffusivity();
102 }
constexpr T getPhysViscosity() const

References olb::AdsorptionConverter< T, DESCRIPTOR >::getPhysDiffusivity(), and olb::AdsorptionConverter< T, DESCRIPTOR >::getPhysViscosity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ print() [1/2]

template<typename T , typename DESCRIPTOR >
void olb::AdsorptionConverter< T, DESCRIPTOR >::print ( ) const
inlinevirtual

nice terminal output for conversion factors, characteristical and physical data

Reimplemented from olb::UnitConverter< T, DESCRIPTOR >.

Definition at line 144 of file adsorptionConverter.h.

144 {
145 {
146 this->print(clout);
147 }
148 }
void print() const
nice terminal output for conversion factors, characteristical and physical data

References olb::AdsorptionConverter< T, DESCRIPTOR >::print().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ print() [2/2]

template<typename T , typename DESCRIPTOR >
void olb::AdsorptionConverter< T, DESCRIPTOR >::print ( std::ostream & clout) const
inlinevirtual

Implements olb::UnitConverterBase.

Definition at line 109 of file adsorptionConverter.h.

109 {
110 {
111 clout << "----------------- UnitConverter information -----------------" << std::endl;
112 clout << "-- Parameters:" << std::endl;
113 clout << "Resolution: N= " << this->getResolution() << std::endl;
114 clout << "Lattice velocity: latticeU= " << this->getCharLatticeVelocity() << std::endl;
115 clout << "Lattice relaxation frequency: omega= " << this->getLatticeRelaxationFrequency() << std::endl;
116 clout << "Lattice relaxation time: tau= " << this->getLatticeRelaxationTime() << std::endl;
117 clout << "Characteristic length(m): charL= " << this->getCharPhysLength() << std::endl;
118 clout << "Characteristic speed(m/s): charU= " << this->getCharPhysVelocity() << std::endl;
119 clout << "Phys. concentration(kg/m^d): charC= " << this->getPhysDensity() << std::endl;
120 clout << "Phys. diffusivity (m^2/s): Diffusivity= " << this->getPhysDiffusivity() << std::endl;
121 clout << "Phys. viscosity (m^2/s): Viscosity= " << this->getPhysViscosity() << std::endl;
122 clout << "Schmidt Number: Sc= " << this->getSchmidtNumber() << std::endl;
123 clout << "Reynolds number: reynoldsNumber= " << this->getReynoldsNumber() << std::endl;
124 clout << "Mach number: machNumber= " << this->getMachNumber() << std::endl;
125 clout << "Fourier number: fourierNumber= " << this->getFourierNumber() << std::endl;
126 clout << std::endl;
127
128 clout << "-- Conversion factors:" << std::endl;
129 clout << "Voxel length(m): physDeltaX= " << this->getConversionFactorLength() << std::endl;
130 clout << "Time step(s): physDeltaT= " << this->getConversionFactorTime() << std::endl;
131 clout << "Velocity factor(m/s): physVelocity= " << this->getConversionFactorVelocity() << std::endl;
132 clout << "Density factor(kg/m^3): physDensity= " << this->getConversionFactorDensity() << std::endl;
133 clout << "Mass factor(kg): physMass= " << this->getConversionFactorMass() << std::endl;
134 clout << "Viscosity factor(m^2/s): physViscosity= " << this->getConversionFactorViscosity() << std::endl;
135 clout << "Diffusivity factor(m^2/s): physDiffusivity=" << this->getConversionFactorDiffusivity() << std::endl;
136 clout << "Force factor(N): physForce= " << this->getConversionFactorForce() << std::endl;
137 clout << "Pressure factor(N/m^2): physPressure= " << this->getConversionFactorPressure() << std::endl;
138 clout << "Particle density factor: " << this->getConversionFactorParticleDensity() << std::endl;
139 clout << "-------------------------------------------------------------" << std::endl;
140
141 }
142 }
constexpr T getFourierNumber() const
constexpr T getConversionFactorParticleDensity() const
conversion factor to convert particle density from lattice units to kg/m^3
constexpr T getConversionFactorDiffusivity() const
constexpr T getSchmidtNumber() const
constexpr T getConversionFactorViscosity() const
constexpr T getReynoldsNumber() const
constexpr T getCharPhysLength() const
return characteristic length in physical units
constexpr T getMachNumber() const
return Mach number
constexpr int getResolution() const
return resolution
constexpr T getPhysDensity() const
return density in physical units
constexpr T getLatticeRelaxationFrequency() const
return relaxation frequency in lattice units
constexpr T getConversionFactorLength() const
access (read-only) to private member variable
constexpr T getCharLatticeVelocity() const
return characteristic velocity in lattice units
constexpr T getConversionFactorVelocity() const
access (read-only) to private member variable
constexpr T getConversionFactorMass() const
access (read-only) to private member variable
constexpr T getConversionFactorForce() const
access (read-only) to private member variable
constexpr T getConversionFactorPressure() const
access (read-only) to private member variable
constexpr T getCharPhysVelocity() const
return characteristic velocity in physical units
constexpr T getConversionFactorTime() const
access (read-only) to private member variable
constexpr T getLatticeRelaxationTime() const
return relaxation time in lattice units

References olb::AdsorptionConverter< T, DESCRIPTOR >::clout, olb::UnitConverter< T, DESCRIPTOR >::getCharLatticeVelocity(), olb::UnitConverter< T, DESCRIPTOR >::getCharPhysLength(), olb::UnitConverter< T, DESCRIPTOR >::getCharPhysVelocity(), olb::UnitConverter< T, DESCRIPTOR >::getConversionFactorDensity(), olb::AdsorptionConverter< T, DESCRIPTOR >::getConversionFactorDiffusivity(), olb::UnitConverter< T, DESCRIPTOR >::getConversionFactorForce(), olb::UnitConverter< T, DESCRIPTOR >::getConversionFactorLength(), olb::UnitConverter< T, DESCRIPTOR >::getConversionFactorMass(), olb::AdsorptionConverter< T, DESCRIPTOR >::getConversionFactorParticleDensity(), olb::UnitConverter< T, DESCRIPTOR >::getConversionFactorPressure(), olb::UnitConverter< T, DESCRIPTOR >::getConversionFactorTime(), olb::UnitConverter< T, DESCRIPTOR >::getConversionFactorVelocity(), olb::AdsorptionConverter< T, DESCRIPTOR >::getConversionFactorViscosity(), olb::AdsorptionConverter< T, DESCRIPTOR >::getFourierNumber(), olb::UnitConverter< T, DESCRIPTOR >::getLatticeRelaxationFrequency(), olb::UnitConverter< T, DESCRIPTOR >::getLatticeRelaxationTime(), olb::UnitConverter< T, DESCRIPTOR >::getMachNumber(), olb::UnitConverter< T, DESCRIPTOR >::getPhysDensity(), olb::AdsorptionConverter< T, DESCRIPTOR >::getPhysDiffusivity(), olb::AdsorptionConverter< T, DESCRIPTOR >::getPhysViscosity(), olb::UnitConverter< T, DESCRIPTOR >::getResolution(), olb::AdsorptionConverter< T, DESCRIPTOR >::getReynoldsNumber(), and olb::AdsorptionConverter< T, DESCRIPTOR >::getSchmidtNumber().

+ Here is the call graph for this function:

Member Data Documentation

◆ _conversionViscosity

template<typename T , typename DESCRIPTOR >
const T olb::AdsorptionConverter< T, DESCRIPTOR >::_conversionViscosity
protected

Definition at line 20 of file adsorptionConverter.h.

◆ _particleConcentration

template<typename T , typename DESCRIPTOR >
const T olb::AdsorptionConverter< T, DESCRIPTOR >::_particleConcentration
protected

Definition at line 21 of file adsorptionConverter.h.

◆ _physViscosity

template<typename T , typename DESCRIPTOR >
const T olb::AdsorptionConverter< T, DESCRIPTOR >::_physViscosity
protected

Definition at line 19 of file adsorptionConverter.h.

◆ clout

template<typename T , typename DESCRIPTOR >
OstreamManager olb::AdsorptionConverter< T, DESCRIPTOR >::clout
mutableprotected

Definition at line 22 of file adsorptionConverter.h.


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