mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
scalarTransportFoam: Added support for steady-state solution and all fvOptions
Optional under-relaxation is provided for steady-state solution. Added missing fvOptions.constrain and fvOptions.correct calls.
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,7 +25,7 @@ Application
|
|||||||
scalarTransportFoam
|
scalarTransportFoam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Solves a transport equation for a passive scalar
|
Solves the steady or transient transport equation for a passive scalar.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
while (simple.correctNonOrthogonal())
|
while (simple.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
solve
|
fvScalarMatrix TEqn
|
||||||
(
|
(
|
||||||
fvm::ddt(T)
|
fvm::ddt(T)
|
||||||
+ fvm::div(phi, T)
|
+ fvm::div(phi, T)
|
||||||
@ -66,6 +66,11 @@ int main(int argc, char *argv[])
|
|||||||
==
|
==
|
||||||
fvOptions(T)
|
fvOptions(T)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
TEqn.relax();
|
||||||
|
fvOptions.constrain(TEqn);
|
||||||
|
TEqn.solve();
|
||||||
|
fvOptions.correct(T);
|
||||||
}
|
}
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|||||||
Reference in New Issue
Block a user