From 56bfc75949a87840bd459d3f11d7c38385c9fc04 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Thu, 22 Jun 2017 14:32:18 +0100 Subject: [PATCH] Rationalize the "pos" function "pos" now returns 1 if the argument is greater than 0, otherwise it returns 0. This is consistent with the common mathematical definition of the "pos" function: https://en.wikipedia.org/wiki/Sign_(mathematics) However the previous implementation in which 1 was also returned for a 0 argument is useful in many situations so the "pos0" has been added which returns 1 if the argument is greater or equal to 0. Additionally the "neg0" has been added which returns 1 if if the argument is less than or equal to 0. --- .../solvers/multiphase/VoF/setRDeltaT.H | 4 +-- .../interFoam/interMixingFoam/alphaEqn.H | 4 +-- .../threePhaseInterfaceProperties.C | 4 +-- .../phaseChangeTwoPhaseMixtures/Kunz/Kunz.C | 2 +- .../Merkle/Merkle.C | 2 +- .../SchnerrSauer/SchnerrSauer.C | 2 +- .../GidaspowErgunWenYu/GidaspowErgunWenYu.C | 6 ++--- .../GidaspowSchillerNaumann.C | 4 +-- .../SchillerNaumann/SchillerNaumann.C | 4 +-- .../dragModels/SyamlalOBrien/SyamlalOBrien.C | 4 +-- .../dragModels/WenYu/WenYu.C | 4 +-- .../multiphaseSystem/multiphaseSystem.C | 3 ++- .../multiphase/multiphaseEulerFoam/pEqn.H | 4 +-- .../multiphaseMixture/multiphaseMixture.C | 3 ++- .../VakhrushevEfremov/VakhrushevEfremov.C | 6 ++--- .../GidaspowErgunWenYu/GidaspowErgunWenYu.C | 4 +-- .../GidaspowSchillerNaumann.C | 4 +-- .../dragModels/IshiiZuber/IshiiZuber.C | 6 ++--- .../interfacialModels/dragModels/Lain/Lain.C | 8 +++--- .../SchillerNaumann/SchillerNaumann.C | 4 +-- .../dragModels/SyamlalOBrien/SyamlalOBrien.C | 4 +-- .../dragModels/Tenneti/Tenneti.C | 2 +- .../dragModels/WenYu/WenYu.C | 4 +-- .../liftModels/TomiyamaLift/TomiyamaLift.C | 6 ++--- .../wallLubricationModels/Frank/Frank.C | 8 +++--- .../TomiyamaWallLubrication.C | 8 +++--- .../ThermalPhaseChangePhaseSystem.C | 4 +-- .../multiphaseSystem/multiphaseSystem.C | 2 +- .../reactingMultiphaseEulerFoam/pU/pEqn.H | 2 +- .../reactingTwoPhaseEulerFoam/pU/pEqn.H | 4 +-- .../Lavieville/Lavieville.C | 2 +- .../partitioningModels/cosine/cosine.C | 4 +-- ...onJacksonParticleThetaFvPatchScalarField.C | 4 +-- .../twoLiquidMixingFoam/alphaCourantNo.H | 4 +-- .../VakhrushevEfremov/VakhrushevEfremov.C | 6 ++--- .../GidaspowErgunWenYu/GidaspowErgunWenYu.C | 4 +-- .../GidaspowSchillerNaumann.C | 4 +-- .../dragModels/IshiiZuber/IshiiZuber.C | 6 ++--- .../interfacialModels/dragModels/Lain/Lain.C | 8 +++--- .../SchillerNaumann/SchillerNaumann.C | 4 +-- .../dragModels/SyamlalOBrien/SyamlalOBrien.C | 4 +-- .../dragModels/WenYu/WenYu.C | 4 +-- .../liftModels/TomiyamaLift/TomiyamaLift.C | 6 ++--- .../wallLubricationModels/Frank/Frank.C | 8 +++--- .../TomiyamaWallLubrication.C | 8 +++--- .../multiphase/twoPhaseEulerFoam/pU/pEqn.H | 4 +-- ...onJacksonParticleThetaFvPatchScalarField.C | 4 +-- etc/codeTemplates/BC/BC.C | 2 +- src/OpenFOAM/dimensionSet/dimensionSet.C | 14 +++++++++- src/OpenFOAM/dimensionSet/dimensionSet.H | 6 +++-- .../dimensionedScalar/dimensionedScalar.C | 26 +++++++++++++++++-- .../dimensionedScalar/dimensionedScalar.H | 4 ++- .../DimensionedScalarField.C | 4 ++- .../DimensionedScalarField.H | 4 ++- .../scalarFieldField/scalarFieldField.C | 4 ++- .../scalarFieldField/scalarFieldField.H | 4 ++- .../fields/Fields/scalarField/scalarField.C | 4 ++- .../fields/Fields/scalarField/scalarField.H | 4 ++- .../GeometricScalarField.C | 4 ++- .../GeometricScalarField.H | 4 ++- src/OpenFOAM/primitives/Scalar/Scalar.H | 19 +++++++++++++- .../primitives/ints/label/labelSpecific.H | 4 +-- ...thDissipationRateInletFvPatchScalarField.C | 4 +-- ...ngLengthFrequencyInletFvPatchScalarField.C | 4 +-- src/combustionModels/diffusion/diffusion.C | 4 +-- .../dynamicInkJetFvMesh/dynamicInkJetFvMesh.C | 2 +- .../fvMotionSolverEngineMesh.C | 2 +- .../SRFFreestreamVelocityFvPatchVectorField.C | 4 +-- .../cfdTools/general/bound/bound.C | 4 +-- .../inletOutlet/inletOutletFvPatchField.C | 4 +-- ...OutletTotalTemperatureFvPatchScalarField.C | 6 ++--- .../interfaceCompressionFvPatchScalarField.C | 2 +- .../outletInlet/outletInletFvPatchField.C | 4 +-- .../plenumPressureFvPatchScalarField.C | 4 +-- ...tedInletOutletVelocityFvPatchVectorField.C | 4 +-- ...tOutletParSlipVelocityFvPatchVectorField.C | 4 +-- ...malInletOutletVelocityFvPatchVectorField.C | 4 +-- ...talHydrostaticPressureFvPatchScalarField.C | 4 +-- .../prghTotalPressureFvPatchScalarField.C | 4 +-- .../totalPressureFvPatchScalarField.C | 10 +++---- .../totalTemperatureFvPatchScalarField.C | 4 +-- ...sityKineticEnergyInletFvPatchScalarField.C | 4 +-- .../uniformInletOutletFvPatchField.C | 4 +-- .../uniformTotalPressureFvPatchScalarField.C | 10 +++---- .../limitedSchemes/blended/blended.H | 4 +-- .../limitedSurfaceInterpolationScheme.C | 6 ++--- .../limitedSchemes/upwind/upwind.H | 4 +-- .../upwind/multivariateUpwind.H | 4 +-- .../outletStabilised/outletStabilised.H | 2 +- .../surfaceFieldValue/surfaceFieldValue.C | 8 +++--- .../clouds/Templates/DSMCCloud/DSMCCloud.C | 2 +- .../Templates/ReactingCloud/ReactingCloudI.H | 4 +-- .../PairCollisionRecordI.H | 4 +-- .../triSurfaceSearch/triSurfaceSearch.C | 6 ++--- .../movingConeTopoFvMesh.C | 6 ++--- .../interfaceProperties/interfaceProperties.C | 2 +- 96 files changed, 269 insertions(+), 196 deletions(-) diff --git a/applications/solvers/multiphase/VoF/setRDeltaT.H b/applications/solvers/multiphase/VoF/setRDeltaT.H index 697e6588e2..26b237e795 100644 --- a/applications/solvers/multiphase/VoF/setRDeltaT.H +++ b/applications/solvers/multiphase/VoF/setRDeltaT.H @@ -73,8 +73,8 @@ rDeltaT.ref() = max ( rDeltaT(), - pos(alpha1Bar() - alphaSpreadMin) - *pos(alphaSpreadMax - alpha1Bar()) + pos0(alpha1Bar() - alphaSpreadMin) + *pos0(alphaSpreadMax - alpha1Bar()) *fvc::surfaceSum(mag(phi))()() /((2*maxAlphaCo)*mesh.V()) ); diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/alphaEqn.H b/applications/solvers/multiphase/interFoam/interMixingFoam/alphaEqn.H index 3f75765dd7..004c0d1ddb 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/alphaEqn.H +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/alphaEqn.H @@ -183,8 +183,8 @@ solve(fvm::ddt(alpha1) + fvc::div(alphaPhi1)); // Create the diffusion coefficients for alpha2<->alpha3 - volScalarField Dc23(D23*max(alpha3, scalar(0))*pos(alpha2)); - volScalarField Dc32(D23*max(alpha2, scalar(0))*pos(alpha3)); + volScalarField Dc23(D23*max(alpha3, scalar(0))*pos0(alpha2)); + volScalarField Dc32(D23*max(alpha2, scalar(0))*pos0(alpha3)); // Add the diffusive flux for alpha3->alpha2 alphaPhi2 -= fvc::interpolate(Dc32)*mesh.magSf()*fvc::snGrad(alpha1); diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C b/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C index b5495dd6ae..99b26c4a83 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C @@ -214,8 +214,8 @@ Foam::threePhaseInterfaceProperties::nearInterface() const { return max ( - pos(mixture_.alpha1() - 0.01)*pos(0.99 - mixture_.alpha1()), - pos(mixture_.alpha2() - 0.01)*pos(0.99 - mixture_.alpha2()) + pos0(mixture_.alpha1() - 0.01)*pos0(0.99 - mixture_.alpha1()), + pos0(mixture_.alpha2() - 0.01)*pos0(0.99 - mixture_.alpha2()) ); } diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C index 32d3fe4308..0f0cfac210 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C @@ -87,7 +87,7 @@ Foam::phaseChangeTwoPhaseMixtures::Kunz::mDotP() const return Pair> ( mcCoeff_*sqr(limitedAlpha1)*(1.0 - limitedAlpha1) - *pos(p - pSat())/max(p - pSat(), 0.01*pSat()), + *pos0(p - pSat())/max(p - pSat(), 0.01*pSat()), (-mvCoeff_)*limitedAlpha1*neg(p - pSat()) ); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C index ade26e86a4..e9b1b93588 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C @@ -83,7 +83,7 @@ Foam::phaseChangeTwoPhaseMixtures::Merkle::mDotP() const return Pair> ( - mcCoeff_*(1.0 - limitedAlpha1)*pos(p - pSat()), + mcCoeff_*(1.0 - limitedAlpha1)*pos0(p - pSat()), (-mvCoeff_)*limitedAlpha1*neg(p - pSat()) ); } diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C index 07fe4a2331..cc21a86a4f 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C @@ -136,7 +136,7 @@ Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::mDotP() const return Pair> ( - Cc_*(1.0 - limitedAlpha1)*pos(p - pSat())*apCoeff, + Cc_*(1.0 - limitedAlpha1)*pos0(p - pSat())*apCoeff, (-Cv_)*(1.0 + alphaNuc() - limitedAlpha1)*neg(p - pSat())*apCoeff ); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C index cc4c7f9656..cd9e68d7f8 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -78,13 +78,13 @@ Foam::tmp Foam::dragModels::GidaspowErgunWenYu::K volScalarField Cds ( neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re) - + pos(Re - 1000)*0.44 + + pos0(Re - 1000)*0.44 ); // Wen and Yu (1966) return ( - pos(alpha2 - 0.8) + pos0(alpha2 - 0.8) *(0.75*Cds*phase2_.rho()*Ur*bp/d) + neg(alpha2 - 0.8) *( diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C index 5e2048aad1..59d3358d4a 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -77,7 +77,7 @@ Foam::tmp Foam::dragModels::GidaspowSchillerNaumann::K volScalarField Cds ( neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re) - + pos(Re - 1000)*0.44 + + pos0(Re - 1000)*0.44 ); return 0.75*Cds*phase2_.rho()*Ur*bp/phase1_.d(); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C index d4d77a2bb3..a9983ed21a 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -74,7 +74,7 @@ Foam::tmp Foam::dragModels::SchillerNaumann::K volScalarField Cds ( neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re) - + pos(Re - 1000)*0.44 + + pos0(Re - 1000)*0.44 ); return 0.75*Cds*phase2_.rho()*Ur/phase1_.d(); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/SyamlalOBrien/SyamlalOBrien.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/SyamlalOBrien/SyamlalOBrien.C index 83419c54d1..975ad0c029 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/SyamlalOBrien/SyamlalOBrien.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/SyamlalOBrien/SyamlalOBrien.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -75,7 +75,7 @@ Foam::tmp Foam::dragModels::SyamlalOBrien::K volScalarField B ( neg(alpha2 - 0.85)*(0.8*pow(alpha2, 1.28)) - + pos(alpha2 - 0.85)*(pow(alpha2, 2.65)) + + pos0(alpha2 - 0.85)*(pow(alpha2, 2.65)) ); volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3))); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C index fd644f5c5a..55c58b6c42 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -77,7 +77,7 @@ Foam::tmp Foam::dragModels::WenYu::K volScalarField Cds ( neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re) - + pos(Re - 1000)*0.44 + + pos0(Re - 1000)*0.44 ); return 0.75*Cds*phase2_.rho()*Ur*bp/phase1_.d(); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index 425be38063..2f923c38a6 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -846,7 +846,8 @@ Foam::multiphaseSystem::nearInterface() const forAllConstIter(PtrDictionary, phases_, iter) { - tnearInt.ref() = max(tnearInt(), pos(iter() - 0.01)*pos(0.99 - iter())); + tnearInt.ref() = + max(tnearInt(), pos0(iter() - 0.01)*pos0(0.99 - iter())); } return tnearInt; diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H index 8e2d78cbec..c81f20db76 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H @@ -254,8 +254,8 @@ // dgdt = // ( - // pos(alpha2)*(pEqnComp2 & p)/rho2 - // - pos(alpha1)*(pEqnComp1 & p)/rho1 + // pos0(alpha2)*(pEqnComp2 & p)/rho2 + // - pos0(alpha1)*(pEqnComp1 & p)/rho1 // ); p_rgh.relax(); diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C index 63a2776db4..825022dee9 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C @@ -548,7 +548,8 @@ Foam::multiphaseMixture::nearInterface() const forAllConstIter(PtrDictionary, phases_, iter) { - tnearInt.ref() = max(tnearInt(), pos(iter() - 0.01)*pos(0.99 - iter())); + tnearInt.ref() = + max(tnearInt(), pos0(iter() - 0.01)*pos0(0.99 - iter())); } return tnearInt; diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/VakhrushevEfremov/VakhrushevEfremov.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/VakhrushevEfremov/VakhrushevEfremov.C index 270419c5b4..073f70a5c7 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/VakhrushevEfremov/VakhrushevEfremov.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/aspectRatioModels/VakhrushevEfremov/VakhrushevEfremov.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -71,9 +71,9 @@ Foam::aspectRatioModels::VakhrushevEfremov::E() const return neg(Ta - scalar(1))*scalar(1) - + pos(Ta - scalar(1))*neg(Ta - scalar(39.8)) + + pos0(Ta - scalar(1))*neg(Ta - scalar(39.8)) *pow3(0.81 + 0.206*tanh(1.6 - 2*log10(max(Ta, scalar(1))))) - + pos(Ta - scalar(39.8))*0.24; + + pos0(Ta - scalar(39.8))*0.24; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C index 7649f217c8..6fec92d0b2 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -84,7 +84,7 @@ Foam::tmp Foam::dragModels::GidaspowErgunWenYu::CdRe() const { return - pos(pair_.continuous() - 0.8)*WenYu_->CdRe() + pos0(pair_.continuous() - 0.8)*WenYu_->CdRe() + neg(pair_.continuous() - 0.8)*Ergun_->CdRe(); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C index 9503264de9..792fc2a65e 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -74,7 +74,7 @@ Foam::dragModels::GidaspowSchillerNaumann::CdRe() const volScalarField CdsRe ( neg(Re - 1000)*24.0*(1.0 + 0.15*pow(Re, 0.687))/alpha2 - + pos(Re - 1000)*0.44*max(Re, residualRe_) + + pos0(Re - 1000)*0.44*max(Re, residualRe_) ); return diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/IshiiZuber/IshiiZuber.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/IshiiZuber/IshiiZuber.C index 8f6b115bbc..74adfb84a9 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/IshiiZuber/IshiiZuber.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/IshiiZuber/IshiiZuber.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -80,7 +80,7 @@ Foam::dragModels::IshiiZuber::CdRe() const volScalarField ReM(Re*muc/muMix); volScalarField CdRe ( - pos(1000 - ReM)*24.0*(scalar(1) + 0.15*pow(ReM, 0.687)) + pos0(1000 - ReM)*24.0*(scalar(1) + 0.15*pow(ReM, 0.687)) + neg(1000 - ReM)*0.44*ReM ); @@ -92,7 +92,7 @@ Foam::dragModels::IshiiZuber::CdRe() const volScalarField CdReEllipse(Ealpha*0.6666*sqrt(Eo)*Re); return - pos(CdReEllipse - CdRe) + pos0(CdReEllipse - CdRe) *min(CdReEllipse, Re*sqr(1 - pair_.dispersed())*2.66667) + neg(CdReEllipse - CdRe)*CdRe; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/Lain/Lain.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/Lain/Lain.C index 2093120190..e172ecd7b2 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/Lain/Lain.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/Lain/Lain.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -66,9 +66,9 @@ Foam::tmp Foam::dragModels::Lain::CdRe() const return neg(Re - 1.5)*16.0 - + pos(Re - 1.5)*neg(Re - 80.0)*14.9*pow(Re, 0.22) - + pos(Re - 80.0)*neg(Re - 1500.0)*48*(1.0 - 2.21/sqrt(max(Re, SMALL))) - + pos(Re - 1500.0)*2.61*Re; + + pos0(Re - 1.5)*neg(Re - 80.0)*14.9*pow(Re, 0.22) + + pos0(Re - 80.0)*neg(Re - 1500.0)*48*(1.0 - 2.21/sqrt(max(Re, SMALL))) + + pos0(Re - 1500.0)*2.61*Re; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C index d0818e2c15..4ca93022f4 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -67,7 +67,7 @@ Foam::tmp Foam::dragModels::SchillerNaumann::CdRe() const return neg(Re - 1000)*24.0*(1.0 + 0.15*pow(Re, 0.687)) - + pos(Re - 1000)*0.44*max(Re, residualRe_); + + pos0(Re - 1000)*0.44*max(Re, residualRe_); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/SyamlalOBrien/SyamlalOBrien.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/SyamlalOBrien/SyamlalOBrien.C index b722736b60..0c8c6f7b33 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/SyamlalOBrien/SyamlalOBrien.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/SyamlalOBrien/SyamlalOBrien.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -71,7 +71,7 @@ Foam::tmp Foam::dragModels::SyamlalOBrien::CdRe() const volScalarField B ( neg(alpha2 - 0.85)*(0.8*pow(alpha2, 1.28)) - + pos(alpha2 - 0.85)*(pow(alpha2, 2.65)) + + pos0(alpha2 - 0.85)*(pow(alpha2, 2.65)) ); volScalarField Re(pair_.Re()); volScalarField Vr diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/Tenneti/Tenneti.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/Tenneti/Tenneti.C index 9395700b72..dcd0bba00e 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/Tenneti/Tenneti.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/Tenneti/Tenneti.C @@ -79,7 +79,7 @@ Foam::tmp Foam::dragModels::Tenneti::CdRe() const volScalarField CdReIsolated ( neg(Res - 1000)*24.0*(1.0 + 0.15*pow(Res, 0.687)) - + pos(Res - 1000)*0.44*max(Res, residualRe_) + + pos0(Res - 1000)*0.44*max(Res, residualRe_) ); volScalarField F0 diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C index c00679e5be..1d52dc6534 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -72,7 +72,7 @@ Foam::tmp Foam::dragModels::WenYu::CdRe() const volScalarField CdsRes ( neg(Res - 1000)*24.0*(1.0 + 0.15*pow(Res, 0.687)) - + pos(Res - 1000)*0.44*max(Res, residualRe_) + + pos0(Res - 1000)*0.44*max(Res, residualRe_) ); return diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/TomiyamaLift/TomiyamaLift.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/TomiyamaLift/TomiyamaLift.C index d4a4dfd17e..ca541dbe41 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/TomiyamaLift/TomiyamaLift.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/TomiyamaLift/TomiyamaLift.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -70,8 +70,8 @@ Foam::tmp Foam::liftModels::TomiyamaLift::Cl() const return neg(EoH - scalar(4))*min(0.288*tanh(0.121*pair_.Re()), f) - + pos(EoH - scalar(4))*neg(EoH - scalar(10.7))*f - + pos(EoH - scalar(10.7))*(-0.288); + + pos0(EoH - scalar(4))*neg(EoH - scalar(10.7))*f + + pos0(EoH - scalar(10.7))*(-0.288); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C index 6fc1940165..f549142810 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -80,9 +80,9 @@ Foam::tmp Foam::wallLubricationModels::Frank::Fi() const return zeroGradWalls ( ( - pos(Eo - 1.0)*neg(Eo - 5.0)*exp(-0.933*Eo + 0.179) - + pos(Eo - 5.0)*neg(Eo - 33.0)*(0.00599*Eo - 0.0187) - + pos(Eo - 33.0)*0.179 + pos0(Eo - 1.0)*neg(Eo - 5.0)*exp(-0.933*Eo + 0.179) + + pos0(Eo - 5.0)*neg(Eo - 33.0)*(0.00599*Eo - 0.0187) + + pos0(Eo - 33.0)*0.179 ) *max ( diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/TomiyamaWallLubrication/TomiyamaWallLubrication.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/TomiyamaWallLubrication/TomiyamaWallLubrication.C index f6a1492900..47afcec18d 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/TomiyamaWallLubrication/TomiyamaWallLubrication.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/TomiyamaWallLubrication/TomiyamaWallLubrication.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -78,9 +78,9 @@ Foam::wallLubricationModels::TomiyamaWallLubrication::Fi() const return zeroGradWalls ( ( - pos(Eo - 1.0)*neg(Eo - 5.0)*exp(-0.933*Eo + 0.179) - + pos(Eo - 5.0)*neg(Eo - 33.0)*(0.00599*Eo - 0.0187) - + pos(Eo - 33.0)*0.179 + pos0(Eo - 1.0)*neg(Eo - 5.0)*exp(-0.933*Eo + 0.179) + + pos0(Eo - 5.0)*neg(Eo - 33.0)*(0.00599*Eo - 0.0187) + + pos0(Eo - 33.0)*0.179 ) *0.5 *pair_.dispersed().d() diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C index 4335bace8a..a6dd838d23 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C @@ -379,8 +379,8 @@ void Foam::ThermalPhaseChangePhaseSystem::correctThermo() ( min ( - (pos(iDmdt)*he2 + neg(iDmdt)*hef2) - - (neg(iDmdt)*he1 + pos(iDmdt)*hef1), + (pos0(iDmdt)*he2 + neg(iDmdt)*hef2) + - (neg(iDmdt)*he1 + pos0(iDmdt)*hef1), 0.3*mag(hef2 - hef1) ) ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index 1f8f83599b..be2114fbcd 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -598,7 +598,7 @@ Foam::multiphaseSystem::nearInterface() const tnearInt.ref() = max ( tnearInt(), - pos(phases()[phasei] - 0.01)*pos(0.99 - phases()[phasei]) + pos0(phases()[phasei] - 0.01)*pos0(0.99 - phases()[phasei]) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H index 3445c81fb9..a164b73f26 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H @@ -179,7 +179,7 @@ while (pimple.correct()) ( fvc::interpolate(fvc::average(alphafs[phasei])) ); - surfaceScalarField phiCorrCoeff(pos(alphafBar - 0.99)); + surfaceScalarField phiCorrCoeff(pos0(alphafBar - 0.99)); surfaceScalarField::Boundary& phiCorrCoeffBf = phiCorrCoeff.boundaryFieldRef(); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H index 3365febdf6..c30d4f1465 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H @@ -143,8 +143,8 @@ while (pimple.correct()) // ddtPhiCorr filter -- only apply in pure(ish) phases surfaceScalarField alphaf1Bar(fvc::interpolate(fvc::average(alphaf1))); - surfaceScalarField phiCorrCoeff1(pos(alphaf1Bar - 0.99)); - surfaceScalarField phiCorrCoeff2(pos(0.01 - alphaf1Bar)); + surfaceScalarField phiCorrCoeff1(pos0(alphaf1Bar - 0.99)); + surfaceScalarField phiCorrCoeff2(pos0(0.01 - alphaf1Bar)); { surfaceScalarField::Boundary& phiCorrCoeff1Bf = diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C index 1963b11425..04b8c2917e 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/Lavieville/Lavieville.C @@ -73,7 +73,7 @@ Lavieville::fLiquid ) const { return - pos(alphaLiquid - alphaCrit_) + pos0(alphaLiquid - alphaCrit_) *( 1 - 0.5*exp(-20*(alphaLiquid - alphaCrit_)) ) diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C index 702464b813..1d157b67ab 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -74,7 +74,7 @@ cosine::fLiquid ) const { return - pos(alphaLiquid1_ - alphaLiquid) + pos0(alphaLiquid1_ - alphaLiquid) *( neg(alphaLiquid0_ - alphaLiquid) *( diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C index 2d8a5cce8e..0fa9d5faf6 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -267,7 +267,7 @@ void Foam::JohnsonJacksonParticleThetaFvPatchScalarField::updateCoeffs() this->refValue() = 0.0; this->refGrad() = - pos(alpha - SMALL) + pos0(alpha - SMALL) *constant::mathematical::pi *specularityCoefficient_.value() *alpha diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/alphaCourantNo.H b/applications/solvers/multiphase/twoLiquidMixingFoam/alphaCourantNo.H index 4e13f6ac56..9c8e27d975 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/alphaCourantNo.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/alphaCourantNo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -41,7 +41,7 @@ if (mesh.nInternalFaces()) { scalarField sumPhi ( - pos(alpha1 - 0.01)*pos(0.99 - alpha1) + pos0(alpha1 - 0.01)*pos0(0.99 - alpha1) *fvc::surfaceSum(mag(phi))().primitiveField() ); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/VakhrushevEfremov/VakhrushevEfremov.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/VakhrushevEfremov/VakhrushevEfremov.C index 270419c5b4..073f70a5c7 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/VakhrushevEfremov/VakhrushevEfremov.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/VakhrushevEfremov/VakhrushevEfremov.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -71,9 +71,9 @@ Foam::aspectRatioModels::VakhrushevEfremov::E() const return neg(Ta - scalar(1))*scalar(1) - + pos(Ta - scalar(1))*neg(Ta - scalar(39.8)) + + pos0(Ta - scalar(1))*neg(Ta - scalar(39.8)) *pow3(0.81 + 0.206*tanh(1.6 - 2*log10(max(Ta, scalar(1))))) - + pos(Ta - scalar(39.8))*0.24; + + pos0(Ta - scalar(39.8))*0.24; } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C index ed8a871416..3ad9969954 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -84,7 +84,7 @@ Foam::tmp Foam::dragModels::GidaspowErgunWenYu::CdRe() const { return - pos(pair_.continuous() - 0.8)*WenYu_->CdRe() + pos0(pair_.continuous() - 0.8)*WenYu_->CdRe() + neg(pair_.continuous() - 0.8)*Ergun_->CdRe(); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C index 9503264de9..792fc2a65e 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -74,7 +74,7 @@ Foam::dragModels::GidaspowSchillerNaumann::CdRe() const volScalarField CdsRe ( neg(Re - 1000)*24.0*(1.0 + 0.15*pow(Re, 0.687))/alpha2 - + pos(Re - 1000)*0.44*max(Re, residualRe_) + + pos0(Re - 1000)*0.44*max(Re, residualRe_) ); return diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/IshiiZuber/IshiiZuber.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/IshiiZuber/IshiiZuber.C index 18971fbdc9..74adfb84a9 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/IshiiZuber/IshiiZuber.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/IshiiZuber/IshiiZuber.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -80,7 +80,7 @@ Foam::dragModels::IshiiZuber::CdRe() const volScalarField ReM(Re*muc/muMix); volScalarField CdRe ( - pos(1000 - ReM)*24.0*(scalar(1) + 0.15*pow(ReM, 0.687)) + pos0(1000 - ReM)*24.0*(scalar(1) + 0.15*pow(ReM, 0.687)) + neg(1000 - ReM)*0.44*ReM ); @@ -92,7 +92,7 @@ Foam::dragModels::IshiiZuber::CdRe() const volScalarField CdReEllipse(Ealpha*0.6666*sqrt(Eo)*Re); return - pos(CdReEllipse - CdRe) + pos0(CdReEllipse - CdRe) *min(CdReEllipse, Re*sqr(1 - pair_.dispersed())*2.66667) + neg(CdReEllipse - CdRe)*CdRe; } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/Lain/Lain.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/Lain/Lain.C index 74ce22f7b2..e172ecd7b2 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/Lain/Lain.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/Lain/Lain.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -66,9 +66,9 @@ Foam::tmp Foam::dragModels::Lain::CdRe() const return neg(Re - 1.5)*16.0 - + pos(Re - 1.5)*neg(Re - 80.0)*14.9*pow(Re, 0.22) - + pos(Re - 80.0)*neg(Re - 1500.0)*48*(1.0 - 2.21/sqrt(max(Re, SMALL))) - + pos(Re - 1500.0)*2.61*Re; + + pos0(Re - 1.5)*neg(Re - 80.0)*14.9*pow(Re, 0.22) + + pos0(Re - 80.0)*neg(Re - 1500.0)*48*(1.0 - 2.21/sqrt(max(Re, SMALL))) + + pos0(Re - 1500.0)*2.61*Re; } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C index d0818e2c15..4ca93022f4 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -67,7 +67,7 @@ Foam::tmp Foam::dragModels::SchillerNaumann::CdRe() const return neg(Re - 1000)*24.0*(1.0 + 0.15*pow(Re, 0.687)) - + pos(Re - 1000)*0.44*max(Re, residualRe_); + + pos0(Re - 1000)*0.44*max(Re, residualRe_); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/SyamlalOBrien/SyamlalOBrien.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/SyamlalOBrien/SyamlalOBrien.C index b722736b60..0c8c6f7b33 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/SyamlalOBrien/SyamlalOBrien.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/SyamlalOBrien/SyamlalOBrien.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -71,7 +71,7 @@ Foam::tmp Foam::dragModels::SyamlalOBrien::CdRe() const volScalarField B ( neg(alpha2 - 0.85)*(0.8*pow(alpha2, 1.28)) - + pos(alpha2 - 0.85)*(pow(alpha2, 2.65)) + + pos0(alpha2 - 0.85)*(pow(alpha2, 2.65)) ); volScalarField Re(pair_.Re()); volScalarField Vr diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C index c00679e5be..1d52dc6534 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -72,7 +72,7 @@ Foam::tmp Foam::dragModels::WenYu::CdRe() const volScalarField CdsRes ( neg(Res - 1000)*24.0*(1.0 + 0.15*pow(Res, 0.687)) - + pos(Res - 1000)*0.44*max(Res, residualRe_) + + pos0(Res - 1000)*0.44*max(Res, residualRe_) ); return diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/TomiyamaLift/TomiyamaLift.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/TomiyamaLift/TomiyamaLift.C index d4a4dfd17e..ca541dbe41 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/TomiyamaLift/TomiyamaLift.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/TomiyamaLift/TomiyamaLift.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -70,8 +70,8 @@ Foam::tmp Foam::liftModels::TomiyamaLift::Cl() const return neg(EoH - scalar(4))*min(0.288*tanh(0.121*pair_.Re()), f) - + pos(EoH - scalar(4))*neg(EoH - scalar(10.7))*f - + pos(EoH - scalar(10.7))*(-0.288); + + pos0(EoH - scalar(4))*neg(EoH - scalar(10.7))*f + + pos0(EoH - scalar(10.7))*(-0.288); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C index 0b9065a1a9..024e5ef2df 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -79,9 +79,9 @@ Foam::tmp Foam::wallLubricationModels::Frank::Fi() const return ( - pos(Eo - 1.0)*neg(Eo - 5.0)*exp(-0.933*Eo + 0.179) - + pos(Eo - 5.0)*neg(Eo - 33.0)*(0.00599*Eo - 0.0187) - + pos(Eo - 33.0)*0.179 + pos0(Eo - 1.0)*neg(Eo - 5.0)*exp(-0.933*Eo + 0.179) + + pos0(Eo - 5.0)*neg(Eo - 33.0)*(0.00599*Eo - 0.0187) + + pos0(Eo - 33.0)*0.179 ) *max ( diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/TomiyamaWallLubrication/TomiyamaWallLubrication.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/TomiyamaWallLubrication/TomiyamaWallLubrication.C index 9209c5108c..3abdfa3d4e 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/TomiyamaWallLubrication/TomiyamaWallLubrication.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/TomiyamaWallLubrication/TomiyamaWallLubrication.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -77,9 +77,9 @@ Foam::wallLubricationModels::TomiyamaWallLubrication::Fi() const return ( - pos(Eo - 1.0)*neg(Eo - 5.0)*exp(-0.933*Eo + 0.179) - + pos(Eo - 5.0)*neg(Eo - 33.0)*(0.00599*Eo - 0.0187) - + pos(Eo - 33.0)*0.179 + pos0(Eo - 1.0)*neg(Eo - 5.0)*exp(-0.933*Eo + 0.179) + + pos0(Eo - 5.0)*neg(Eo - 33.0)*(0.00599*Eo - 0.0187) + + pos0(Eo - 33.0)*0.179 ) *0.5 *pair_.dispersed().d() diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/pU/pEqn.H b/applications/solvers/multiphase/twoPhaseEulerFoam/pU/pEqn.H index 2010e65ebc..eabc3961df 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/pU/pEqn.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/pU/pEqn.H @@ -145,8 +145,8 @@ while (pimple.correct()) // ddtPhiCorr filter -- only apply in pure(ish) phases surfaceScalarField alphaf1Bar(fvc::interpolate(fvc::average(alphaf1))); - surfaceScalarField phiCorrCoeff1(pos(alphaf1Bar - 0.99)); - surfaceScalarField phiCorrCoeff2(pos(0.01 - alphaf1Bar)); + surfaceScalarField phiCorrCoeff1(pos0(alphaf1Bar - 0.99)); + surfaceScalarField phiCorrCoeff2(pos0(0.01 - alphaf1Bar)); { surfaceScalarField::Boundary& phiCorrCoeff1Bf = diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C index 2d8a5cce8e..0fa9d5faf6 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -267,7 +267,7 @@ void Foam::JohnsonJacksonParticleThetaFvPatchScalarField::updateCoeffs() this->refValue() = 0.0; this->refGrad() = - pos(alpha - SMALL) + pos0(alpha - SMALL) *constant::mathematical::pi *specularityCoefficient_.value() *alpha diff --git a/etc/codeTemplates/BC/BC.C b/etc/codeTemplates/BC/BC.C index 10e55a5aff..5e32969aa4 100644 --- a/etc/codeTemplates/BC/BC.C +++ b/etc/codeTemplates/BC/BC.C @@ -207,7 +207,7 @@ void Foam::CLASS::updateCoeffs() ( "phi" ); - this->valueFraction() = 1.0 - pos(phip); + this->valueFraction() = 1.0 - pos0(phip); PARENT::updateCoeffs(); } diff --git a/src/OpenFOAM/dimensionSet/dimensionSet.C b/src/OpenFOAM/dimensionSet/dimensionSet.C index 3b4d84d16a..269d25282f 100644 --- a/src/OpenFOAM/dimensionSet/dimensionSet.C +++ b/src/OpenFOAM/dimensionSet/dimensionSet.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -411,12 +411,24 @@ Foam::dimensionSet Foam::pos(const dimensionSet&) } +Foam::dimensionSet Foam::pos0(const dimensionSet&) +{ + return dimless; +} + + Foam::dimensionSet Foam::neg(const dimensionSet&) { return dimless; } +Foam::dimensionSet Foam::neg0(const dimensionSet&) +{ + return dimless; +} + + Foam::dimensionSet Foam::posPart(const dimensionSet& ds) { return ds; diff --git a/src/OpenFOAM/dimensionSet/dimensionSet.H b/src/OpenFOAM/dimensionSet/dimensionSet.H index dd596cc6ea..94a1608c9a 100644 --- a/src/OpenFOAM/dimensionSet/dimensionSet.H +++ b/src/OpenFOAM/dimensionSet/dimensionSet.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -81,7 +81,9 @@ dimensionSet magSqr(const dimensionSet&); dimensionSet mag(const dimensionSet&); dimensionSet sign(const dimensionSet&); dimensionSet pos(const dimensionSet&); +dimensionSet pos0(const dimensionSet&); dimensionSet neg(const dimensionSet&); +dimensionSet neg0(const dimensionSet&); dimensionSet posPart(const dimensionSet&); dimensionSet negPart(const dimensionSet&); dimensionSet inv(const dimensionSet&); @@ -360,7 +362,7 @@ public: friend dimensionSet magSqr(const dimensionSet&); friend dimensionSet mag(const dimensionSet&); friend dimensionSet sign(const dimensionSet&); - friend dimensionSet pos(const dimensionSet&); + friend dimensionSet pos0(const dimensionSet&); friend dimensionSet neg(const dimensionSet&); friend dimensionSet inv(const dimensionSet&); diff --git a/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C b/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C index a03d895bcf..be7cf05115 100644 --- a/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C +++ b/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -198,6 +198,17 @@ dimensionedScalar pos(const dimensionedScalar& ds) } +dimensionedScalar pos0(const dimensionedScalar& ds) +{ + return dimensionedScalar + ( + "pos0(" + ds.name() + ')', + pos0(ds.dimensions()), + ::Foam::pos0(ds.value()) + ); +} + + dimensionedScalar neg(const dimensionedScalar& ds) { return dimensionedScalar @@ -209,13 +220,24 @@ dimensionedScalar neg(const dimensionedScalar& ds) } +dimensionedScalar neg0(const dimensionedScalar& ds) +{ + return dimensionedScalar + ( + "neg0(" + ds.name() + ')', + neg0(ds.dimensions()), + ::Foam::neg0(ds.value()) + ); +} + + dimensionedScalar posPart(const dimensionedScalar& ds) { return dimensionedScalar ( "posPart(" + ds.name() + ')', posPart(ds.dimensions()), - ::Foam::pos(ds.value()) + ::Foam::pos0(ds.value()) ); } diff --git a/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.H b/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.H index d1f618c2de..4ef982f2f1 100644 --- a/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.H +++ b/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -68,7 +68,9 @@ dimensionedScalar hypot(const dimensionedScalar&, const dimensionedScalar&); dimensionedScalar sign(const dimensionedScalar&); dimensionedScalar pos(const dimensionedScalar&); +dimensionedScalar pos0(const dimensionedScalar&); dimensionedScalar neg(const dimensionedScalar&); +dimensionedScalar neg0(const dimensionedScalar&); dimensionedScalar posPart(const dimensionedScalar&); dimensionedScalar negPart(const dimensionedScalar&); diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.C b/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.C index d3d20ce0e2..88bbc16b6b 100644 --- a/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.C +++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -708,7 +708,9 @@ UNARY_FUNCTION(scalar, scalar, sqrt, sqrt) UNARY_FUNCTION(scalar, scalar, cbrt, cbrt) UNARY_FUNCTION(scalar, scalar, sign, sign) UNARY_FUNCTION(scalar, scalar, pos, pos) +UNARY_FUNCTION(scalar, scalar, pos0, pos0) UNARY_FUNCTION(scalar, scalar, neg, neg) +UNARY_FUNCTION(scalar, scalar, neg0, neg0) UNARY_FUNCTION(scalar, scalar, posPart, posPart) UNARY_FUNCTION(scalar, scalar, negPart, negPart) diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.H index 0a9eeae38c..dca5d267a8 100644 --- a/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.H +++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -91,7 +91,9 @@ UNARY_FUNCTION(scalar, scalar, sqrt, sqrt) UNARY_FUNCTION(scalar, scalar, cbrt, cbrt) UNARY_FUNCTION(scalar, scalar, sign, sign) UNARY_FUNCTION(scalar, scalar, pos, pos) +UNARY_FUNCTION(scalar, scalar, pos0, pos0) UNARY_FUNCTION(scalar, scalar, neg, neg) +UNARY_FUNCTION(scalar, scalar, neg0, neg0) UNARY_FUNCTION(scalar, scalar, posPart, posPart) UNARY_FUNCTION(scalar, scalar, negPart, negPart) diff --git a/src/OpenFOAM/fields/FieldFields/scalarFieldField/scalarFieldField.C b/src/OpenFOAM/fields/FieldFields/scalarFieldField/scalarFieldField.C index 3774f66c59..aaf4304b2b 100644 --- a/src/OpenFOAM/fields/FieldFields/scalarFieldField/scalarFieldField.C +++ b/src/OpenFOAM/fields/FieldFields/scalarFieldField/scalarFieldField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -108,7 +108,9 @@ UNARY_FUNCTION(scalar, scalar, sqrt) UNARY_FUNCTION(scalar, scalar, cbrt) UNARY_FUNCTION(scalar, scalar, sign) UNARY_FUNCTION(scalar, scalar, pos) +UNARY_FUNCTION(scalar, scalar, pos0) UNARY_FUNCTION(scalar, scalar, neg) +UNARY_FUNCTION(scalar, scalar, neg0) UNARY_FUNCTION(scalar, scalar, posPart) UNARY_FUNCTION(scalar, scalar, negPart) UNARY_FUNCTION(scalar, scalar, exp) diff --git a/src/OpenFOAM/fields/FieldFields/scalarFieldField/scalarFieldField.H b/src/OpenFOAM/fields/FieldFields/scalarFieldField/scalarFieldField.H index 43e6418914..d16e4a5515 100644 --- a/src/OpenFOAM/fields/FieldFields/scalarFieldField/scalarFieldField.H +++ b/src/OpenFOAM/fields/FieldFields/scalarFieldField/scalarFieldField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -101,7 +101,9 @@ UNARY_FUNCTION(scalar, scalar, sqrt) UNARY_FUNCTION(scalar, scalar, cbrt) UNARY_FUNCTION(scalar, scalar, sign) UNARY_FUNCTION(scalar, scalar, pos) +UNARY_FUNCTION(scalar, scalar, pos0) UNARY_FUNCTION(scalar, scalar, neg) +UNARY_FUNCTION(scalar, scalar, neg0) UNARY_FUNCTION(scalar, scalar, posPart) UNARY_FUNCTION(scalar, scalar, negPart) UNARY_FUNCTION(scalar, scalar, exp) diff --git a/src/OpenFOAM/fields/Fields/scalarField/scalarField.C b/src/OpenFOAM/fields/Fields/scalarField/scalarField.C index 0aac998c8d..ba4d14c175 100644 --- a/src/OpenFOAM/fields/Fields/scalarField/scalarField.C +++ b/src/OpenFOAM/fields/Fields/scalarField/scalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -132,7 +132,9 @@ UNARY_FUNCTION(scalar, scalar, sqrt) UNARY_FUNCTION(scalar, scalar, cbrt) UNARY_FUNCTION(scalar, scalar, sign) UNARY_FUNCTION(scalar, scalar, pos) +UNARY_FUNCTION(scalar, scalar, pos0) UNARY_FUNCTION(scalar, scalar, neg) +UNARY_FUNCTION(scalar, scalar, neg0) UNARY_FUNCTION(scalar, scalar, posPart) UNARY_FUNCTION(scalar, scalar, negPart) UNARY_FUNCTION(scalar, scalar, exp) diff --git a/src/OpenFOAM/fields/Fields/scalarField/scalarField.H b/src/OpenFOAM/fields/Fields/scalarField/scalarField.H index 4d85eece11..45a1e6ea27 100644 --- a/src/OpenFOAM/fields/Fields/scalarField/scalarField.H +++ b/src/OpenFOAM/fields/Fields/scalarField/scalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -106,7 +106,9 @@ UNARY_FUNCTION(scalar, scalar, sqrt) UNARY_FUNCTION(scalar, scalar, cbrt) UNARY_FUNCTION(scalar, scalar, sign) UNARY_FUNCTION(scalar, scalar, pos) +UNARY_FUNCTION(scalar, scalar, pos0) UNARY_FUNCTION(scalar, scalar, neg) +UNARY_FUNCTION(scalar, scalar, neg0) UNARY_FUNCTION(scalar, scalar, posPart) UNARY_FUNCTION(scalar, scalar, negPart) UNARY_FUNCTION(scalar, scalar, exp) diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.C b/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.C index 0362e15dbe..24444e2b0c 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -851,7 +851,9 @@ UNARY_FUNCTION(scalar, scalar, sqrt, sqrt) UNARY_FUNCTION(scalar, scalar, cbrt, cbrt) UNARY_FUNCTION(scalar, scalar, sign, sign) UNARY_FUNCTION(scalar, scalar, pos, pos) +UNARY_FUNCTION(scalar, scalar, pos0, pos0) UNARY_FUNCTION(scalar, scalar, neg, neg) +UNARY_FUNCTION(scalar, scalar, neg0, neg0) UNARY_FUNCTION(scalar, scalar, posPart, posPart) UNARY_FUNCTION(scalar, scalar, negPart, negPart) diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.H b/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.H index 950b526796..be54c17243 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.H +++ b/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -99,7 +99,9 @@ UNARY_FUNCTION(scalar, scalar, sqrt, sqrt) UNARY_FUNCTION(scalar, scalar, cbrt, cbrt) UNARY_FUNCTION(scalar, scalar, sign, sign) UNARY_FUNCTION(scalar, scalar, pos, pos) +UNARY_FUNCTION(scalar, scalar, pos0, pos0) UNARY_FUNCTION(scalar, scalar, neg, neg) +UNARY_FUNCTION(scalar, scalar, neg0, neg0) UNARY_FUNCTION(scalar, scalar, posPart, posPart) UNARY_FUNCTION(scalar, scalar, negPart, negPart) diff --git a/src/OpenFOAM/primitives/Scalar/Scalar.H b/src/OpenFOAM/primitives/Scalar/Scalar.H index 0641bc1257..ea5c5239da 100644 --- a/src/OpenFOAM/primitives/Scalar/Scalar.H +++ b/src/OpenFOAM/primitives/Scalar/Scalar.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License @@ -165,24 +165,41 @@ inline Scalar component(const Scalar s, const direction) } +//- Return 1 if s is positive or 0 otherwise -1 inline Scalar sign(const Scalar s) { return (s >= 0)? 1: -1; } +//- Return 1 if s is positive but not 0 inline Scalar pos(const Scalar s) +{ + return (s > 0)? 1: 0; +} + + +//- Return 1 if s is positive or 0 +inline Scalar pos0(const Scalar s) { return (s >= 0)? 1: 0; } +//- Return 1 if s is negative but not 0 inline Scalar neg(const Scalar s) { return (s < 0)? 1: 0; } +//- Return 1 if s is negative or 0 +inline Scalar neg0(const Scalar s) +{ + return (s <= 0)? 1: 0; +} + + //- Return the positive part of s inline Scalar posPart(const Scalar s) { diff --git a/src/OpenFOAM/primitives/ints/label/labelSpecific.H b/src/OpenFOAM/primitives/ints/label/labelSpecific.H index 66fa99d0cc..77194fb543 100644 --- a/src/OpenFOAM/primitives/ints/label/labelSpecific.H +++ b/src/OpenFOAM/primitives/ints/label/labelSpecific.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -41,7 +41,7 @@ inline label sign(const label s) return (s >= 0)? 1: -1; } -inline label pos(const label s) +inline label pos0(const label s) { return (s >= 0)? 1: 0; } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C index 3fd5e2e1e3..cd362bfd3b 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -147,7 +147,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs() patch().lookupPatchField(this->phiName_); this->refValue() = Cmu75*kp*sqrt(kp)/mixingLength_; - this->valueFraction() = 1.0 - pos(phip); + this->valueFraction() = 1.0 - pos0(phip); inletOutletFvPatchScalarField::updateCoeffs(); } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C index 018e706e43..548c7db738 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -143,7 +143,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs() patch().lookupPatchField(this->phiName_); this->refValue() = sqrt(kp)/(Cmu25*mixingLength_); - this->valueFraction() = 1.0 - pos(phip); + this->valueFraction() = 1.0 - pos0(phip); inletOutletFvPatchScalarField::updateCoeffs(); } diff --git a/src/combustionModels/diffusion/diffusion.C b/src/combustionModels/diffusion/diffusion.C index ca6f896067..c5a3ee9ea5 100644 --- a/src/combustionModels/diffusion/diffusion.C +++ b/src/combustionModels/diffusion/diffusion.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -86,7 +86,7 @@ void diffusion::correct() this->wFuel_ == C_*this->turbulence().muEff() *mag(fvc::grad(YFuel) & fvc::grad(YO2)) - *pos(YFuel)*pos(YO2); + *pos0(YFuel)*pos0(YO2); } } } diff --git a/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C b/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C index 737e27877e..03e4290f3e 100644 --- a/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C +++ b/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C @@ -107,7 +107,7 @@ bool Foam::dynamicInkJetFvMesh::update() stationaryPoints_.component(vector::X)* ( 1.0 - + pos + + pos0 ( - (stationaryPoints_.component(vector::X)) - refPlaneX_ diff --git a/src/engine/engineMesh/fvMotionSolverEngineMesh/fvMotionSolverEngineMesh.C b/src/engine/engineMesh/fvMotionSolverEngineMesh/fvMotionSolverEngineMesh.C index 2238fe09df..583ddde324 100644 --- a/src/engine/engineMesh/fvMotionSolverEngineMesh/fvMotionSolverEngineMesh.C +++ b/src/engine/engineMesh/fvMotionSolverEngineMesh/fvMotionSolverEngineMesh.C @@ -81,7 +81,7 @@ void Foam::fvMotionSolverEngineMesh::move() ); motionSolver_.pointMotionU().boundaryFieldRef()[linerIndex_] == - pistonSpeed*pos(deckHeight_.value() - linerPoints) + pistonSpeed*pos0(deckHeight_.value() - linerPoints) *(deckHeight_.value() - linerPoints) /(deckHeight_.value() - pistonPlusLayers); } diff --git a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C index 29fd691ef7..6749dfb749 100644 --- a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C +++ b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -149,7 +149,7 @@ void Foam::SRFFreestreamVelocityFvPatchVectorField::updateCoeffs() } // Set the inlet-outlet choice based on the direction of the freestream - valueFraction() = 1.0 - pos(refValue() & patch().Sf()); + valueFraction() = 1.0 - pos0(refValue() & patch().Sf()); mixedFvPatchField::updateCoeffs(); } diff --git a/src/finiteVolume/cfdTools/general/bound/bound.C b/src/finiteVolume/cfdTools/general/bound/bound.C index a63891166b..91563fedc8 100644 --- a/src/finiteVolume/cfdTools/general/bound/bound.C +++ b/src/finiteVolume/cfdTools/general/bound/bound.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -48,7 +48,7 @@ Foam::bound(volScalarField& vsf, const dimensionedScalar& lowerBound) ( vsf.primitiveField(), fvc::average(max(vsf, lowerBound))().primitiveField() - * pos(-vsf.primitiveField()) + * pos0(-vsf.primitiveField()) ), lowerBound.value() ); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C index 3b82d16f5f..49aa47efad 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License @@ -128,7 +128,7 @@ void Foam::inletOutletFvPatchField::updateCoeffs() phiName_ ); - this->valueFraction() = 1.0 - pos(phip); + this->valueFraction() = 1.0 - pos0(phip); mixedFvPatchField::updateCoeffs(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C index 5c32980c1e..5735ee6222 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License @@ -178,8 +178,8 @@ void Foam::inletOutletTotalTemperatureFvPatchScalarField::updateCoeffs() scalar gM1ByG = (gamma_ - 1.0)/gamma_; this->refValue() = - T0_/(1.0 + 0.5*psip*gM1ByG*(1.0 - pos(phip))*magSqr(Up)); - this->valueFraction() = 1.0 - pos(phip); + T0_/(1.0 + 0.5*psip*gM1ByG*(1.0 - pos0(phip))*magSqr(Up)); + this->valueFraction() = 1.0 - pos0(phip); inletOutletFvPatchScalarField::updateCoeffs(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/interfaceCompression/interfaceCompressionFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/interfaceCompression/interfaceCompressionFvPatchScalarField.C index 6300160c11..3a9b21df69 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/interfaceCompression/interfaceCompressionFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/interfaceCompression/interfaceCompressionFvPatchScalarField.C @@ -97,7 +97,7 @@ void Foam::interfaceCompressionFvPatchScalarField::updateCoeffs() return; } - operator==(pos(this->patchInternalField() - 0.5)); + operator==(pos0(this->patchInternalField() - 0.5)); fixedValueFvPatchScalarField::updateCoeffs(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C index 15d3a99fa6..408b40686b 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License @@ -128,7 +128,7 @@ void Foam::outletInletFvPatchField::updateCoeffs() phiName_ ); - this->valueFraction() = pos(phip); + this->valueFraction() = pos0(phip); mixedFvPatchField::updateCoeffs(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C index aadbfcfd85..f1dbf71611 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -284,7 +284,7 @@ void Foam::plenumPressureFvPatchScalarField::updateCoeffs() // Limit to prevent outflow const scalarField p_new ( - (1.0 - pos(phi))*t*plenumPressure + pos(phi)*max(p, plenumPressure) + (1.0 - pos0(phi))*t*plenumPressure + pos0(phi)*max(p, plenumPressure) ); // Relaxation fraction diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C index fc3e22c9b4..c472c754eb 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License @@ -178,7 +178,7 @@ void Foam::pressureDirectedInletOutletVelocityFvPatchVectorField::updateCoeffs() << exit(FatalError); } - valueFraction() = 1.0 - pos(phip); + valueFraction() = 1.0 - pos0(phip); mixedFvPatchVectorField::updateCoeffs(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C index d86e95fa37..84abe77c3f 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License @@ -152,7 +152,7 @@ void Foam::pressureInletOutletParSlipVelocityFvPatchVectorField::updateCoeffs() << exit(FatalError); } - valueFraction() = 1.0 - pos(phip); + valueFraction() = 1.0 - pos0(phip); mixedFvPatchVectorField::updateCoeffs(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C index fb4c677659..84689bf1e9 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License @@ -148,7 +148,7 @@ void Foam::pressureNormalInletOutletVelocityFvPatchVectorField::updateCoeffs() << exit(FatalError); } - valueFraction() = 1.0 - pos(phip); + valueFraction() = 1.0 - pos0(phip); mixedFvPatchVectorField::updateCoeffs(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalHydrostaticPressure/prghTotalHydrostaticPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalHydrostaticPressure/prghTotalHydrostaticPressureFvPatchScalarField.C index d650d7f0ad..e1705e24bc 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalHydrostaticPressure/prghTotalHydrostaticPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalHydrostaticPressure/prghTotalHydrostaticPressureFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -133,7 +133,7 @@ void Foam::prghTotalHydrostaticPressureFvPatchScalarField::updateCoeffs() operator== ( ph_rghp - - 0.5*rhop*(1.0 - pos(phip))*magSqr(Up) + - 0.5*rhop*(1.0 - pos0(phip))*magSqr(Up) ); fixedValueFvPatchScalarField::updateCoeffs(); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C index 1140551128..9a4f9b1572 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -180,7 +180,7 @@ void Foam::prghTotalPressureFvPatchScalarField::updateCoeffs() operator== ( p0_ - - 0.5*rhop*(1.0 - pos(phip))*magSqr(Up) + - 0.5*rhop*(1.0 - pos0(phip))*magSqr(Up) - rhop*((g.value() & patch().Cf()) - ghRef.value()) ); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C index bcd8557253..de94aeeffe 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -176,7 +176,7 @@ void Foam::totalPressureFvPatchScalarField::updateCoeffs const fvPatchField& rho = patch().lookupPatchField(rhoName_); - operator==(p0p - 0.5*rho*(1.0 - pos(phip))*magSqr(Up)); + operator==(p0p - 0.5*rho*(1.0 - pos0(phip))*magSqr(Up)); } else { @@ -194,14 +194,14 @@ void Foam::totalPressureFvPatchScalarField::updateCoeffs p0p /pow ( - (1.0 + 0.5*psip*gM1ByG*(1.0 - pos(phip))*magSqr(Up)), + (1.0 + 0.5*psip*gM1ByG*(1.0 - pos0(phip))*magSqr(Up)), 1.0/gM1ByG ) ); } else { - operator==(p0p/(1.0 + 0.5*psip*(1.0 - pos(phip))*magSqr(Up))); + operator==(p0p/(1.0 + 0.5*psip*(1.0 - pos0(phip))*magSqr(Up))); } } @@ -209,7 +209,7 @@ void Foam::totalPressureFvPatchScalarField::updateCoeffs else if (internalField().dimensions() == dimPressure/dimDensity) { // Incompressible flow - operator==(p0p - 0.5*(1.0 - pos(phip))*magSqr(Up)); + operator==(p0p - 0.5*(1.0 - pos0(phip))*magSqr(Up)); } else { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C index 15df485592..df7d20629c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -167,7 +167,7 @@ void Foam::totalTemperatureFvPatchScalarField::updateCoeffs() operator== ( - T0_/(1.0 + 0.5*psip*gM1ByG*(1.0 - pos(phip))*magSqr(Up)) + T0_/(1.0 + 0.5*psip*gM1ByG*(1.0 - pos0(phip))*magSqr(Up)) ); fixedValueFvPatchScalarField::updateCoeffs(); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C index 58dbd64126..20369fe63c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License @@ -137,7 +137,7 @@ updateCoeffs() patch().lookupPatchField(this->phiName_); this->refValue() = 1.5*sqr(intensity_)*magSqr(Up); - this->valueFraction() = 1.0 - pos(phip); + this->valueFraction() = 1.0 - pos0(phip); inletOutletFvPatchScalarField::updateCoeffs(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C index 4eacb7541c..011b8552fd 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation \\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License @@ -150,7 +150,7 @@ void Foam::uniformInletOutletFvPatchField::updateCoeffs() phiName_ ); - this->valueFraction() = 1.0 - pos(phip); + this->valueFraction() = 1.0 - pos0(phip); mixedFvPatchField::updateCoeffs(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C index 0a37e65e80..152a74937c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -164,7 +164,7 @@ void Foam::uniformTotalPressureFvPatchScalarField::updateCoeffs const fvPatchField& rho = patch().lookupPatchField(rhoName_); - operator==(p0 - 0.5*rho*(1.0 - pos(phip))*magSqr(Up)); + operator==(p0 - 0.5*rho*(1.0 - pos0(phip))*magSqr(Up)); } else { @@ -182,14 +182,14 @@ void Foam::uniformTotalPressureFvPatchScalarField::updateCoeffs p0 /pow ( - (1.0 + 0.5*psip*gM1ByG*(1.0 - pos(phip))*magSqr(Up)), + (1.0 + 0.5*psip*gM1ByG*(1.0 - pos0(phip))*magSqr(Up)), 1.0/gM1ByG ) ); } else { - operator==(p0/(1.0 + 0.5*psip*(1.0 - pos(phip))*magSqr(Up))); + operator==(p0/(1.0 + 0.5*psip*(1.0 - pos0(phip))*magSqr(Up))); } } @@ -197,7 +197,7 @@ void Foam::uniformTotalPressureFvPatchScalarField::updateCoeffs else if (internalField().dimensions() == dimPressure/dimDensity) { // Incompressible flow - operator==(p0 - 0.5*(1.0 - pos(phip))*magSqr(Up)); + operator==(p0 - 0.5*(1.0 - pos0(phip))*magSqr(Up)); } else { diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/blended/blended.H b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/blended/blended.H index 491683ee68..f74b56df9d 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/blended/blended.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/blended/blended.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -191,7 +191,7 @@ public: { return blendingFactor_*this->mesh().surfaceInterpolation::weights() - + (1 - blendingFactor_)*pos(this->faceFlux_); + + (1 - blendingFactor_)*pos0(this->faceFlux_); } }; diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C index d2c301c8dc..5e891eb16f 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -153,7 +153,7 @@ Foam::limitedSurfaceInterpolationScheme::weights { pWeights[face] = pWeights[face]*CDweights[face] - + (1.0 - pWeights[face])*pos(faceFlux_[face]); + + (1.0 - pWeights[face])*pos0(faceFlux_[face]); } surfaceScalarField::Boundary& bWeights = @@ -170,7 +170,7 @@ Foam::limitedSurfaceInterpolationScheme::weights { pWeights[face] = pWeights[face]*pCDweights[face] - + (1.0 - pWeights[face])*pos(pFaceFlux[face]); + + (1.0 - pWeights[face])*pos0(pFaceFlux[face]); } } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/upwind/upwind.H b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/upwind/upwind.H index 30aa055539..aa71d183b9 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/upwind/upwind.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/upwind/upwind.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -134,7 +134,7 @@ public: //- Return the interpolation weighting factors tmp weights() const { - return pos(this->faceFlux_); + return pos0(this->faceFlux_); } //- Return the interpolation weighting factors diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/upwind/multivariateUpwind.H b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/upwind/multivariateUpwind.H index 504d542eab..848f1bae52 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/upwind/multivariateUpwind.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/upwind/multivariateUpwind.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -131,7 +131,7 @@ public: const GeometricField& ) const { - return pos(faceFlux_); + return pos0(faceFlux_); } }; diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/outletStabilised/outletStabilised.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/outletStabilised/outletStabilised.H index 0413fc3753..93cd27b9aa 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/outletStabilised/outletStabilised.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/outletStabilised/outletStabilised.H @@ -166,7 +166,7 @@ public: if (mesh_.isInternalFace(facei)) { // Apply upwind differencing - w[facei] = pos(faceFlux_[facei]); + w[facei] = pos0(faceFlux_[facei]); } } } diff --git a/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C b/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C index fdcfdf3a95..9152d17fde 100644 --- a/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C +++ b/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C @@ -687,14 +687,14 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::processValues case opSumDirection: { const vector n(dict_.lookup("direction")); - return gSum(pos(values*(Sf & n))*mag(values)); + return gSum(pos0(values*(Sf & n))*mag(values)); } case opSumDirectionBalance: { const vector n(dict_.lookup("direction")); const scalarField nv(values*(Sf & n)); - return gSum(pos(nv)*mag(values) - neg(nv)*mag(values)); + return gSum(pos0(nv)*mag(values) - neg(nv)*mag(values)); } default: { @@ -722,7 +722,7 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::processValues n /= mag(n) + ROOTVSMALL; const scalarField nv(n & values); - return gSum(pos(nv)*n*(nv)); + return gSum(pos0(nv)*n*(nv)); } case opSumDirectionBalance: { @@ -730,7 +730,7 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::processValues n /= mag(n) + ROOTVSMALL; const scalarField nv(n & values); - return gSum(pos(nv)*n*(nv)); + return gSum(pos0(nv)*n*(nv)); } case opAreaNormalAverage: { diff --git a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C index f16a25aa50..685e90ec44 100644 --- a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C +++ b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C @@ -248,7 +248,7 @@ void Foam::DSMCCloud::collisions() vector relPos = p.position() - cC; label subCell = - pos(relPos.x()) + 2*pos(relPos.y()) + 4*pos(relPos.z()); + pos0(relPos.x()) + 2*pos0(relPos.y()) + 4*pos0(relPos.z()); subCells[subCell].append(i); whichSubCell[i] = subCell; diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H index 2dff7d3a55..667cff55fd 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -136,7 +136,7 @@ inline Foam::tmp Foam::ReactingCloud::SYi return fvm::Sp(neg(sourceField)*sourceField/(Yi + YiSMALL), Yi) - + pos(sourceField)*sourceField; + + pos0(sourceField)*sourceField; } else { diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecordI.H b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecordI.H index 8c693d9c27..2d9f12ca26 100644 --- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecordI.H +++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollisionRecordList/PairCollisionRecord/PairCollisionRecordI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -72,7 +72,7 @@ inline Type& Foam::PairCollisionRecord::collisionData() template inline bool Foam::PairCollisionRecord::accessed() const { - return pos(origProcOfOther_); + return pos0(origProcOfOther_); } diff --git a/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.C b/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.C index e4c4b9c14c..40edce3f2c 100644 --- a/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.C +++ b/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License @@ -109,10 +109,10 @@ bool Foam::triSurfaceSearch::checkUniqueHit surface().faceNormals()[edgeFacei]; const label signCurrHit = - pos(currHitNormal & lineVec); + pos0(currHitNormal & lineVec); const label signExistingHit = - pos(existingHitNormal & lineVec); + pos0(existingHitNormal & lineVec); if (signCurrHit == signExistingHit) { diff --git a/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C b/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C index 151f1c10cb..1142d6d8c7 100644 --- a/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C +++ b/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C @@ -350,7 +350,7 @@ bool Foam::movingConeTopoFvMesh::update() newPoints = topoChangeMap().preMotionPoints() + ( - pos(0.5 - mag(motionMask_)) // cells above the body + pos0(0.5 - mag(motionMask_)) // cells above the body )*curMotionVel_*time().deltaT().value(); } else @@ -369,7 +369,7 @@ bool Foam::movingConeTopoFvMesh::update() newPoints = points() + ( - pos(0.5 - mag(motionMask_)) // cells above the body + pos0(0.5 - mag(motionMask_)) // cells above the body )*curMotionVel_*time().deltaT().value(); } } @@ -380,7 +380,7 @@ bool Foam::movingConeTopoFvMesh::update() newPoints = points() + ( - pos(0.5 - mag(motionMask_)) // cells above the body + pos0(0.5 - mag(motionMask_)) // cells above the body )*curMotionVel_*time().deltaT().value(); } diff --git a/src/transportModels/interfaceProperties/interfaceProperties.C b/src/transportModels/interfaceProperties/interfaceProperties.C index 7fcc2629e9..978ecef4ca 100644 --- a/src/transportModels/interfaceProperties/interfaceProperties.C +++ b/src/transportModels/interfaceProperties/interfaceProperties.C @@ -221,7 +221,7 @@ Foam::interfaceProperties::surfaceTensionForce() const Foam::tmp Foam::interfaceProperties::nearInterface() const { - return pos(alpha1_ - 0.01)*pos(0.99 - alpha1_); + return pos0(alpha1_ - 0.01)*pos0(0.99 - alpha1_); }