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

Real Gas EOS

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 2, 2013, 12:27
Default
  #41
New Member
 
magazoni
Join Date: Jul 2012
Posts: 11
Rep Power: 14
magazoni is on a distinguished road
Hi,

I used your github code. The code basicPsiThermo is copied correctly.

Thanks,
Felipe Magazoni
magazoni is offline   Reply With Quote

Old   December 2, 2013, 15:04
Default
  #42
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18
Chris Lucas is on a distinguished road
Hi,

your right, I get the same error now. The code worked before, I only got the error after I recompiled the code. I will have a look at it.

I guess the problem is related to the macro in basicPsiThermo.

Christian

PS: the code in my OpenFOAM extend branch should work.

Christian
Chris Lucas is offline   Reply With Quote

Old   December 3, 2013, 04:34
Default
  #43
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18
Chris Lucas is on a distinguished road
Hi,

I removed a bug from the code (pull new github code). I haven't checked if the code works, but in my Tester (which differs a bit from the github code) the code compiles.

Christian
Chris Lucas is offline   Reply With Quote

Old   December 3, 2013, 09:46
Default
  #44
New Member
 
magazoni
Join Date: Jul 2012
Posts: 11
Rep Power: 14
magazoni is on a distinguished road
Chris,

It's working. Thank you very much.

Felipe Magazoni
magazoni is offline   Reply With Quote

Old   March 6, 2014, 07:56
Default great Job Chris!!!
  #45
Member
 
Join Date: Aug 2012
Posts: 33
Rep Power: 14
gigilentini8 is on a distinguished road
It works very well
Unfortunately it seems that OF2.2 changed a lot of things there
Is anyone working on a porting for OF2.2?

Last edited by gigilentini8; March 7, 2014 at 08:07.
gigilentini8 is offline   Reply With Quote

Old   March 10, 2014, 04:03
Default
  #46
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18
Chris Lucas is on a distinguished road
Hi,

I have no Version of my code for OpenFOAM 2.2. However, it should not be so difficult to use the realgas library in OpenFOAM 2.2 (change realGasHThermo).


Regards,

Christian
Chris Lucas is offline   Reply With Quote

Old   May 2, 2014, 12:57
Default
  #47
New Member
 
Artem
Join Date: Mar 2013
Posts: 3
Rep Power: 13
KypoHo is on a distinguished road
Hi. I tried to compile the IAPWS package, but there is a problem

Code:
artem@artem-VirtualBox:/opt/openfoam211/src/thermophysicalModels/externalMedia/IAPWS_Waterproperties$ wmake libso
touch: cannot touch `Make/linux64GccDPOpt/dontIncludeDeps': Permission denied
SOURCE=IAPWSThermo/IAPWSThermos.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall  -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3   -DNoRepository -ftemplate-depth-100  -I/opt/openfoam211/src/finiteVolume/lnInclude  -I/opt/openfoam211/src/thermophysicalModels/specie/lnInclude  -I/opt/openfoam211/src/thermophysicalModels/basic/lnInclude  -IlnInclude  -I. -I/opt/openfoam211/src/OpenFOAM/lnInclude  -I/opt/openfoam211/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o  Make/linux64GccDPOpt/IAPWSThermos.o
IAPWSThermo/IAPWSThermos.C:66:2: error: expected constructor, destructor, or type conversion before ‘;’ token
make: *** [Make/linux64GccDPOpt/IAPWSThermos.o] Error 1
artem@artem-VirtualBox:/opt/openfoam211/src/thermophysicalModels/externalMedia/IAPWS_Waterproperties$
I use OpenFoam211

Do you have any idea about this?

Thanks in advance,
Kuznetcov Artem
KypoHo is offline   Reply With Quote

Old   May 3, 2014, 08:08
Default
  #48
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18
Chris Lucas is on a distinguished road
Hi,

1. Have a look at this. Maybe you need to be root to compile the code.

touch: cannot touch `Make/linux64GccDPOpt/dontIncludeDeps': Permission denied



