mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Adding functionality to scalarTransport FO and residence time tutorials for VOF
and single phase cases. Registration of the compressed flux in interFoam as it is needed for the FO if used.
This commit is contained in:
49
tutorials/incompressible/pimpleFoam/RAS/TJunction/0/s
Normal file
49
tutorials/incompressible/pimpleFoam/RAS/TJunction/0/s
Normal file
@ -0,0 +1,49 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object s;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet1
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
}
|
||||
|
||||
outlet2
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
}
|
||||
|
||||
defaultFaces
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -79,6 +79,41 @@ functions
|
||||
(0.21 0 0.01) // at central block
|
||||
);
|
||||
}
|
||||
|
||||
sTransport
|
||||
{
|
||||
type scalarTransport;
|
||||
libs ("libsolverFunctionObjects.so");
|
||||
|
||||
enabled true;
|
||||
writeControl outputTime;
|
||||
writeInterval 1;
|
||||
|
||||
field s;
|
||||
|
||||
write true;
|
||||
|
||||
fvOptions
|
||||
{
|
||||
unitySource
|
||||
{
|
||||
type scalarSemiImplicitSource;
|
||||
enabled true;
|
||||
|
||||
scalarSemiImplicitSourceCoeffs
|
||||
{
|
||||
selectionMode all;
|
||||
volumeMode specific;
|
||||
injectionRateSuSp
|
||||
{
|
||||
s (1 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resetOnStartUp false;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -32,6 +32,7 @@ divSchemes
|
||||
div(phi,k) Gauss limitedLinear 1;
|
||||
div(phi,epsilon) Gauss limitedLinear 1;
|
||||
div(phi,R) Gauss limitedLinear 1;
|
||||
div(phi,s) Gauss limitedLinear 1;
|
||||
div(R) Gauss linear;
|
||||
div(phi,nuTilda) Gauss limitedLinear 1;
|
||||
div((nuEff*dev2(T(grad(U))))) Gauss linear;
|
||||
|
||||
@ -33,7 +33,7 @@ solvers
|
||||
smoother GaussSeidel;
|
||||
}
|
||||
|
||||
"(U|k|epsilon)"
|
||||
"(U|k|epsilon|s)"
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
@ -41,7 +41,7 @@ solvers
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
"(U|k|epsilon)Final"
|
||||
"(U|k|epsilon|s)Final"
|
||||
{
|
||||
$U;
|
||||
tolerance 1e-05;
|
||||
@ -65,6 +65,7 @@ relaxationFactors
|
||||
"U.*" 1;
|
||||
"k.*" 1;
|
||||
"epsilon.*" 1;
|
||||
"s.*" 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
54
tutorials/multiphase/interFoam/RAS/angledDuct/0/s
Normal file
54
tutorials/multiphase/interFoam/RAS/angledDuct/0/s
Normal file
@ -0,0 +1,54 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object s;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
front
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
back
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
porosityWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -52,5 +52,46 @@ maxAlphaCo 1;
|
||||
|
||||
maxDeltaT 1;
|
||||
|
||||
functions
|
||||
{
|
||||
sTransport
|
||||
{
|
||||
type scalarTransport;
|
||||
libs ("libsolverFunctionObjects.so");
|
||||
|
||||
enabled true;
|
||||
writeControl outputTime;
|
||||
writeInterval 1;
|
||||
|
||||
field s;
|
||||
|
||||
write true;
|
||||
|
||||
phase alpha.water;
|
||||
bounded01 false;
|
||||
|
||||
// Adding fvOption source for residence time
|
||||
fvOptions
|
||||
{
|
||||
unitySource
|
||||
{
|
||||
type scalarSemiImplicitSource;
|
||||
enabled true;
|
||||
|
||||
scalarSemiImplicitSourceCoeffs
|
||||
{
|
||||
selectionMode all;
|
||||
volumeMode specific;
|
||||
injectionRateSuSp
|
||||
{
|
||||
s (1 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resetOnStartUp false;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -31,6 +31,7 @@ divSchemes
|
||||
div(phi,alpha) Gauss vanLeer;
|
||||
div(phirb,alpha) Gauss linear;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,s) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
@ -50,5 +51,11 @@ snGradSchemes
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
s;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -66,7 +66,7 @@ solvers
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(U|k|epsilon).*"
|
||||
"(U|k|epsilon|s).*"
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
|
||||
48
tutorials/multiphase/interFoam/RAS/waterChannel/0/s
Normal file
48
tutorials/multiphase/interFoam/RAS/waterChannel/0/s
Normal file
@ -0,0 +1,48 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object s;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -29,7 +29,7 @@ deltaT 0.1;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
writeInterval 5;
|
||||
writeInterval 10;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
@ -82,6 +82,43 @@ functions
|
||||
$inletFlux;
|
||||
name atmosphere;
|
||||
}
|
||||
|
||||
sTransport
|
||||
{
|
||||
type scalarTransport;
|
||||
libs ("libsolverFunctionObjects.so");
|
||||
|
||||
enabled true;
|
||||
writeControl outputTime;
|
||||
writeInterval 1;
|
||||
|
||||
field s;
|
||||
bounded01 false;
|
||||
phase alpha.water;
|
||||
|
||||
write true;
|
||||
|
||||
fvOptions
|
||||
{
|
||||
unitySource
|
||||
{
|
||||
type scalarSemiImplicitSource;
|
||||
enabled true;
|
||||
|
||||
scalarSemiImplicitSourceCoeffs
|
||||
{
|
||||
selectionMode all;
|
||||
volumeMode specific;
|
||||
injectionRateSuSp
|
||||
{
|
||||
s (1 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resetOnStartUp false;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -35,6 +35,9 @@ divSchemes
|
||||
|
||||
"div\(phi,(k|omega)\)" Gauss upwind;
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
|
||||
div(phi,s) Gauss vanLeer;
|
||||
div(phirb,s) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
@ -57,5 +60,11 @@ wallDist
|
||||
method meshWave;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
s;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -67,7 +67,7 @@ solvers
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(U|k|omega).*"
|
||||
"(U|k|omega|s).*"
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
|
||||
Reference in New Issue
Block a user