|
[Sponsors] |
November 7, 2012, 10:15 |
add source term in energy equation
|
#1 |
New Member
Chad
Join Date: Sep 2011
Posts: 16
Rep Power: 14 |
Hi, Foamers,
I added a source term in temperature equation, but the strange thing is temperature becomes unbounded hence unphysical. I have no any idea. The following are relevant codes. The basic idea is : I added a source term in TEqn, and the source term is also dependent on T. When I deal with ddt(alphaTemp), I already stored .oldTime() each time. I cannot see where the problem would be. ----------------- fvScalarMatrix TEqn ( fvm::ddt(cp, T) + fvm::div(phi*fvc::interpolate(cp), T) - fvm::laplacian(lambda/rho, T) == ST ); ------------------- ST = ( - hs*fvc::ddt(alphaTemp) - hs*fvc::div(phi,alphaTemp) ); ------------------- forAll(mesh.cells(), celli) { if (T[celli] < Ts.value()) { alphaTemp[celli] = 0; } else if (T[celli] > Tl.value()) { alphaTemp[celli] = 1; } else { alphaTemp[celli] = (T[celli]-Ts.value())/(Tl.value()-Ts.value()); } }; ---------------------- Any response is welcome and appreciated. Last edited by chaolian; November 8, 2012 at 02:51. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
"parabolicVelocity" in OpenFoam 2.1.0 ? | sawyer86 | OpenFOAM Running, Solving & CFD | 21 | February 7, 2012 11:44 |
Source term energy equation for reactive flows | DaIN | Main CFD Forum | 0 | October 6, 2011 15:11 |
Source Term on Scalar Transport Equation | alessio.nz | OpenFOAM Programming & Development | 9 | January 31, 2011 07:56 |
Mass transfer Term in Mixture Energy Equation | CFDtoy | Main CFD Forum | 0 | July 3, 2008 16:14 |
UDF for energy source | mauricio sanchez | FLUENT | 0 | August 30, 2005 15:56 |