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

Real Gas EOS - Departure Functions

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

Like Tree1Likes
  • 1 Post By vegito87

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 15, 2017, 02:20
Default Real Gas EOS - Departure Functions
  #1
New Member
 
VinhNDX
Join Date: Jul 2017
Posts: 5
Rep Power: 9
vegito87 is on a distinguished road
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.

Last edited by vegito87; September 15, 2017 at 04:10.
vegito87 is offline   Reply With Quote

Old   September 18, 2017, 05:34
Default
  #2
New Member
 
VinhNDX
Join Date: Jul 2017
Posts: 5
Rep Power: 9
vegito87 is on a distinguished road
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.
vegito87 is offline   Reply With Quote

Old   September 19, 2017, 14:27
Default
  #3
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 19
chriss85 will become famous soon enough
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?
chriss85 is offline   Reply With Quote

Old   September 19, 2017, 23:11
Default
  #4
New Member
 
VinhNDX
Join Date: Jul 2017
Posts: 5
Rep Power: 9
vegito87 is on a distinguished road
Quote:
Originally Posted by chriss85 View Post
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.
vegito87 is offline   Reply With Quote

Old   May 12, 2019, 10:58
Default
  #5
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by vegito87 View Post
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
alimea is offline   Reply With Quote

Old   May 14, 2019, 04:23
Default
  #6
New Member
 
VinhNDX
Join Date: Jul 2017
Posts: 5
Rep Power: 9
vegito87 is on a distinguished road
Quote:
Originally Posted by alimea View Post
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
vegito87 is offline   Reply With Quote

Old   May 14, 2019, 04:27
Default
  #7
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by vegito87 View Post
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
alimea is offline   Reply With Quote

Old   May 14, 2019, 04:42
Default
  #8
New Member
 
VinhNDX
Join Date: Jul 2017
Posts: 5
Rep Power: 9
vegito87 is on a distinguished road
Quote:
Originally Posted by alimea View Post
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 likes this.
vegito87 is offline   Reply With Quote

Old   May 14, 2019, 04:44
Smile
  #9
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by vegito87 View Post
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.
alimea is offline   Reply With Quote

Old   October 30, 2019, 12:30
Default JWL implementation | blastFoam solver release
  #10
Member
 
Peter
Join Date: Feb 2015
Location: New York
Posts: 73
Rep Power: 11
opedrofunk is on a distinguished road
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
opedrofunk is offline   Reply With Quote

Old   November 2, 2019, 05:40
Default
  #11
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by opedrofunk View Post
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
alimea is offline   Reply With Quote

Reply

Tags
jwl, real gas model

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Supersonic real gas flows David Christopher FLUENT 2 September 5, 2023 08:28
Real Gas EOS francesco_capuano OpenFOAM Programming & Development 61 December 24, 2017 17:54
help me check udf tranvantrung551987 Fluent UDF and Scheme Programming 0 August 23, 2013 06:55
defining a term for a domain using DEFINE_ADJUST MASOUD Fluent UDF and Scheme Programming 1 September 24, 2010 06:08
about the real gas in Numeca redboy Fidelity CFD 2 March 4, 2003 08:57


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