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

energy equation coupled with liquid fraction updating

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 5, 2012, 20:54
Question energy equation coupled with liquid fraction updating
  #1
New Member
 
Chad
Join Date: Sep 2011
Posts: 16
Rep Power: 14
chaolian is on a distinguished road
Hello Foamers -
I have a question. Say, I want to solve a temperature equation involving liquid fraction alpha, but alpha updates very simply in each iteration. I tried to modify fabian's meltFoam TEqn.H, the following is part of TEqn.H. It compiles fine but the result is not correct. Any ideas?
---------------------------------------
fvScalarMatrix TEqn
(
fvm::ddt(cp, T)
+ fvm::div(phi*fvc::interpolate(cp), T)
+ hs*(fvc::ddt(alpha)+fvc::div(phi,alpha))
- fvm::laplacian(lambda/rho, T)
);


TEqn.relax();
TEqn.solve();


forAll(T, celli)
{
if (T[celli] < Ts.value())
{
alpha[celli] = 0;
}
else if (T[celli] > Tl.value())
{
alpha[celli] = 1;
}
else
{
alpha[celli] = (T[celli]-Ts.value())/(Tl.value()-Ts.value());
}
}
----------------------------------------
Thanks in advance for any response.
chaolian is offline   Reply With Quote

Reply

Tags
meltfoam


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
Water subcooled boiling Attesz CFX 7 January 5, 2013 03:32
Constant velocity of the material Sas CFX 15 July 13, 2010 08:56
Viscosity and the Energy Equation Rich Main CFD Forum 0 December 16, 2009 14:01
SIMPLE and energy equation convergence Fabio Main CFD Forum 0 June 1, 2007 06:06
question about energy equation zhou FLUENT 0 February 23, 2004 23:55


All times are GMT -4. The time now is 16:27.