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

How creating new thermo physical model

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 1 Post By zeliboba
  • 1 Post By dpalko
  • 1 Post By zeliboba
  • 1 Post By dpalko
  • 1 Post By mahaputra

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 5, 2007, 03:45
Default Hi there! I am looking for
  #1
New Member
 
Stefan Weiland
Join Date: Mar 2009
Location: Germany
Posts: 2
Rep Power: 0
weiste01 is on a distinguished road
Hi there!

I am looking for some help with openFoam. In general I am aiming on the "big goal" of computing buoyancy driven flow of liquid and gaseous hydrogen in a closed container, which is subject to an external heat flux. Because I am quite new to openFoam I am expecting to encounter quite a number of obstacles.
The first problem for which I want to ask this time is about a way of modelling the thermodynamic properties of hydrogen. I already did some experiments with creating a new "equation of state" function, derived from the existing perfectGas-function. For testing I named it constDens because I wanted to model a constant density, just to check whether I get some sort of trivial solution (zero velovity) when I run the buoyantFoam solver. After I updated the entries in \src\thermophysicalModels\basic\basicThermo\basicT hermos.C by adding

makeBasicThermo
(
hThermo,
pureMixture,
constTransport,
hConstThermo,
constDens
);

and also adding a entry in the "files" in \src\thermophysicalModels\specie\Make I was quite happy that at least the compilation ran through without complications. My disenchantment came with running my test case with the buoyantFoam solver, which gave exactly the same results as if I ran it with the "old" perfectGas model, although I changed the line in \constant\thermophysicalProperties from
thermoType hThermo<puremixture<consttransport<speciethermo<hc onstthermo<perfectgas>>>>>; to
thermoType hThermo<puremixture<consttransport<speciethermo<hc onstthermo<constdens>>>>>;.

Alltogether I now have the impression that it is not quite clear to me how the properties are computed during running the solver. Therefore I would be grateful, if someone could give me some advice how to approach this problem. If someone knows &ndash; besides the user guide - some sort of documentation that explains the philosophy of including thermo physical models in the solution process I would be jumping to the ceiling (virtually, of course).

Another (more insignificant issue) is that the constDens model did not appear in the list of available models in the FoamX case manager. What do I have to do for including a new thermophysical model here?

Thanks in advance for your support!
Stefan
weiste01 is offline   Reply With Quote

Old   August 22, 2008, 07:05
Default Hi It seems that I'm having t
  #2
hkb
New Member
 
Henrik Bergersen
Join Date: Mar 2009
Posts: 17
Rep Power: 17
hkb is on a distinguished road
Hi
It seems that I'm having the same problem. I have added a new equation of state (I'm using rho=rho(T) to simulate liquid water) with new equations for rho and psi and updated basicThermos.C, but I still get the density that the perfectGas model would get. Did you ever manage to solve the problem (I note that this was almost a year ago).

Best Regards
Henrik
hkb is offline   Reply With Quote

Old   September 12, 2008, 07:15
Default hi all I also have the same
  #3
Member
 
Maxim Loginov
Join Date: Mar 2009
Posts: 33
Rep Power: 17
zeliboba is on a distinguished road
hi all

I also have the same problem... There is a package I created from perfect gas with dummy equation of state (simply constant density) for testing, I tried it on sonicTurbFoam/prism (density should vary significantly), but no difference is observed from perfect gas case. it seems to be everything correct, I'm pretty sure my EoS is chosen by solver etc.
can anybody explain in more details how to create new EoS? tutorial would be perfect, but working casw tarball is fine also.
zeliboba is offline   Reply With Quote

Old   September 12, 2008, 07:19
Default http://www.cfd-online.com/Ope
  #4
Member
 
Maxim Loginov
Join Date: Mar 2009
Posts: 33
Rep Power: 17
zeliboba is on a distinguished road
thermophysicalModels.tar.bz2
atulkjoy likes this.
zeliboba is offline   Reply With Quote

Old   September 12, 2008, 08:43
Default Hi Maxim, I looked at your
  #5
New Member
 
David Palko
Join Date: Mar 2009
Location: Stockholm
Posts: 17
Rep Power: 17
dpalko is on a distinguished road
Hi Maxim,

I looked at your package and everything looks fine there. I also tried to run sonicTurbFoam/prism case with perfectGas and your constantRho and the results are significantly different, so i assume the constantRho class works as it should.
Short description of what i did.
1. Unpacked your constantRho directory to specie/equationOfState.

