|October 7, 2011, 08:23||
atan(s) function. openFoam
Join Date: Feb 2011
Posts: 34Rep Power: 7
I can see that the function atan(s) in openFoam can only give results in the 1st and 4th quadrant. (angles between -pi and +pi)
My angle can variate between 0 and 2pi.
Is there any function in openFoam which can give the right result?
I know in Matlab is called atan2(s) but openFoam does not recognise that.
|October 7, 2011, 08:41||
Join Date: Mar 2009
Location: Lisbon, Portugal
Blog Entries: 39Rep Power: 99
When in doubt about some detail like this, check the code documentation: http://www.openfoam.com/docs/cpp/
Here's the proof that atan2 does exist in OpenFOAM: http://foam.sourceforge.net/docs/cpp...ce.html#l00085 - AFAIK it's the standard C/C++ libraries that don't have atan2.
To use it, you might need to call it by the full path name:
value = Foam::atan2(x,y);
value = atan2(x,y);
|atan, function, openfoam|
|Thread||Thread Starter||Forum||Replies||Last Post|
|bug in "average" function of OpenFOAM||jms||OpenFOAM||0||March 22, 2011 05:04|
|Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64||wyldckat||OpenFOAM Announcements from Other Sources||3||September 8, 2010 06:25|
|Modified OpenFOAM Forum Structure and New Mailing-List||pete||Site News & Announcements||0||June 29, 2009 05:56|
|Could you please help me about the VTKFoam||liugx212||OpenFOAM Pre-Processing||5||February 13, 2008 12:31|
|OpenFoam 14 installation problem||gfcoppola||OpenFOAM Installation||20||November 2, 2007 14:38|