diff --git a/etc/codeTemplates/BC/BC.C b/etc/codeTemplates/BC/BC.C index 7c1bb0e8d6..7dc8098b37 100644 --- a/etc/codeTemplates/BC/BC.C +++ b/etc/codeTemplates/BC/BC.C @@ -207,7 +207,7 @@ void Foam::CLASS::updateCoeffs() const scalarField& phip = this->patch().template lookupPatchField("phi"); - this->valueFraction() = 1.0 - pos0(phip); + this->valueFraction() = neg(phip); PARENT::updateCoeffs(); } diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C index 514c894e5a..f930a4c3cb 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C @@ -113,7 +113,7 @@ tmp SpalartAllmarasIDDES::dTilda if (fe_) { tmp fe1 = - 2*(pos0(alpha)*pow(expTerm, -11.09) + neg(alpha)*pow(expTerm, -9.)); + 2*lerp(pow(expTerm, -9.), pow(expTerm, -11.09), pos0(alpha)); tmp fe2 = 1 - max(ft(magGradU), fl(magGradU)); tmp fe = max(fe1 - 1, scalar(0))*psi*fe2; @@ -129,7 +129,7 @@ tmp SpalartAllmarasIDDES::dTilda // Simplified formulation from Gritskevich et al. paper (2011) where fe = 0 return max ( - fdTilda*lRAS + (1 - fdTilda)*lLES, + lerp(lLES, lRAS, fdTilda), dimensionedScalar("SMALL", dimLength, SMALL) ); } diff --git a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C index 42c5691e26..be6e5cafd2 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C @@ -109,7 +109,7 @@ tmp kOmegaSSTIDDES::dTilda if (fe_) { tmp fe1 = - 2*(pos0(alpha)*pow(expTerm, -11.09) + neg(alpha)*pow(expTerm, -9.)); + 2*lerp(pow(expTerm, -9.), pow(expTerm, -11.09), pos0(alpha)); tmp fe2 = 1 - max(ft(magGradU), fl(magGradU)); tmp fe = max(fe1 - 1, scalar(0))*fe2; @@ -124,7 +124,7 @@ tmp kOmegaSSTIDDES::dTilda // Simplified formulation from Gritskevich et al. paper (2011) where fe = 0 return max ( - fdTilda*lRAS + (1 - fdTilda)*lLES, + lerp(lLES, lRAS, fdTilda), dimensionedScalar(dimLength, SMALL) ); } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C index 2266a1430a..dfdff55615 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C @@ -157,7 +157,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs() patch().lookupPatchField(this->phiName_); this->refValue() = (Cmu75/mixingLength_)*pow(kp, 1.5); - this->valueFraction() = 1.0 - pos0(phip); + this->valueFraction() = neg(phip); inletOutletFvPatchScalarField::updateCoeffs(); } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C index 084965c11c..1fec48c218 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C @@ -146,7 +146,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs() patch().lookupPatchField(this->phiName_); this->refValue() = sqrt(kp)/(Cmu25*mixingLength_); - this->valueFraction() = 1.0 - pos0(phip); + this->valueFraction() = neg(phip); inletOutletFvPatchScalarField::updateCoeffs(); } diff --git a/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchField.C b/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchField.C index cf93fde241..9c9749be92 100644 --- a/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchField.C +++ b/src/finiteArea/fields/faPatchFields/derived/inletOutlet/inletOutletFaPatchField.C @@ -126,7 +126,7 @@ void Foam::inletOutletFaPatchField::updateCoeffs() const Field& phip = this->patch().template lookupPatchField(phiName_); - this->valueFraction() = 1.0 - pos(phip); + this->valueFraction() = neg(phip); mixedFaPatchField::updateCoeffs(); } diff --git a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C index bdd1de4779..da50a57f7e 100644 --- a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C +++ b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C @@ -152,7 +152,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::updateCoeffs(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C index cce6c7b6af..459620bf6b 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C @@ -128,7 +128,7 @@ void Foam::inletOutletFvPatchField::updateCoeffs() const Field& phip = this->patch().template lookupPatchField(phiName_); - this->valueFraction() = 1.0 - pos0(phip); + this->valueFraction() = neg(phip); mixedFvPatchField::updateCoeffs(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C index 84198f6e2e..4e25428a0b 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C @@ -181,8 +181,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(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C index 67de38f255..364e24d3aa 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C @@ -272,7 +272,12 @@ void Foam::plenumPressureFvPatchScalarField::updateCoeffs() // Limit to prevent outflow const scalarField p_new ( - (1.0 - pos0(phi))*t*plenumPressure + pos0(phi)*max(p, plenumPressure) + lerp + ( + t*plenumPressure, // Negative phi + max(p, plenumPressure), // Positive phi + pos0(phi) // 0-1 selector + ) ); // Relaxation fraction @@ -280,7 +285,7 @@ void Foam::plenumPressureFvPatchScalarField::updateCoeffs() const scalar fraction = oneByFraction < 1.0 ? 1.0 : 1.0/oneByFraction; // Set the new value - operator==((1.0 - fraction)*p_old + fraction*p_new); + operator==(lerp(p_old, p_new, fraction)); fixedValueFvPatchScalarField::updateCoeffs(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C index 4f1f1b5a4e..db7d962d81 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C @@ -176,7 +176,7 @@ void Foam::pressureDirectedInletOutletVelocityFvPatchVectorField::updateCoeffs() << exit(FatalError); } - valueFraction() = 1.0 - pos0(phip); + valueFraction() = neg(phip); mixedFvPatchVectorField::updateCoeffs(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C index 6676732f48..d3b2100080 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C @@ -150,7 +150,7 @@ void Foam::pressureInletOutletParSlipVelocityFvPatchVectorField::updateCoeffs() << exit(FatalError); } - valueFraction() = 1.0 - pos0(phip); + valueFraction() = neg(phip); mixedFvPatchVectorField::updateCoeffs(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C index 4b316b0e67..e6d254f67d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C @@ -146,7 +146,7 @@ void Foam::pressureNormalInletOutletVelocityFvPatchVectorField::updateCoeffs() << exit(FatalError); } - valueFraction() = 1.0 - pos0(phip); + valueFraction() = neg(phip); mixedFvPatchVectorField::updateCoeffs(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressurePermeableAlphaInletOutletVelocity/pressurePermeableAlphaInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressurePermeableAlphaInletOutletVelocity/pressurePermeableAlphaInletOutletVelocityFvPatchVectorField.C index 5bfce07557..30fdd16204 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressurePermeableAlphaInletOutletVelocity/pressurePermeableAlphaInletOutletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressurePermeableAlphaInletOutletVelocity/pressurePermeableAlphaInletOutletVelocityFvPatchVectorField.C @@ -155,7 +155,7 @@ updateCoeffs() << exit(FatalError); } - valueFraction() = 1.0 - pos0(phip); + valueFraction() = neg(phip); if (alphaName_ != "none") { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghPermeableAlphaTotalPressure/prghPermeableAlphaTotalPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/prghPermeableAlphaTotalPressure/prghPermeableAlphaTotalPressureFvPatchScalarField.C index 6bc84ada0d..ecd795af13 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/prghPermeableAlphaTotalPressure/prghPermeableAlphaTotalPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/prghPermeableAlphaTotalPressure/prghPermeableAlphaTotalPressureFvPatchScalarField.C @@ -215,7 +215,7 @@ void Foam::prghPermeableAlphaTotalPressureFvPatchScalarField::updateSnGrad tmp p ( p0_->value(t) - - 0.5*rhop*(1.0 - pos0(phip))*magSqr(Up) + - 0.5*rhop*(neg(phip))*magSqr(Up) - rhop*((g.value() & patch().Cf()) - ghRef.value()) ); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalHydrostaticPressure/prghTotalHydrostaticPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalHydrostaticPressure/prghTotalHydrostaticPressureFvPatchScalarField.C index 53fa406082..2360322800 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalHydrostaticPressure/prghTotalHydrostaticPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalHydrostaticPressure/prghTotalHydrostaticPressureFvPatchScalarField.C @@ -136,7 +136,7 @@ void Foam::prghTotalHydrostaticPressureFvPatchScalarField::updateCoeffs() operator== ( ph_rghp - - 0.5*rhop*(1.0 - pos0(phip))*magSqr(Up) + - 0.5*rhop*(neg(phip))*magSqr(Up) ); fixedValueFvPatchScalarField::updateCoeffs(); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C index 41fe07eee8..4e442c6c4e 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C @@ -178,7 +178,7 @@ void Foam::prghTotalPressureFvPatchScalarField::updateCoeffs() operator== ( p0_ - - 0.5*rhop*(1.0 - pos0(phip))*magSqr(Up) + - 0.5*rhop*(neg(phip))*magSqr(Up) - rhop*((g.value() & patch().Cf()) - ghRef.value()) ); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C index b3bcd97273..0bf923b69a 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C @@ -178,7 +178,7 @@ void Foam::totalPressureFvPatchScalarField::updateCoeffs const auto& rho = patch().lookupPatchField(rhoName_); - operator==(p0p - 0.5*rho*(1.0 - pos0(phip))*magSqr(Up)); + operator==(p0p - 0.5*rho*(neg(phip))*magSqr(Up)); } else { @@ -196,14 +196,14 @@ void Foam::totalPressureFvPatchScalarField::updateCoeffs p0p /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==(p0p/(1.0 + 0.5*psip*(1.0 - pos0(phip))*magSqr(Up))); + operator==(p0p/(1.0 + 0.5*psip*(neg(phip))*magSqr(Up))); } } @@ -211,7 +211,7 @@ void Foam::totalPressureFvPatchScalarField::updateCoeffs else if (internalField().dimensions() == dimPressure/dimDensity) { // Incompressible flow - operator==(p0p - 0.5*(1.0 - pos0(phip))*magSqr(Up)); + operator==(p0p - 0.5*(neg(phip))*magSqr(Up)); } else { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C index b6ad51dd07..b9cabaefc5 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C @@ -170,7 +170,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(); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C index 453e96a5f2..06f5809c0d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C @@ -140,7 +140,7 @@ updateCoeffs() patch().lookupPatchField(this->phiName_); this->refValue() = 1.5*sqr(intensity_)*magSqr(Up); - this->valueFraction() = 1.0 - pos0(phip); + this->valueFraction() = neg(phip); inletOutletFvPatchScalarField::updateCoeffs(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C index d981820e78..3a54b9ce6e 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C @@ -157,7 +157,7 @@ void Foam::uniformInletOutletFvPatchField::updateCoeffs() phiName_ ); - this->valueFraction() = 1.0 - pos0(phip); + this->valueFraction() = neg(phip); mixedFvPatchField::updateCoeffs(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C index 1ebfba5288..833c5e819b 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C @@ -166,7 +166,7 @@ void Foam::uniformTotalPressureFvPatchScalarField::updateCoeffs const auto& rho = patch().lookupPatchField(rhoName_); - operator==(p0 - 0.5*rho*(1.0 - pos0(phip))*magSqr(Up)); + operator==(p0 - 0.5*rho*(neg(phip))*magSqr(Up)); } else { @@ -184,14 +184,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))); } } @@ -199,7 +199,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 { diff --git a/src/transportModels/geometricVoF/cellCuts/cutFace/cutFaceAdvect.C b/src/transportModels/geometricVoF/cellCuts/cutFace/cutFaceAdvect.C index 0f7dde785f..79b023edfe 100644 --- a/src/transportModels/geometricVoF/cellCuts/cutFace/cutFaceAdvect.C +++ b/src/transportModels/geometricVoF/cellCuts/cutFace/cutFaceAdvect.C @@ -412,7 +412,7 @@ Foam::scalar Foam::cutFaceAdvect::timeIntegratedArea // If all cuttings are in the future but non of them within [0,dt] then // if cell is filling up (Un0 > 0) face must be empty during whole time // interval - tIntArea = magSf * dt * (1 - pos0(Un0)); + tIntArea = magSf * dt * neg(Un0); return tIntArea; } @@ -437,7 +437,7 @@ Foam::scalar Foam::cutFaceAdvect::timeIntegratedArea // If Un0 > 0 cell is filling up and it must initially be empty. // If Un0 < 0 cell must initially be full(y immersed in fluid A). time = firstTime; - initialArea = magSf * (1.0 - pos0(Un0)); + initialArea = magSf * neg(Un0); tIntArea = initialArea * time; cutPoints(fPts, pTimes, time, FIIL); } @@ -669,7 +669,7 @@ Foam::scalar Foam::cutFaceAdvect::timeIntegratedArea // If all cuttings are in the future but non of them within [0,dt] then // if cell is filling up (Un0 > 0) face must be empty during whole time // interval - tIntArea = magSf * dt * (1 - pos0(Un0)); + tIntArea = magSf * dt * neg(Un0); return tIntArea; } @@ -694,7 +694,7 @@ Foam::scalar Foam::cutFaceAdvect::timeIntegratedArea // If Un0 > 0 cell is filling up and it must initially be empty. // If Un0 < 0 cell must initially be full(y immersed in fluid A). time = firstTime; - initialArea = magSf * (1.0 - pos0(Un0)); + initialArea = magSf * neg(Un0); tIntArea = initialArea * time; cutPoints(faceI, time, FIIL); }