CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Real Gas EOS (https://www.cfd-online.com/Forums/openfoam-programming-development/103937-real-gas-eos.html)

magazoni December 2, 2013 11:27

Hi,

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

Thanks,
Felipe Magazoni

Chris Lucas December 2, 2013 14:04

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 December 3, 2013 03:34

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

magazoni December 3, 2013 08:46

Chris,

It's working. Thank you very much.

Felipe Magazoni

gigilentini8 March 6, 2014 06:56

great Job Chris!!!
 
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?

Chris Lucas March 10, 2014 03:03

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

KypoHo May 2, 2014 11:57

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

Chris Lucas May 3, 2014 07:08

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

KypoHo May 3, 2014 10:54

Thank you, Christian. Seems to work.

Regards, Artem

Linse January 12, 2015 09:18

Comprehension question
 
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!

Chris Lucas January 24, 2015 04:46

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

ait April 17, 2016 17:23

Using mixtures for real gas Eos (Peng Robinson)
 
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!!!

Raghuveera July 8, 2016 16:54

Issue with installing Christian Lucas Real gas library
 
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

Chris Lucas July 13, 2016 04:11

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

Raghuveera July 21, 2016 23:42

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 July 24, 2016 15:01

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

Mhmnabil March 24, 2017 20:59

Using rhoPimpleFoam or buoyantPimpleFoam with your real gas EOS
 
Quote:

Originally Posted by Chris Lucas (Post 528853)
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?

Chris Lucas March 27, 2017 14:27

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 March 27, 2017 14:30

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 (Post 642528)
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 March 27, 2017 15:27

https://sourceforge.net/p/foam-exten...i/master/tree/


All times are GMT -4. The time now is 05:35.