2. i added the following lines into "specie/Make/files":
constantRho=equationOfState/constantRho
$(constantRho)/constantRho.C

3. Then i recompiled specie directory by:
> cd thermophysicalModels/specie
> wmake libso

4. I added the following to "basic/basicThermo/basicThermos.C"
#include "constantRho.H"
and later:
makeBasicThermo
(
hThermo,
pureMixture,
constTransport,
hConstThermo,
constantRho
);
5. I recompiled basicThermo by:
> cd thermophysicalModels/basic
> wmake libso

6. I recompiled solver (not sure if this is mandatory), by firstly rmdepall and then wmake

7. Then i just run the case prism with two different classes.

Please let me know if that helps.

Regards,

David
apple-tree likes this.
dpalko is offline   Reply With Quote

Old   September 12, 2008, 10:19
Default hi David you are right actu
  #6
Member
 
Maxim Loginov
Join Date: Mar 2009
Posts: 33
Rep Power: 17
zeliboba is on a distinguished road
hi David

you are right actually, I have mentioned problem with another EoS, I thought they behave similarly. The problem EoS attached, to use it you have to change in constant/thermophysicalProperties

thermoType hThermo<puremixture<consttransport<speciethermo<hc onstthermo<perfectgasconstantp>>>>>;
mixture air 1 28.9 100000 1300 2.544e+06 1.84e-05 0.7;

the pressure constant is added to "mixture" string, of course it would be much nicer to read from a subdictionary, but I did not manage to do it yet.

what is your approach?

specie.tar.bz2
atulkjoy likes this.
zeliboba is offline   Reply With Quote

Old   September 12, 2008, 11:27
Default Maxim, I run the case with
  #7
New Member
 
David Palko
Join Date: Mar 2009
Location: Stockholm
Posts: 17
Rep Power: 17
dpalko is on a distinguished road
Maxim,

I run the case with your library perfectGasConstP and i get exactly the same results as with the perfectGas class.
Then i realized that here you have the compressibility defined as 1/R()T, exactly the same as for an ideal gas. It is actually psi() what matters, not rho(). If you modify function psi(), you would definetely get different result. I tried to ask forum for the explanation in my other thread (the one about IAPWS properties implentation). I think that what OpenFoam does is that it returns the density defined by basicThermo class, in basicThermo.C line 204. Here it returns p_*psi(), which is the exact relation for an ideal gas.

Hope to hear from you soon,

David
atulkjoy likes this.
dpalko is offline   Reply With Quote

Old   March 3, 2009, 04:54
Default Dear All is there any the
  #8
Member
 
Nugroho Adi
Join Date: Mar 2009
Location: norway
Posts: 79
Rep Power: 17
mahaputra is on a distinguished road
Dear All


is there any thermophysical solver for CO2 available now?


or someone in here had developed CO2 thermophysical model?




thanks before
atulkjoy likes this.
mahaputra is offline   Reply With Quote

Old   June 15, 2009, 18:19
Default gas and liquid property
  #9
Member
 
amin
Join Date: May 2009
Posts: 62
Rep Power: 17
az1362f is on a distinguished road
hi to all

I want to use a diesel fuel with density of 840 kg/m3 and nitrogen (N2) as a chamber gas.
how can I set this two parameters?
I checked C7H16 files (.C & .H) but I don't know some parameters,for example rho_(61.38396836, 0.26211, 540.2, 0.28141),I checked html document but it does not describe these parameters:

NSRDSfunc5 (scalar a, scalar b, scalar c, scalar d)

any body can describe them and say how can I get the description of another input parameters like
pv_(87.829, -6996.4, -9.8802, 7.2099e-06, 2),
hl_(540.20, 499121.791545248, 0.38795, 0, 0, 0),
cp_(540.20, 6.11976102401216, 3137.69909384855, 182.274175063868, -254.530511150515),etc.

can I set chamber gas by changing N2 and O2 files in 0 directory in dieselfoam tutorial directory?
how can I describe a chamber gas with a defined properties like density viscosity,etc?

please help me
regard
az1362f is offline   Reply With Quote

Old   June 29, 2009, 07:56
Default Creating Peng-Robinson EOS
  #10
Member
 
Hamed Aghajani
Join Date: Mar 2009
Location: London, UK
Posts: 77
Rep Power: 17
haghajani is on a distinguished road
Dear All,

I want to implement Peng-Robinson EOS, and make use of it in carbon dioxide high pressure release.

Would you please let me have you advise on the how to derive it suitable for OF.

