CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Zero Equation Turbulence models

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   April 17, 2013, 03:33
Default
  #3
Member
 
cosimo bianchini
Join Date: Mar 2009
Location: Florence, Tuscany, Italy
Posts: 88
Rep Power: 17
cosimobianchini is on a distinguished road
Send a message via Skype™ to cosimobianchini
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
cosimobianchini is offline   Reply With Quote

 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 11:52.