hay, guys.rn I got several questions about openlb code. My code version is olb-0.8r0. Hope you can take some time to help me solve them.rnrn 1. When I traced the cavity2d example in olb-0.8r0, I found that the density on the corner is computed by the following code, which I couldn’t understand. Could anybody tell what theory of this process takes. Thank you so much.rn
Code:
T rho = (T)2/(T)3*(rho01+rho10) – (T)1/(T)6*(rho02+rho20);
rnrn 2. About the f distribution calculated in bgkCollision, why is the const multiplier of uxSqr_, uySqr_ 3. For most D2Q9 models it’s 9/2. Here is the code:rn
Code:
T uxSqr = u[0]*u[0];rn T uySqr = u[1]*u[1];rnrn T ux_ = (T)3 * u[0];rn T uy_ = (T)3 * u[1];rnrn T uxSqr_ = (T)3 * uxSqr;rn T uySqr_ = (T)3 * uySqr;rn T uxSqr__ = (T)3/(T)2 * uxSqr;rn T uySqr__ = (T)3/(T)2 * uySqr;rn T uSqr_ = uxSqr__ + uySqr__;rnrn T uxPySqr_ = (T)9/(T)2 * (u[0]+u[1])*(u[0]+u[1]);rn T uxMySqr_ = (T)9/(T)2 * (u[0]-u[1])*(u[0]-u[1]);rnrn rho_ = (T)1/(T)9 * rho;rn cf_ = (T)1/(T)9 * (rho-(T)1);rnrn cell[6] *= (T)1-omega;rn cell[6] += omega*(cf_ + rho_*(ux_ + uxSqr_ – uySqr__));rn cell[8] *= (T)1-omega;rn cell[8] += omega*(cf_ + rho_*(uy_ + uySqr_ – uxSqr__));rn cell[2] *= (T)1-omega;rn cell[2] += omega*(cf_ + rho_*(-ux_ + uxSqr_ – uySqr__));rn cell[4] *= (T)1-omega;rn cell[4] += omega*(cf_ + rho_*(-uy_ + uySqr_ – uxSqr__));
rn rn what’s more, does anybody have the example code of Kovasznay flow. If possible, would you plz send me a copy? Here is my email address, openlb12@163.com. Thank you so much.rnrnrnrn best wishes!