2. I guess you only copied part of the code and missed the new code in the basic folder. Download the complete git reposity and compile it.

Regards,
Christian
Chris Lucas is offline   Reply With Quote

Old   May 3, 2014, 11:54
Default
  #49
New Member
 
Artem
Join Date: Mar 2013
Posts: 3
Rep Power: 13
KypoHo is on a distinguished road
Thank you, Christian. Seems to work.

Regards, Artem
KypoHo is offline   Reply With Quote

Old   January 12, 2015, 10:18
Default Comprehension question
  #50
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 16
Linse is on a distinguished road
Just for understanding: For using your realGas library, would it be sufficient to include it as an additional library via the controlDict? Or would it be necessary to change more of the code, let alone fully recompile OF?

Cheers,
Bernhard


PS: If you need to be root to compile anything for OpenFOAM, you are doing something wrong!
Linse is offline   Reply With Quote

Old   January 24, 2015, 05:46
Default
  #51
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18
Chris Lucas is on a distinguished road
Hi,

the real gas library is not a stand alone library, because a few of the standard openFoam classes needed to be changed as well.

However, you can copy the new + changed classes and copy them in your openFoam version.

Christian
Chris Lucas is offline   Reply With Quote

Old   April 17, 2016, 18:23
Default Using mixtures for real gas Eos (Peng Robinson)
  #52
ait
New Member
 
Aly Taleb
Join Date: Aug 2015
Posts: 5
Rep Power: 11
ait is on a distinguished road
I'm using OF2.1.1 with the real gas EoS from Chris Lucas to simulate expansion and compression of alkanes and refrigerants in gas springs. I noticed that apart from the source files for the EoS (for example pengRobinson.C), there are also source files for using gas mixtures (mixturePengRobinson.C, see here: https://github.com/morgoth541/of_rea...State/mixtures) where van der Waals mixing rules are used. Does anybody know how I must modify the thermophysicalProperties file to use the mixture equations of state? I couldn't find an example in the tutorials.

Thanks!!!
ait is offline   Reply With Quote

Old   July 8, 2016, 17:54
Default Issue with installing Christian Lucas Real gas library
  #53
New Member
 
RVeer
Join Date: Apr 2016
Location: Orlando, FL
Posts: 8
Rep Power: 10
Raghuveera is on a distinguished road
Hello All,

I am very new to OpenFoam. Can anyone let me know where I am doing wrong in installing Real gas library of Christian Lucas?

I have already OF-2.1.1. and 3.0.1 installed in my system.

Procedure I followed:
1) I have placed the entire downloaded folder (of_realFluid-master)inside the OF-2.1.1 installation directory.
2) saved an alias in the personal .bashrc file, simply by running the following command.
echo
"alias ofrgas211='source \$HOME/OpenFOAM/OpenFOAM-2.1.1/
of_realFluid-masters/etc/bashrc $FOAM_SETTINGS'" >> $HOME/.bashrc
3) Then I entered inside 'of_realFluid-masters' and tried doing './Allmake'.

I am getting the following error:

Error: Current directory is not /home/vasulab/OpenFOAM/OpenFOAM-2.1.1
Error: Current directory is not $WM_PROJECT_DIR
The environment variables are inconsistent with the installation.
Check the OpenFOAM entries in your dot-files and source them.m getting the following error:

Thanks,
Rveera
Raghuveera is offline   Reply With Quote

Old   July 13, 2016, 05:11
Default
  #54
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18
Chris Lucas is on a distinguished road
Hi

@ ait: The mixture EOS classes are not connected to the mixture classes in openFOAM "like homogeneousMixture". This needs to the done.Additionally, you should checked thermo class as well. I only wrote and checked the the mixture EOS classes,

@ Raghuveera: when you simply load the bashrc file in the real gas repo, can you install openFOAM?
Christian
Chris Lucas is offline   Reply With Quote

Old   July 22, 2016, 00:42
Default
  #55
New Member
 
