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.
This commit is contained in:
henry
2009-05-11 23:19:56 +01:00
parent 6562861180
commit 0ee817a060
15 changed files with 105 additions and 86 deletions

View File

@ -7,8 +7,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-linterfaceProperties \ -linterfaceProperties \
@ -18,5 +17,4 @@ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-ldynamicMesh \ -ldynamicMesh \
-lmeshTools \ -lmeshTools \
-ldynamicFvMesh \ -ldynamicFvMesh
-lsampling

View File

@ -116,34 +116,23 @@
pd + rho*(g & mesh.C()) pd + rho*(g & mesh.C())
); );
autoPtr<probes> pRefProbe;
label pdRefCell = 0; label pdRefCell = 0;
scalar pdRefValue = 0.0; scalar pdRefValue = 0.0;
setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue);
scalar pRefValue = 0.0; scalar pRefValue = 0.0;
if (pd.needReference()) if (pd.needReference())
{ {
pRefProbe.set
(
new probes
(
"pRefProbe",
mesh,
mesh.solutionDict().subDict("PISO").subDict("pRefProbe")
)
);
pRefValue = readScalar pRefValue = readScalar
( (
mesh.solutionDict().subDict("PISO").lookup("pRefValue") mesh.solutionDict().subDict("PISO").lookup("pRefValue")
); );
pdRefCell = pRefProbe->cells()[0];
p += dimensionedScalar p += dimensionedScalar
( (
"p", "p",
p.dimensions(), p.dimensions(),
pRefValue - pRefProbe->sample<scalar>("p")()[0] pRefValue - getRefCellValue(p, pdRefCell)
); );
} }

View File

@ -40,7 +40,6 @@ Description
#include "interfaceProperties.H" #include "interfaceProperties.H"
#include "twoPhaseMixture.H" #include "twoPhaseMixture.H"
#include "turbulenceModel.H" #include "turbulenceModel.H"
#include "probes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -123,7 +122,7 @@ int main(int argc, char *argv[])
( (
"p", "p",
p.dimensions(), p.dimensions(),
pRefValue - pRefProbe->sample<scalar>("p")()[0] pRefValue - getRefCellValue(p, pdRefCell)
); );
} }

View File

@ -106,6 +106,23 @@
scalar pdRefValue = 0.0; scalar pdRefValue = 0.0;
setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue); 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 // Construct interface from alpha1 distribution
interfaceProperties interface(alpha1, U, twoPhaseProperties); interfaceProperties interface(alpha1, U, twoPhaseProperties);

View File

@ -91,6 +91,16 @@ int main(int argc, char *argv[])
p = pd + rho*gh; p = pd + rho*gh;
if (pd.needReference())
{
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pdRefCell)
);
}
turbulence->correct(); turbulence->correct();
runTime.write(); runTime.write();

View File

@ -68,6 +68,23 @@
scalar pdRefValue = 0.0; scalar pdRefValue = 0.0;
setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue); 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 // Construct incompressible turbulence model
autoPtr<incompressible::turbulenceModel> turbulence autoPtr<incompressible::turbulenceModel> turbulence

View File

@ -83,6 +83,16 @@ int main(int argc, char *argv[])
p = pd + rho*gh; p = pd + rho*gh;
if (pd.needReference())
{
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pdRefCell)
);
}
turbulence->correct(); turbulence->correct();
runTime.write(); runTime.write();

View File

@ -95,6 +95,23 @@
scalar pdRefValue = 0.0; scalar pdRefValue = 0.0;
setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue); 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 // Construct incompressible turbulence model
autoPtr<incompressible::turbulenceModel> turbulence autoPtr<incompressible::turbulenceModel> turbulence

View File

@ -75,6 +75,16 @@ int main(int argc, char *argv[])
p = pd + rho*gh; p = pd + rho*gh;
if (pd.needReference())
{
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pdRefCell)
);
}
turbulence->correct(); turbulence->correct();
runTime.write(); runTime.write();

View File

@ -121,13 +121,10 @@ PISO
nAlphaCorr 1; nAlphaCorr 1;
nAlphaSubCycles 3; nAlphaSubCycles 3;
cAlpha 1; cAlpha 1;
pdRefCell 0;
pdRefPoint (0.51 0.51 0.51);
pdRefValue 0; pdRefValue 0;
pRefProbe pRefValue 0;
{
fields ( pd );
probeLocations ( ( 0.51 0.51 0.51 ) );
}
} }

View File

@ -98,19 +98,10 @@ PISO
nAlphaSubCycles 3; nAlphaSubCycles 3;
cAlpha 1.5; cAlpha 1.5;
correctPhi no; correctPhi no;
pRefProbe
{
fields
(
p
);
probeLocations
(
( 0 0 0.15 )
);
}
pRefValue 100000; pdRefPoint (0 0 0.15);
pdRefValue 0;
pRefValue 1e5;
} }
relaxationFactors relaxationFactors

View File

@ -98,19 +98,10 @@ PISO
nAlphaSubCycles 3; nAlphaSubCycles 3;
cAlpha 1.5; cAlpha 1.5;
correctPhi no; correctPhi no;
pRefProbe
{
fields
(
p
);
probeLocations
(
( 0 0 0.15 )
);
}
pRefValue 100000; pdRefPoint (0 0 0.15);
pdRefValue 0;
pRefValue 1e5;
} }
relaxationFactors relaxationFactors

View File

@ -98,19 +98,10 @@ PISO
nAlphaSubCycles 3; nAlphaSubCycles 3;
cAlpha 1.5; cAlpha 1.5;
correctPhi no; correctPhi no;
pRefProbe
{
fields
(
p
);
probeLocations
(
( 0 0 0.15 )
);
}
pRefValue 100000; pdRefPoint (0 0 0.15);
pdRefValue 0;
pRefValue 1e5;
} }
relaxationFactors relaxationFactors

View File

@ -98,19 +98,10 @@ PISO
nAlphaSubCycles 3; nAlphaSubCycles 3;
cAlpha 1.5; cAlpha 1.5;
correctPhi no; correctPhi no;
pRefProbe
{
fields
(
p
);
probeLocations
(
( 0 0 0.15 )
);
}
pRefValue 100000; pdRefPoint (0 0 0.15);
pdRefValue 0;
pRefValue 1e5;
} }
relaxationFactors relaxationFactors

View File

@ -98,19 +98,10 @@ PISO
nAlphaSubCycles 3; nAlphaSubCycles 3;
cAlpha 1.5; cAlpha 1.5;
correctPhi no; correctPhi no;
pRefProbe
{
fields
(
p
);
probeLocations
(
( 0 0 0.15 )
);
}
pRefValue 100000; pdRefPoint (0 0 0.15);
pdRefValue 0;
pRefValue 1e5;
} }
relaxationFactors relaxationFactors