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

abnormal temperature near interface when adding energy equation to interFoam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 22, 2012, 04:14
Default abnormal temperature near interface when adding energy equation to interFoam
  #1
Member
 
HouKen
Join Date: Jul 2011
Posts: 66
Rep Power: 6
houkensjtu is on a distinguished road
To be brief, I added energy equation to interFoam according to the modify tutorial in this thread:

Diverging result for Temperature field in interFoam

The author mentioned two possible types of TEqn.H which is(in openfoam language):
fvScalarMatrix TEqn
(
fvm::ddt(rhoCp, T)
+ fvm::div(rhoPhiCpf, T)
- fvm::laplacian(kappaf, T)
);

and

fvScalarMatrix TEqn
(
fvm::ddt(rho, T)
+ fvm::div(rhoPhi, T)
- fvm::laplacian((kappa/Cp), T)
);

The author pointed out that with the first type of TEqn, temperature instability occurs near the interface when thermal property difference of two phase is large, on the other hand, with the second type TEqn, no instability will occur even thermal properties differs significantly.

I tested the behavior of interFoam with these two different kind of TEqn, exactly the same phenomena as the author pointed out occurred in my case. However I want go further and ask WHY this happens? As far as I am concerned, since the rhoPhiCpf*T term is also calculated with a Gauss upwind scheme, even the convection term becomes large because of Cp is multiplied, it should be limited to a reasonable level that at least will not cause instability. Unfortunately this obviously doesn't match with the test result.

Right now, the only way I could figure out to somehow find the problem is to look at the A matrix in A*T=b equation. By this I mean, since eventually the TEqn will be solved by openFoam's magic code and the LAST step must be solving the linear equation A*T=b(T is temperature field), by investigating A's value I could find what's happening near the interface and then distinguish the problem. However...I just don't know how to find out A, it seems that it hide very deeply because of the encapsulation structure of openfoam. Does anyone has any idea on how-to doing this mission? Or there is better way to figure out the problem?

I am very interesting in investigating the reason of this phenomena, please help and comment if you have any idea!

Last edited by houkensjtu; November 22, 2012 at 09:04.
houkensjtu is offline   Reply With Quote

Old   November 22, 2012, 07:59
Default
  #2
Member
 
Meindert de Groot
Join Date: Jun 2012
Location: Netherlands
Posts: 34
Rep Power: 5
meindert is on a distinguished road
Have a look at gdbOF (http://openfoamwiki.net/index.php/Contrib_gdbOF).
meindert is offline   Reply With Quote

Old   November 22, 2012, 08:45
Default
  #3
Member
 
HouKen
Join Date: Jul 2011
Posts: 66
Rep Power: 6
houkensjtu is on a distinguished road
Quote:
Originally Posted by meindert View Post
Thanks for reply!
Actually I already knew the existence of gdbOF. Unfortunately I found the gdbOF manual was too brief and obviously there is a knowledge gap between my understanding and the lowest requirement in order to use gdbOF to debug...
houkensjtu is offline   Reply With Quote

Old   November 26, 2012, 20:58
Default
  #4
Member
 
HouKen
Join Date: Jul 2011
Posts: 66
Rep Power: 6
houkensjtu is on a distinguished road
Maybe I didn't give enough information?
I review the thread again
Diverging result for Temperature field in interFoam

and "eberberovic" mentioned that face fluxes in the temperature equation should be consistent with the fluxes calculated for the momentum equation. I can't fully understand why it's important.

Anyway now I could some how concluded that:
1. If face fluxes in the temperature equation is NOT consistent with the fluxes calculated for the momentum equation, then totally temperature divergence happens.
2. If face fluxes in the temperature equation is consistent with the fluxes calculated for the momentum equation, but still the convection term is calculated in a form "rhophi*Cpf", a converged result could be obtained BUT instability occurs near interface.
3. Not calculate face flux in temperature equation at all. A fully converge and interface-stable result could be obtained.

But why is all that?
Please help!

Last edited by houkensjtu; November 26, 2012 at 21:15.
houkensjtu is offline   Reply With Quote

Old   June 26, 2013, 13:40
Default
  #5
New Member
 
hadisafaei
Join Date: May 2011
Posts: 4
Rep Power: 6
hadisafaei is on a distinguished road
ّI think you've define rhoPhiCpf in alphaEqn.H file? if yes, the results may be wrong because alphaEqn.H is included in alphaEqnSubCycle.H . In this condition you can get reasonable result by changing the value of nAlphaSubCycles in fvSolution (i.e nAlphaSubCycles=1) . in general you can act like definition of rhoPhi in alphaEqnSubCycle.H file.
hadisafaei 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
error message cuteapathy CFX 14 March 20, 2012 07:45
Constant velocity of the material Sas CFX 15 July 13, 2010 08:56
Concentric tube heat exchanger (Air-Water) Young CFX 5 October 6, 2008 23:17
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 21:09


All times are GMT -4. The time now is 09:33.