|
[Sponsors] |
June 20, 2012, 10:41 |
define sign scalar
|
#1 |
Senior Member
Jian Zhong
Join Date: Feb 2012
Location: Birmingham
Posts: 109
Rep Power: 14 |
Hi,
I set up a passive scalar. But when calculating, the negative values come out. Actually, the passive can not be negative. How to set the scalar to be sign type (only positive or zero value)? |
|
June 20, 2012, 15:25 |
|
#2 |
Senior Member
A_R
Join Date: Jun 2009
Posts: 122
Rep Power: 17 |
Dear zx
you can do like this rho == max(rho, rhoMin); you should insert your value in rhoMin position. |
|
June 21, 2012, 15:42 |
|
#3 |
Senior Member
Jian Zhong
Join Date: Feb 2012
Location: Birmingham
Posts: 109
Rep Power: 14 |
||
August 25, 2014, 15:06 |
|
#4 |
New Member
Jonas L. Ansoni
Join Date: Jun 2011
Location: Brazil
Posts: 22
Rep Power: 15 |
Hello zx and niaz!!
I'm facing the same problem. I'm simulating the transport of a passive scalar (C) in a biphasic flow by interDymFoam and the values are negatives. I created a new solver based on interDyFoam (interDyMScalarFoam.C) as can seen on the attached files. The solver works fine, however the values of the passive scalar are negatives. I tried to use other numerical schemes such as suggested by Jasak on post #13, but without success. You could give me more details of how you solved this problem. Where do you set rho == max(rho, rhoMin);? Link to download the files (interDyMScalarFoam.C, C, fvSchemes, fvSolutions) https://dl.dropboxusercontent.com/u/...onForum.tar.gz Thanks a lot. |
|
August 25, 2014, 17:46 |
|
#5 |
Senior Member
Jian Zhong
Join Date: Feb 2012
Location: Birmingham
Posts: 109
Rep Power: 14 |
You may try C==max(C,0.0) after you solve the scalar transport equation.
Thanks, Jian |
|
Tags |
sign scalar |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Installing OF 1.6 on Mac OS X | gschaider | OpenFOAM Installation | 129 | June 19, 2010 09:23 |
Scalar problem! | lig | FLUENT | 0 | May 5, 2010 15:16 |
Missing math.h header | Travis | FLUENT | 4 | January 15, 2009 11:48 |
Free surface boudary conditions with SOLA-VOF | Fan | Main CFD Forum | 10 | September 9, 2006 12:24 |
UDF FOR UNSTEADY TIME STEP | mayur | FLUENT | 3 | August 9, 2006 10:19 |