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

OpenFoam vs CFX5 mass balance in OpenFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 6, 2006, 10:46
Default Try inserting p.oldTime() in "
  #21
Member
 
E. David Huckaby
Join Date: Mar 2009
Posts: 57
Rep Power: 17
david_h is on a distinguished road
Try inserting p.oldTime() in "createFields.H" after p is created. This statement exists in rhopSonicFoam but not in sonicTurbFoam. If the previous values of p are not being stored, then the DpDt field would not be calculated correctly. Setting dp/dt = 0 in the energy equation would seem to be consistent with your analysis of the temperature rise.
david_h is offline   Reply With Quote

Old   September 7, 2006, 03:38
Default If there is a bug here please
  #22
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
If there is a bug here please report it in the bug-reports section.

Thanks.
mattijs is offline   Reply With Quote

Old   September 7, 2006, 05:24
Default This is not a bug - it is done
  #23
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
This is not a bug - it is done quite deliberately. The trick allows you to treat grad k together with grad p in the momentum equation. Typically k will be very small compared to p and no damage done; if you wish to be very precise, you can take it out of the pressure after the solution.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   September 7, 2006, 07:27
Default Now, we have inserted p.oldTim
  #24
Member
 
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 17
tangd is on a distinguished road
Now, we have inserted p.oldTime() in "createFields.H". And in fact, we can see small changes in the spatial pressure and temperature distribution. But unfortunately, the mean vales of temperature and pressure remain nearly the same as before and are still clearly below the values of CFX5. Some other proposals? Thanks!
tangd is offline   Reply With Quote

Old   September 7, 2006, 09:07
Default I noticed that you have a shar
  #25
Member
 
E. David Huckaby
Join Date: Mar 2009
Posts: 57
Rep Power: 17
david_h is on a distinguished road
I noticed that you have a sharp temperature gradient at the inlet. You might try running the simulation with a longer inlet pipe to prevent diffusive (turbulent and conductive) heat losses at the inlet boundary. This might make of the 1K difference.
david_h is offline   Reply With Quote

Old   September 7, 2006, 09:26
Default Aha, good idea :-) In foam, y
  #26
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Aha, good idea :-) In foam, you will have temperature diffusion back through the inlet in case you specify a fixed value of T. Thus, the energy you put into the system is not equal to inlet flux times cp time T at the inlet.

In other codes I know, people usually kill the back diffusion through the inlet by setting boundary heat conductivity to zero at the inlet patch. I would say this is "wrong" because pysically people do not actually think of specifying the inlet temperature as a place-holder for the energy intake (flux), which is a slightly different animal.

This is in line what Dave says - thanks.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   September 7, 2006, 09:32
Default We have, of course, analysed t
  #27
Member
 
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 17
tangd is on a distinguished road
We have, of course, analysed the "near field" of the inlet and compared it with CFX5. There are hardly some differences of temperature, pressure and velocity at inlet. Thus, we tend to assume that the error does not come from the inlet. Additionally, we have also tested the model without turbulence (by setting "turbulence off" in turbulenceProperties), but the difference of mean values was nearly the same.
tangd is offline   Reply With Quote

Old   September 7, 2006, 10:14
Default Hrv we wrote our latest ans
  #28
Member
 
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 17
tangd is on a distinguished road
Hrv

we wrote our latest answer before we saw your answer.

What do you think about checking your opinion by using the enthalpy equation

solve
(
fvm::ddt(rho, h)
+ fvm::div(phi, h)
==
DpDt
);


Thus, we have no diffusion effects at all, also no back diffusion through the inlet.
tangd is offline   Reply With Quote

Old   September 8, 2006, 02:44
Default Meanwhile we have tested the e
  #29
Member
 
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 17
tangd is on a distinguished road
Meanwhile we have tested the enthalpy equation without diffusion. However, the changes in mean temperature and pressure are tiny. Thus, thermal diffusion may be negligible. Some other ideas? Thanks!
tangd is offline   Reply With Quote

Old   September 27, 2006, 05:21
Default Here are some new results. Now
  #30
Member
 
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 17
tangd is on a distinguished road
Here are some new results. Now, we have chosen the same model as before, but
with larger inlet temperature and mass flow (please reference to the first post).
The result of mass flow rate at inlet from OpenFOAM matches that of CFX5
very well, so does the enthalpy flux at inlet (it includes the kinetic part).
So we can say there is apparently no problem at inlet. However, the mean
temperature and mean pressure differences between OpenFOAM and CFX5 are getting
much larger compared to previous simulation. Additionally, we have shown a pressure
result based on an analytical uniform pressure model. It agrees with CFX5, but not
with OpenFoam.

We have also calculated a case with an inlet total temperature of 298 K. Here, we
get after 20ms a mean temperature value of 220 K in the volume (at 20ms the overall
kinetic enthalpy in the system is too small in order to explain the low temperture).
This makes no sense.

Does someone have any ideas?


tangd is offline   Reply With Quote

Old   September 29, 2006, 06:53
Default I thought you had already pinp
  #31
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
I thought you had already pinpointed the problem with your analysis 14 posts ago.

If the CFX results exactly match analytical results and OpenFOAM matches the same analysis minus the gamma term, then there is obviously something missing/wrong in the thermo model you are using. (Either that or both you and CFX made the same derivation error, something I think highly unlikely.)

You have to start combing through the enthalpy solver code and digging into the thermo library to compare the constituent models and governing equations.

Validations like these are exceedingly important, so please keep at it. I'm sure lots of people will be willing to help you track down the source of this problem. For instance, if you need to know where to find the code for a particular model, just ask.
eugene is offline   Reply With Quote

Old   September 29, 2006, 09:09
Default Along these lines, it would al
  #32
Member
 
E. David Huckaby
Join Date: Mar 2009
Posts: 57
Rep Power: 17
david_h is on a distinguished road
Along these lines, it would also help if you could post the model(OpenFOAM files) or a more detailed schematic of the flow system you are simulating. If neither of these is possible, would you be able to post one of the above for a simpler flow system which has similar behavior.
david_h is offline   Reply With Quote

Old   September 29, 2006, 10:23
Default Thanks for the offer. Currentl
  #33
Member
 
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 17
tangd is on a distinguished road
Thanks for the offer. Currently, we are checking some indeas, that could fix the problems. If we have no success, we will post the case.
tangd is offline   Reply With Quote

Old   May 23, 2010, 17:36
Default
  #34
Senior Member
 
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 16
Chrisi1984 is on a distinguished road
Quote:
Originally Posted by tangd View Post
Thanks for the offer. Currently, we are checking some indeas, that could fix the problems. If we have no success, we will post the case.

I am using rhoSimpleFoam, and I have also the problem with a too low outlet temperature. It is caused by an total enthalpy loss, although I have adiabatic walls.

So I would like to know if you found a solution for your problem. Perhabs it is also the solution for my Problem.

Regards
Chrisi
Chrisi1984 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
How to check Heat Balance in heat transfer like mass balance for flow mahendra OpenFOAM Post-Processing 15 February 8, 2012 11:19
[blockMesh] CheckMesh error using a tutorial from OpenFOAM 114 with openFOAM 13 martapajon OpenFOAM Meshing & Mesh Conversion 7 January 21, 2008 13:52
OpenFOAM users in Munich OpenFOAM benutzer in M%c3%bcnchen jaswi OpenFOAM 0 August 3, 2007 14:11
A new Howto on the OpenFOAM Wiki Compiling OpenFOAM under Unix mbeaudoin OpenFOAM Installation 2 April 28, 2006 09:54
Mass Balance in CFX5.7 KKA CFX 5 March 9, 2005 22:54


All times are GMT -4. The time now is 16:10.