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

Modify rhoCentralFoam: other equations of state

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By wkm19920807

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 16, 2015, 15:31
Default Modify rhoCentralFoam: other equations of state
  #1
Senior Member
 
Phoevos
Join Date: Mar 2009
Posts: 104
Rep Power: 17
fivos is on a distinguished road
Hi to everyone,

I am planning to use rhoCentralFoam for simulating both highly and weakly compressible flows, because I need an explicit density based solver (pressure based solvers are not an option because they are not likely to work with the density variations I am planning to..). The simulations I will have to do involve equations of state that are not supported by the vanilla rhoCentralFoam solver. For example rhoCentralFoam only allows psiThermo type and more specifically the ideal gas (named as perfectGas) and the Peng Robinson EOS.

I will need to simulate equation of state of the form of p=C*rho^g (isentropic gas), p=B*((rho/rho0)^g-1) (Tait EOS - there is something similar in openFoam named adiabaticPerfectFluid, but does not run with rhoCentralFoam since it is not a valid psiThermo type) and combinations of both, for compressible cavitating flows.

So, the main question is: Has anyone tried to modify the rhoCentralFoam along with the psiThermo types in order to introduce additional EOS, apart from the standard perfectGas and Peng Robinson? Any guidance on that?

I have some background on compressible methods, so I know how rhoCentralFoam works. However, my C++ is not very good and the way the code is structured does not help me understand where should I begin modifying.

For the beginning, the EOS I am planning to use does not involve temperature/internal energy, so I am thinking of discarding the energy equation (the rhoE stuff) - this is somewhat straightforward. Beyond that, I am a little bit puzzled whether it is better to discard the psiThermo type and implement my own hardwired in the new code variant, or add an additional EOS (how?) in psiThermo..

Any thoughts/comments are welcome.
Thanks in advance

P.S. If anyone is willing to cooperate for such a development, he/she is welcome.
fivos is offline   Reply With Quote

Old   May 3, 2017, 15:01
Default
  #2
Member
 
Alex Jarosch
Join Date: Dec 2015
Location: Austria
Posts: 32
Rep Power: 10
alexj is on a distinguished road
Hi Phoevos,I just started to think about adding the Tait EOS to rhoPimpleFoam and found your thread on this. Did you make progress on adding the Tait EOS to rhoCentralFoam?

Any starting help would be highly appreciated.

Thanks in advance,
Alex
alexj is offline   Reply With Quote

Old   May 3, 2017, 18:02
Default
  #3
Senior Member
 
Phoevos
Join Date: Mar 2009
Posts: 104
Rep Power: 17
fivos is on a distinguished road
Dear Alex,

Your question is a bit self-conflicting.. are you interested in rhoCentralFoam or rhoPimpleFoam?

If you want a pressure based solver, then you already have the adiabaticPerfectFluid class, which can work with several pressure-based solvers of OpenFOAM (e.g. compressibleInterFoam).

For rhoCentralFoam, it is impossible as the code is structured.. A colleague of mine and me have modified heavily rhoCentralFoam (basically, totally discarded all existing thermodynamic libraries and implemented our own) to work with arbitrary compressible fluids but it is still under development/testing, so I cannot share anything as of now..

Good luck.
fivos is offline   Reply With Quote

Old   May 4, 2017, 02:46
Default
  #4
Member
 
Alex Jarosch
Join Date: Dec 2015
Location: Austria
Posts: 32
Rep Power: 10
alexj is on a distinguished road
Dear Phoevos,

thanks for the fast reply. Yes I was somewhat unclear if I want rhoCentralFoam or rhoPimpleFoam. My plan was to use both at some point during my project, however I thought that for my initial setup rhoPimpleFoam should be sufficient.

Anyhow, thanks for pointing me to the adiabaticPerfectFluid class and compressibleInterFoam. I plan to work with a single fluid for most applications, but I guess one can run compressibleInterFoam also with just one fluid.

Good to know that rhoCentralFoam in its current form can not be modified, that saves me a lot of time figuring that out by myself.

Good luck with your development of a modified rhoCentralFoam.

Best regards,
Alex
alexj is offline   Reply With Quote

Old   July 24, 2020, 03:24
Default
  #5
New Member
 
wangkuiming
Join Date: Jul 2020
Posts: 2
Rep Power: 0
wkm19920807 is on a distinguished road
Dear Phoevos,
I just started to think about adding other equations of state to rhoCentralFoam and to simulate the compressibility of liquid working fluids.But I found the rhoCentralFoam only allows psiThermo type and more specifically the ideal gas (named as perfectGas) and the Peng Robinson EOS and found your thread on this. Did you make progress on adding the other to rhoCentralFoam?

Any starting help would be highly appreciated.

Thanks in advance,
Kuiming Wang
dlahaye likes this.
wkm19920807 is offline   Reply With Quote

Old   July 29, 2020, 13:17
Default
  #6
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 723
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
Greetings,

1/ Possibly this helps: https://wiki.openfoam.com/Thermodyna...abelle_Choquet

2/ How about renaming this existing implementation to something new, check whether it compiles and runs, and starting making modifications in this new copy? Possibly too naive, but can the refined with new insight.

D.
dlahaye 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


LinkBacks (?)
LinkBack to this Thread: https://www.cfd-online.com/Forums/openfoam-programming-development/147272-modify-rhocentralfoam-other-equations-state.html
Posted By For Type Date
Modify rhoCentralFoam: other equations of state This thread Refback April 24, 2015 11:35

Similar Threads
Thread Thread Starter Forum Replies Last Post
Guide: Writing Equations in LaTeX on the CFD Online Forums pete Site Help, Feedback & Discussions 27 May 19, 2022 03:19
how to implement k-epsilon equations in ADI method kiamey Main CFD Forum 2 July 17, 2014 17:13
error message cuteapathy CFX 14 March 20, 2012 06:45
Navier-Stokes equations in compressible flow GACEM Hatem Phoenics 1 June 3, 2001 05:30
good equations of thermal property of CO2 under near- or super- critical state H.Zhang Main CFD Forum 0 December 2, 1998 15:43


All times are GMT -4. The time now is 15:54.