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

energy equation coupled with liquid fraction updating

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 5, 2012, 21:54
Question energy equation coupled with liquid fraction updating
  #1
New Member
 
Chad
Join Date: Sep 2011
Posts: 16
Rep Power: 5
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

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
Water subcooled boiling Attesz CFX 7 January 5, 2013 04: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 15:01
SIMPLE and energy equation convergence Fabio Main CFD Forum 0 June 1, 2007 06:06
question about energy equation zhou FLUENT 0 February 24, 2004 00:55


All times are GMT -4. The time now is 12:40.