- **OpenFOAM**
(*https://www.cfd-online.com/Forums/openfoam/*)

- - **how to develope a solver**
(*https://www.cfd-online.com/Forums/openfoam/117226-how-develope-solver.html*)

how to develope a solverHi everyone,
i want to develop a solver by adding energy equation to momentum equation(like adding temperature to icoFoam solver) but the difference is that the variables are coupled in these two equations for instance, viscosity in momentum equation varies with temperature in energy equation. what should i do? any help is appreciated. Arjang |

new volScalarField nuHi
stick to this howTo: HTML Code:
`http://openfoamwiki.net/index.php/How_to_add_temperature_to_icoFoam` Code:
`volScalarField nu ( IOobject ( "nu", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), nu0*(scalar(1)-nuk*(T-T0) );` Code:
`nu = nu0*(scalar(1)-nuk*(T-T0));` Code:
`dimensionedScalar nu0 ( transportProperties.lookup("nu0") );` 3. Update your viscosity function after you solved for temperature in the TEqn.H Code:
`nu = nu0*(scalar(1)-nuk*(T-T0));` This should be all. Regards Fabian |

appreciationHallo Fabian
Vielen Dank. |

All times are GMT -4. The time now is 22:10. |