# thermoFoam tutorial/example case

 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 27, 2019, 07:35 thermoFoam tutorial/example case #1 New Member   shach Join Date: Apr 2019 Posts: 26 Rep Power: 3 Hi, I am trying to solve cooling rotor problem. The rotor is heated up and the air is flowing around to cool it down. I think the case combined the rotation and heat transfer and I am not sure which solver is suitable for this case. Anyone can give me some suggestion? For now, I am solving the flow field using simpleFoam and MRF, or pimpleFoam and rotating mesh, for steadystate and transient respectively. My plan is after the flow field is converged. I would like to apply a temperature boundary condition on the rotor and solve the energy equation with a frozen flow field. By this, the influence of the temperature on the flow is ignored, I am not sure how bad the error will be. The solver for this frozen flow field is thermoFoam. However, I didn't find any example case or tutorial for this solver. Anyone has experience with this solver? Any suggestion is high appreciated. Thanks.

 October 2, 2019, 11:45 some suggestions #2 Member   Arthur Join Date: Aug 2014 Location: Italy Posts: 39 Rep Power: 7 Hello, have you solved your problem? In my opinion you should solve a similar problem in at least two steps. First: Solve the fluid dynamic problem considering density. Use a solver like rhoSimpleFoam or rhoPimpleFoam. To deactivate the energy equation impose a relative error between iteration equal to 1 (hard action) or recompile the solver not considering the energy equation. In this first step the solver must consider density since in the second step you will solve only the energy equation. The energy equation requires density, If you solve this first step with simpleFoam or pimpleFoam you will have a dimension error, something like this: [e[1 -1 -3 0 0 0 0] ] + [e[0 2 -3 0 0 0 0] ] due to the fact that pressure is not divided by density. Always remember that any CFD code solves adimensional equations. Second: Impose in fvSolutions under SIMPLE options frozenFlow on, like this SIMPLE { consistent yes; nNonOrthogonalCorrectors 3; frozenFlow on; residualControl { p 1e-4; U 1e-4; "(k|epsilon|e)" 1e-4; } } and change the solver from rhoSimpleFoam to thermoFoam in controlDict. Now you can solve the energy equation with frozen flow.

October 2, 2019, 12:24
#3
New Member

shach
Join Date: Apr 2019
Posts: 26
Rep Power: 3
I am using chtMultiRegionSimpleFoam to solve the MRF and heat transfer problem at the same time now. It is working fine.

Quote:
 Originally Posted by Artur.Ant Hello, have you solved your problem? In my opinion you should solve a similar problem in at least two steps. First: Solve the fluid dynamic problem considering density. Use a solver like rhoSimpleFoam or rhoPimpleFoam. To deactivate the energy equation impose a relative error between iteration equal to 1 (hard action) or recompile the solver not considering the energy equation. In this first step the solver must consider density since in the second step you will solve only the energy equation. The energy equation requires density, If you solve this first step with simpleFoam or pimpleFoam you will have a dimension error, something like this: [e[1 -1 -3 0 0 0 0] ] + [e[0 2 -3 0 0 0 0] ] due to the fact that pressure is not divided by density. Always remember that any CFD code solves adimensional equations. Second: Impose in fvSolutions under SIMPLE options frozenFlow on, like this SIMPLE { consistent yes; nNonOrthogonalCorrectors 3; frozenFlow on; residualControl { p 1e-4; U 1e-4; "(k|epsilon|e)" 1e-4; } } and change the solver from rhoSimpleFoam to thermoFoam in controlDict. Now you can solve the energy equation with frozen flow.