Commit 0ee817a0 authored by henry's avatar henry
Browse files

Also added a separate specification of the static pressure level but the

location for the specification is the same as that for the pd level.
parent 65628611
......@@ -7,8 +7,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude
-I$(LIB_SRC)/dynamicFvMesh/lnInclude
EXE_LIBS = \
-linterfaceProperties \
......@@ -18,5 +17,4 @@ EXE_LIBS = \
-lfiniteVolume \
-ldynamicMesh \
-lmeshTools \
-ldynamicFvMesh \
-lsampling
-ldynamicFvMesh
......@@ -116,34 +116,23 @@
pd + rho*(g & mesh.C())
);
autoPtr<probes> pRefProbe;
label pdRefCell = 0;
scalar pdRefValue = 0.0;
setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue);
scalar pRefValue = 0.0;
if (pd.needReference())
{
pRefProbe.set
(
new probes
(
"pRefProbe",
mesh,
mesh.solutionDict().subDict("PISO").subDict("pRefProbe")
)
);
pRefValue = readScalar
(
mesh.solutionDict().subDict("PISO").lookup("pRefValue")
);
pdRefCell = pRefProbe->cells()[0];
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - pRefProbe->sample<scalar>("p")()[0]
pRefValue - getRefCellValue(p, pdRefCell)
);
}
......@@ -40,7 +40,6 @@ Description
#include "interfaceProperties.H"
#include "twoPhaseMixture.H"
#include "turbulenceModel.H"
#include "probes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -123,7 +122,7 @@ int main(int argc, char *argv[])
(
"p",
p.dimensions(),
pRefValue - pRefProbe->sample<scalar>("p")()[0]
pRefValue - getRefCellValue(p, pdRefCell)
);
}
......
......@@ -106,6 +106,23 @@
scalar pdRefValue = 0.0;
setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue);
scalar pRefValue = 0.0;
if (pd.needReference())
{
pRefValue = readScalar
(
mesh.solutionDict().subDict("PISO").lookup("pRefValue")
);
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pdRefCell)
);
}
// Construct interface from alpha1 distribution
interfaceProperties interface(alpha1, U, twoPhaseProperties);
......
......@@ -91,6 +91,16 @@ int main(int argc, char *argv[])
p = pd + rho*gh;
if (pd.needReference())
{
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pdRefCell)
);
}
turbulence->correct();
runTime.write();
......
......@@ -68,6 +68,23 @@
scalar pdRefValue = 0.0;
setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue);
scalar pRefValue = 0.0;
if (pd.needReference())
{
pRefValue = readScalar
(
mesh.solutionDict().subDict("PISO").lookup("pRefValue")
);
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pdRefCell)
);
}
// Construct incompressible turbulence model
autoPtr<incompressible::turbulenceModel> turbulence
......
......@@ -83,6 +83,16 @@ int main(int argc, char *argv[])
p = pd + rho*gh;
if (pd.needReference())
{
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pdRefCell)
);
}
turbulence->correct();
runTime.write();
......
......@@ -95,6 +95,23 @@
scalar pdRefValue = 0.0;
setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue);
scalar pRefValue = 0.0;
if (pd.needReference())
{
pRefValue = readScalar
(
mesh.solutionDict().subDict("PISO").lookup("pRefValue")
);
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pdRefCell)
);
}
// Construct incompressible turbulence model
autoPtr<incompressible::turbulenceModel> turbulence
......
......@@ -75,6 +75,16 @@ int main(int argc, char *argv[])
p = pd + rho*gh;
if (pd.needReference())
{
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pdRefCell)
);
}
turbulence->correct();
runTime.write();
......
......@@ -121,13 +121,10 @@ PISO
nAlphaCorr 1;
nAlphaSubCycles 3;
cAlpha 1;
pdRefCell 0;
pdRefPoint (0.51 0.51 0.51);
pdRefValue 0;
pRefProbe
{
fields ( pd );
probeLocations ( ( 0.51 0.51 0.51 ) );
}
pRefValue 0;
}
......
......@@ -98,19 +98,10 @@ PISO
nAlphaSubCycles 3;
cAlpha 1.5;
correctPhi no;
pRefProbe
{
fields
(
p
);
probeLocations
(
( 0 0 0.15 )
);
}
pRefValue 100000;
pdRefPoint (0 0 0.15);
pdRefValue 0;
pRefValue 1e5;
}
relaxationFactors
......
......@@ -98,19 +98,10 @@ PISO
nAlphaSubCycles 3;
cAlpha 1.5;
correctPhi no;
pRefProbe
{
fields
(
p
);
probeLocations
(
( 0 0 0.15 )
);
}
pRefValue 100000;
pdRefPoint (0 0 0.15);
pdRefValue 0;
pRefValue 1e5;
}
relaxationFactors
......
......@@ -98,19 +98,10 @@ PISO
nAlphaSubCycles 3;
cAlpha 1.5;
correctPhi no;
pRefProbe
{
fields
(
p
);
probeLocations
(
( 0 0 0.15 )
);
}
pRefValue 100000;
pdRefPoint (0 0 0.15);
pdRefValue 0;
pRefValue 1e5;
}
relaxationFactors
......
......@@ -98,19 +98,10 @@ PISO
nAlphaSubCycles 3;
cAlpha 1.5;
correctPhi no;
pRefProbe
{
fields
(
p
);
probeLocations
(
( 0 0 0.15 )
);
}
pRefValue 100000;
pdRefPoint (0 0 0.15);
pdRefValue 0;
pRefValue 1e5;
}
relaxationFactors
......
......@@ -98,19 +98,10 @@ PISO
nAlphaSubCycles 3;
cAlpha 1.5;
correctPhi no;
pRefProbe
{
fields
(
p
);
probeLocations
(
( 0 0 0.15 )
);
}
pRefValue 100000;
pdRefPoint (0 0 0.15);
pdRefValue 0;
pRefValue 1e5;
}
relaxationFactors
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment