
[Sponsors] 
September 6, 2006, 09:46 
Try inserting p.oldTime() in "

#21 
Member
E. David Huckaby
Join Date: Mar 2009
Posts: 57
Rep Power: 10 
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.


September 7, 2006, 02:38 
If there is a bug here please

#22 
Super Moderator
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 18 
If there is a bug here please report it in the bugreports section.
Thanks. 

September 7, 2006, 04:24 
This is not a bug  it is done

#23 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,806
Rep Power: 25 
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 

September 7, 2006, 06:27 
Now, we have inserted p.oldTim

#24 
Member
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 10 
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!


September 7, 2006, 08:07 
I noticed that you have a shar

#25 
Member
E. David Huckaby
Join Date: Mar 2009
Posts: 57
Rep Power: 10 
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.


September 7, 2006, 08:26 
Aha, good idea :) In foam, y

#26 
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,806
Rep Power: 25 
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 placeholder 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 

September 7, 2006, 08:32 
We have, of course, analysed t

#27 
Member
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 10 
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.


September 7, 2006, 09:14 
Hrv
we wrote our latest ans

#28 
Member
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 10 
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. 

September 8, 2006, 01:44 
Meanwhile we have tested the e

#29 
Member
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 10 
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!


September 27, 2006, 04:21 
Here are some new results. Now

#30 
Member
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 10 
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? 

September 29, 2006, 05:53 
I thought you had already pinp

#31 
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 14 
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. 

September 29, 2006, 08:09 
Along these lines, it would al

#32 
Member
E. David Huckaby
Join Date: Mar 2009
Posts: 57
Rep Power: 10 
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.


September 29, 2006, 09:23 
Thanks for the offer. Currentl

#33 
Member
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 10 
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.


May 23, 2010, 16:36 

#34  
Senior Member
Join Date: Jan 2010
Location: Stuttgart
Posts: 148
Rep Power: 9 
Quote:
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 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
How to check Heat Balance in heat transfer like mass balance for flow  mahendra  OpenFOAM PostProcessing  15  February 8, 2012 11:19 
CheckMesh error using a tutorial from OpenFOAM 114 with openFOAM 13  martapajon  OpenFOAM Native Meshers: blockMesh  7  January 21, 2008 13:52 
OpenFOAM users in Munich OpenFOAM benutzer in M%c3%bcnchen  jaswi  OpenFOAM  0  August 3, 2007 13:11 
A new Howto on the OpenFOAM Wiki Compiling OpenFOAM under Unix  mbeaudoin  OpenFOAM Installation  2  April 28, 2006 08:54 
Mass Balance in CFX5.7  KKA  CFX  5  March 9, 2005 22:54 