|
[Sponsors] |
Modify rhoCentralFoam: other equations of state |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 16, 2015, 16:31 |
Modify rhoCentralFoam: other equations of state
|
#1 |
Senior Member
Phoevos
Join Date: Mar 2009
Posts: 104
Rep Power: 17 |
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. |
|
May 3, 2017, 16:01 |
|
#2 |
Member
Alex Jarosch
Join Date: Dec 2015
Location: Austria
Posts: 33
Rep Power: 11 |
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 |
|
May 3, 2017, 19:02 |
|
#3 |
Senior Member
Phoevos
Join Date: Mar 2009
Posts: 104
Rep Power: 17 |
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. |
|
May 4, 2017, 03:46 |
|
#4 |
Member
Alex Jarosch
Join Date: Dec 2015
Location: Austria
Posts: 33
Rep Power: 11 |
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 |
|
July 24, 2020, 04:24 |
|
#5 |
New Member
wangkuiming
Join Date: Jul 2020
Posts: 2
Rep Power: 0 |
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 |
|
July 29, 2020, 14:17 |
|
#6 |
Senior Member
|
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. |
|
|
|
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 12: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 04:19 |
how to implement k-epsilon equations in ADI method | kiamey | Main CFD Forum | 2 | July 17, 2014 18:13 |
error message | cuteapathy | CFX | 14 | March 20, 2012 07:45 |
Navier-Stokes equations in compressible flow | GACEM Hatem | Phoenics | 1 | June 3, 2001 06:30 |
good equations of thermal property of CO2 under near- or super- critical state | H.Zhang | Main CFD Forum | 0 | December 2, 1998 16:43 |