energy equation coupled with liquid fraction updating
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. |
All times are GMT -4. The time now is 06:46. |