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

add source term in energy equation

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By chaolian

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   November 7, 2012, 10:15
Unhappy add source term in energy equation
  #1
New Member
 
Chad
Join Date: Sep 2011
Posts: 16
Rep Power: 14
chaolian is on a distinguished road
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.
Kummi likes this.

Last edited by chaolian; November 8, 2012 at 02:51.
chaolian is offline   Reply With Quote

 


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
"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


All times are GMT -4. The time now is 23:38.