Reply To: channel3d Taueff
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › channel3d Taueff › Reply To: channel3d Taueff
namespace detail {
template <typename COLLISION, typename DESCRIPTOR, typename MOMENTA, typename EQUILIBRIUM>
struct SmagorinskyEffectiveOmega {
using MomentaF = typename MOMENTA::template type<DESCRIPTOR>;
using CollisionO = typename COLLISION::template type<DESCRIPTOR, MOMENTA, EQUILIBRIUM>;
template <typename CELL, typename PARAMETERS, typename V=typename CELL::value_t>
V computeEffectiveOmega(CELL& cell, PARAMETERS& parameters) any_platform {
V piNeqNormSqr { };
MomentaF().computePiNeqNormSqr(cell, piNeqNormSqr);
const V rho = MomentaF().computeRho(cell);
const V omega = parameters.template get<descriptors::OMEGA>();
std::cout << “omega1111111: ” << parameters.template get<descriptors::OMEGA>() << std::endl;
const V smagorinsky = parameters.template get<collision::LES::Smagorinsky>();
V piNeqNorm = util::sqrt(piNeqNormSqr);
V preFactor = smagorinsky*smagorinsky
* descriptors::invCs2<V,DESCRIPTOR>()*descriptors::invCs2<V,DESCRIPTOR>()
* 2 * util::sqrt(2);
/// Molecular realaxation time
V tauMol = V{1} / omega;
std::cout << “tauMol: ” << tauMol << std::endl << std::flush;
/// Turbulent realaxation time
V tauTurb = V{0.5} * (util::sqrt(tauMol*tauMol + preFactor / rho * piNeqNorm) – tauMol);
std::cout << “tauTurb: ” << tauTurb << std::endl << std::flush;
/// Effective realaxation time
V tauEff = tauMol + tauTurb;
return V{1} / tauEff;
} Why can’t I output taueff here, thanks