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

How can Temperature be added into interFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 9, 2008, 06:37
Default I have used interFoam to simul
  #1
Member
 
Hy Yu
Join Date: Mar 2009
Location: Hessen, Germany
Posts: 34
Rep Power: 17
ttdtud is on a distinguished road
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!
ttdtud is offline   Reply With Quote

Old   July 10, 2008, 12:05
Default Hi Hy, just some thoughts:
  #2
caw
Member
 
Christian Winkler
Join Date: Mar 2009
Location: Mannheim, Germany
Posts: 63
Rep Power: 17
caw is on a distinguished road
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
caw is offline   Reply With Quote

Old   July 11, 2008, 05:48
Default Hi Christian, thank you ver
  #3
Member
 
Hy Yu
Join Date: Mar 2009
Location: Hessen, Germany
Posts: 34
Rep Power: 17
ttdtud is on a distinguished road
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
ttdtud is offline   Reply With Quote

Old   July 11, 2008, 09:06
Default Hi Yu, have a look at: Ope
  #4
caw
Member
 
Christian Winkler
Join Date: Mar 2009
Location: Mannheim, Germany
Posts: 63
Rep Power: 17
caw is on a distinguished road
Hi Yu,

have a look at:
OpenFOAM\OpenFOAM-1.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
caw is offline   Reply With Quote

Old   July 15, 2008, 22:15
Default Hi, Yu, Did you have any lu
  #5
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 18
hsieh is on a distinguished road
Hi, Yu,

Did you have any luck adding temperature to interFoam? If you are successful, can you post the new solver?

pei
hsieh is offline   Reply With Quote

Old   July 16, 2008, 07:59
Default Hi Pei, soory I have not su
  #6
Member
 
Hy Yu
Join Date: Mar 2009
Location: Hessen, Germany
Posts: 34
Rep Power: 17
ttdtud is on a distinguished road
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
ttdtud is offline   Reply With Quote

Old   July 16, 2008, 09:25
Default Hi, Yu, Thanks! If you n
  #7
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 18
hsieh is on a distinguished road
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
hsieh is offline   Reply With Quote

Old   May 19, 2009, 12:06
Default Adding TEqn to les/interFoam
  #8
Member
 
Hamed Aghajani
Join Date: Mar 2009
Location: London, UK
Posts: 77
Rep Power: 17
haghajani is on a distinguished road
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
haghajani is offline   Reply With Quote

Old   May 21, 2009, 01:38
Default
  #9
New Member
 
Zaki Saldi
Join Date: Mar 2009
Posts: 18
Rep Power: 17
zakifoam is on a distinguished road
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
zakifoam is offline   Reply With Quote

Old   May 21, 2009, 04:45
Default Gamma term in the energy equation
  #10
Member
 
Hamed Aghajani
Join Date: Mar 2009
Location: London, UK
Posts: 77
Rep Power: 17
haghajani is on a distinguished road
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
haghajani is offline   Reply With Quote

Old   June 14, 2010, 13:17
Default
  #11
Member
 
Join Date: Nov 2009
Posts: 48
Rep Power: 17
farhagim is on a distinguished road
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:
Originally Posted by haghajani View Post
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
farhagim is offline   Reply With Quote

Old   June 14, 2010, 13:52
Default
  #12
Member
 
Hamed Aghajani
Join Date: Mar 2009
Location: London, UK
Posts: 77
Rep Power: 17
haghajani is on a distinguished road
Mehran,

Hope you'd find it usefull;


surfaceScalarField landaf = fvc::interpolate(landa);
surfaceScalarField landaEff
(
"landaEff",
landaf
+ fvc::interpolate(rho*Cp*turbulence->nut())
);
// mu-sgs (Sub-grid 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
haghajani is offline   Reply With Quote

Old   June 17, 2010, 13:32
Default
  #13
Member
 
Join Date: Nov 2009
Posts: 48
Rep Power: 17
farhagim is on a distinguished road
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:
Originally Posted by haghajani View Post
Mehran,

Hope you'd find it usefull;


surfaceScalarField landaf = fvc::interpolate(landa);
surfaceScalarField landaEff
(
"landaEff",
landaf
+ fvc::interpolate(rho*Cp*turbulence->nut())
);
// mu-sgs (Sub-grid 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
farhagim is offline   Reply With Quote

Old   September 4, 2011, 08:27
Default
  #14
New Member
 
Join Date: Nov 2010
Posts: 10
Rep Power: 16
siavash_abadeh is on a distinguished road
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
siavash_abadeh is offline   Reply With Quote

Old   September 7, 2013, 08:32
Default
  #15
New Member
 
sasan
Join Date: Sep 2013
Posts: 28
Rep Power: 13
Sasy is on a distinguished road
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?
Sasy is offline   Reply With Quote

Reply


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
added mass Kuba Broniszewski FLUENT 2 February 23, 2007 10:39
Added Mass in a 2-D Cylinder Rahul Bharadwaj Main CFD Forum 0 March 2, 2005 14:11
Added Mass in a 2-D Cylinder Rahul Bharadwaj FLUENT 0 March 2, 2005 13:51
added mass error Neil Main CFD Forum 2 August 13, 2003 12:52
Effect of added CPU ? steve podleski Main CFD Forum 8 August 10, 1999 21:26


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