RVeer
Join Date: Apr 2016
Location: Orlando, FL
Posts: 8
Rep Power: 10
Raghuveera is on a distinguished road
Hello Chris,

Sorry for my question. I have put myself in confusion because, I already have OF211 in my computer. Now I installed your OF with a different name in 'bashrc' file.

i.e., as
export WM_PROJECT=OpenFOAM
export WM_PROJECT_VERSION=2.1.RG

After that, I simply made the ./Allwmake. (Just followed the same procedure of OF installation).

I have one more question from your tutorial example.

What is the source for the 'nasaHeatCapacityPolynomial' you used inside your tutorial?

-Thanks
Rveer
Raghuveera is offline   Reply With Quote

Old   July 24, 2016, 16:01
Default
  #56
New Member
 
RVeer
Join Date: Apr 2016
Location: Orlando, FL
Posts: 8
Rep Power: 10
Raghuveera is on a distinguished road
Chris,

Can you please let me know, is your real gas library considers all real effects in thermodynamics in account?
For example, in real gas enthalpy is function of both temperature and pressure. Hence, the temperature calculations must be different from ideal gas assumption.

-Thanks,
Raghu
Raghuveera is offline   Reply With Quote

Old   March 24, 2017, 21:59
Default Using rhoPimpleFoam or buoyantPimpleFoam with your real gas EOS
  #57
New Member
 
Mahdi Nabil
Join Date: Sep 2015
Posts: 9
Rep Power: 11
Mhmnabil is on a distinguished road
Quote:
Originally Posted by Chris Lucas View Post
Hi,

the real gas library is not a stand alone library, because a few of the standard openFoam classes needed to be changed as well.

However, you can copy the new + changed classes and copy them in your openFoam version.

Christian
Hi Chris,

Just a quick question. I am trying to simulate supercritical CO2 flow using buoyantPimpleFoam or rhoPimpleFoam in OpenFOAM 2.4.0. But, I have hit a wall. I think they cannot handle any EOS other than the ones in which P is linear with rho. Right?
I mean if I want to use your library for real gas or Peng Robinson or etc., I should use your solver (realPISO), and the OpenFOAM solvers will never work as they are. Right?
Mhmnabil is offline   Reply With Quote

Old   March 27, 2017, 15:27
Default
  #58
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18
Chris Lucas is on a distinguished road
Hi,

you have to use the real gas library and the solver.

You can use the newest foam extented version. The solver and the real gas library is included there.

Christian
Chris Lucas is offline   Reply With Quote

Old   March 27, 2017, 15:30
Default
  #59
New Member
 
Mahdi Nabil
Join Date: Sep 2015
Posts: 9
Rep Power: 11
Mhmnabil is on a distinguished road
Hi Lucas,

Thanks a lot for your reply. I just found your realPISO solver which is in OF 2.1. Can you send me the link to the newest foam extented version? I mean the link to your real flow solver on the newest foam extented version.
Is it still compatible to OF 2.1 or a later version?

Mahdi


Quote:
Originally Posted by Chris Lucas View Post
Hi,

you have to use the real gas library and the solver.

You can use the newest foam extented version. The solver and the real gas library is included there.

Christian
Mhmnabil is offline   Reply With Quote

Old   March 27, 2017, 16:27
Default
  #60
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18
Chris Lucas is on a distinguished road
https://sourceforge.net/p/foam-exten...i/master/tree/
Chris Lucas is offline   Reply With Quote

Reply

Tags
high pressure injection, openfoam 2.1.x, real gas


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
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 06:21
error: uninitialized local variable 't' used MASOUD Fluent UDF and Scheme Programming 5 October 17, 2016 05:24
error message cuteapathy CFX 14 March 20, 2012 07:45
defining a term for a domain using DEFINE_ADJUST MASOUD Fluent UDF and Scheme Programming 1 September 24, 2010 06:08
Constant velocity of the material Sas CFX 15 July 13, 2010 09:56


All times are GMT -4. The time now is 04:19.