diff --git a/applications/solvers/multiphase/interDyMFoam/Make/options b/applications/solvers/multiphase/interDyMFoam/Make/options index 74498326a9b50323fabc5c29781578d8aaec8e2e..b9aa7705765b5d6e7a2582a7b74534a7c4a6bd87 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 0f1efe717f535961d11b57db5099f4caea932854..bcceb9d748193843a3124b585b538497b61e9d22 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 0386e6625ccb3f2092bdf25f81e90aac826178ae..046503a8c459abc2f1c6caeb958c39a2ee985668 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 53dd01672a274de04ea0c4d5979fb3aaa97a7a7f..70637747528a9851a51dad21b021fead0adc3761 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 7d2048037a491544282087f85c5a1d2a37940a80..4dd86bd8f72fafbdbcb9db63cea841d79b6d1d26 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 9119631d0cc34e4bd366c7f00c43379490a7d71c..07650fd4ddaf26054f94c303fdb1259f525244a3 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 d0626cbf05bb63a643f0ad4a14fb1849647feb5c..c5fdb5f3c2e36d8ae693a7aead0ee0a71168d482 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 bd7c3e2c9ff9515e3c0e1d4a2501de200c9f7083..a38135dc19a968cd10cf38beec6b3a35a4e4165b 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 be8eea9061b53547c198af1926c121f3700f0eef..1caf455708079ff2f4f04733c388aa070393ba8a 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 36d56bb947117523daaeaf8e09654f575b3981db..2ca306273d2f9178a190c71b10c6f37cbc5ac67a 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 2688ec1f985053188ce72b6adff9feb6dfe38aad..c9dccc239e4610d982bc3f6e8a70b36aad0e9d79 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 ce22769b821733c857d6f80b3a0ffa627ae0ec80..c9dccc239e4610d982bc3f6e8a70b36aad0e9d79 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 ce22769b821733c857d6f80b3a0ffa627ae0ec80..c9dccc239e4610d982bc3f6e8a70b36aad0e9d79 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 ce22769b821733c857d6f80b3a0ffa627ae0ec80..c9dccc239e4610d982bc3f6e8a70b36aad0e9d79 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 ce22769b821733c857d6f80b3a0ffa627ae0ec80..c9dccc239e4610d982bc3f6e8a70b36aad0e9d79 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