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

Modifying density update in fireFoam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 22, 2011, 18:54
Default Modifying density update in fireFoam
  #1
Member
 
Join Date: Sep 2010
Posts: 31
Rep Power: 6
anfho is on a distinguished road
Hi All,
I am trying to substitute the density calcultaion that OpenFoam uses in fireFoam with my own density calculation model.

Since I am a newbie in OF and a newbie in C++ also, I haven't completely understood, how the functionalities and the dependencies are in OF-fireFoam. . For example, I am even confused what

rho = thermo.rho()

exactly means, what exactly happens there and where the thermo class is located at...

So my questions are:
(1) can the density calculation be easily swaped with a different model?
(2) where is the thermo class located?
(3) does anyone know how the density update works in OF? Is it based on the recursive beta PDF integration and where are the actual calculations happening?

Any help is greatly appreciated,
Andreas
anfho is offline   Reply With Quote

Old   February 28, 2011, 12:10
Default
  #2
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 198
Rep Power: 7
Chris Lucas is on a distinguished road
Hi,

rho = thermo.rho() returns the density field. Have a look at basicThermo.C, basicPsiThermo.C or basicRhoThermo.C

About (1), depends what you want to do. But most of the time, you have to rewrite the entire thermo library

About(2) src/thermophsyicalModels

About (3) have a look at the classes above.

Regards,
Christian

Last edited by Chris Lucas; March 3, 2011 at 13:24.
Chris Lucas is offline   Reply With Quote

Old   March 19, 2011, 20:48
Default
  #3
Member
 
Join Date: Sep 2010
Posts: 31
Rep Power: 6
anfho is on a distinguished road
Hallo Christian,
I am still puzzled how the density update works for the case of the fireFoam solver. The presentation attached states that the density calculation is based on the recursive beta integration in fireFoam. So far, I have not been able to locate where this is happening. When I start from the main file of the fireFoam solver (fireFoam.C), I find that:
Code:
00087         rho = thermo.rho();
And I will end up looking at “basicPsiThermo.H”, which defines the “thermo” class called in “fireFoam.C”. In the lines 98-101, I find that:
Code:
00097             //- Density [kg/m^3] - uses current value of pressure
00098             virtual tmp<volScalarField> rho() const
00099             {
00100                 return p_*psi();
00101             }
Where both, p_ and psi() are of type volScalarField. I am wondering now: Where does p_ and psi() get their values from, how does the type volSclarField work and what is the difference between rho_, rho(); p_, p(); psi_, psi(). Another question I have would be: How is this rho passed on to the governing equations (ft-, fuhs-, p-, U-Eqns.) of the solver?
I would really appreciate if you could give me some hints on how to understand the density update process.
Gruß, Andreas
Attached Files
File Type: pdf IntroductionToFireFOAM_sm.pdf (93.5 KB, 33 views)
anfho is offline   Reply With Quote

Old   March 22, 2011, 04:02
Default
  #4
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 198
Rep Power: 7
Chris Lucas is on a distinguished road
Hi,

p_ -> from the solver. In the solver, the p field is a pointer,

psi-> equation of state.

Regards,
Christian
Chris Lucas 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
Density based solver with cnst density! p_agoodboy FLUENT 0 November 8, 2010 23:18
REAL GAS UDF brian FLUENT 6 September 11, 2006 08:23
Warning 097- AB CD-adapco 6 November 15, 2004 05:41
variable density water Atit Koonsrisuk CFX 2 July 24, 2003 03:07
density update by UDF in non-premixed combustion IKSOO FLUENT 2 December 8, 2002 21:37


All times are GMT -4. The time now is 22:21.