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:
sergio
2016-11-21 09:21:45 -08:00
parent dfbb9d0900
commit 143e99194f
16 changed files with 601 additions and 40 deletions

View 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;
}
}
// ************************************************************************* //

View File

@ -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;
}
}
// ************************************************************************* //

View File

@ -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;

View File

@ -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;
}
}