
[Sponsors] 
July 9, 2008, 05:37 
I have used interFoam to simul

#1 
Member
Hy Yu
Join Date: Mar 2009
Location: Hessen, Germany
Posts: 34
Rep Power: 8 
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! 

July 10, 2008, 11:05 
Hi Hy,
just some thoughts:

#2 
Member
Christian Winkler
Join Date: Mar 2009
Location: Mannheim, Germany
Posts: 63
Rep Power: 8 
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 

July 11, 2008, 04:48 
Hi Christian,
thank you ver

#3 
Member
Hy Yu
Join Date: Mar 2009
Location: Hessen, Germany
Posts: 34
Rep Power: 8 
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 

July 11, 2008, 08:06 
Hi Yu,
have a look at:
Ope

#4 
Member
Christian Winkler
Join Date: Mar 2009
Location: Mannheim, Germany
Posts: 63
Rep Power: 8 
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 

July 15, 2008, 21:15 
Hi, Yu,
Did you have any lu

#5 
Senior Member
PeiYing Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 9 
Hi, Yu,
Did you have any luck adding temperature to interFoam? If you are successful, can you post the new solver? pei 

July 16, 2008, 06:59 
Hi Pei,
soory I have not su

#6 
Member
Hy Yu
Join Date: Mar 2009
Location: Hessen, Germany
Posts: 34
Rep Power: 8 
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 

July 16, 2008, 08:25 
Hi, Yu,
Thanks!
If you n

#7 
Senior Member
PeiYing Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 9 
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 

May 19, 2009, 11:06 
Adding TEqn to les/interFoam

#8 
Member
Hamed Aghajani
Join Date: Mar 2009
Location: London, UK
Posts: 77
Rep Power: 8 
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 

May 21, 2009, 00:38 

#9 
New Member
Zaki Saldi
Join Date: Mar 2009
Posts: 18
Rep Power: 8 
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 

May 21, 2009, 03:45 
Gamma term in the energy equation

#10 
Member
Hamed Aghajani
Join Date: Mar 2009
Location: London, UK
Posts: 77
Rep Power: 8 
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 

June 14, 2010, 12:17 

#11 
Member
Join Date: Nov 2009
Posts: 48
Rep Power: 8 
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 

June 14, 2010, 12:52 

#12 
Member
Hamed Aghajani
Join Date: Mar 2009
Location: London, UK
Posts: 77
Rep Power: 8 
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 

June 17, 2010, 12:32 

#13  
Member
Join Date: Nov 2009
Posts: 48
Rep Power: 8 
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:


September 4, 2011, 07:27 

#14 
New Member
Join Date: Nov 2010
Posts: 10
Rep Power: 7 
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 

September 7, 2013, 07:32 

#15 
New Member
sasan
Join Date: Sep 2013
Posts: 28
Rep Power: 4 
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? 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
added mass  Kuba Broniszewski  FLUENT  2  February 23, 2007 10:39 
Added Mass in a 2D Cylinder  Rahul Bharadwaj  Main CFD Forum  0  March 2, 2005 14:11 
Added Mass in a 2D Cylinder  Rahul Bharadwaj  FLUENT  0  March 2, 2005 13:51 
added mass error  Neil  Main CFD Forum  2  August 13, 2003 11:52 
Effect of added CPU ?  steve podleski  Main CFD Forum  8  August 10, 1999 20:26 