|
[Sponsors] |
Difference between psiThermo and rhoThermo. |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 15, 2014, 09:20 |
Difference between psiThermo and rhoThermo.
|
#1 |
Senior Member
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13 |
Hello,everyone,
Greetings OF2.3.1 has been released:http://www.openfoam.org/download/ubuntu.php Enjoy it! Now i'm confused with this two classes psiThermo and rhoThermo. As far as I know, the difference them the difference to get the density, the first one using psi*p while the latter use the equation of state(many different methods in ../specie/equationOfState). But I want to know where they are be used? That's means in which situation we should use psiThermo and ortherwise we should use rhoThermo. I'm confused with these two class because i think both of them are used in situation where the compressity should be considered. Thank you in advance! regards, wenxu |
|
December 16, 2014, 02:49 |
|
#2 |
Senior Member
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13 |
Still no one help me ? I still have no idea about this please give me some hints if are seeing this post, thank you very much!
|
|
December 16, 2014, 09:27 |
|
#3 |
Senior Member
Join Date: Oct 2013
Posts: 397
Rep Power: 19 |
I think psiThermo is mostly used for compressible fluids, while rhoThermo is made for solids/incompressible fluids? I may be wrong though...
|
|
January 7, 2015, 04:02 |
psiThermo rho = p*psi
|
#5 |
Senior Member
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18 |
Hi Folks
Here is what Doxygen says: Code:
Foam::rhoThermo Basic thermodynamic properties based on density Foam::psiThermo Basic thermodynamic properties based on compressibility This is definitely not all the whole story of both thermo models but I might be a starting point. Cheers Fabian |
|
January 7, 2015, 04:23 |
|
#6 |
Senior Member
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13 |
Thank you, Fabian,
From the source code, i could find that the explicit difference between them are described as you told. But i really want to know the implicit points behind that. Such as what the difference between them when we use them to implement combustion models? regards, shawn |
|
January 7, 2015, 11:05 |
|
#7 |
Senior Member
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18 |
No guaranty but I'd say that the choice of the model depends on your application. Buoyant solvers, manly changing their density due to temperature changes, use the rhoThermo model. They use a simplified pressure equation where psi is accounted for explicitly:
Code:
fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh)) + fvc::div(phiHbyA) - fvm::laplacian(rAUf, p_rgh) == fvOptions(psi, p_rgh, rho.name()) In contrast, some combustion solvers and trans sonic solvers use the psiThermo model. They have another pressure equation where the change in time of pressure is treated implicit by ddt(psi, p): Code:
fvm::ddt(psi, p) + fvc::div(phiHbyA) - fvm::laplacian(rhorAUf, p) == fvOptions(psi, p, rho.name()) So the comment of chriss85 #3 is not entirely wrong. But still no guaranty that all my statements are correct. Cheers Fabian |
|
January 7, 2015, 12:14 |
|
#8 |
Senior Member
Join Date: Oct 2013
Posts: 397
Rep Power: 19 |
Thanks for the clarification. Do you think that the choise of explicit vs. implicit ddt term has anything to do with the choice of the thermo model? Or is the explicit formulation only used here because it is required due to the formulation, as the argument of implicit terms needs to be the variable which is solved with the equation?
|
|
January 7, 2015, 21:09 |
|
#9 | |
Senior Member
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13 |
Thank you,Fabian and chriss85.
But the true thing is that rhoThermo can also be used in the transonic situation, e.g reactionFoam/pEqn.H: Quote:
regards, wenxu |
||
January 8, 2015, 04:30 |
|
#10 |
Senior Member
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18 |
That's what I meant when I said that chriss85 #3 is not entirely wrong. One should use rhoThermo for fluids with low compressibility like water where the density change is mostly due to temperature variation. The psiThermo model should be used for gas.
Thank you both for the nice discussion Cheers Fabian Last edited by fabian_roesler; January 8, 2015 at 06:10. |
|
December 20, 2018, 10:53 |
|
#11 |
Senior Member
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 8 |
I am confused about rho = thermo.rho(). What's its function? Update the rho? If there exists rhoEqn.H, does it also update rho? Which is the latest?
Different solvers based on rhoThermo or psiThermo (like buoyantPimpleFoam or rhoSimpleFoam). They all include rho = thermo.rho(). does it have the same effect in both solvers? |
|
January 2, 2019, 04:26 |
|
#12 |
Senior Member
Join Date: Oct 2013
Posts: 397
Rep Power: 19 |
thermo.rho() returns a stored rho field that is calculated from pressure and temperature fields according to the selected thermophysical model in thermo.correct().
|
|
June 4, 2020, 05:20 |
|
#13 |
Senior Member
Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 10 |
I know this is a very old post, but it is about the very thing I want to know, so I'll post my thoughts here and hopefully more experienced people can shed some lights on it.
First, I think the term "compressible" has to be defined carefully here. (I don't have experience on supersonic flows or high Ma flows, so what I have in mind may be wrong) Compressible flows, or "fully" compressible flows, suggest that the density should change with respect to pressure (and temperature, mixture componenets, etc.). However, in many heat transfer and combustion problems, the density mainly changes with temperature and mixture components, but not with pressure. It is still a compressible flow in the sense that the density does vary(and sometimes it varies a lot, one or two orders of magnitude difference), but not so in the sense that the density does NOT vary with pressure changes. To deal with the latter case people have developed the so-called low Mach number formulation to solve the whole system of equations. With the above being said, I have a feeling that the psiThermo and rhoThermo classes are created mainly to differentiate the "fully" compressible solvers and the low Mach number ones, although I'm not so sure if there are existing solvers that indeed use the low Mach number formulation. What do you guys think? Also, in rhoThermo both rho and psi is from the equation of state and p is calculated, doesn't this overconstrain the system? If rho = psi*p, then we only need to know two of the three. Maybe in rhoThermo rho is not psi*p anymore? But then it would mean that the pressure equation should have different forms for different EOSs right? Last edited by cryabroad; June 4, 2020 at 05:28. Reason: Adding another question |
|
June 19, 2020, 11:05 |
|
#14 | |
Member
alexander thierfelder
Join Date: Dec 2019
Posts: 71
Rep Power: 7 |
Quote:
Hey I am currently also researching this topic. I think you are right with your first suggestion. I mean we distinguish between compressible flows and incompressible flows when there is a reasonable change in density or not. Never the less gases are always compressible, that has nothing to do with the flow. For example in radiators without fan, like in the room heaters that work with natural convection, the difference in density is mainly a result of the temperature change. On the other hand there are flows with "high" velocity, like air in a wind tunnel where also density changes occur without a big temperature difference. In both cases the air is itself is compressible, it is a material property. Then if you have again an air flow at low speed and without heating, like a slow moving object (maybe walking human? , Im bad in examples ), you have nearly no density changes, but still the gas is compressible. I would suggest following settings: first example : compressible solver like rhoPimpleFoam, with heRhoThermo second example : compressible solver like rhoPimpleFoam, with hePsiThermo third example : incompressible solver like pimpleFoam If you on the other hand want to simulate a heat exchanger with a liquid as a medium, where you expect a mayor impact on the density due to temperature, I would also use a compressible solver because it solves the energy equation in the NSE and also handles the influence on the viscosity and so on via thermo class. I would again choose: compressible solver like rhoPimpleFoam, with heRhoThermo What do you think? That does not cover the real backround why the different thermo types are more accurate/stable/faster/...( or even choosable for solvers) maybe someone has more knowledge about that. |
||
September 21, 2020, 23:51 |
|
#15 |
Senior Member
Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 10 |
It has been a while since my last post, time has wings!
Starting from OF-5, we can use all thermo types (psiThermo or rhoThermo) in rhoPimpleFoam, but in buoyantPimpleFoam still just rhoThermo is used. I think this shows that for rhoPimpleFoam, which is a general compressible solver, the thermo type doesn't make huge differences. I haven't tested this though, just a quick thought based on the code. As for rhoThermo, I may find the correct answer. psi is NOT rho/p, but the partial derivative of rho w.r.t. p under constant temperature. However, in psiThermo, rho = psi*p, which is hard-coded. I wonder if this means that rhoPimpleFoam, when used with psiThermo, should only be used for perfect gas, because this is when the the partial derivative of rho w.r.t. p equals 1/RT, and 1/RT*p gives us the density. |
|
September 22, 2020, 06:37 |
|
#16 | |
Member
alexander thierfelder
Join Date: Dec 2019
Posts: 71
Rep Power: 7 |
Quote:
psiThermo can especcialy be used when you do expect a difference to ideal gas behaviour. You can use it with pengRobinson for example. Then a compressibility factor Z is calculated in the backgrund by the acentric factor and critical values. Z gives with the specific Gas constant R and the temperature T the compressibility psi. psi= 1/(Z*R*T) rho = psi*p my thermofile looked like this: Code:
thermoType { type hePsiThermo; mixture pureMixture; transport polynomial; thermo hPolynomial; equationOfState PengRobinsonGas; specie specie; energy sensibleEnthalpy; } mixture { specie//AirValues { molWeight 28.9; } thermodynamics { Hf 0; Sf 0; CpCoeffs<8> ( 1029.48769276813 -0.259754651949017 0.000720524392649807 -4.32731178093884e-7 8.18443559767102e-11 0 0 0); // [J/kg/K] } transport { muCoeffs<8> ( 6.33240897464201e-6 4.34314235629553e-8 -7.67992288001185e-12 0 0 0 0 0 ); //- Dynamic viscosity [kg/m/s] kappaCoeffs<8> ( 0.00422477982917543 7.58163166906076e-5 -1.29122249700985e-8 0 0 0 0 0 ); //- Thermal conductivity [W/m/K] } equationOfState { Tc 132.5; //- Critical Temperature [K] Vc 8.45251377759746E-2; //- Critical volume [m^3/kmol] Pc 3.7860E6;//- Critical Pressure [Pa] omega 0.036;//- Acentric factor [-] http://www.coolprop.org/fluid_properties/fluids/Air.html blended from oxygen and nitrogen } } |
||
September 22, 2020, 10:49 |
|
#17 |
Senior Member
Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 10 |
PengRobinsonGas is a speical one, because you can still get density from psi times p. What confuses me is when other EOS is used, e.g., perfectFluid, where rho = rho0+p/(RT), psi is equal to 1/(RT). One can browse all other types, whose source code is at /src/thermophysicalModels/specie/equationOfState. It is clear that psi is indeed the partial derivative of rho w.r.t. p under constant temperature. But from rhoPimpleFoam, psi is rho/p. Any thoughts?
|
|
September 22, 2020, 12:10 |
|
#18 | |
Member
alexander thierfelder
Join Date: Dec 2019
Posts: 71
Rep Power: 7 |
Quote:
ah yes you are indeed right, but OF developers thought of that. Try to use anything other than PR or IG. It is not implemented / allowed. Those are all implemented variations for use of hePsiThermo: Code:
type mixture transport thermo equationOfState specie energy hePsiThermo homogeneousMixture const hConst perfectGas specie sensibleEnthalpy hePsiThermo homogeneousMixture sutherland hConst perfectGas specie sensibleEnthalpy hePsiThermo homogeneousMixture sutherland janaf perfectGas specie sensibleEnthalpy hePsiThermo inhomogeneousMixture const hConst perfectGas specie sensibleEnthalpy hePsiThermo inhomogeneousMixture sutherland hConst perfectGas specie sensibleEnthalpy hePsiThermo inhomogeneousMixture sutherland janaf perfectGas specie sensibleEnthalpy hePsiThermo multiComponentMixture const eConst perfectGas specie sensibleInternalEnergy hePsiThermo multiComponentMixture const hConst perfectGas specie sensibleEnthalpy hePsiThermo multiComponentMixture sutherland janaf perfectGas specie sensibleEnthalpy hePsiThermo multiComponentMixture sutherland janaf perfectGas specie sensibleInternalEnergy hePsiThermo pureMixture const eConst perfectGas specie sensibleInternalEnergy hePsiThermo pureMixture const hConst perfectGas specie sensibleEnthalpy hePsiThermo pureMixture const hConst perfectGas specie sensibleInternalEnergy hePsiThermo pureMixture polynomial hPolynomial PengRobinsonGas specie sensibleEnthalpy hePsiThermo pureMixture polynomial janaf PengRobinsonGas specie sensibleEnthalpy hePsiThermo pureMixture sutherland eConst perfectGas specie sensibleInternalEnergy hePsiThermo pureMixture sutherland hConst PengRobinsonGas specie sensibleEnthalpy hePsiThermo pureMixture sutherland hConst perfectGas specie sensibleEnthalpy hePsiThermo pureMixture sutherland hConst perfectGas specie sensibleInternalEnergy hePsiThermo pureMixture sutherland janaf PengRobinsonGas specie sensibleEnthalpy hePsiThermo pureMixture sutherland janaf PengRobinsonGas specie sensibleInternalEnergy hePsiThermo pureMixture sutherland janaf perfectGas specie sensibleEnthalpy hePsiThermo pureMixture sutherland janaf perfectGas specie sensibleInternalEnergy hePsiThermo reactingMixture const eConst perfectGas specie sensibleInternalEnergy hePsiThermo reactingMixture const hConst perfectGas specie sensibleEnthalpy hePsiThermo reactingMixture sutherland janaf perfectGas specie sensibleEnthalpy hePsiThermo reactingMixture sutherland janaf perfectGas specie sensibleInternalEnergy hePsiThermo singleStepReactingMixture sutherland janaf perfectGas specie sensibleEnthalpy hePsiThermo singleStepReactingMixture sutherland janaf perfectGas specie sensibleInternalEnergy hePsiThermo veryInhomogeneousMixture const hConst perfectGas specie sensibleEnthalpy hePsiThermo veryInhomogeneousMixture sutherland hConst perfectGas specie sensibleEnthalpy hePsiThermo veryInhomogeneousMixture sutherland janaf perfectGas specie sensibleEnthalpy |
||
September 22, 2020, 12:14 |
|
#19 |
Member
alexander thierfelder
Join Date: Dec 2019
Posts: 71
Rep Power: 7 |
we should do some comparison simulations between rhoThermo and psiThermo to see if there are major differences in the results. Maybe a tutorial case with following different settings:
heRhoThermo pureMixture polynomial hPolynomial PengRobinsonGas specie sensibleEnthalpy heRhoThermo pureMixture sutherland hConst perfectGas specie sensibleEnthalpy hePsiThermo pureMixture polynomial hPolynomial PengRobinsonGas specie sensibleEnthalpy hePsiThermo pureMixture sutherland hConst perfectGas specie sensibleEnthalpy |
|
September 14, 2021, 11:17 |
|
#20 | |
Member
UOCFD
Join Date: Oct 2020
Posts: 40
Rep Power: 6 |
Quote:
Nice explanations, thanks. However, why is not PengRobinson compatible with the multicomponentMixture?? EOS coefficients for each specie can be easily found |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
using psiThermo instead of rhoThermo | skuznet | OpenFOAM Pre-Processing | 0 | January 21, 2014 11:51 |