diff --git a/applications/solvers/multiphase/VoF/setRDeltaT.H b/applications/solvers/multiphase/VoF/setRDeltaT.H index 697e6588e..26b237e79 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 d720aa97f..bbcd6affd 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/alphaEqn.H +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/alphaEqn.H @@ -179,8 +179,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 74f451968..a2df55aa5 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C @@ -219,8 +219,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 32d3fe430..0f0cfac21 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 ade26e86a..e9b1b9358 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 07fe4a233..cc21a86a4 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 cc4c7f965..cd9e68d7f 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 5e2048aad..59d3358d4 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 d4d77a2bb..a9983ed21 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 83419c54d..975ad0c02 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 fd644f5c5..55c58b6c4 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 798e9c2eb..8963e026e 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -850,7 +850,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 8e2d78cbe..c81f20db7 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 21b5edefe..fdb1ec547 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C @@ -550,7 +550,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 270419c5b..073f70a5c 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 7649f217c..6fec92d0b 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 9503264de..792fc2a65 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 8f6b115bb..74adfb84a 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 209312019..e172ecd7b 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 d0818e2c1..4ca93022f 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 b722736b6..0c8c6f7b3 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 9395700b7..dcd0bba00 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 c00679e5b..1d52dc653 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 d4a4dfd17..ca541dbe4 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 6fc194016..f54914281 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 f6a149290..47afcec18 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 4335bace8..a6dd838d2 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 805d99844..ea2dcc736 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -597,7 +597,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 3445c81fb..a164b73f2 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 3365febdf..c30d4f146 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 1963b1142..04b8c2917 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 702464b81..1d157b67a 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 2d8a5cce8..0fa9d5faf 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 4e13f6ac5..9c8e27d97 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 270419c5b..073f70a5c 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 ed8a87141..3ad996995 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 9503264de..792fc2a65 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 18971fbdc..74adfb84a 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 74ce22f7b..e172ecd7b 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 d0818e2c1..4ca93022f 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 b722736b6..0c8c6f7b3 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 c00679e5b..1d52dc653 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 d4a4dfd17..ca541dbe4 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 0b9065a1a..024e5ef2d 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 9209c5108..3abdfa3d4 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 2010e65eb..eabc3961d 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 2d8a5cce8..0fa9d5faf 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 d31c281a5..9e9e48004 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 11279746a..166e164b1 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 dd596cc6e..94a1608c9 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 a03d895bc..be7cf0511 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 d1f618c2d..4ef982f2f 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 d3d20ce0e..88bbc16b6 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 0a9eeae38..dca5d267a 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 3774f66c5..aaf4304b2 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 43e641891..d16e4a551 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 0aac998c8..ba4d14c17 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 4d85eece1..45a1e6ea2 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 0362e15db..24444e2b0 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 950b52679..be54c1724 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 34a705153..146ea3fdb 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 | ------------------------------------------------------------------------------- License @@ -155,24 +155,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 66fa99d0c..77194fb54 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/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C index 2dbfd2b97..b68761251 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C +++ b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.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 @@ -112,7 +112,7 @@ tmp SpalartAllmarasIDDES::dTilda const volScalarField magGradU(mag(gradU)); tmp fHill = - 2*(pos(alpha)*pow(expTerm, -11.09) + neg(alpha)*pow(expTerm, -9.0)); + 2*(pos0(alpha)*pow(expTerm, -11.09) + neg(alpha)*pow(expTerm, -9.0)); tmp fStep = min(2*pow(expTerm, -9.0), scalar(1)); const volScalarField fHyb(max(1 - fd(magGradU), fStep)); diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C index 3fd5e2e1e..cd362bfd3 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 018e706e4..548c7db73 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 ca6f89606..c5a3ee9ea 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 b05475fcd..213646ec5 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 aba57144d..7e187e757 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 29fd691ef..6749dfb74 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 a63891166..91563fedc 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 e5036e405..8e838f7a0 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 | ------------------------------------------------------------------------------- License @@ -126,7 +126,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 8a113e177..5c33b06a7 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 | ------------------------------------------------------------------------------- License @@ -176,8 +176,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 6300160c1..3a9b21df6 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 7584e4aa1..5393ddc6a 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 | ------------------------------------------------------------------------------- License @@ -126,7 +126,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 aadbfcfd8..f1dbf7161 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 377408a86..70c175487 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 | ------------------------------------------------------------------------------- License @@ -177,7 +177,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 0bfeff65a..0da3f1910 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 | ------------------------------------------------------------------------------- License @@ -151,7 +151,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 13ab7e6e1..9497e1780 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 | ------------------------------------------------------------------------------- License @@ -147,7 +147,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 d650d7f0a..e1705e24b 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 114055112..9a4f9b157 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 bcd855725..de94aeeff 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 15df48559..df7d20629 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 b364efbb4..7c0436a6d 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 | ------------------------------------------------------------------------------- License @@ -136,7 +136,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 2ae611dc1..8dd00091d 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 | ------------------------------------------------------------------------------- License @@ -148,7 +148,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 0a37e65e8..152a74937 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 74ed9b157..0b5984c74 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 @@ -188,7 +188,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 62d3b3903..e1bcd7db2 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 @@ -155,7 +155,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 = @@ -172,7 +172,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 65958ea8f..e98695053 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 @@ -131,7 +131,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 504d542ea..848f1bae5 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 77b505d88..28eab9e82 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/outletStabilised/outletStabilised.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/outletStabilised/outletStabilised.H @@ -163,7 +163,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 3ac33748e..952d40218 100644 --- a/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C +++ b/src/functionObjects/field/fieldValues/surfaceFieldValue/surfaceFieldValue.C @@ -582,14 +582,14 @@ processValues case opSumDirection: { vector n(dict_.lookup("direction")); - return sum(pos(values*(Sf & n))*mag(values)); + return sum(pos0(values*(Sf & n))*mag(values)); } case opSumDirectionBalance: { vector n(dict_.lookup("direction")); const scalarField nv(values*(Sf & n)); - return sum(pos(nv)*mag(values) - neg(nv)*mag(values)); + return sum(pos0(nv)*mag(values) - neg(nv)*mag(values)); } default: { @@ -617,7 +617,7 @@ processValues n /= mag(n) + ROOTVSMALL; const scalarField nv(n & values); - return sum(pos(nv)*n*(nv)); + return sum(pos0(nv)*n*(nv)); } case opSumDirectionBalance: { @@ -625,7 +625,7 @@ processValues n /= mag(n) + ROOTVSMALL; const scalarField nv(n & values); - return sum(pos(nv)*n*(nv)); + return sum(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 6c9d8a26f..ee87ace3b 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 2dff7d3a5..667cff55f 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 8c693d9c2..2d9f12ca2 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 d95b28a98..793d32fc7 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 | ------------------------------------------------------------------------------- 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 151f1c10c..1142d6d8c 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 b2fc80eb3..a448009d1 100644 --- a/src/transportModels/interfaceProperties/interfaceProperties.C +++ b/src/transportModels/interfaceProperties/interfaceProperties.C @@ -226,7 +226,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_); } diff --git a/src/waves/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.C b/src/waves/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.C index 5466911c6..81897565c 100644 --- a/src/waves/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.C +++ b/src/waves/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.C @@ -153,7 +153,7 @@ void Foam::waveAlphaFvPatchScalarField::updateCoeffs() const scalarField& phip = patch().lookupPatchField("phi"); - valueFraction() = 1 - pos(phip); + valueFraction() = 1 - pos0(phip); } else { diff --git a/src/waves/derivedFvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.C b/src/waves/derivedFvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.C index c6877d3df..48e39a555 100644 --- a/src/waves/derivedFvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.C +++ b/src/waves/derivedFvPatchFields/waveVelocity/waveVelocityFvPatchVectorField.C @@ -140,7 +140,7 @@ void Foam::waveVelocityFvPatchVectorField::updateCoeffs() const symmTensorField nnp(sqr(patch().nf())); // Fix all components if inflow, just normal if outflow - valueFraction() = (1 - pos(phip))*I + pos(phip)*nnp; + valueFraction() = (1 - pos0(phip))*I + pos0(phip)*nnp; directionMixedFvPatchVectorField::updateCoeffs(); directionMixedFvPatchVectorField::evaluate(); diff --git a/src/waves/waveModels/Airy/Airy.C b/src/waves/waveModels/Airy/Airy.C index ff94fe3d2..7a639951e 100644 --- a/src/waves/waveModels/Airy/Airy.C +++ b/src/waves/waveModels/Airy/Airy.C @@ -86,7 +86,7 @@ Foam::tmp Foam::waveModels::Airy::velocity if (shallow()) { const scalar kh = k()*depth(); - const scalarField khz((kh + kz)*pos(kh + kz)); + const scalarField khz((kh + kz)*pos0(kh + kz)); return wa*zip(cosh(khz)*cos(phi), sinh(khz)*sin(phi))/sinh(kh); } else diff --git a/src/waves/waveModels/Stokes2/Stokes2.C b/src/waves/waveModels/Stokes2/Stokes2.C index 9b6d7d50f..958734e1c 100644 --- a/src/waves/waveModels/Stokes2/Stokes2.C +++ b/src/waves/waveModels/Stokes2/Stokes2.C @@ -95,7 +95,7 @@ Foam::tmp Foam::waveModels::Stokes2::velocity const scalarField phi(angle(t, u, x)); const scalarField kz(- k()*mag(z - elevation(t, u, x))); const scalar kh = k()*depth(); - const scalarField khz((kh + kz)*pos(kh + kz)); + const scalarField khz((kh + kz)*pos0(kh + kz)); const scalar kwaa = k()*omega(u)*sqr(amplitude(t)); return