|
[Sponsors] |
December 21, 2016, 10:49 |
Argument unit to evaluate cosine function ?
|
#1 |
New Member
fluidflowsteel
Join Date: Jun 2016
Posts: 21
Rep Power: 9 |
Hi
Can any one help me in this ? I have one equation where Theta = Foam::atan2(y,x) where y and x can be any value integer or floating type. Thus the value of the Theta will be in the range of -pi to + pi in radians as per the atan2 function. Then i need to find out the value of cos(Theta). Now my question is whether the argument Theta has to be in radians to get the cosine value or I need to convert the Theta from radians to degrees to get the cosine value ? with regards |
|
December 21, 2016, 14:54 |
|
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi,
FOAM works with radians either than with degree. You also can make some simple checks. What does cos(pi) return or what does cos(90°) return within FOAM. Assuming that we would need degree, the second one should return 0.
__________________
Keep foaming, Tobias Holzmann |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Problem with parallel run of snappyHexMesh | Lorenzo92 | OpenFOAM Meshing & Mesh Conversion | 5 | April 15, 2016 04:12 |
-Xlinker --add-needed -Xlinker --no-as-needed | NH1994 | OpenFOAM Programming & Development | 7 | December 31, 2014 10:24 |
[swak4Foam] installation problem with version 0.2.3 | Claudio87 | OpenFOAM Community Contributions | 9 | May 8, 2013 10:20 |
is internalField(U) equivalent to zeroGradient? | immortality | OpenFOAM Running, Solving & CFD | 7 | March 29, 2013 01:27 |
Droplet Evaporation | Christian | Main CFD Forum | 2 | February 27, 2007 06:27 |