CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   turbulent schmidt number with scalarTransportFoam (https://www.cfd-online.com/Forums/openfoam-programming-development/121267-turbulent-schmidt-number-scalartransportfoam.html)

dgenekim July 25, 2013 02:38

turbulent schmidt number with scalarTransportFoam
 
Hi Foamers,

I need a solver which can deal with turbulent diffusivity instead of constant DT.
I have tried to modify the original scalarTransportFoam code as:

In createField.H, I added

===================
Info<< "Reading field nut\n" << endl;

volScalarField nut
(
IOobject
(
"nut",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
=========================

and

=========================
Info<< "Reading diffusivity ScT\n" << endl;

dimensionedScalar ScT
(
transportProperties.lookup("ScT")
);
=========================

and modified the scalarTransportFoam.C as:

=========================
solve
(
fvm::ddt(T)
+ fvm::div(phi, T)
- fvm::laplacian(nut/ScT, T)
==
fvOptions(T)
========================

The compiling was done without error message. However, when I ran a test simulation I got the error message as:

========================
--> FOAM FATAL IO ERROR:
"ill defined primitiveEntry starting at keyword 'laplacian(nut' on line 37 and ending at line 60"

file: /home/dongjin/OpenFOAM/dongjin-2.2.1/practice/crossflowmixingchannel/scalarTransportFoam/system/fvSchemes at line 60.

From function primitiveEntry::readEntry(const dictionary&, Istream&)
in file lnInclude/IOerror.C at line 132.

FOAM exiting
=======================

Before running a simulation, I copied the 'nut' file from the previous simpleFoam simulation under the '0' folder, and modified the transportProperties and fvScheme files as:

===================
laplacianSchemes
{
default none;
laplacian(nut/ScT,T) Gauss linear corrected;
}
====================
and
====================
ScT ScT [ 0 0 0 0 0 0 0 ] 0.15;
=====================

Please reply me why I got the above mentioned error?

dgenekim July 25, 2013 02:54

I could make the run further by changing fvScheme as:

from
laplacian(nut/ScT,T) Gauss linear corrected;
to
laplacian(nut|ScT,T) Gauss linear corrected;

but now I got:

=================================
file: /home/dongjin/OpenFOAM/dongjin-2.2.1/practice/crossflowmixingchannel/scalarTransportFoam/0/nut.boundaryField.upperWall from line 2906 to line 2910.

From function fvPatchField<Type>::New(const fvPatch&, const DimensionedField<Type, volMesh>&, const dictionary&)
in file /opt/openfoam221/src/finiteVolume/lnInclude/fvPatchFieldNew.C at line 136.

FOAM exiting
===============================

Any idea?

dgenekim July 25, 2013 03:14

In nut file, line number from 2906 to 2910 contains:

2903 }
2904 upperWall
2905 {
2906 type nutkWallFunction;
2907 Cmu 0.09;
2908 kappa 0.41;
2909 E 9.8;
2910 value nonuniform List<scalar>

dgenekim July 25, 2013 03:49

I just make the run successful by simply modifying nut file as:

from
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value nonuniform List<scalar>

to
type calculated;
value nonuniform List<scalar>

and by fixing fvScheme file as:

from
laplacian(nut|ScT,T) Gauss linear corrected;
to
laplacian((nut|ScT),T) Gauss linear corrected;


I will leave this posting for other users information ^^

ibrahim hagali November 26, 2020 10:07

I have a question please, How the SCT distribution gonna be calculated, you have not included this step in the above code?


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