|
[Sponsors] |
August 17, 2009, 02:41 |
yPlusLam() in RASModel.C
|
#1 |
New Member
Guanghao Wu
Join Date: Mar 2009
Location: Tokyo, Japan
Posts: 15
Rep Power: 17 |
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. |
|
August 17, 2009, 03:12 |
|
#2 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
Good morning
It is because it is a non-linear equation, hence you need to solve it in an iterative manner. Best regards, NIels |
|
August 17, 2009, 03:20 |
|
#3 |
New Member
Guanghao Wu
Join Date: Mar 2009
Location: Tokyo, Japan
Posts: 15
Rep Power: 17 |
Hi, NLels
Just now I found its my misunderstanding. You've replied before I delete my thread. However, thank you very much. |
|
March 20, 2012, 19:45 |
|
#4 |
Member
Yuri Feldman
Join Date: Mar 2011
Posts: 30
Rep Power: 15 |
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 |
|
March 18, 2014, 14:06 |
|
#5 | ||
New Member
Alex Chan
Join Date: Jan 2014
Location: Amherst, MA
Posts: 10
Rep Power: 12 |
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:
|
|||
July 11, 2018, 12:57 |
|
#6 | |
Senior Member
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 141
Rep Power: 10 |
Quote:
|
||
September 23, 2020, 04:17 |
|
#7 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15 |
||
|
|