From 0ee817a060d196ffd10fd5f1d91f5133121ff6fa Mon Sep 17 00:00:00 2001 From: henry <Henry Weller h.weller@opencfd.co.uk> Date: Mon, 11 May 2009 23:19:56 +0100 Subject: [PATCH] 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. --- .../multiphase/interDyMFoam/Make/options | 6 ++---- .../multiphase/interDyMFoam/createFields.H | 17 +++-------------- .../multiphase/interDyMFoam/interDyMFoam.C | 3 +-- .../solvers/multiphase/interFoam/createFields.H | 17 +++++++++++++++++ .../solvers/multiphase/interFoam/interFoam.C | 10 ++++++++++ .../multiphaseInterFoam/createFields.H | 17 +++++++++++++++++ .../multiphaseInterFoam/multiphaseInterFoam.C | 10 ++++++++++ .../twoLiquidMixingFoam/createFields.H | 17 +++++++++++++++++ .../twoLiquidMixingFoam/twoLiquidMixingFoam.C | 10 ++++++++++ .../ras/damBreakWithObstacle/system/fvSolution | 9 +++------ .../ras/sloshingTank2D/system/fvSolution | 15 +++------------ .../ras/sloshingTank2D3DoF/system/fvSolution | 15 +++------------ .../ras/sloshingTank3D/system/fvSolution | 15 +++------------ .../ras/sloshingTank3D3DoF/system/fvSolution | 15 +++------------ .../ras/sloshingTank3D6DoF/system/fvSolution | 15 +++------------ 15 files changed, 105 insertions(+), 86 deletions(-) diff --git a/applications/solvers/multiphase/interDyMFoam/Make/options b/applications/solvers/multiphase/interDyMFoam/Make/options index 74498326a9b..b9aa7705765 100644 --- a/applications/solvers/multiphase/interDyMFoam/Make/options +++ b/applications/solvers/multiphase/interDyMFoam/Make/options @@ -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 diff --git a/applications/solvers/multiphase/interDyMFoam/createFields.H b/applications/solvers/multiphase/interDyMFoam/createFields.H index 0f1efe717f5..bcceb9d7481 100644 --- a/applications/solvers/multiphase/interDyMFoam/createFields.H +++ b/applications/solvers/multiphase/interDyMFoam/createFields.H @@ -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) ); } diff --git a/applications/solvers/multiphase/interDyMFoam/interDyMFoam.C b/applications/solvers/multiphase/interDyMFoam/interDyMFoam.C index 0386e6625cc..046503a8c45 100644 --- a/applications/solvers/multiphase/interDyMFoam/interDyMFoam.C +++ b/applications/solvers/multiphase/interDyMFoam/interDyMFoam.C @@ -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) ); } diff --git a/applications/solvers/multiphase/interFoam/createFields.H b/applications/solvers/multiphase/interFoam/createFields.H index 53dd01672a2..70637747528 100644 --- a/applications/solvers/multiphase/interFoam/createFields.H +++ b/applications/solvers/multiphase/interFoam/createFields.H @@ -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); diff --git a/applications/solvers/multiphase/interFoam/interFoam.C b/applications/solvers/multiphase/interFoam/interFoam.C index 7d2048037a4..4dd86bd8f72 100644 --- a/applications/solvers/multiphase/interFoam/interFoam.C +++ b/applications/solvers/multiphase/interFoam/interFoam.C @@ -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(); diff --git a/applications/solvers/multiphase/multiphaseInterFoam/createFields.H b/applications/solvers/multiphase/multiphaseInterFoam/createFields.H index 9119631d0cc..07650fd4dda 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/createFields.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/createFields.H @@ -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 diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C index d0626cbf05b..c5fdb5f3c2e 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C @@ -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(); diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H b/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H index bd7c3e2c9ff..a38135dc19a 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H @@ -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 diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C b/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C index be8eea9061b..1caf4557080 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C @@ -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(); diff --git a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSolution b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSolution index 36d56bb9471..2ca306273d2 100644 --- a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSolution +++ b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSolution @@ -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; } diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/fvSolution b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/fvSolution index 2688ec1f985..c9dccc239e4 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/fvSolution +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/fvSolution @@ -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 diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/fvSolution b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/fvSolution index ce22769b821..c9dccc239e4 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/fvSolution +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/fvSolution @@ -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 diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/system/fvSolution b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/system/fvSolution index ce22769b821..c9dccc239e4 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/system/fvSolution +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/system/fvSolution @@ -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 diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/system/fvSolution b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/system/fvSolution index ce22769b821..c9dccc239e4 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/system/fvSolution +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/system/fvSolution @@ -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 diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/system/fvSolution b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/system/fvSolution index ce22769b821..c9dccc239e4 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/system/fvSolution +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/system/fvSolution @@ -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 -- GitLab