Strange temperature behaviour with interFoam
Hello all,
I added energy equation to interFoam following example in this trend It compiles, runs and converges fine but I keep getting strange results with the temperature. I simulated rising bubble at high pressure. The problem is that after few time steps, the bubble temperature acts like a heat source such that the bubble temperature rises (+30k) above the saturated temp even when the surrounding liquid is also set at saturated condition. It's like perpectual motion machine of the 1st order (no heat source yet bubble temperature keeps increasing, even when I initialize the bubble temp to same as the surrounding). The bubble should atleast stay at around the same temperature as the surrounding liquid for now, right? Temperature BC used are same as bubble, i.e. inlet, wall and internal field are at saturated temp; no phase change and no wall heating for now. My solver seems fine, similar what was used in the trend. 0.5 was used for maxCo and maxAlphaCo. Please how do I get the bubble temperature to behave right? Every advice is welcomed please. Thanks 
hello,
I faced this issue some time ago with this solver (interFoam + T). To solve this issue, i have added a limiter to T (min and max), and also use a lower time step + more corrector for the Pimple loop. This effect (heated bubble) should disappear after some time step, and the limiter on T will not be used, but help for the first iterations. regards, olivier 
It has been resolved. Thanks Oliver. I actually noticed that setting the maxCo and maxAlphaCo to around 0.1 provided better results, yet it did not really resolve the issue. The true problem was with convective term. The way it was computed in the trend is not quite correct. What I did was to divide through my rhoCp and solve the energy eqn in the form below.
ddt(T) + div(phi,T) == laplacian(kappa/rhoCp,T) From this, I think the best way to compute the convective term might be to simply multiply the flux with rhoCp i.e. rhoPhiCp = phi*rho1*cp1*alpha1 + (scalar(1)  alpha1)*rho2*cp2*phi thus, solving energy eqn as in the trend would be ddt(rhoCp,T) + div(rhoPhiCp,T) == laplacian(kappa,T) Note that I computed my kappa using simple VOF relation: kappa = k1*alpha1 + k2*(scalar(1)  alpha1) Now, I have another question: What's the effect of including pressure in the equation? i.e. ddt(rhoCp,T) + div(rhoPhiCp,T) + div(phi,p_rgh) == laplacian(kappa,T) Every comment is welcomed. 
dear foamer,
I know this post write for many time ago,but I face to this problem right now, I wanna simulation rising bubble with temp, following this boundary conditions: upper wall 312k and else is zeroGradient and my box have 298k. after few iteration bubble temp be 400k. can you help me plz? how can I solve this problem? 
Hello,
You can now use compressibleInterFoam (from OF 2.2. and 2.3). regards, olivier 
Quote:
in my case bubble is incompressible. how can used this solver? don't you know about my problem? why bubble temp increase? best regard Sajad 
hello,
Well if the temperature of the bubble will change, then your case is not incompressible, unless you consider small temperature variation. And even with incompressible gaz (thus small temperature effect), you can use compressibleInterFoam solver. regards, olivier 
Quote:
thanks for reply again, I wanna simulation bubble next to a wall, wall have 312k and box have 298k, after spend time, I must saw change bubble temp change but this change is between 298 to 312. but I saw this temp=400k, for this simulation can I use compressibleInterFoam? thanks 
Hi Seju, double check how you're implementing the convection term in your energy equation. Seems you might have problem with your flux.

Quote:
this is my energy equation: fvScalarMatrix TEqn ( fvm::ddt(rhoCp, T) + fvm::div(rhoPhiCpf, T)  fvm::laplacian(kappaf, T) ); TEqn.solve(); I simulation same you simulation this and I use HTML Code:
[B]Diverging result for Temperature field in interFoam [/B] 
All times are GMT 4. The time now is 01:24. 