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 - Departure Functions (https://www.cfd-online.com/Forums/openfoam-programming-development/192992-real-gas-eos-departure-functions.html)

vegito87 September 15, 2017 01:20

Real Gas EOS - Departure Functions
 
Dear all,

I am implementing the real gas equation of state JWL into OpenFoam. According to the code structure of OF, the departure functions for enthalpy, entropy, Cp,... must be calculated. I used the formulas and followed the procedure for Peng Robinson EOS in the book "Introductory Chemical Engineering Thermodynamics" to compute the values in the JWL case. But the value for entropy departure function is infinity, so I think the formulas may not be general enough.

Could you please give me some guidance or relating theory and experience in computing the departure functions for real gas EOS ?

Thank you very much.

vegito87 September 18, 2017 04:34

Can anyone having experience in adding a new equation of state give me some advice ? I thought it is just easy as adding a new equation to calculate the pressure from density, temperature and other parameters, but it turns out in OF there are more things to do related to departure functions.

chriss85 September 19, 2017 13:27

I'm interested in this as well, but haven't looked much into it.
Given arbitrary functions rho(p,T), h(p,T), what needs to be done?

vegito87 September 19, 2017 22:11

Quote:

Originally Posted by chriss85 (Post 664932)
I'm interested in this as well, but haven't looked much into it.
Given arbitrary functions rho(p,T), h(p,T), what needs to be done?

Hi Chriss,

Thanks for your comment. What I am trying to do is to get the departure functions which required in the OF code structure for enthalpy h(p,T), entropy s(p,T), specific heat constant Cp(p,T),... from equation of state p = p(rho, T).

Actually, the eos JWL is in the form p = p (rho, e) with e is the specific internal energy, but for simplicity, I am working with its simplified form p = p (rho, T). So, I need to know more about the general formula which can be used to calculate the departure functions.

alimea May 12, 2019 09:58

Quote:

Originally Posted by vegito87 (Post 664966)
Hi Chriss,

Thanks for your comment. What I am trying to do is to get the departure functions which required in the OF code structure for enthalpy h(p,T), entropy s(p,T), specific heat constant Cp(p,T),... from equation of state p = p(rho, T).

Actually, the eos JWL is in the form p = p (rho, e) with e is the specific internal energy, but for simplicity, I am working with its simplified form p = p (rho, T). So, I need to know more about the general formula which can be used to calculate the departure functions.

Dear VinhNDX,

I want to do the same! (add JWL EOS). know I have the same problem:
I don't know how can I calculate h, s, cp, cpMcv, Z. could you please help me if you found the solution?

Do I have to change the "correct", "he", "pThermo", ... functions?

I'm really appreciate if you answer me.
Regards

vegito87 May 14, 2019 03:23

Quote:

Originally Posted by alimea (Post 733386)
Dear VinhNDX,

I want to do the same! (add JWL EOS). know I have the same problem:
I don't know how can I calculate h, s, cp, cpMcv, Z. could you please help me if you found the solution?

Do I have to change the "correct", "he", "pThermo", ... functions?

I'm really appreciate if you answer me.
Regards


Hi alimea,


At first, I have tried to develop the whole real gas model by deriving the departure functions for enthalpy, entropy,..., based on its formula. However, it is quite difficult for me. Therefore I decided to add JWL equation just for recalculating the pressure once we have solved for other parameters which also gave quite good results.


Regards,
Vinh

alimea May 14, 2019 03:27

Quote:

Originally Posted by vegito87 (Post 733541)
Hi alimea,


At first, I have tried to develop the whole real gas equation by deriving the departure functions for enthalpy, entropy,..., based on its formula. However, it is quite difficult for me. Therefore I decided to add JWL equation just for recalculating the pressure once we have solved for other parameters which also gave quite good results.


Regards,
Vinh

Dear Vinh,
Thanks for your reply.
How can I find the formula of departure functions for enthalpy, entropy,...?
can you introduce a web page, paper, etc?

I didn't get this sentence: "Therefore I decided to add JWL equation just for recalculating the pressure once we have solved for other parameters which also gave quite good results."


Regards,
Alimea

vegito87 May 14, 2019 03:42

Quote:

Originally Posted by alimea (Post 733543)
Dear Vinh,
Thanks for your reply.
How can I find the formula of departure functions for enthalpy, entropy,...?
can you introduce a web page, paper, etc?

I didn't get this sentence: "Therefore I decided to add JWL equation just for recalculating the pressure once we have solved for other parameters which also gave quite good results."


Regards,
Alimea


Hi Alimea,


The formula for departure functions could be found in some documents/books related to real gas model. They are the difference between perfect and real gas parameters. Please google it. Or you can read the implementation of other real gas models for reference in OF source code of Thermophysical Models, such as Peng-Robinson.


I modified OF solver by adding a seperate JWL equation for recalculating pressure after solving other parameters. The procedure is similar to "How to add temperature to icoFoam":


HTML Code:

https://openfoamwiki.net/index.php/How_to_add_temperature_to_icoFoam


My work was not good enough, so good luck for your work.


Regards,
Vinh

alimea May 14, 2019 03:44

Quote:

Originally Posted by vegito87 (Post 733546)
Hi Alimea,


The formula for departure functions could be found in some documents/books related to real gas model. They are the difference between perfect and real gas parameters. Please google it. Or you can read the implementation of other real gas models for reference in OF source code of Thermophysical Models, such as Peng-Robinson.


I modified OF solver by adding a seperate JWL equation for recalculating pressure after solving other parameters. The procedure is similar to "How to add temperature to icoFoam":


HTML Code:

https://openfoamwiki.net/index.php/How_to_add_temperature_to_icoFoam


My work was not good enough, so good luck for your work.


Regards,
Vinh


Ok, Thank you. :)

opedrofunk October 30, 2019 11:30

JWL implementation | blastFoam solver release
 
Hi,

Yes, we have just released a new solver (blastFoam) which includes the JWL equation of state (an extensions to model afterburn), as well as several other useful and interoperable equations of state (e.g. ideal gas, stiffened gas, tait, cochran-chan, van der waals, JWL), flux schemes (HLLC, AUSM+, Kurganov/Tadmor), and multiple examples/tutorial cases.

You can get the code/source here: https://github.com/synthetik-technologies/blastfoam

Hope this helps!
Peter Vonk
Synthetik Applied Technologies

alimea November 2, 2019 04:40

Quote:

Originally Posted by opedrofunk (Post 748466)
Hi,

Yes, we have just released a new solver (blastFoam) which includes the JWL equation of state (an extensions to model afterburn), as well as several other useful and interoperable equations of state (e.g. ideal gas, stiffened gas, tait, cochran-chan, van der waals, JWL), flux schemes (HLLC, AUSM+, Kurganov/Tadmor), and multiple examples/tutorial cases.

You can get the code/source here: https://github.com/synthetik-technologies/blastfoam

Hope this helps!
Peter Vonk
Synthetik Applied Technologies


Dear Peter,

Thank you for sharing your solver. I will compile it, and test it for my case, and give you a feedback.
It is mentioned that it works with OF v7. Can I compile it on OF V4 or V2.3.1?

regards,
Ali


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