define sign scalar

 Register Blogs Members List Search Today's Posts Mark Forums Read

 June 20, 2012, 10:41 define sign scalar #1 Senior Member   Jian Zhong Join Date: Feb 2012 Location: Birmingham Posts: 109 Rep Power: 7 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: 120 Rep Power: 10 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: 7
Quote:
 Originally Posted by niaz Dear zx you can do like this rho == max(rho, rhoMin); you should insert your value in rhoMin position.
Many thanks. It works.

August 25, 2014, 15:06
#4
New Member

Jonas L. Ansoni
Join Date: Jun 2011
Location: Brazil
Posts: 22
Rep Power: 8
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);?

https://dl.dropboxusercontent.com/u/...onForum.tar.gz

Thanks a lot.
Attached Files
 interDyMScalarFoam.C (4.4 KB, 5 views)

 August 25, 2014, 17:46 #5 Senior Member   Jian Zhong Join Date: Feb 2012 Location: Birmingham Posts: 109 Rep Power: 7 You may try C==max(C,0.0) after you solve the scalar transport equation. Thanks, Jian

 Tags sign scalar

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post gschaider OpenFOAM Installation on Windows, Mac and other Unsupported Platforms 129 June 19, 2010 09:23 lig FLUENT 0 May 5, 2010 15:16 Travis FLUENT 4 January 15, 2009 12:48 Fan Main CFD Forum 10 September 9, 2006 12:24 mayur FLUENT 3 August 9, 2006 10:19

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