CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM

how to develope a solver

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

LinkBack Thread Tools Display Modes
Old   May 5, 2013, 04:01
Default how to develope a solver
Arjang Behnoud
Join Date: Oct 2012
Posts: 61
Rep Power: 6
AmirBaqa1987 is on a distinguished road
Sponsored Links
Hi 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.

AmirBaqa1987 is offline   Reply With Quote
Sponsored Links

Old   May 5, 2013, 05:13
Smile new volScalarField nu
Senior Member
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 210
Rep Power: 11
fabian_roesler is on a distinguished road

stick to this howTo:
HTML Code:
1. You can add a new scalarField nu for the kinematic viscosity to the createFields.H like this:

volScalarField nu (     IOobject     (          "nu",          runTime.timeName(),          mesh,          IOobject::NO_READ,          IOobject::AUTO_WRITE      ),      nu0*(scalar(1)-nuk*(T-T0) );
2. Read the constants of your viscosity function. For example nu0, nuk and T0 for a linear function

nu = nu0*(scalar(1)-nuk*(T-T0));

dimensionedScalar nu0 (      transportProperties.lookup("nu0") );
dimensionedScalar nuk (      transportProperties.lookup("nuk") );

3. Update your viscosity function after you solved for temperature in the TEqn.H

nu = nu0*(scalar(1)-nuk*(T-T0));

This should be all.


fabian_roesler is offline   Reply With Quote

Old   May 6, 2013, 02:57
Default appreciation
Arjang Behnoud
Join Date: Oct 2012
Posts: 61
Rep Power: 6
AmirBaqa1987 is on a distinguished road
Hallo Fabian

Vielen Dank.
AmirBaqa1987 is offline   Reply With Quote


Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
thobois class engineTopoChangerMesh error Peter_600 OpenFOAM 4 August 2, 2014 09:52
3d vof Smaras FLUENT 2 February 19, 2013 07:58
Interfoam blows on parallel run danvica OpenFOAM Running, Solving & CFD 16 December 22, 2012 03:09
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 14:08
How to develope my own solver ztdep OpenFOAM Running, Solving & CFD 0 September 15, 2005 10:41

Sponsored Links

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