CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Where to find what is the value of Universal gas constant used in the OpenFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 1 Post By AshwaniAssam
  • 2 Post By Tobi
  • 2 Post By AshwaniAssam

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 8, 2019, 13:16
Default Where to find what is the value of Universal gas constant used in the OpenFoam
  #1
Senior Member
 
Ashwani
Join Date: Sep 2013
Location: Hyderabad
Posts: 154
Rep Power: 12
AshwaniAssam is on a distinguished road
Hi all,


In the file thermodynamicConstants.C the definition of universal gas constant is defined as

Code:
      // Note: the 1e3 converts from /mol to /kmol for consistency with the
     // SI choice of kg rather than g for mass.

     // This is not appropriate for USCS and will be changed to an entry in

     // the DimensionedConstants dictionary in etc/controlDict

     const scalar RR = 1e3*physicoChemical::R.value();

What I understand is the universal gas constant is denoted by R.value(). Where is this defined I am unable to locate.



I am trying to ascertain what is the gas constant value used by the perfect gas model. I want to use the gas constant value as 1.
cjacob likes this.
AshwaniAssam is offline   Reply With Quote

Old   October 8, 2019, 15:00
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,


you can use Doxygen for that:


https://cpp.openfoam.org/v7/physicoC...8C_source.html
jiejie and lpz456 like this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   October 9, 2019, 00:30
Default
  #3
Senior Member
 
Ashwani
Join Date: Sep 2013
Location: Hyderabad
Posts: 154
Rep Power: 12
AshwaniAssam is on a distinguished road
Thank you. I found the answer in the file you directed.

Universal gas constant = Avogadro No. * Boltzmann constant = NA * k

NA is defined in fundamentalConstants.C and k is defined dynamically in

OpenFOAM/OpenFOAM-v1906/etc/controlDict
jiejie and lpz456 like this.
AshwaniAssam is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 09:04
error message cuteapathy CFX 14 March 20, 2012 06:45
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 06:55
CGNS lib and Fortran compiler manaliac Main CFD Forum 2 November 29, 2010 06:25
Gas pressure question Dan Moskal Main CFD Forum 0 October 24, 2002 22:02


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