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

How creating new thermo physical model

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

Like Tree1Likes
  • 1 Post By dpalko

Reply
 
LinkBack Thread Tools Display Modes
Old   September 5, 2007, 02: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, 06:05
Default Hi It seems that I'm having t
  #2
hkb
New Member
 
Henrik Bergersen
Join Date: Mar 2009
Posts: 17
Rep Power: 8
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, 06:15
Default hi all I also have the same
  #3
Member
 
Maxim Loginov
Join Date: Mar 2009
Posts: 33
Rep Power: 8
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, 06:19
Default http://www.cfd-online.com/Ope
  #4
Member
 
Maxim Loginov
Join Date: Mar 2009
Posts: 33
Rep Power: 8
zeliboba is on a distinguished road
thermophysicalModels.tar.bz2
zeliboba is offline   Reply With Quote

Old   September 12, 2008, 07:43
Default Hi Maxim, I looked at your
  #5
New Member
 
David Palko
Join Date: Mar 2009
Location: Stockholm
Posts: 17
Rep Power: 8
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, 09:19
Default hi David you are right actu
  #6
Member
 
Maxim Loginov
Join Date: Mar 2009
Posts: 33
Rep Power: 8
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
zeliboba is offline   Reply With Quote

Old   September 12, 2008, 10:27
Default Maxim, I run the case with
  #7
New Member
 
David Palko
Join Date: Mar 2009
Location: Stockholm
Posts: 17
Rep Power: 8
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
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: 8
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
mahaputra is offline   Reply With Quote

Old   June 15, 2009, 17:19
Default gas and liquid property
  #9
Member
 
amin
Join Date: May 2009
Posts: 59
Rep Power: 8
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, 06:56
Default Creating Peng-Robinson EOS
  #10
Member
 
Hamed Aghajani
Join Date: Mar 2009
Location: London, UK
Posts: 77
Rep Power: 8
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, 02:26
Default combustion with new liquid species Oxygen
  #11
New Member
 
Ramesh
Join Date: Aug 2009
Posts: 4
Rep Power: 7
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, 62 views)

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

Reply

Thread Tools
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 On
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 09:11
physical model with cfd Beno Main CFD Forum 0 August 30, 2004 06:06
non-physical production of k, k-w turbulence model David Garrido Main CFD Forum 9 September 17, 1999 15:47


All times are GMT -4. The time now is 03:40.