Hi Mathias,rnrnI redefine the DynSmagorinskyBGKdynamics as:rn
Code:
template<typename T, template<typename U> class Lattice>rnclass DynSmagorinskyBGKdynamicsNew : public BGKdynamics<T,Lattice> {rnpublic:rn /// Constructorrn DynSmagorinskyBGKdynamicsNew(T omega_, Momenta<T,Lattice>& momenta_, T dx_, T dt_);rn /// Collision steprn virtual void collide(Cell<T,Lattice>& cell, LatticeStatistics<T>& statistics_);rn /// Collide with fixed velocityrn virtual void staticCollide(Cell<T,Lattice>& cell, const T u[Lattice<T>::d],rn LatticeStatistics<T>& statistics_);rn /// Set local relaxation parameter of the dynamicsrn virtual void setOmega(T omega_);rn /// Get local smagorinsky relaxation parameter of the dynamicsrn virtual T getSmagorinskyOmega(Cell<T,Lattice>& cell_);rnrnprivate:rn /// Computes a constant prefactor in order to speed up the computationrn T computePreFactor(T omega_, T smagoConst_, T dx_, T dt_);rn /// Computes the local smagorinsky relaxation parameterrn T computeOmega(T omega0_, T preFactor_, T rho_, T pi_[util::TensorVal<Lattice<T> >::n],rn Cell<T,Lattice>& cell);rn /// effective collision time based upon Smagorisnky approachrn T tau_eff;rn T dx;rn T dt;rn const static int smagoConstIsAt = Lattice<T>::ExternalField::smagoConstIsAt;rn};
rnrnIt should be noted that the smagoConstIsAt attribut have been defined as const static int (before was const static T).
Quote:
This phrase have been modified, it have been changed const static int by const static T
rnrnThe code compile well.rnrnNow, I some kind of confused about the real implementation of this turbulence model. I know that in this model determines the Smagorinsky parameter (Csm) in each cell at each time step. I understood that
Code:
const static int smagoConstIsAt = Lattice<T>::ExternalField::smagoConstIsAt
give the position vector for a external field of the lattice. However, I have not figured out in which moment this “”external field”” have been created.rnrnShould the user give an initial value of this parameter by using for example:rn
Code:
template<typename T, template<typename U> class Lattice>rnvoid SuperLattice2D<T,Lattice>::defineExternalField(SuperGeometry2D<T>& sGeometry,rn int material, int fieldBeginsAt, int sizeOfField, AnalyticalF2D<T,T>& field)
rnAs for the “”Poiseuille-Forced-2D”” example?rnrnBest regards,rnAlejandro