yPlusLam() in RASModel.C
In $SRC/turbulenceModels/incompressible/RAS/RASModel.C, Line148
scalar RASModel::yPlusLam(const scalar kappa, const scalar E) const { scalar ypl = 11.0; for (int i=0; i<10; i++) <== ??? { ypl = log(max(E*ypl, 1))/kappa; } return ypl; } I cant understand the for{...}, how about as follows? scalar RASModel::yPlusLam(const scalar kappa, const scalar E) const { scalar ypl = 11.0; ypl = log(max(E*ypl, 1))/kappa; return ypl; } Also, in $SRC/turbulenceModels/compressible/RAS/RASModel.C, Line153 scalar RASModel::yPlusLam(const scalar kappa, const scalar E) const { scalar ypl = 11.0; for (int i=0; i<10; i++) { ypl = log(E*ypl)/kappa; } return ypl; } => scalar RASModel::yPlusLam(const scalar kappa, const scalar E) const { scalar ypl = 11.0; ypl = log(max(E*ypl, 1))/kappa; return ypl; } Thanks in advance. 
Good morning
It is because it is a nonlinear equation, hence you need to solve it in an iterative manner. Best regards, NIels 
Hi, NLels
Just now I found its my misunderstanding. You've replied before I delete my thread. However, thank you very much. 
Dear friends,
I am also puzzled about the above for loop. Can you please explain in more detais which non linear equation it supposed to solve and how it does it Mnay tahnks, Yuri 
Two years later, I too have a question about this  why only iterate 10 times?
I am getting an error where the product E*ypl was negative in: Quote:
Quote:

Quote:


All times are GMT 4. The time now is 16:07. 