I have used interFoam to simul
I have used interFoam to simulate falling films. In case of isothermal investigations have been performed successfully.
Now i am going to simulate falling films with heat transfer. Then the energy eqaution must be added into the standard interFoam solver. Any advice and hint would be appreciated! 
Hi Hy,
just some thoughts:
Hi Hy,
just some thoughts: I would say that your problem comes from the fact that the call of "twoPhaseProperties.correct();" does NOT take care of Cp and lambda but only of viscosity. Therefore you have to update the volume averaged fields for lambda and Cp every timestep on your own. I would then suggest to use a different formulation for your T Equation. Assuming Cp is constant just divide by Cp. This would get you to something like: fvScalarMatrix TEqn ( fvm::ddt(rho,T) +fvm::div(rhoPhi,T) fvm::laplacian(lambda_div_CP,T) ); You then have to recalculate the field lambda_div_CP every timestep based on gamma. Best regards Christian 
Hi Christian,
thank you ver
Hi Christian,
thank you very much for your answer. yes you are right. The Cp and lambda have not been recalculated according "gamma". Only rho is calculated by means of "gamma". Bue i donot know why it occured? You said because of accessment "twoPhaseProperties.correct()", can you give me some explainations? You also advised me that i should adjust my "TEqn" and calculate the new "lambda_div_Cp". i.e. I should correct it in "createFields.H", right? Best Regards Yu 
Hi Yu,
have a look at:
Ope
Hi Yu,
have a look at: OpenFOAM\OpenFOAM1.4.1\src\transportModels\incompressible\incompres sibleTwoPhas eMixture\twoPhaseMixture.H There you can find: // Correct the laminar viscosity void correct() { calcNu(); } which only recalculates nu >You also advised me that i should adjust my >"TEqn" and calculate the new "lambda_div_Cp". >i.e. I should correct it in "createFields.H", >right? Yes and no. You have to introduce the new Field lambda_div_Cp in the createFields.H, but you have to recalculate it every timestep based on gamma. This has to be done outside the createFields.H because this file is only called once on solver startup. Just do the recalculation before calling solve(T....); Best regards. Christian 
Hi, Yu,
Did you have any lu
Hi, Yu,
Did you have any luck adding temperature to interFoam? If you are successful, can you post the new solver? pei 
Hi Pei,
soory I have not su
Hi Pei,
soory I have not succeeded. I have tried to adjust my Solver. However, one good news is that after adjustment "rho, cp and lambda" have been recalculated successflully according to "gamma". But the results of test case have fatal errors. Anaway, if I finish this task I will upload it in time. Yu 
Hi, Yu,
Thanks!
If you n
Hi, Yu,
Thanks! If you need someone to do some testing of your new solver, please let me know. I will be glad to help. Pei 
Adding TEqn to les/interFoam
Dear All
Have anybody of you got success in adding temperature to interFoam? The equation I am trying to add is; (1) rho*Cp*[ddt(gamma*T)+grad(gamma*U*T)]=laplacian(gamma*Landa_eff*T) I know that, a surfaceScalarField should be exist to update thermal conductivity in each time step (2) {Landa_eff = Landa + Cp*nuSgs()}, I have Les Turbulence Model as well. To comply the Eq.2, should I modify a new library for Landa(Thermal conductivity), to call it in TEqn as twoPhaseProperties.landa(), or something else. I also tried with Creatfield and it didn't worked. Please elaborate, Kindly, Hamed hamed.aghajani@gmail.com h.aghajani@kingston.ac.uk 
Hi Hamed,
I am replying here to your posting in the thread of thermocapillary free surface, because this thread is more relevant to your question. You can add turbulent Prandtl in the transportProperties. Make a header file called "readProperties.H" and in it do as following: IOdictionary transportProperties ( IOobject ( "transportProperties", runTime.constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE ) ); dimensionedScalar Pr_t ( transportProperties.lookup("Pr_t") ); regards, zaki 
Gamma term in the energy equation
Dear Zaki,
Thanks for replying, Have you realized, why the energy equation is derived in the format shown in paper? I mean the gamma is included in to equation. Regards, Hamed 
Hi Hamed,
have you been sucessfull in adding energy equation in to LEs Interfoam solver. can you can you help me to do that too?? thanks, Mehran Quote:

Mehran,
Hope you'd find it usefull; surfaceScalarField landaf = fvc::interpolate(landa); surfaceScalarField landaEff ( "landaEff", landaf + fvc::interpolate(rho*Cp*turbulence>nut()) ); // musgs (Subgrid scale dynamic viscosity) //Lamba: Thermal Conductivity fvScalarMatrix hEqn ( rho * Cp* ( fvm::ddt(T) + fvm::div(phi, T) //div(Foam::volScalarField&, Foam::volScalarField&) )  fvm::laplacian(landaEff, T) ); hEqn.solve(); Hamed 
Thanks Hamed..I will add these line. I think I might have some other question from you during this week. Thanks for your help ;)
Mehran Quote:

hi dears
i have a case that i want to solve energy equation to interfoam. is there anyone who can help me(is there ready code). thanks in advance 
Hi Hamed and other foarmers
i want add energy equation and mass source to interFoam....i find how add energy equation to this solver but i dont have idae for source term..any body can help me?:o:confused::) 
All times are GMT 4. The time now is 15:09. 