|
[Sponsors] |
August 8, 2013, 13:59 |
SimpleFoam and Temperature Equation
|
#1 |
Member
Patrick Wollny
Join Date: Apr 2010
Posts: 58
Rep Power: 16 |
Hello,
I have add the enthalpy equation in temperature form to simpleFoam. The Equation has now this form: Code:
fvScalarMatrix TEqn ( fvm::div(phi, T) - fvm::Sp(fvc::div(phi),T) - fvm::laplacian(turbulence->nut()/0.85, T) - fvm::laplacian(DT,T) == 1/cp*fvc::div(phi*fvc::interpolate(p)) - 1/cp*p*fvc::div(phi) ); TEqn.relax(); TEqn.solve(); The equation is added to simpleFoam.c in after the pressure correction: Code:
while (runTime.loop()) { Info<< "Time = " << runTime.timeName() << nl << endl; # include "readSIMPLEControls.H" # include "initConvergenceCheck.H" p.storePrevIter(); // Pressure-velocity SIMPLE corrector { # include "UEqn.H" # include "pEqn.H" } turbulence->correct(); # include "TEqn.H" runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; # include "convergenceCheck.H" } Info<< "End\n" << endl; return 0; } The difference between the result of fluent and my code is shown by the picture below, where the upper is result is my code and the result below was calculated by fluend - the result of fluent is equal to cfx and rhoSimpleFoam. Can someone tell me what´s wrong with my code? I´ve tested the temperature equation with and without the terms "1/cp*fvc::div(phi*fvc::interpolate(p)) - 1/cp*p*fvc::div(phi)" since this is an incompressible case, there is no big difference. The div and grad schemes are 1st order upwind and least squares in all cases. The velocity field is in very close agreement with the other calculations. Best regards, Patrick |
|
August 9, 2013, 09:04 |
|
#2 |
Member
Patrick Wollny
Join Date: Apr 2010
Posts: 58
Rep Power: 16 |
No idea?
This is strange btw. the temperature BC at the wall is zeroGradient Last edited by Pat84; August 9, 2013 at 11:52. |
|
June 10, 2014, 15:04 |
|
#3 |
New Member
Lee
Join Date: Oct 2011
Posts: 15
Rep Power: 15 |
Hi Patrick,
Have you solved your problem ? and you can share me your code adding temperature equation into simpleFoam ? Lee |
|
June 11, 2014, 02:51 |
|
#4 |
Senior Member
Yogesh Bapat
Join Date: Oct 2010
Posts: 102
Rep Power: 16 |
Hello,
Can you just check if your energy equation is fully converged? What URF are you using for energy equation? Regards, -Yogesh |
|
June 12, 2014, 11:48 |
|
#5 |
New Member
Lee
Join Date: Oct 2011
Posts: 15
Rep Power: 15 |
Hi Yogesh,
URF = 0.15 ; The energy equation seems not to be fully converged. Have you tried this for your cases ? What are you experiencing this problem ? SKLee |
|
June 16, 2014, 01:43 |
|
#6 |
Senior Member
Yogesh Bapat
Join Date: Oct 2010
Posts: 102
Rep Power: 16 |
Hello,
I think you should try with much larger under-relaxation and make sure that energy equation is converged. -Yogesh |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
adding temperature to simpleFoam | waters | OpenFOAM Programming & Development | 80 | May 30, 2017 22:30 |
simpleFoam temperature blows up | tellico | OpenFOAM Running, Solving & CFD | 0 | June 24, 2013 14:19 |
simpleFoam with energy equation | sega | OpenFOAM Programming & Development | 6 | January 26, 2013 07:42 |
Temperature in simpleFoam takes lots of Iterations | okroud | OpenFOAM Running, Solving & CFD | 5 | October 19, 2012 02:35 |
Transport Equation for temperature variance | ameya | OpenFOAM Running, Solving & CFD | 0 | December 5, 2008 02:16 |