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

How to access math function

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 19, 2008, 18:07
Default Dear OpenFOAMers: I would l
  #1
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 9
hsieh is on a distinguished road
Dear OpenFOAMers:

I would like to revise gen6DoF.C in interDyMFoam/sloshingTank3D6DoF. I tried to use Foam::abs(... Foam::sin(..)), but, got an error saying abs is not a member function of Foam. However, Foam::sin(..) works in the same .C file. Can someone tell me how to access abs function?

Thanks!
Pei
hsieh is offline   Reply With Quote

Old   November 19, 2008, 22:52
Default Hi Pei ! According to the p
  #2
Member
 
Mathieu Olivier
Join Date: Mar 2009
Location: Quebec City, Canada
Posts: 76
Rep Power: 8
mathieu is on a distinguished road
Hi Pei !

According to the programmer's guide (p. P-23), the Foam::abs() does not seem to exist. I guess that Foam::mag() would do the same job for a scalar...

Mathieu
mathieu is offline   Reply With Quote

Old   November 20, 2008, 07:52
Default Thanks a lot Mathieu! I mis
  #3
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 9
hsieh is on a distinguished road
Thanks a lot Mathieu!

I missed this in the Programmer's guide.

Pei
hsieh 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
Missing math.h header Travis FLUENT 4 January 15, 2009 12:48
Problem with math equations Jonas Larsson CFD-Wiki 1 November 14, 2006 12:56
a math operator in UDF lichun Dong FLUENT 7 June 18, 2005 22:04
math description of CFD John Main CFD Forum 2 December 13, 2002 03:34
MATH * MATH + MATH - MATH Mehdi BEN ELHADJ Main CFD Forum 2 October 9, 2000 16:02


All times are GMT -4. The time now is 00:57.