CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM

Argument unit to evaluate cosine function ?

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

LinkBack Thread Tools Display Modes
Old   December 21, 2016, 11:49
Default Argument unit to evaluate cosine function ?
New Member
Join Date: Jun 2016
Posts: 18
Rep Power: 2
fluidflowsteel is on a distinguished road

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
fluidflowsteel is offline   Reply With Quote

Old   December 21, 2016, 15:54
Senior Member
Tobi's Avatar
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,665
Blog Entries: 6
Rep Power: 31
Tobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi

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
Tobi is online now   Reply With Quote


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
Problem with parallel run of snappyHexMesh Lorenzo92 OpenFOAM Native Meshers: snappyHexMesh and Others 5 April 15, 2016 04:12
-Xlinker --add-needed -Xlinker --no-as-needed NH1994 OpenFOAM Programming & Development 7 December 31, 2014 11:24
swak4Foam installation problem Claudio87 OpenFOAM 9 May 8, 2013 10:20
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 02:27
Droplet Evaporation Christian Main CFD Forum 2 February 27, 2007 07:27

All times are GMT -4. The time now is 09:11.