fvPatchFields: Replaced 1 - pos0(phi) with the simpler neg(phi)
This commit is contained in:
@ -189,7 +189,7 @@ void Foam::CLASS::updateCoeffs()
|
||||
(
|
||||
"phi"
|
||||
);
|
||||
this->valueFraction() = 1.0 - pos0(phip);
|
||||
this->valueFraction() = neg(phip);
|
||||
|
||||
PARENT::updateCoeffs();
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -136,7 +136,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs()
|
||||
patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
|
||||
|
||||
this->refValue() = Cmu75*kp*sqrt(kp)/mixingLength_;
|
||||
this->valueFraction() = 1.0 - pos0(phip);
|
||||
this->valueFraction() = neg(phip);
|
||||
|
||||
inletOutletFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -136,7 +136,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs()
|
||||
patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
|
||||
|
||||
this->refValue() = sqrt(kp)/(Cmu25*mixingLength_);
|
||||
this->valueFraction() = 1.0 - pos0(phip);
|
||||
this->valueFraction() = neg(phip);
|
||||
|
||||
inletOutletFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -137,7 +137,7 @@ void Foam::SRFFreestreamVelocityFvPatchVectorField::updateCoeffs()
|
||||
}
|
||||
|
||||
// Set the inlet-outlet choice based on the direction of the freestream
|
||||
valueFraction() = 1.0 - pos0(refValue() & patch().Sf());
|
||||
valueFraction() = neg(refValue() & patch().Sf());
|
||||
|
||||
mixedFvPatchField<vector>::updateCoeffs();
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -115,7 +115,7 @@ void Foam::inletOutletFvPatchField<Type>::updateCoeffs()
|
||||
phiName_
|
||||
);
|
||||
|
||||
this->valueFraction() = 1.0 - pos0(phip);
|
||||
this->valueFraction() = neg(phip);
|
||||
|
||||
mixedFvPatchField<Type>::updateCoeffs();
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -162,8 +162,8 @@ void Foam::inletOutletTotalTemperatureFvPatchScalarField::updateCoeffs()
|
||||
scalar gM1ByG = (gamma_ - 1.0)/gamma_;
|
||||
|
||||
this->refValue() =
|
||||
T0_/(1.0 + 0.5*psip*gM1ByG*(1.0 - pos0(phip))*magSqr(Up));
|
||||
this->valueFraction() = 1.0 - pos0(phip);
|
||||
T0_/(1.0 + 0.5*psip*gM1ByG*neg(phip)*magSqr(Up));
|
||||
this->valueFraction() = neg(phip);
|
||||
|
||||
inletOutletFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -261,7 +261,7 @@ void Foam::plenumPressureFvPatchScalarField::updateCoeffs()
|
||||
// Limit to prevent outflow
|
||||
const scalarField p_new
|
||||
(
|
||||
(1.0 - pos0(phi))*t*plenumPressure + pos0(phi)*max(p, plenumPressure)
|
||||
neg(phi)*t*plenumPressure + pos0(phi)*max(p, plenumPressure)
|
||||
);
|
||||
|
||||
// Relaxation fraction
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -164,7 +164,7 @@ void Foam::pressureDirectedInletOutletVelocityFvPatchVectorField::updateCoeffs()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
valueFraction() = 1.0 - pos0(phip);
|
||||
valueFraction() = neg(phip);
|
||||
|
||||
mixedFvPatchVectorField::updateCoeffs();
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -139,7 +139,7 @@ void Foam::pressureInletOutletParSlipVelocityFvPatchVectorField::updateCoeffs()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
valueFraction() = 1.0 - pos0(phip);
|
||||
valueFraction() = neg(phip);
|
||||
|
||||
mixedFvPatchVectorField::updateCoeffs();
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -135,7 +135,7 @@ void Foam::pressureNormalInletOutletVelocityFvPatchVectorField::updateCoeffs()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
valueFraction() = 1.0 - pos0(phip);
|
||||
valueFraction() = neg(phip);
|
||||
|
||||
mixedFvPatchVectorField::updateCoeffs();
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2016-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -116,11 +116,7 @@ void Foam::prghTotalHydrostaticPressureFvPatchScalarField::updateCoeffs()
|
||||
const vectorField& Up =
|
||||
patch().lookupPatchField<volVectorField, vector>(UName_);
|
||||
|
||||
operator==
|
||||
(
|
||||
ph_rghp
|
||||
- 0.5*rhop*(1.0 - pos0(phip))*magSqr(Up)
|
||||
);
|
||||
operator==(ph_rghp - 0.5*rhop*neg(phip)*magSqr(Up));
|
||||
|
||||
fixedValueFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ void Foam::totalPressureFvPatchScalarField::updateCoeffs
|
||||
dynamicPressureFvPatchScalarField::updateCoeffs
|
||||
(
|
||||
p0_,
|
||||
0.5*(1 - pos0(phip))*magSqr(Up)
|
||||
0.5*neg(phip)*magSqr(Up)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -153,7 +153,7 @@ void Foam::totalTemperatureFvPatchScalarField::updateCoeffs()
|
||||
|
||||
operator==
|
||||
(
|
||||
T0_/(1.0 + 0.5*psip*gM1ByG*(1.0 - pos0(phip))*magSqr(Up))
|
||||
T0_/(1.0 + 0.5*psip*gM1ByG*neg(phip)*magSqr(Up))
|
||||
);
|
||||
|
||||
fixedValueFvPatchScalarField::updateCoeffs();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -127,7 +127,7 @@ updateCoeffs()
|
||||
patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
|
||||
|
||||
this->refValue() = 1.5*sqr(intensity_)*magSqr(Up);
|
||||
this->valueFraction() = 1.0 - pos0(phip);
|
||||
this->valueFraction() = neg(phip);
|
||||
|
||||
inletOutletFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -134,7 +134,7 @@ void Foam::uniformInletOutletFvPatchField<Type>::updateCoeffs()
|
||||
phiName_
|
||||
);
|
||||
|
||||
this->valueFraction() = 1.0 - pos0(phip);
|
||||
this->valueFraction() = neg(phip);
|
||||
|
||||
mixedFvPatchField<Type>::updateCoeffs();
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -146,7 +146,7 @@ void Foam::uniformTotalPressureFvPatchScalarField::updateCoeffs
|
||||
const fvPatchField<scalar>& rho =
|
||||
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
||||
|
||||
operator==(p0 - 0.5*rho*(1.0 - pos0(phip))*magSqr(Up));
|
||||
operator==(p0 - 0.5*rho*neg(phip)*magSqr(Up));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -164,14 +164,14 @@ void Foam::uniformTotalPressureFvPatchScalarField::updateCoeffs
|
||||
p0
|
||||
/pow
|
||||
(
|
||||
(1.0 + 0.5*psip*gM1ByG*(1.0 - pos0(phip))*magSqr(Up)),
|
||||
(1.0 + 0.5*psip*gM1ByG*neg(phip)*magSqr(Up)),
|
||||
1.0/gM1ByG
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
operator==(p0/(1.0 + 0.5*psip*(1.0 - pos0(phip))*magSqr(Up)));
|
||||
operator==(p0/(1.0 + 0.5*psip*neg(phip)*magSqr(Up)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -179,7 +179,7 @@ void Foam::uniformTotalPressureFvPatchScalarField::updateCoeffs
|
||||
else if (internalField().dimensions() == dimPressure/dimDensity)
|
||||
{
|
||||
// Incompressible flow
|
||||
operator==(p0 - 0.5*(1.0 - pos0(phip))*magSqr(Up));
|
||||
operator==(p0 - 0.5*neg(phip)*magSqr(Up));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user