mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
Rationalize the "pos" function
"pos" now returns 1 if the argument is greater than 0, otherwise it returns 0. This is consistent with the common mathematical definition of the "pos" function: https://en.wikipedia.org/wiki/Sign_(mathematics) However the previous implementation in which 1 was also returned for a 0 argument is useful in many situations so the "pos0" has been added which returns 1 if the argument is greater or equal to 0. Additionally the "neg0" has been added which returns 1 if if the argument is less than or equal to 0.
This commit is contained in:
@ -73,8 +73,8 @@
|
|||||||
rDeltaT.ref() = max
|
rDeltaT.ref() = max
|
||||||
(
|
(
|
||||||
rDeltaT(),
|
rDeltaT(),
|
||||||
pos(alpha1Bar() - alphaSpreadMin)
|
pos0(alpha1Bar() - alphaSpreadMin)
|
||||||
*pos(alphaSpreadMax - alpha1Bar())
|
*pos0(alphaSpreadMax - alpha1Bar())
|
||||||
*fvc::surfaceSum(mag(phi))()()
|
*fvc::surfaceSum(mag(phi))()()
|
||||||
/((2*maxAlphaCo)*mesh.V())
|
/((2*maxAlphaCo)*mesh.V())
|
||||||
);
|
);
|
||||||
|
|||||||
@ -179,8 +179,8 @@
|
|||||||
solve(fvm::ddt(alpha1) + fvc::div(alphaPhi1));
|
solve(fvm::ddt(alpha1) + fvc::div(alphaPhi1));
|
||||||
|
|
||||||
// Create the diffusion coefficients for alpha2<->alpha3
|
// Create the diffusion coefficients for alpha2<->alpha3
|
||||||
volScalarField Dc23(D23*max(alpha3, scalar(0))*pos(alpha2));
|
volScalarField Dc23(D23*max(alpha3, scalar(0))*pos0(alpha2));
|
||||||
volScalarField Dc32(D23*max(alpha2, scalar(0))*pos(alpha3));
|
volScalarField Dc32(D23*max(alpha2, scalar(0))*pos0(alpha3));
|
||||||
|
|
||||||
// Add the diffusive flux for alpha3->alpha2
|
// Add the diffusive flux for alpha3->alpha2
|
||||||
alphaPhi2 -= fvc::interpolate(Dc32)*mesh.magSf()*fvc::snGrad(alpha1);
|
alphaPhi2 -= fvc::interpolate(Dc32)*mesh.magSf()*fvc::snGrad(alpha1);
|
||||||
|
|||||||
@ -219,8 +219,8 @@ Foam::threePhaseInterfaceProperties::nearInterface() const
|
|||||||
{
|
{
|
||||||
return max
|
return max
|
||||||
(
|
(
|
||||||
pos(mixture_.alpha1() - 0.01)*pos(0.99 - mixture_.alpha1()),
|
pos0(mixture_.alpha1() - 0.01)*pos0(0.99 - mixture_.alpha1()),
|
||||||
pos(mixture_.alpha2() - 0.01)*pos(0.99 - mixture_.alpha2())
|
pos0(mixture_.alpha2() - 0.01)*pos0(0.99 - mixture_.alpha2())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -87,7 +87,7 @@ Foam::phaseChangeTwoPhaseMixtures::Kunz::mDotP() const
|
|||||||
return Pair<tmp<volScalarField>>
|
return Pair<tmp<volScalarField>>
|
||||||
(
|
(
|
||||||
mcCoeff_*sqr(limitedAlpha1)*(1.0 - limitedAlpha1)
|
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())
|
(-mvCoeff_)*limitedAlpha1*neg(p - pSat())
|
||||||
);
|
);
|
||||||
|
|||||||
@ -83,7 +83,7 @@ Foam::phaseChangeTwoPhaseMixtures::Merkle::mDotP() const
|
|||||||
|
|
||||||
return Pair<tmp<volScalarField>>
|
return Pair<tmp<volScalarField>>
|
||||||
(
|
(
|
||||||
mcCoeff_*(1.0 - limitedAlpha1)*pos(p - pSat()),
|
mcCoeff_*(1.0 - limitedAlpha1)*pos0(p - pSat()),
|
||||||
(-mvCoeff_)*limitedAlpha1*neg(p - pSat())
|
(-mvCoeff_)*limitedAlpha1*neg(p - pSat())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -136,7 +136,7 @@ Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::mDotP() const
|
|||||||
|
|
||||||
return Pair<tmp<volScalarField>>
|
return Pair<tmp<volScalarField>>
|
||||||
(
|
(
|
||||||
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
|
(-Cv_)*(1.0 + alphaNuc() - limitedAlpha1)*neg(p - pSat())*apCoeff
|
||||||
);
|
);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -78,13 +78,13 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::GidaspowErgunWenYu::K
|
|||||||
volScalarField Cds
|
volScalarField Cds
|
||||||
(
|
(
|
||||||
neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)
|
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)
|
// Wen and Yu (1966)
|
||||||
return
|
return
|
||||||
(
|
(
|
||||||
pos(alpha2 - 0.8)
|
pos0(alpha2 - 0.8)
|
||||||
*(0.75*Cds*phase2_.rho()*Ur*bp/d)
|
*(0.75*Cds*phase2_.rho()*Ur*bp/d)
|
||||||
+ neg(alpha2 - 0.8)
|
+ neg(alpha2 - 0.8)
|
||||||
*(
|
*(
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -77,7 +77,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::GidaspowSchillerNaumann::K
|
|||||||
volScalarField Cds
|
volScalarField Cds
|
||||||
(
|
(
|
||||||
neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)
|
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();
|
return 0.75*Cds*phase2_.rho()*Ur*bp/phase1_.d();
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -74,7 +74,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::SchillerNaumann::K
|
|||||||
volScalarField Cds
|
volScalarField Cds
|
||||||
(
|
(
|
||||||
neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)
|
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();
|
return 0.75*Cds*phase2_.rho()*Ur/phase1_.d();
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -75,7 +75,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::SyamlalOBrien::K
|
|||||||
volScalarField B
|
volScalarField B
|
||||||
(
|
(
|
||||||
neg(alpha2 - 0.85)*(0.8*pow(alpha2, 1.28))
|
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)));
|
volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)));
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -77,7 +77,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::WenYu::K
|
|||||||
volScalarField Cds
|
volScalarField Cds
|
||||||
(
|
(
|
||||||
neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)
|
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();
|
return 0.75*Cds*phase2_.rho()*Ur*bp/phase1_.d();
|
||||||
|
|||||||
@ -850,7 +850,8 @@ Foam::multiphaseSystem::nearInterface() const
|
|||||||
|
|
||||||
forAllConstIter(PtrDictionary<phaseModel>, phases_, iter)
|
forAllConstIter(PtrDictionary<phaseModel>, 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;
|
return tnearInt;
|
||||||
|
|||||||
@ -254,8 +254,8 @@
|
|||||||
// dgdt =
|
// dgdt =
|
||||||
|
|
||||||
// (
|
// (
|
||||||
// pos(alpha2)*(pEqnComp2 & p)/rho2
|
// pos0(alpha2)*(pEqnComp2 & p)/rho2
|
||||||
// - pos(alpha1)*(pEqnComp1 & p)/rho1
|
// - pos0(alpha1)*(pEqnComp1 & p)/rho1
|
||||||
// );
|
// );
|
||||||
|
|
||||||
p_rgh.relax();
|
p_rgh.relax();
|
||||||
|
|||||||
@ -550,7 +550,8 @@ Foam::multiphaseMixture::nearInterface() const
|
|||||||
|
|
||||||
forAllConstIter(PtrDictionary<phase>, phases_, iter)
|
forAllConstIter(PtrDictionary<phase>, 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;
|
return tnearInt;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -71,9 +71,9 @@ Foam::aspectRatioModels::VakhrushevEfremov::E() const
|
|||||||
|
|
||||||
return
|
return
|
||||||
neg(Ta - scalar(1))*scalar(1)
|
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)))))
|
*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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -84,7 +84,7 @@ Foam::tmp<Foam::volScalarField>
|
|||||||
Foam::dragModels::GidaspowErgunWenYu::CdRe() const
|
Foam::dragModels::GidaspowErgunWenYu::CdRe() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
pos(pair_.continuous() - 0.8)*WenYu_->CdRe()
|
pos0(pair_.continuous() - 0.8)*WenYu_->CdRe()
|
||||||
+ neg(pair_.continuous() - 0.8)*Ergun_->CdRe();
|
+ neg(pair_.continuous() - 0.8)*Ergun_->CdRe();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -74,7 +74,7 @@ Foam::dragModels::GidaspowSchillerNaumann::CdRe() const
|
|||||||
volScalarField CdsRe
|
volScalarField CdsRe
|
||||||
(
|
(
|
||||||
neg(Re - 1000)*24.0*(1.0 + 0.15*pow(Re, 0.687))/alpha2
|
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
|
return
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -80,7 +80,7 @@ Foam::dragModels::IshiiZuber::CdRe() const
|
|||||||
volScalarField ReM(Re*muc/muMix);
|
volScalarField ReM(Re*muc/muMix);
|
||||||
volScalarField CdRe
|
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
|
+ neg(1000 - ReM)*0.44*ReM
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ Foam::dragModels::IshiiZuber::CdRe() const
|
|||||||
volScalarField CdReEllipse(Ealpha*0.6666*sqrt(Eo)*Re);
|
volScalarField CdReEllipse(Ealpha*0.6666*sqrt(Eo)*Re);
|
||||||
|
|
||||||
return
|
return
|
||||||
pos(CdReEllipse - CdRe)
|
pos0(CdReEllipse - CdRe)
|
||||||
*min(CdReEllipse, Re*sqr(1 - pair_.dispersed())*2.66667)
|
*min(CdReEllipse, Re*sqr(1 - pair_.dispersed())*2.66667)
|
||||||
+ neg(CdReEllipse - CdRe)*CdRe;
|
+ neg(CdReEllipse - CdRe)*CdRe;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -66,9 +66,9 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::Lain::CdRe() const
|
|||||||
|
|
||||||
return
|
return
|
||||||
neg(Re - 1.5)*16.0
|
neg(Re - 1.5)*16.0
|
||||||
+ pos(Re - 1.5)*neg(Re - 80.0)*14.9*pow(Re, 0.22)
|
+ pos0(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)))
|
+ pos0(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 - 1500.0)*2.61*Re;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -67,7 +67,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::SchillerNaumann::CdRe() const
|
|||||||
|
|
||||||
return
|
return
|
||||||
neg(Re - 1000)*24.0*(1.0 + 0.15*pow(Re, 0.687))
|
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_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -71,7 +71,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::SyamlalOBrien::CdRe() const
|
|||||||
volScalarField B
|
volScalarField B
|
||||||
(
|
(
|
||||||
neg(alpha2 - 0.85)*(0.8*pow(alpha2, 1.28))
|
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 Re(pair_.Re());
|
||||||
volScalarField Vr
|
volScalarField Vr
|
||||||
|
|||||||
@ -79,7 +79,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::Tenneti::CdRe() const
|
|||||||
volScalarField CdReIsolated
|
volScalarField CdReIsolated
|
||||||
(
|
(
|
||||||
neg(Res - 1000)*24.0*(1.0 + 0.15*pow(Res, 0.687))
|
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
|
volScalarField F0
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -72,7 +72,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::WenYu::CdRe() const
|
|||||||
volScalarField CdsRes
|
volScalarField CdsRes
|
||||||
(
|
(
|
||||||
neg(Res - 1000)*24.0*(1.0 + 0.15*pow(Res, 0.687))
|
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
|
return
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -70,8 +70,8 @@ Foam::tmp<Foam::volScalarField> Foam::liftModels::TomiyamaLift::Cl() const
|
|||||||
|
|
||||||
return
|
return
|
||||||
neg(EoH - scalar(4))*min(0.288*tanh(0.121*pair_.Re()), f)
|
neg(EoH - scalar(4))*min(0.288*tanh(0.121*pair_.Re()), f)
|
||||||
+ pos(EoH - scalar(4))*neg(EoH - scalar(10.7))*f
|
+ pos0(EoH - scalar(4))*neg(EoH - scalar(10.7))*f
|
||||||
+ pos(EoH - scalar(10.7))*(-0.288);
|
+ pos0(EoH - scalar(10.7))*(-0.288);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -80,9 +80,9 @@ Foam::tmp<Foam::volVectorField> Foam::wallLubricationModels::Frank::Fi() const
|
|||||||
return zeroGradWalls
|
return zeroGradWalls
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
pos(Eo - 1.0)*neg(Eo - 5.0)*exp(-0.933*Eo + 0.179)
|
pos0(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)
|
+ pos0(Eo - 5.0)*neg(Eo - 33.0)*(0.00599*Eo - 0.0187)
|
||||||
+ pos(Eo - 33.0)*0.179
|
+ pos0(Eo - 33.0)*0.179
|
||||||
)
|
)
|
||||||
*max
|
*max
|
||||||
(
|
(
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -78,9 +78,9 @@ Foam::wallLubricationModels::TomiyamaWallLubrication::Fi() const
|
|||||||
return zeroGradWalls
|
return zeroGradWalls
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
pos(Eo - 1.0)*neg(Eo - 5.0)*exp(-0.933*Eo + 0.179)
|
pos0(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)
|
+ pos0(Eo - 5.0)*neg(Eo - 33.0)*(0.00599*Eo - 0.0187)
|
||||||
+ pos(Eo - 33.0)*0.179
|
+ pos0(Eo - 33.0)*0.179
|
||||||
)
|
)
|
||||||
*0.5
|
*0.5
|
||||||
*pair_.dispersed().d()
|
*pair_.dispersed().d()
|
||||||
|
|||||||
@ -379,8 +379,8 @@ void Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::correctThermo()
|
|||||||
(
|
(
|
||||||
min
|
min
|
||||||
(
|
(
|
||||||
(pos(iDmdt)*he2 + neg(iDmdt)*hef2)
|
(pos0(iDmdt)*he2 + neg(iDmdt)*hef2)
|
||||||
- (neg(iDmdt)*he1 + pos(iDmdt)*hef1),
|
- (neg(iDmdt)*he1 + pos0(iDmdt)*hef1),
|
||||||
0.3*mag(hef2 - hef1)
|
0.3*mag(hef2 - hef1)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -597,7 +597,7 @@ Foam::multiphaseSystem::nearInterface() const
|
|||||||
tnearInt.ref() = max
|
tnearInt.ref() = max
|
||||||
(
|
(
|
||||||
tnearInt(),
|
tnearInt(),
|
||||||
pos(phases()[phasei] - 0.01)*pos(0.99 - phases()[phasei])
|
pos0(phases()[phasei] - 0.01)*pos0(0.99 - phases()[phasei])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -179,7 +179,7 @@ while (pimple.correct())
|
|||||||
(
|
(
|
||||||
fvc::interpolate(fvc::average(alphafs[phasei]))
|
fvc::interpolate(fvc::average(alphafs[phasei]))
|
||||||
);
|
);
|
||||||
surfaceScalarField phiCorrCoeff(pos(alphafBar - 0.99));
|
surfaceScalarField phiCorrCoeff(pos0(alphafBar - 0.99));
|
||||||
|
|
||||||
surfaceScalarField::Boundary& phiCorrCoeffBf =
|
surfaceScalarField::Boundary& phiCorrCoeffBf =
|
||||||
phiCorrCoeff.boundaryFieldRef();
|
phiCorrCoeff.boundaryFieldRef();
|
||||||
|
|||||||
@ -143,8 +143,8 @@ while (pimple.correct())
|
|||||||
|
|
||||||
// ddtPhiCorr filter -- only apply in pure(ish) phases
|
// ddtPhiCorr filter -- only apply in pure(ish) phases
|
||||||
surfaceScalarField alphaf1Bar(fvc::interpolate(fvc::average(alphaf1)));
|
surfaceScalarField alphaf1Bar(fvc::interpolate(fvc::average(alphaf1)));
|
||||||
surfaceScalarField phiCorrCoeff1(pos(alphaf1Bar - 0.99));
|
surfaceScalarField phiCorrCoeff1(pos0(alphaf1Bar - 0.99));
|
||||||
surfaceScalarField phiCorrCoeff2(pos(0.01 - alphaf1Bar));
|
surfaceScalarField phiCorrCoeff2(pos0(0.01 - alphaf1Bar));
|
||||||
|
|
||||||
{
|
{
|
||||||
surfaceScalarField::Boundary& phiCorrCoeff1Bf =
|
surfaceScalarField::Boundary& phiCorrCoeff1Bf =
|
||||||
|
|||||||
@ -73,7 +73,7 @@ Lavieville::fLiquid
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
pos(alphaLiquid - alphaCrit_)
|
pos0(alphaLiquid - alphaCrit_)
|
||||||
*(
|
*(
|
||||||
1 - 0.5*exp(-20*(alphaLiquid - alphaCrit_))
|
1 - 0.5*exp(-20*(alphaLiquid - alphaCrit_))
|
||||||
)
|
)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -74,7 +74,7 @@ cosine::fLiquid
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
pos(alphaLiquid1_ - alphaLiquid)
|
pos0(alphaLiquid1_ - alphaLiquid)
|
||||||
*(
|
*(
|
||||||
neg(alphaLiquid0_ - alphaLiquid)
|
neg(alphaLiquid0_ - alphaLiquid)
|
||||||
*(
|
*(
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -267,7 +267,7 @@ void Foam::JohnsonJacksonParticleThetaFvPatchScalarField::updateCoeffs()
|
|||||||
this->refValue() = 0.0;
|
this->refValue() = 0.0;
|
||||||
|
|
||||||
this->refGrad() =
|
this->refGrad() =
|
||||||
pos(alpha - SMALL)
|
pos0(alpha - SMALL)
|
||||||
*constant::mathematical::pi
|
*constant::mathematical::pi
|
||||||
*specularityCoefficient_.value()
|
*specularityCoefficient_.value()
|
||||||
*alpha
|
*alpha
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -41,7 +41,7 @@ if (mesh.nInternalFaces())
|
|||||||
{
|
{
|
||||||
scalarField sumPhi
|
scalarField sumPhi
|
||||||
(
|
(
|
||||||
pos(alpha1 - 0.01)*pos(0.99 - alpha1)
|
pos0(alpha1 - 0.01)*pos0(0.99 - alpha1)
|
||||||
*fvc::surfaceSum(mag(phi))().primitiveField()
|
*fvc::surfaceSum(mag(phi))().primitiveField()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -71,9 +71,9 @@ Foam::aspectRatioModels::VakhrushevEfremov::E() const
|
|||||||
|
|
||||||
return
|
return
|
||||||
neg(Ta - scalar(1))*scalar(1)
|
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)))))
|
*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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -84,7 +84,7 @@ Foam::tmp<Foam::volScalarField>
|
|||||||
Foam::dragModels::GidaspowErgunWenYu::CdRe() const
|
Foam::dragModels::GidaspowErgunWenYu::CdRe() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
pos(pair_.continuous() - 0.8)*WenYu_->CdRe()
|
pos0(pair_.continuous() - 0.8)*WenYu_->CdRe()
|
||||||
+ neg(pair_.continuous() - 0.8)*Ergun_->CdRe();
|
+ neg(pair_.continuous() - 0.8)*Ergun_->CdRe();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -74,7 +74,7 @@ Foam::dragModels::GidaspowSchillerNaumann::CdRe() const
|
|||||||
volScalarField CdsRe
|
volScalarField CdsRe
|
||||||
(
|
(
|
||||||
neg(Re - 1000)*24.0*(1.0 + 0.15*pow(Re, 0.687))/alpha2
|
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
|
return
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -80,7 +80,7 @@ Foam::dragModels::IshiiZuber::CdRe() const
|
|||||||
volScalarField ReM(Re*muc/muMix);
|
volScalarField ReM(Re*muc/muMix);
|
||||||
volScalarField CdRe
|
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
|
+ neg(1000 - ReM)*0.44*ReM
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ Foam::dragModels::IshiiZuber::CdRe() const
|
|||||||
volScalarField CdReEllipse(Ealpha*0.6666*sqrt(Eo)*Re);
|
volScalarField CdReEllipse(Ealpha*0.6666*sqrt(Eo)*Re);
|
||||||
|
|
||||||
return
|
return
|
||||||
pos(CdReEllipse - CdRe)
|
pos0(CdReEllipse - CdRe)
|
||||||
*min(CdReEllipse, Re*sqr(1 - pair_.dispersed())*2.66667)
|
*min(CdReEllipse, Re*sqr(1 - pair_.dispersed())*2.66667)
|
||||||
+ neg(CdReEllipse - CdRe)*CdRe;
|
+ neg(CdReEllipse - CdRe)*CdRe;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -66,9 +66,9 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::Lain::CdRe() const
|
|||||||
|
|
||||||
return
|
return
|
||||||
neg(Re - 1.5)*16.0
|
neg(Re - 1.5)*16.0
|
||||||
+ pos(Re - 1.5)*neg(Re - 80.0)*14.9*pow(Re, 0.22)
|
+ pos0(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)))
|
+ pos0(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 - 1500.0)*2.61*Re;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -67,7 +67,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::SchillerNaumann::CdRe() const
|
|||||||
|
|
||||||
return
|
return
|
||||||
neg(Re - 1000)*24.0*(1.0 + 0.15*pow(Re, 0.687))
|
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_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -71,7 +71,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::SyamlalOBrien::CdRe() const
|
|||||||
volScalarField B
|
volScalarField B
|
||||||
(
|
(
|
||||||
neg(alpha2 - 0.85)*(0.8*pow(alpha2, 1.28))
|
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 Re(pair_.Re());
|
||||||
volScalarField Vr
|
volScalarField Vr
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -72,7 +72,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::WenYu::CdRe() const
|
|||||||
volScalarField CdsRes
|
volScalarField CdsRes
|
||||||
(
|
(
|
||||||
neg(Res - 1000)*24.0*(1.0 + 0.15*pow(Res, 0.687))
|
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
|
return
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -70,8 +70,8 @@ Foam::tmp<Foam::volScalarField> Foam::liftModels::TomiyamaLift::Cl() const
|
|||||||
|
|
||||||
return
|
return
|
||||||
neg(EoH - scalar(4))*min(0.288*tanh(0.121*pair_.Re()), f)
|
neg(EoH - scalar(4))*min(0.288*tanh(0.121*pair_.Re()), f)
|
||||||
+ pos(EoH - scalar(4))*neg(EoH - scalar(10.7))*f
|
+ pos0(EoH - scalar(4))*neg(EoH - scalar(10.7))*f
|
||||||
+ pos(EoH - scalar(10.7))*(-0.288);
|
+ pos0(EoH - scalar(10.7))*(-0.288);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -79,9 +79,9 @@ Foam::tmp<Foam::volVectorField> Foam::wallLubricationModels::Frank::Fi() const
|
|||||||
|
|
||||||
return
|
return
|
||||||
(
|
(
|
||||||
pos(Eo - 1.0)*neg(Eo - 5.0)*exp(-0.933*Eo + 0.179)
|
pos0(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)
|
+ pos0(Eo - 5.0)*neg(Eo - 33.0)*(0.00599*Eo - 0.0187)
|
||||||
+ pos(Eo - 33.0)*0.179
|
+ pos0(Eo - 33.0)*0.179
|
||||||
)
|
)
|
||||||
*max
|
*max
|
||||||
(
|
(
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -77,9 +77,9 @@ Foam::wallLubricationModels::TomiyamaWallLubrication::Fi() const
|
|||||||
|
|
||||||
return
|
return
|
||||||
(
|
(
|
||||||
pos(Eo - 1.0)*neg(Eo - 5.0)*exp(-0.933*Eo + 0.179)
|
pos0(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)
|
+ pos0(Eo - 5.0)*neg(Eo - 33.0)*(0.00599*Eo - 0.0187)
|
||||||
+ pos(Eo - 33.0)*0.179
|
+ pos0(Eo - 33.0)*0.179
|
||||||
)
|
)
|
||||||
*0.5
|
*0.5
|
||||||
*pair_.dispersed().d()
|
*pair_.dispersed().d()
|
||||||
|
|||||||
@ -145,8 +145,8 @@ while (pimple.correct())
|
|||||||
|
|
||||||
// ddtPhiCorr filter -- only apply in pure(ish) phases
|
// ddtPhiCorr filter -- only apply in pure(ish) phases
|
||||||
surfaceScalarField alphaf1Bar(fvc::interpolate(fvc::average(alphaf1)));
|
surfaceScalarField alphaf1Bar(fvc::interpolate(fvc::average(alphaf1)));
|
||||||
surfaceScalarField phiCorrCoeff1(pos(alphaf1Bar - 0.99));
|
surfaceScalarField phiCorrCoeff1(pos0(alphaf1Bar - 0.99));
|
||||||
surfaceScalarField phiCorrCoeff2(pos(0.01 - alphaf1Bar));
|
surfaceScalarField phiCorrCoeff2(pos0(0.01 - alphaf1Bar));
|
||||||
|
|
||||||
{
|
{
|
||||||
surfaceScalarField::Boundary& phiCorrCoeff1Bf =
|
surfaceScalarField::Boundary& phiCorrCoeff1Bf =
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -267,7 +267,7 @@ void Foam::JohnsonJacksonParticleThetaFvPatchScalarField::updateCoeffs()
|
|||||||
this->refValue() = 0.0;
|
this->refValue() = 0.0;
|
||||||
|
|
||||||
this->refGrad() =
|
this->refGrad() =
|
||||||
pos(alpha - SMALL)
|
pos0(alpha - SMALL)
|
||||||
*constant::mathematical::pi
|
*constant::mathematical::pi
|
||||||
*specularityCoefficient_.value()
|
*specularityCoefficient_.value()
|
||||||
*alpha
|
*alpha
|
||||||
|
|||||||
@ -207,7 +207,7 @@ void Foam::CLASS::updateCoeffs()
|
|||||||
(
|
(
|
||||||
"phi"
|
"phi"
|
||||||
);
|
);
|
||||||
this->valueFraction() = 1.0 - pos(phip);
|
this->valueFraction() = 1.0 - pos0(phip);
|
||||||
|
|
||||||
PARENT::updateCoeffs();
|
PARENT::updateCoeffs();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
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&)
|
Foam::dimensionSet Foam::neg(const dimensionSet&)
|
||||||
{
|
{
|
||||||
return dimless;
|
return dimless;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::dimensionSet Foam::neg0(const dimensionSet&)
|
||||||
|
{
|
||||||
|
return dimless;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::dimensionSet Foam::posPart(const dimensionSet& ds)
|
Foam::dimensionSet Foam::posPart(const dimensionSet& ds)
|
||||||
{
|
{
|
||||||
return ds;
|
return ds;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -81,7 +81,9 @@ dimensionSet magSqr(const dimensionSet&);
|
|||||||
dimensionSet mag(const dimensionSet&);
|
dimensionSet mag(const dimensionSet&);
|
||||||
dimensionSet sign(const dimensionSet&);
|
dimensionSet sign(const dimensionSet&);
|
||||||
dimensionSet pos(const dimensionSet&);
|
dimensionSet pos(const dimensionSet&);
|
||||||
|
dimensionSet pos0(const dimensionSet&);
|
||||||
dimensionSet neg(const dimensionSet&);
|
dimensionSet neg(const dimensionSet&);
|
||||||
|
dimensionSet neg0(const dimensionSet&);
|
||||||
dimensionSet posPart(const dimensionSet&);
|
dimensionSet posPart(const dimensionSet&);
|
||||||
dimensionSet negPart(const dimensionSet&);
|
dimensionSet negPart(const dimensionSet&);
|
||||||
dimensionSet inv(const dimensionSet&);
|
dimensionSet inv(const dimensionSet&);
|
||||||
@ -360,7 +362,7 @@ public:
|
|||||||
friend dimensionSet magSqr(const dimensionSet&);
|
friend dimensionSet magSqr(const dimensionSet&);
|
||||||
friend dimensionSet mag(const dimensionSet&);
|
friend dimensionSet mag(const dimensionSet&);
|
||||||
friend dimensionSet sign(const dimensionSet&);
|
friend dimensionSet sign(const dimensionSet&);
|
||||||
friend dimensionSet pos(const dimensionSet&);
|
friend dimensionSet pos0(const dimensionSet&);
|
||||||
friend dimensionSet neg(const dimensionSet&);
|
friend dimensionSet neg(const dimensionSet&);
|
||||||
friend dimensionSet inv(const dimensionSet&);
|
friend dimensionSet inv(const dimensionSet&);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
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)
|
dimensionedScalar neg(const dimensionedScalar& ds)
|
||||||
{
|
{
|
||||||
return dimensionedScalar
|
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)
|
dimensionedScalar posPart(const dimensionedScalar& ds)
|
||||||
{
|
{
|
||||||
return dimensionedScalar
|
return dimensionedScalar
|
||||||
(
|
(
|
||||||
"posPart(" + ds.name() + ')',
|
"posPart(" + ds.name() + ')',
|
||||||
posPart(ds.dimensions()),
|
posPart(ds.dimensions()),
|
||||||
::Foam::pos(ds.value())
|
::Foam::pos0(ds.value())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -68,7 +68,9 @@ dimensionedScalar hypot(const dimensionedScalar&, const dimensionedScalar&);
|
|||||||
|
|
||||||
dimensionedScalar sign(const dimensionedScalar&);
|
dimensionedScalar sign(const dimensionedScalar&);
|
||||||
dimensionedScalar pos(const dimensionedScalar&);
|
dimensionedScalar pos(const dimensionedScalar&);
|
||||||
|
dimensionedScalar pos0(const dimensionedScalar&);
|
||||||
dimensionedScalar neg(const dimensionedScalar&);
|
dimensionedScalar neg(const dimensionedScalar&);
|
||||||
|
dimensionedScalar neg0(const dimensionedScalar&);
|
||||||
dimensionedScalar posPart(const dimensionedScalar&);
|
dimensionedScalar posPart(const dimensionedScalar&);
|
||||||
dimensionedScalar negPart(const dimensionedScalar&);
|
dimensionedScalar negPart(const dimensionedScalar&);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -708,7 +708,9 @@ UNARY_FUNCTION(scalar, scalar, sqrt, sqrt)
|
|||||||
UNARY_FUNCTION(scalar, scalar, cbrt, cbrt)
|
UNARY_FUNCTION(scalar, scalar, cbrt, cbrt)
|
||||||
UNARY_FUNCTION(scalar, scalar, sign, sign)
|
UNARY_FUNCTION(scalar, scalar, sign, sign)
|
||||||
UNARY_FUNCTION(scalar, scalar, pos, pos)
|
UNARY_FUNCTION(scalar, scalar, pos, pos)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, pos0, pos0)
|
||||||
UNARY_FUNCTION(scalar, scalar, neg, neg)
|
UNARY_FUNCTION(scalar, scalar, neg, neg)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, neg0, neg0)
|
||||||
UNARY_FUNCTION(scalar, scalar, posPart, posPart)
|
UNARY_FUNCTION(scalar, scalar, posPart, posPart)
|
||||||
UNARY_FUNCTION(scalar, scalar, negPart, negPart)
|
UNARY_FUNCTION(scalar, scalar, negPart, negPart)
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -91,7 +91,9 @@ UNARY_FUNCTION(scalar, scalar, sqrt, sqrt)
|
|||||||
UNARY_FUNCTION(scalar, scalar, cbrt, cbrt)
|
UNARY_FUNCTION(scalar, scalar, cbrt, cbrt)
|
||||||
UNARY_FUNCTION(scalar, scalar, sign, sign)
|
UNARY_FUNCTION(scalar, scalar, sign, sign)
|
||||||
UNARY_FUNCTION(scalar, scalar, pos, pos)
|
UNARY_FUNCTION(scalar, scalar, pos, pos)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, pos0, pos0)
|
||||||
UNARY_FUNCTION(scalar, scalar, neg, neg)
|
UNARY_FUNCTION(scalar, scalar, neg, neg)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, neg0, neg0)
|
||||||
UNARY_FUNCTION(scalar, scalar, posPart, posPart)
|
UNARY_FUNCTION(scalar, scalar, posPart, posPart)
|
||||||
UNARY_FUNCTION(scalar, scalar, negPart, negPart)
|
UNARY_FUNCTION(scalar, scalar, negPart, negPart)
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -108,7 +108,9 @@ UNARY_FUNCTION(scalar, scalar, sqrt)
|
|||||||
UNARY_FUNCTION(scalar, scalar, cbrt)
|
UNARY_FUNCTION(scalar, scalar, cbrt)
|
||||||
UNARY_FUNCTION(scalar, scalar, sign)
|
UNARY_FUNCTION(scalar, scalar, sign)
|
||||||
UNARY_FUNCTION(scalar, scalar, pos)
|
UNARY_FUNCTION(scalar, scalar, pos)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, pos0)
|
||||||
UNARY_FUNCTION(scalar, scalar, neg)
|
UNARY_FUNCTION(scalar, scalar, neg)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, neg0)
|
||||||
UNARY_FUNCTION(scalar, scalar, posPart)
|
UNARY_FUNCTION(scalar, scalar, posPart)
|
||||||
UNARY_FUNCTION(scalar, scalar, negPart)
|
UNARY_FUNCTION(scalar, scalar, negPart)
|
||||||
UNARY_FUNCTION(scalar, scalar, exp)
|
UNARY_FUNCTION(scalar, scalar, exp)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -101,7 +101,9 @@ UNARY_FUNCTION(scalar, scalar, sqrt)
|
|||||||
UNARY_FUNCTION(scalar, scalar, cbrt)
|
UNARY_FUNCTION(scalar, scalar, cbrt)
|
||||||
UNARY_FUNCTION(scalar, scalar, sign)
|
UNARY_FUNCTION(scalar, scalar, sign)
|
||||||
UNARY_FUNCTION(scalar, scalar, pos)
|
UNARY_FUNCTION(scalar, scalar, pos)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, pos0)
|
||||||
UNARY_FUNCTION(scalar, scalar, neg)
|
UNARY_FUNCTION(scalar, scalar, neg)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, neg0)
|
||||||
UNARY_FUNCTION(scalar, scalar, posPart)
|
UNARY_FUNCTION(scalar, scalar, posPart)
|
||||||
UNARY_FUNCTION(scalar, scalar, negPart)
|
UNARY_FUNCTION(scalar, scalar, negPart)
|
||||||
UNARY_FUNCTION(scalar, scalar, exp)
|
UNARY_FUNCTION(scalar, scalar, exp)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -132,7 +132,9 @@ UNARY_FUNCTION(scalar, scalar, sqrt)
|
|||||||
UNARY_FUNCTION(scalar, scalar, cbrt)
|
UNARY_FUNCTION(scalar, scalar, cbrt)
|
||||||
UNARY_FUNCTION(scalar, scalar, sign)
|
UNARY_FUNCTION(scalar, scalar, sign)
|
||||||
UNARY_FUNCTION(scalar, scalar, pos)
|
UNARY_FUNCTION(scalar, scalar, pos)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, pos0)
|
||||||
UNARY_FUNCTION(scalar, scalar, neg)
|
UNARY_FUNCTION(scalar, scalar, neg)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, neg0)
|
||||||
UNARY_FUNCTION(scalar, scalar, posPart)
|
UNARY_FUNCTION(scalar, scalar, posPart)
|
||||||
UNARY_FUNCTION(scalar, scalar, negPart)
|
UNARY_FUNCTION(scalar, scalar, negPart)
|
||||||
UNARY_FUNCTION(scalar, scalar, exp)
|
UNARY_FUNCTION(scalar, scalar, exp)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -106,7 +106,9 @@ UNARY_FUNCTION(scalar, scalar, sqrt)
|
|||||||
UNARY_FUNCTION(scalar, scalar, cbrt)
|
UNARY_FUNCTION(scalar, scalar, cbrt)
|
||||||
UNARY_FUNCTION(scalar, scalar, sign)
|
UNARY_FUNCTION(scalar, scalar, sign)
|
||||||
UNARY_FUNCTION(scalar, scalar, pos)
|
UNARY_FUNCTION(scalar, scalar, pos)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, pos0)
|
||||||
UNARY_FUNCTION(scalar, scalar, neg)
|
UNARY_FUNCTION(scalar, scalar, neg)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, neg0)
|
||||||
UNARY_FUNCTION(scalar, scalar, posPart)
|
UNARY_FUNCTION(scalar, scalar, posPart)
|
||||||
UNARY_FUNCTION(scalar, scalar, negPart)
|
UNARY_FUNCTION(scalar, scalar, negPart)
|
||||||
UNARY_FUNCTION(scalar, scalar, exp)
|
UNARY_FUNCTION(scalar, scalar, exp)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -851,7 +851,9 @@ UNARY_FUNCTION(scalar, scalar, sqrt, sqrt)
|
|||||||
UNARY_FUNCTION(scalar, scalar, cbrt, cbrt)
|
UNARY_FUNCTION(scalar, scalar, cbrt, cbrt)
|
||||||
UNARY_FUNCTION(scalar, scalar, sign, sign)
|
UNARY_FUNCTION(scalar, scalar, sign, sign)
|
||||||
UNARY_FUNCTION(scalar, scalar, pos, pos)
|
UNARY_FUNCTION(scalar, scalar, pos, pos)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, pos0, pos0)
|
||||||
UNARY_FUNCTION(scalar, scalar, neg, neg)
|
UNARY_FUNCTION(scalar, scalar, neg, neg)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, neg0, neg0)
|
||||||
UNARY_FUNCTION(scalar, scalar, posPart, posPart)
|
UNARY_FUNCTION(scalar, scalar, posPart, posPart)
|
||||||
UNARY_FUNCTION(scalar, scalar, negPart, negPart)
|
UNARY_FUNCTION(scalar, scalar, negPart, negPart)
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -99,7 +99,9 @@ UNARY_FUNCTION(scalar, scalar, sqrt, sqrt)
|
|||||||
UNARY_FUNCTION(scalar, scalar, cbrt, cbrt)
|
UNARY_FUNCTION(scalar, scalar, cbrt, cbrt)
|
||||||
UNARY_FUNCTION(scalar, scalar, sign, sign)
|
UNARY_FUNCTION(scalar, scalar, sign, sign)
|
||||||
UNARY_FUNCTION(scalar, scalar, pos, pos)
|
UNARY_FUNCTION(scalar, scalar, pos, pos)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, pos0, pos0)
|
||||||
UNARY_FUNCTION(scalar, scalar, neg, neg)
|
UNARY_FUNCTION(scalar, scalar, neg, neg)
|
||||||
|
UNARY_FUNCTION(scalar, scalar, neg0, neg0)
|
||||||
UNARY_FUNCTION(scalar, scalar, posPart, posPart)
|
UNARY_FUNCTION(scalar, scalar, posPart, posPart)
|
||||||
UNARY_FUNCTION(scalar, scalar, negPart, negPart)
|
UNARY_FUNCTION(scalar, scalar, negPart, negPart)
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
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)
|
inline Scalar sign(const Scalar s)
|
||||||
{
|
{
|
||||||
return (s >= 0)? 1: -1;
|
return (s >= 0)? 1: -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Return 1 if s is positive but not 0
|
||||||
inline Scalar pos(const Scalar s)
|
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 (s >= 0)? 1: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//- Return 1 if s is negative but not 0
|
||||||
inline Scalar neg(const Scalar s)
|
inline Scalar neg(const Scalar s)
|
||||||
{
|
{
|
||||||
return (s < 0)? 1: 0;
|
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
|
//- Return the positive part of s
|
||||||
inline Scalar posPart(const Scalar s)
|
inline Scalar posPart(const Scalar s)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -41,7 +41,7 @@ inline label sign(const label s)
|
|||||||
return (s >= 0)? 1: -1;
|
return (s >= 0)? 1: -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline label pos(const label s)
|
inline label pos0(const label s)
|
||||||
{
|
{
|
||||||
return (s >= 0)? 1: 0;
|
return (s >= 0)? 1: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -112,7 +112,7 @@ tmp<volScalarField> SpalartAllmarasIDDES<BasicTurbulenceModel>::dTilda
|
|||||||
const volScalarField magGradU(mag(gradU));
|
const volScalarField magGradU(mag(gradU));
|
||||||
|
|
||||||
tmp<volScalarField> fHill =
|
tmp<volScalarField> 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<volScalarField> fStep = min(2*pow(expTerm, -9.0), scalar(1));
|
tmp<volScalarField> fStep = min(2*pow(expTerm, -9.0), scalar(1));
|
||||||
const volScalarField fHyb(max(1 - fd(magGradU), fStep));
|
const volScalarField fHyb(max(1 - fd(magGradU), fStep));
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -147,7 +147,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs()
|
|||||||
patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
|
patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
|
||||||
|
|
||||||
this->refValue() = Cmu75*kp*sqrt(kp)/mixingLength_;
|
this->refValue() = Cmu75*kp*sqrt(kp)/mixingLength_;
|
||||||
this->valueFraction() = 1.0 - pos(phip);
|
this->valueFraction() = 1.0 - pos0(phip);
|
||||||
|
|
||||||
inletOutletFvPatchScalarField::updateCoeffs();
|
inletOutletFvPatchScalarField::updateCoeffs();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -143,7 +143,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs()
|
|||||||
patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
|
patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
|
||||||
|
|
||||||
this->refValue() = sqrt(kp)/(Cmu25*mixingLength_);
|
this->refValue() = sqrt(kp)/(Cmu25*mixingLength_);
|
||||||
this->valueFraction() = 1.0 - pos(phip);
|
this->valueFraction() = 1.0 - pos0(phip);
|
||||||
|
|
||||||
inletOutletFvPatchScalarField::updateCoeffs();
|
inletOutletFvPatchScalarField::updateCoeffs();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -86,7 +86,7 @@ void diffusion<CombThermoType, ThermoType>::correct()
|
|||||||
this->wFuel_ ==
|
this->wFuel_ ==
|
||||||
C_*this->turbulence().muEff()
|
C_*this->turbulence().muEff()
|
||||||
*mag(fvc::grad(YFuel) & fvc::grad(YO2))
|
*mag(fvc::grad(YFuel) & fvc::grad(YO2))
|
||||||
*pos(YFuel)*pos(YO2);
|
*pos0(YFuel)*pos0(YO2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -107,7 +107,7 @@ bool Foam::dynamicInkJetFvMesh::update()
|
|||||||
stationaryPoints_.component(vector::X)*
|
stationaryPoints_.component(vector::X)*
|
||||||
(
|
(
|
||||||
1.0
|
1.0
|
||||||
+ pos
|
+ pos0
|
||||||
(
|
(
|
||||||
- (stationaryPoints_.component(vector::X))
|
- (stationaryPoints_.component(vector::X))
|
||||||
- refPlaneX_
|
- refPlaneX_
|
||||||
|
|||||||
@ -81,7 +81,7 @@ void Foam::fvMotionSolverEngineMesh::move()
|
|||||||
);
|
);
|
||||||
|
|
||||||
motionSolver_.pointMotionU().boundaryFieldRef()[linerIndex_] ==
|
motionSolver_.pointMotionU().boundaryFieldRef()[linerIndex_] ==
|
||||||
pistonSpeed*pos(deckHeight_.value() - linerPoints)
|
pistonSpeed*pos0(deckHeight_.value() - linerPoints)
|
||||||
*(deckHeight_.value() - linerPoints)
|
*(deckHeight_.value() - linerPoints)
|
||||||
/(deckHeight_.value() - pistonPlusLayers);
|
/(deckHeight_.value() - pistonPlusLayers);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -149,7 +149,7 @@ void Foam::SRFFreestreamVelocityFvPatchVectorField::updateCoeffs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set the inlet-outlet choice based on the direction of the freestream
|
// 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<vector>::updateCoeffs();
|
mixedFvPatchField<vector>::updateCoeffs();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -48,7 +48,7 @@ Foam::bound(volScalarField& vsf, const dimensionedScalar& lowerBound)
|
|||||||
(
|
(
|
||||||
vsf.primitiveField(),
|
vsf.primitiveField(),
|
||||||
fvc::average(max(vsf, lowerBound))().primitiveField()
|
fvc::average(max(vsf, lowerBound))().primitiveField()
|
||||||
* pos(-vsf.primitiveField())
|
* pos0(-vsf.primitiveField())
|
||||||
),
|
),
|
||||||
lowerBound.value()
|
lowerBound.value()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -126,7 +126,7 @@ void Foam::inletOutletFvPatchField<Type>::updateCoeffs()
|
|||||||
phiName_
|
phiName_
|
||||||
);
|
);
|
||||||
|
|
||||||
this->valueFraction() = 1.0 - pos(phip);
|
this->valueFraction() = 1.0 - pos0(phip);
|
||||||
|
|
||||||
mixedFvPatchField<Type>::updateCoeffs();
|
mixedFvPatchField<Type>::updateCoeffs();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -176,8 +176,8 @@ void Foam::inletOutletTotalTemperatureFvPatchScalarField::updateCoeffs()
|
|||||||
scalar gM1ByG = (gamma_ - 1.0)/gamma_;
|
scalar gM1ByG = (gamma_ - 1.0)/gamma_;
|
||||||
|
|
||||||
this->refValue() =
|
this->refValue() =
|
||||||
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));
|
||||||
this->valueFraction() = 1.0 - pos(phip);
|
this->valueFraction() = 1.0 - pos0(phip);
|
||||||
|
|
||||||
inletOutletFvPatchScalarField::updateCoeffs();
|
inletOutletFvPatchScalarField::updateCoeffs();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -97,7 +97,7 @@ void Foam::interfaceCompressionFvPatchScalarField::updateCoeffs()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
operator==(pos(this->patchInternalField() - 0.5));
|
operator==(pos0(this->patchInternalField() - 0.5));
|
||||||
|
|
||||||
fixedValueFvPatchScalarField::updateCoeffs();
|
fixedValueFvPatchScalarField::updateCoeffs();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -126,7 +126,7 @@ void Foam::outletInletFvPatchField<Type>::updateCoeffs()
|
|||||||
phiName_
|
phiName_
|
||||||
);
|
);
|
||||||
|
|
||||||
this->valueFraction() = pos(phip);
|
this->valueFraction() = pos0(phip);
|
||||||
|
|
||||||
mixedFvPatchField<Type>::updateCoeffs();
|
mixedFvPatchField<Type>::updateCoeffs();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -284,7 +284,7 @@ void Foam::plenumPressureFvPatchScalarField::updateCoeffs()
|
|||||||
// Limit to prevent outflow
|
// Limit to prevent outflow
|
||||||
const scalarField p_new
|
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
|
// Relaxation fraction
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -177,7 +177,7 @@ void Foam::pressureDirectedInletOutletVelocityFvPatchVectorField::updateCoeffs()
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
valueFraction() = 1.0 - pos(phip);
|
valueFraction() = 1.0 - pos0(phip);
|
||||||
|
|
||||||
mixedFvPatchVectorField::updateCoeffs();
|
mixedFvPatchVectorField::updateCoeffs();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -151,7 +151,7 @@ void Foam::pressureInletOutletParSlipVelocityFvPatchVectorField::updateCoeffs()
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
valueFraction() = 1.0 - pos(phip);
|
valueFraction() = 1.0 - pos0(phip);
|
||||||
|
|
||||||
mixedFvPatchVectorField::updateCoeffs();
|
mixedFvPatchVectorField::updateCoeffs();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -147,7 +147,7 @@ void Foam::pressureNormalInletOutletVelocityFvPatchVectorField::updateCoeffs()
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
valueFraction() = 1.0 - pos(phip);
|
valueFraction() = 1.0 - pos0(phip);
|
||||||
|
|
||||||
mixedFvPatchVectorField::updateCoeffs();
|
mixedFvPatchVectorField::updateCoeffs();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -133,7 +133,7 @@ void Foam::prghTotalHydrostaticPressureFvPatchScalarField::updateCoeffs()
|
|||||||
operator==
|
operator==
|
||||||
(
|
(
|
||||||
ph_rghp
|
ph_rghp
|
||||||
- 0.5*rhop*(1.0 - pos(phip))*magSqr(Up)
|
- 0.5*rhop*(1.0 - pos0(phip))*magSqr(Up)
|
||||||
);
|
);
|
||||||
|
|
||||||
fixedValueFvPatchScalarField::updateCoeffs();
|
fixedValueFvPatchScalarField::updateCoeffs();
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -180,7 +180,7 @@ void Foam::prghTotalPressureFvPatchScalarField::updateCoeffs()
|
|||||||
operator==
|
operator==
|
||||||
(
|
(
|
||||||
p0_
|
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())
|
- rhop*((g.value() & patch().Cf()) - ghRef.value())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -176,7 +176,7 @@ void Foam::totalPressureFvPatchScalarField::updateCoeffs
|
|||||||
const fvPatchField<scalar>& rho =
|
const fvPatchField<scalar>& rho =
|
||||||
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
||||||
|
|
||||||
operator==(p0p - 0.5*rho*(1.0 - pos(phip))*magSqr(Up));
|
operator==(p0p - 0.5*rho*(1.0 - pos0(phip))*magSqr(Up));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -194,14 +194,14 @@ void Foam::totalPressureFvPatchScalarField::updateCoeffs
|
|||||||
p0p
|
p0p
|
||||||
/pow
|
/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
|
1.0/gM1ByG
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
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)
|
else if (internalField().dimensions() == dimPressure/dimDensity)
|
||||||
{
|
{
|
||||||
// Incompressible flow
|
// Incompressible flow
|
||||||
operator==(p0p - 0.5*(1.0 - pos(phip))*magSqr(Up));
|
operator==(p0p - 0.5*(1.0 - pos0(phip))*magSqr(Up));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -167,7 +167,7 @@ void Foam::totalTemperatureFvPatchScalarField::updateCoeffs()
|
|||||||
|
|
||||||
operator==
|
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();
|
fixedValueFvPatchScalarField::updateCoeffs();
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -136,7 +136,7 @@ updateCoeffs()
|
|||||||
patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
|
patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
|
||||||
|
|
||||||
this->refValue() = 1.5*sqr(intensity_)*magSqr(Up);
|
this->refValue() = 1.5*sqr(intensity_)*magSqr(Up);
|
||||||
this->valueFraction() = 1.0 - pos(phip);
|
this->valueFraction() = 1.0 - pos0(phip);
|
||||||
|
|
||||||
inletOutletFvPatchScalarField::updateCoeffs();
|
inletOutletFvPatchScalarField::updateCoeffs();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -148,7 +148,7 @@ void Foam::uniformInletOutletFvPatchField<Type>::updateCoeffs()
|
|||||||
phiName_
|
phiName_
|
||||||
);
|
);
|
||||||
|
|
||||||
this->valueFraction() = 1.0 - pos(phip);
|
this->valueFraction() = 1.0 - pos0(phip);
|
||||||
|
|
||||||
mixedFvPatchField<Type>::updateCoeffs();
|
mixedFvPatchField<Type>::updateCoeffs();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -164,7 +164,7 @@ void Foam::uniformTotalPressureFvPatchScalarField::updateCoeffs
|
|||||||
const fvPatchField<scalar>& rho =
|
const fvPatchField<scalar>& rho =
|
||||||
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
||||||
|
|
||||||
operator==(p0 - 0.5*rho*(1.0 - pos(phip))*magSqr(Up));
|
operator==(p0 - 0.5*rho*(1.0 - pos0(phip))*magSqr(Up));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -182,14 +182,14 @@ void Foam::uniformTotalPressureFvPatchScalarField::updateCoeffs
|
|||||||
p0
|
p0
|
||||||
/pow
|
/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
|
1.0/gM1ByG
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
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)
|
else if (internalField().dimensions() == dimPressure/dimDensity)
|
||||||
{
|
{
|
||||||
// Incompressible flow
|
// Incompressible flow
|
||||||
operator==(p0 - 0.5*(1.0 - pos(phip))*magSqr(Up));
|
operator==(p0 - 0.5*(1.0 - pos0(phip))*magSqr(Up));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -188,7 +188,7 @@ public:
|
|||||||
{
|
{
|
||||||
return
|
return
|
||||||
blendingFactor_*this->mesh().surfaceInterpolation::weights()
|
blendingFactor_*this->mesh().surfaceInterpolation::weights()
|
||||||
+ (1 - blendingFactor_)*pos(this->faceFlux_);
|
+ (1 - blendingFactor_)*pos0(this->faceFlux_);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -155,7 +155,7 @@ Foam::limitedSurfaceInterpolationScheme<Type>::weights
|
|||||||
{
|
{
|
||||||
pWeights[face] =
|
pWeights[face] =
|
||||||
pWeights[face]*CDweights[face]
|
pWeights[face]*CDweights[face]
|
||||||
+ (1.0 - pWeights[face])*pos(faceFlux_[face]);
|
+ (1.0 - pWeights[face])*pos0(faceFlux_[face]);
|
||||||
}
|
}
|
||||||
|
|
||||||
surfaceScalarField::Boundary& bWeights =
|
surfaceScalarField::Boundary& bWeights =
|
||||||
@ -172,7 +172,7 @@ Foam::limitedSurfaceInterpolationScheme<Type>::weights
|
|||||||
{
|
{
|
||||||
pWeights[face] =
|
pWeights[face] =
|
||||||
pWeights[face]*pCDweights[face]
|
pWeights[face]*pCDweights[face]
|
||||||
+ (1.0 - pWeights[face])*pos(pFaceFlux[face]);
|
+ (1.0 - pWeights[face])*pos0(pFaceFlux[face]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -131,7 +131,7 @@ public:
|
|||||||
//- Return the interpolation weighting factors
|
//- Return the interpolation weighting factors
|
||||||
tmp<surfaceScalarField> weights() const
|
tmp<surfaceScalarField> weights() const
|
||||||
{
|
{
|
||||||
return pos(this->faceFlux_);
|
return pos0(this->faceFlux_);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the interpolation weighting factors
|
//- Return the interpolation weighting factors
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -131,7 +131,7 @@ public:
|
|||||||
const GeometricField<Type, fvPatchField, volMesh>&
|
const GeometricField<Type, fvPatchField, volMesh>&
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return pos(faceFlux_);
|
return pos0(faceFlux_);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -163,7 +163,7 @@ public:
|
|||||||
if (mesh_.isInternalFace(facei))
|
if (mesh_.isInternalFace(facei))
|
||||||
{
|
{
|
||||||
// Apply upwind differencing
|
// Apply upwind differencing
|
||||||
w[facei] = pos(faceFlux_[facei]);
|
w[facei] = pos0(faceFlux_[facei]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,14 +582,14 @@ processValues
|
|||||||
case opSumDirection:
|
case opSumDirection:
|
||||||
{
|
{
|
||||||
vector n(dict_.lookup("direction"));
|
vector n(dict_.lookup("direction"));
|
||||||
return sum(pos(values*(Sf & n))*mag(values));
|
return sum(pos0(values*(Sf & n))*mag(values));
|
||||||
}
|
}
|
||||||
case opSumDirectionBalance:
|
case opSumDirectionBalance:
|
||||||
{
|
{
|
||||||
vector n(dict_.lookup("direction"));
|
vector n(dict_.lookup("direction"));
|
||||||
const scalarField nv(values*(Sf & n));
|
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:
|
default:
|
||||||
{
|
{
|
||||||
@ -617,7 +617,7 @@ processValues
|
|||||||
n /= mag(n) + ROOTVSMALL;
|
n /= mag(n) + ROOTVSMALL;
|
||||||
const scalarField nv(n & values);
|
const scalarField nv(n & values);
|
||||||
|
|
||||||
return sum(pos(nv)*n*(nv));
|
return sum(pos0(nv)*n*(nv));
|
||||||
}
|
}
|
||||||
case opSumDirectionBalance:
|
case opSumDirectionBalance:
|
||||||
{
|
{
|
||||||
@ -625,7 +625,7 @@ processValues
|
|||||||
n /= mag(n) + ROOTVSMALL;
|
n /= mag(n) + ROOTVSMALL;
|
||||||
const scalarField nv(n & values);
|
const scalarField nv(n & values);
|
||||||
|
|
||||||
return sum(pos(nv)*n*(nv));
|
return sum(pos0(nv)*n*(nv));
|
||||||
}
|
}
|
||||||
case opAreaNormalAverage:
|
case opAreaNormalAverage:
|
||||||
{
|
{
|
||||||
|
|||||||
@ -248,7 +248,7 @@ void Foam::DSMCCloud<ParcelType>::collisions()
|
|||||||
vector relPos = p.position() - cC;
|
vector relPos = p.position() - cC;
|
||||||
|
|
||||||
label subCell =
|
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);
|
subCells[subCell].append(i);
|
||||||
whichSubCell[i] = subCell;
|
whichSubCell[i] = subCell;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -136,7 +136,7 @@ inline Foam::tmp<Foam::fvScalarMatrix> Foam::ReactingCloud<CloudType>::SYi
|
|||||||
|
|
||||||
return
|
return
|
||||||
fvm::Sp(neg(sourceField)*sourceField/(Yi + YiSMALL), Yi)
|
fvm::Sp(neg(sourceField)*sourceField/(Yi + YiSMALL), Yi)
|
||||||
+ pos(sourceField)*sourceField;
|
+ pos0(sourceField)*sourceField;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -72,7 +72,7 @@ inline Type& Foam::PairCollisionRecord<Type>::collisionData()
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
inline bool Foam::PairCollisionRecord<Type>::accessed() const
|
inline bool Foam::PairCollisionRecord<Type>::accessed() const
|
||||||
{
|
{
|
||||||
return pos(origProcOfOther_);
|
return pos0(origProcOfOther_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -109,10 +109,10 @@ bool Foam::triSurfaceSearch::checkUniqueHit
|
|||||||
surface().faceNormals()[edgeFacei];
|
surface().faceNormals()[edgeFacei];
|
||||||
|
|
||||||
const label signCurrHit =
|
const label signCurrHit =
|
||||||
pos(currHitNormal & lineVec);
|
pos0(currHitNormal & lineVec);
|
||||||
|
|
||||||
const label signExistingHit =
|
const label signExistingHit =
|
||||||
pos(existingHitNormal & lineVec);
|
pos0(existingHitNormal & lineVec);
|
||||||
|
|
||||||
if (signCurrHit == signExistingHit)
|
if (signCurrHit == signExistingHit)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -350,7 +350,7 @@ bool Foam::movingConeTopoFvMesh::update()
|
|||||||
newPoints =
|
newPoints =
|
||||||
topoChangeMap().preMotionPoints()
|
topoChangeMap().preMotionPoints()
|
||||||
+ (
|
+ (
|
||||||
pos(0.5 - mag(motionMask_)) // cells above the body
|
pos0(0.5 - mag(motionMask_)) // cells above the body
|
||||||
)*curMotionVel_*time().deltaT().value();
|
)*curMotionVel_*time().deltaT().value();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -369,7 +369,7 @@ bool Foam::movingConeTopoFvMesh::update()
|
|||||||
newPoints =
|
newPoints =
|
||||||
points()
|
points()
|
||||||
+ (
|
+ (
|
||||||
pos(0.5 - mag(motionMask_)) // cells above the body
|
pos0(0.5 - mag(motionMask_)) // cells above the body
|
||||||
)*curMotionVel_*time().deltaT().value();
|
)*curMotionVel_*time().deltaT().value();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -380,7 +380,7 @@ bool Foam::movingConeTopoFvMesh::update()
|
|||||||
newPoints =
|
newPoints =
|
||||||
points()
|
points()
|
||||||
+ (
|
+ (
|
||||||
pos(0.5 - mag(motionMask_)) // cells above the body
|
pos0(0.5 - mag(motionMask_)) // cells above the body
|
||||||
)*curMotionVel_*time().deltaT().value();
|
)*curMotionVel_*time().deltaT().value();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -226,7 +226,7 @@ Foam::interfaceProperties::surfaceTensionForce() const
|
|||||||
Foam::tmp<Foam::volScalarField>
|
Foam::tmp<Foam::volScalarField>
|
||||||
Foam::interfaceProperties::nearInterface() const
|
Foam::interfaceProperties::nearInterface() const
|
||||||
{
|
{
|
||||||
return pos(alpha1_ - 0.01)*pos(0.99 - alpha1_);
|
return pos0(alpha1_ - 0.01)*pos0(0.99 - alpha1_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -153,7 +153,7 @@ void Foam::waveAlphaFvPatchScalarField::updateCoeffs()
|
|||||||
const scalarField& phip =
|
const scalarField& phip =
|
||||||
patch().lookupPatchField<surfaceScalarField, scalar>("phi");
|
patch().lookupPatchField<surfaceScalarField, scalar>("phi");
|
||||||
|
|
||||||
valueFraction() = 1 - pos(phip);
|
valueFraction() = 1 - pos0(phip);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -140,7 +140,7 @@ void Foam::waveVelocityFvPatchVectorField::updateCoeffs()
|
|||||||
const symmTensorField nnp(sqr(patch().nf()));
|
const symmTensorField nnp(sqr(patch().nf()));
|
||||||
|
|
||||||
// Fix all components if inflow, just normal if outflow
|
// 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::updateCoeffs();
|
||||||
directionMixedFvPatchVectorField::evaluate();
|
directionMixedFvPatchVectorField::evaluate();
|
||||||
|
|||||||
@ -86,7 +86,7 @@ Foam::tmp<Foam::vector2DField> Foam::waveModels::Airy::velocity
|
|||||||
if (shallow())
|
if (shallow())
|
||||||
{
|
{
|
||||||
const scalar kh = k()*depth();
|
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);
|
return wa*zip(cosh(khz)*cos(phi), sinh(khz)*sin(phi))/sinh(kh);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user