As I had a look into current perfect gas Eos, it seems the psi(rho/P) parameter is more important than rho. Because, later rho is been calculate by, rho = p_*psi

Please let me have your kind advise,

Best Hamed
haghajani is offline   Reply With Quote

Old   August 21, 2009, 03:26
Default combustion with new liquid species Oxygen
  #11
New Member
 
Ramesh
Join Date: Aug 2009
Posts: 4
Rep Power: 17
rameshbvb is on a distinguished road
Hello Friends,

I am Ramesh working on a cryogenic rocket simulation with gaseous Hydrogen fuel and liquid oxygen combustion. Since there is no oxygen implemented as liquid specie i added new specie liquid oxygen. And modified the NSRDS functions . which are attached. it is working well but the problem is the droplets are not evaporating. The liquid oxygen droplets are coming at 90K. but in paraview it is showing temp as 200K. i dont' where the problem is.

The files are attached

Can any body help me

Thanks in advance
Attached Files
File Type: gz O2.tar.gz (3.5 KB, 109 views)

Last edited by rameshbvb; August 22, 2009 at 02:06.
rameshbvb is offline   Reply With Quote

Old   May 8, 2020, 16:08
Default new thermophysical model
  #12
New Member
 
pranay
Join Date: Mar 2020
Posts: 7
Rep Power: 6
pranay347 is on a distinguished road
Quote:
Originally Posted by weiste01 View Post
Hi there!

I am looking for some help with openFoam. In general I am aiming on the "big goal" of computing buoyancy driven flow of liquid and gaseous hydrogen in a closed container, which is subject to an external heat flux. Because I am quite new to openFoam I am expecting to encounter quite a number of obstacles.
The first problem for which I want to ask this time is about a way of modelling the thermodynamic properties of hydrogen. I already did some experiments with creating a new "equation of state" function, derived from the existing perfectGas-function. For testing I named it constDens because I wanted to model a constant density, just to check whether I get some sort of trivial solution (zero velovity) when I run the buoyantFoam solver. After I updated the entries in \src\thermophysicalModels\basic\basicThermo\basicT hermos.C by adding

makeBasicThermo
(
hThermo,
pureMixture,
constTransport,
hConstThermo,
constDens
);

and also adding a entry in the "files" in \src\thermophysicalModels\specie\Make I was quite happy that at least the compilation ran through without complications. My disenchantment came with running my test case with the buoyantFoam solver, which gave exactly the same results as if I ran it with the "old" perfectGas model, although I changed the line in \constant\thermophysicalProperties from
thermoType hThermo<puremixture<consttransport<speciethermo<hc onstthermo<perfectgas>>>>>; to
thermoType hThermo<puremixture<consttransport<speciethermo<hc onstthermo<constdens>>>>>;.

Alltogether I now have the impression that it is not quite clear to me how the properties are computed during running the solver. Therefore I would be grateful, if someone could give me some advice how to approach this problem. If someone knows &ndash; besides the user guide - some sort of documentation that explains the philosophy of including thermo physical models in the solution process I would be jumping to the ceiling (virtually, of course).

Another (more insignificant issue) is that the constDens model did not appear in the list of available models in the FoamX case manager. What do I have to do for including a new thermophysical model here?

Thanks in advance for your support!
Stefan

Good morning everyone i am studying a CHT heat transfer problem with a air flowing above and below a solid with different temp conditions. i need to make a new thermophysicalModel such as thermoType { type heRhoThermo; mixture pureMixture; transport sutherland; thermo hPolynomial; equationOfState perfectGas; specie specie; energy sensibleEnthalpy; } this combination is not a standard one within openfoamV7(which i am using), so i need to make new one by compiling thermophysicalModel. i can able to compile it with the required changes in the thermophysicalModels files but when i run the simulation its giving the same error of "unknown rhoreaction thermo type" listing valid combinations. can anyone help me how to compile a new thermophysicalModels and use it in simulation step by step as i read cfd online issues and ghent professor lectures in youtube but couldn't solve the issue. thanks in advance( please answer if you this as i am searching from last 3 weeks about this)
pranay347 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Viscous resistance coefficient in physical v-model AL FLUENT 0 December 15, 2008 15:52
BuoyantFoam physical model juanduque OpenFOAM Running, Solving & CFD 4 September 7, 2006 10:11
physical model with cfd Beno Main CFD Forum 0 August 30, 2004 07:06
non-physical production of k, k-w turbulence model David Garrido Main CFD Forum 9 September 17, 1999 16:47


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