|
[Sponsors] |
April 17, 2013, 03:33 |
|
#3 |
Member
|
If I did not misunderstand you should use your if statement within a loop on the internal cells of your volScalarField nut_. What the error is saying is that it makes no sense a statement like <= for a volScalarField in fact for some cells it will be > for others <.
In order to make it work write something like forAll(nut_,cellI) { if(d_[cellI] <= (1.3*H_)) { nut_[cellI] = a_*zh_*exp(-b_*d_[cellI]/H_)*mag(U_)*pow((d_[cellI]/H_),2); } else { nut_[cellI] = 0.16*Uh_*(d_[cellI] + z0_)/Foam::log((d_[cellI] + z0_)/z0_); } } assuming that all other variables except for d_ and U_ are of type scalar this should work. Another thing you should pay attention to is in the use of vector variables (I guessed U_ it is velocity vector) in a statement with scalars on the LHS, I added the operator mag(U_) to evaluate the magnitude of velocity but I'm not sure this is what you want. Change the operator accordingly to your needs but check that it returns a scalar.
__________________
Cosimo Bianchini Ergon Research s.r.l. Via Panciatichi, 92 50127 Florence - ITALY Tel: +39 055 0763716 Mob: +39 320 9460153 e-mail: cosimo.bianchini@ergonresearch.it URL: www.ergonresearch.it |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Turbulence postprocessing | Mohsin | FLUENT | 2 | October 3, 2016 14:18 |
Calculation of the Governing Equations | Mihail | CFX | 7 | September 7, 2014 06:27 |
Reynolds transport, turbulence model, etc | Beginner | Main CFD Forum | 1 | January 7, 2009 05:36 |
Solving the turbulence equation | summer | FLUENT | 4 | July 13, 2007 09:57 |
turbulence models? | haider | FLUENT | 0 | March 7, 2006 23:58 |