25#ifndef LATTICE_TAU_FROM_BOUNDARY_DISTANCE_3D_HH
26#define LATTICE_TAU_FROM_BOUNDARY_DISTANCE_3D_HH
33#define M_PI (3.14159265358979323846)
48template<
typename T,
typename DESCRIPTOR,
typename TDESCRIPTOR>
50 SuperLattice<T,DESCRIPTOR>& sLattice,
SuperGeometry<T,3>& sGeometry,
XMLreader const& xmlReader,
const ThermalUnitConverter<T,DESCRIPTOR,TDESCRIPTOR>& converter,
const T p,
const T T_avg,
const T c_p,
const T beta,
const T lambda_0,
const T sigma,
const T p_0,
const T n_0)
53 this->
getName() =
"physTauFromBoundaryDistance";
56 for (
int iC = 0; iC < maxC; iC++) {
57 this->
_blockF.emplace_back(
new BlockLatticePhysTauFromBoundaryDistance3D<T,DESCRIPTOR,TDESCRIPTOR>(this->
_sLattice.
getBlock(iC), sGeometry.
getBlockGeometry(iC), xmlReader, this->_converter, p, T_avg, c_p, beta, lambda_0, sigma, p_0, n_0));
61template <
typename T,
typename DESCRIPTOR,
typename TDESCRIPTOR>
63 BlockLattice<T,DESCRIPTOR>& blockLattice,
BlockGeometry<T,3>& blockGeometry,
XMLreader const& xmlReader,
ThermalUnitConverter<T,DESCRIPTOR,TDESCRIPTOR> const& converter,
const T p,
const T T_avg,
const T c_p,
const T beta,
const T lambda_0,
const T sigma,
const T p_0,
const T n_0)
64 :
BlockLatticeThermalPhysF3D<T,DESCRIPTOR,TDESCRIPTOR>(blockLattice,converter,1), _blockGeometry(blockGeometry), _distanceFunctor(blockLattice, blockGeometry, xmlReader), _tmp1(lambda_0 * 287.058 * T_avg / p / c_p), _tmp2(2. * beta / (util::sqrt(2.) *
M_PI * sigma * sigma * p * n_0 / p_0))
66 this->
getName() =
"physTauFromBoundaryDistance";
70template <
typename T,
typename DESCRIPTOR,
typename TDESCRIPTOR>
74 _distanceFunctor(L, input);
75 if ( L[0] < this->_converter.getPhysDeltaX() ) {
76 L[0] = this->_converter.getPhysDeltaX();
79 const T alpha = _tmp1 / ( 1. + _tmp2 / L[0] );
81 output[0] = alpha / this->_converter.getConversionFactorViscosity() * descriptors::invCs2<T,TDESCRIPTOR>() + 0.5;
Representation of a block geometry.
functor returns pointwise pore radius for packings of spheres given by indicators returns NAN for non...
BlockLatticePhysTauFromBoundaryDistance3D(BlockLattice< T, DESCRIPTOR > &blockLattice, BlockGeometry< T, 3 > &blockGeometry, XMLreader const &xmlReader, ThermalUnitConverter< T, DESCRIPTOR, TDESCRIPTOR > const &converter, const T p, const T T_avg, const T c_p, const T beta, const T lambda_0, const T sigma, const T p_0, const T n_0)
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class
represents all thermal functors that operate on a DESCRIPTOR with output in Phys, e....
Platform-abstracted block lattice for external access and inter-block interaction.
std::string & getName()
read and write access to name
std::vector< std::unique_ptr< BlockF3D< T > > > _blockF
Super functors may consist of several BlockF3D<W> derived functors.
Representation of a statistic for a parallel 2D geometry.
BlockGeometry< T, D > & getBlockGeometry(int locIC)
Read and write access to a single block geometry.
SuperLattice< T, TDESCRIPTOR > & _sLattice
SuperLatticePhysTauFromBoundaryDistance3D(SuperLattice< T, DESCRIPTOR > &sLattice, SuperGeometry< T, 3 > &sGeometry, XMLreader const &xmlReader, ThermalUnitConverter< T, DESCRIPTOR, TDESCRIPTOR > const &converter, const T p, const T T_avg, const T c_p, const T beta, const T lambda_0, const T sigma, const T p_0, const T n_0)
represents all thermal functors that operate on a DESCRIPTOR with output in Phys, e....
Super class maintaining block lattices for a cuboid decomposition.
BlockLattice< T, DESCRIPTOR > & getBlock(int locC)
Return BlockLattice with local index locC.
LoadBalancer< T > & getLoadBalancer()
Read and write access to the load balancer.
Conversion between physical and lattice units, as well as discretization specialized for thermal appl...
Wrapper functions that simplify the use of MPI.
Top level namespace for all of OpenLB.
Representation of a parallel 2D geometry – header file.