- **OpenFOAM Programming & Development**
(*http://www.cfd-online.com/Forums/openfoam-programming-development/*)

- - **simpleFoam with energy equation**
(*http://www.cfd-online.com/Forums/openfoam-programming-development/69148-simplefoam-energy-equation.html*)

simpleFoam with energy equationHello world.
I'm dealing with a case in which Navier-Stokes and energy equation can be solved one after the other. I have little experience in manipulating solvers, but I think it's possible to alter the simpleFoam solver for such a case. So where do I put the energy equation?As I want to compute temperature after successfully converged Navier-Stokes-Equation I have thought about opening another time-loop and solving the energy equation there. Something like this: Code:
` Info<< "\nStarting time loop\n" << endl;` Thanks for your ideas. See you. Sebastian |

Hi Sebastian,
have a look at buoyantSimpleFoam. Regards, Markus. |

Quote:
So I will put the energy equation inside it too? Code:
` {` |

It took some time before I got back to this construction site:
Do you think buoyantSimpleFoam for itself (without chaning anything) will be the right choice for a simple convective heat transfer problem? |

It worked well for me. But you can take out the buoyancy term as well.
Markus |

TEqn.HHi Markus and Sebastian,
Why can't we put the TEqn.H out side the SIMPLE loop. I think we need to calculate temperature field after we got corrected velocity field. Is my idea right or wrong? And since simpleFoam calculates turbulent flows I put my Teqn.H as, { volScalarField kappaEff ( "kappaEff", turbulence->nu()/Pr + turbulence->nut()/Prt ); fvScalarMatrix TEqn ( //fvm::ddt(T) fvm::div(phi, T) - fvm::laplacian(kappaEff, T) ); TEqn.relax(); TEqn.solve(); //rhok = 1.0 - beta*(T - TRef); } Please correct me if I am wrong. My temperature value fluctuates a lot whenever I used it out side the SIMPLE loop. But in pisoFoam I put it in outside the PISO loop and worked really good. Please advice me. Best regards, Suranga. |

Hi Suranga
I think the (rather old) discussion here was about the time loop not the Simple/pimple loop. Naturally one needs to keep the algorithm for the Navier-Stokes equations intact. You can add whatever equation outside the algorithm to let it resole the pressure-velocity coupling in peace. Of course all equations should be inside the time loop unless you need to solve an equation once. Hisham |

All times are GMT -4. The time now is 23:11. |