CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Negative of a scalar s ??

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 19, 2013, 09:46
Default Negative of a scalar s ??
  #1
Member
 
Nikesh Bhattarai
Join Date: Nov 2011
Location: Daejeon, South Korea
Posts: 58
Rep Power: 4
nikesh is an unknown quantity at this point
hii,
I have a small doubt I'd like to clarify. Hope somebody would help me out.
I understand that Positive of a scalar s is:

pos(s) = 1 if s>=0
= 0 if s<0

How can I express Negative of a scalar s?

neg(s) = ???

I'm assuming that this is possible BUT I find OpenFoam guide mentioning only about pos(s), but doesn't talk about neg(s). So just wanted to make sure.
I'm using OF version 1.7.1.

I'd appreciate any help.

Thanks in advance.
Nikesh.
nikesh is offline   Reply With Quote

Old   March 19, 2013, 12:11
Default
  #2
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
I'm pretty sure there is a neg function, I did a quick search on the Doxygen docs and found several (in 2.2.x). You could also call pos(-s) and get near identical behaviour if your version of Foam doesn't have neg.
mturcios777 is offline   Reply With Quote

Old   March 19, 2013, 14:42
Default
  #3
Member
 
Nikesh Bhattarai
Join Date: Nov 2011
Location: Daejeon, South Korea
Posts: 58
Rep Power: 4
nikesh is an unknown quantity at this point
I tried using neg(s) in one of my codes and it does not seem to give me any error msg. But I'm still not sure what neg(s) would return.
neg(s) = ?
nikesh is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
compressible flow in turbocharger riesotto OpenFOAM 50 May 26, 2014 01:47
error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Native Meshers: blockMesh 2 March 14, 2012 10:56
mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 12 December 12, 2011 05:16
BlockMesh FOAM warning gaottino OpenFOAM Native Meshers: blockMesh 7 July 19, 2010 14:11
Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Native Meshers: blockMesh 10 April 2, 2007 14:00


All times are GMT -4. The time now is 19:03.