From 309a5d92f58d4ee4065e8146a0ca9f7edf62a04f Mon Sep 17 00:00:00 2001 From: mattijs <mattijs> Date: Thu, 1 Jun 2017 17:59:10 +0100 Subject: [PATCH] BUG: patchFields: set patchType() by hand if construct-from-parts. Related to #315. --- .../fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C | 3 ++- .../fvPatchFields/derived/fixedMean/fixedMeanFvPatchField.C | 6 ++++-- .../fixedNormalInletOutletVelocityFvPatchVectorField.C | 3 ++- .../derived/fixedNormalSlip/fixedNormalSlipFvPatchField.C | 3 ++- .../fluxCorrectedVelocityFvPatchVectorField.C | 3 ++- .../derived/freestream/freestreamFvPatchField.C | 4 +++- .../derived/inletOutlet/inletOutletFvPatchField.C | 4 +++- .../inletOutletTotalTemperatureFvPatchScalarField.C | 4 +++- .../fvPatchFields/derived/noSlip/noSlipFvPatchVectorField.C | 6 ++++-- .../derived/outletInlet/outletInletFvPatchField.C | 4 +++- .../outletPhaseMeanVelocityFvPatchVectorField.C | 4 +++- .../derived/partialSlip/partialSlipFvPatchField.C | 3 ++- .../phaseHydrostaticPressureFvPatchScalarField.C | 4 +++- .../pressureDirectedInletOutletVelocityFvPatchVectorField.C | 3 ++- .../pressureInletOutletParSlipVelocityFvPatchVectorField.C | 3 ++- .../pressureInletOutletVelocityFvPatchVectorField.C | 3 ++- .../pressureNormalInletOutletVelocityFvPatchVectorField.C | 3 ++- .../rotatingPressureInletOutletVelocityFvPatchVectorField.C | 3 ++- .../supersonicFreestreamFvPatchVectorField.C | 4 +++- ...turbulentIntensityKineticEnergyInletFvPatchScalarField.C | 3 ++- .../uniformFixedGradient/uniformFixedGradientFvPatchField.C | 3 ++- .../uniformInletOutlet/uniformInletOutletFvPatchField.C | 3 ++- .../variableHeightFlowRateFvPatchField.C | 3 ++- 23 files changed, 57 insertions(+), 25 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C index fffb20722f4..e2dd514e133 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -52,6 +52,7 @@ Foam::fixedFluxPressureFvPatchScalarField::fixedFluxPressureFvPatchScalarField fixedGradientFvPatchScalarField(p, iF), curTimeIndex_(-1) { + patchType() = dict.lookupOrDefault<word>("patchType", word::null); if (dict.found("value") && dict.found("gradient")) { fvPatchField<scalar>::operator= diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedMean/fixedMeanFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedMean/fixedMeanFvPatchField.C index 1637834c9fc..648b7169666 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedMean/fixedMeanFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedMean/fixedMeanFvPatchField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -50,7 +50,9 @@ Foam::fixedMeanFvPatchField<Type>::fixedMeanFvPatchField : fixedValueFvPatchField<Type>(p, iF, dict), meanValue_(Function1<Type>::New("meanValue", dict)) -{} +{ + this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); +} template<class Type> diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.C index 72f372ad919..e2c2669d2e0 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalInletOutletVelocity/fixedNormalInletOutletVelocityFvPatchVectorField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -68,6 +68,7 @@ fixedNormalInletOutletVelocityFvPatchVectorField fvPatchVectorField::New(p, iF, dict.subDict("normalVelocity")) ) { + patchType() = dict.lookupOrDefault<word>("patchType", word::null); fvPatchVectorField::operator=(vectorField("value", dict, p.size())); refValue() = normalVelocity(); refGrad() = Zero; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.C index d2a8a6b425d..90add397bf1 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedNormalSlip/fixedNormalSlipFvPatchField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -66,6 +66,7 @@ Foam::fixedNormalSlipFvPatchField<Type>::fixedNormalSlipFvPatchField transformFvPatchField<Type>(p, iF), fixedValue_("fixedValue", dict, p.size()) { + this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); evaluate(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.C index d02d0436b7f..10124ec9f83 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fluxCorrectedVelocity/fluxCorrectedVelocityFvPatchVectorField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -71,6 +71,7 @@ fluxCorrectedVelocityFvPatchVectorField phiName_(dict.lookupOrDefault<word>("phi", "phi")), rhoName_(dict.lookupOrDefault<word>("rho", "rho")) { + patchType() = dict.lookupOrDefault<word>("patchType", word::null); fvPatchVectorField::operator=(patchInternalField()); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.C index 99dad9c4d99..49ae3f5b27a 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -48,6 +48,8 @@ Foam::freestreamFvPatchField<Type>::freestreamFvPatchField : inletOutletFvPatchField<Type>(p, iF) { + this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); + this->phiName_ = dict.lookupOrDefault<word>("phi","phi"); freestreamValue() = Field<Type>("freestreamValue", dict, p.size()); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C index e5036e40586..3b82d16f5f1 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -68,6 +68,8 @@ Foam::inletOutletFvPatchField<Type>::inletOutletFvPatchField mixedFvPatchField<Type>(p, iF), phiName_(dict.lookupOrDefault<word>("phi", "phi")) { + this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); + this->refValue() = Field<Type>("inletValue", dict, p.size()); if (dict.found("value")) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C index 8a113e177a0..5c32980c1ee 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -81,6 +81,8 @@ inletOutletTotalTemperatureFvPatchScalarField gamma_(readScalar(dict.lookup("gamma"))), T0_("T0", dict, p.size()) { + this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); + this->phiName_ = dict.lookupOrDefault<word>("phi", "phi"); this->refValue() = Zero; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/noSlip/noSlipFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/noSlip/noSlipFvPatchVectorField.C index b042164ca7a..b5b0d62db35 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/noSlip/noSlipFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/noSlip/noSlipFvPatchVectorField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -46,7 +46,9 @@ Foam::noSlipFvPatchVectorField::noSlipFvPatchVectorField ) : fixedValueFvPatchVectorField(p, iF, Zero) -{} +{ + patchType() = dict.lookupOrDefault<word>("patchType", word::null); +} Foam::noSlipFvPatchVectorField::noSlipFvPatchVectorField diff --git a/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C index 7584e4aa1a9..15d3a99fa69 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -68,6 +68,8 @@ Foam::outletInletFvPatchField<Type>::outletInletFvPatchField mixedFvPatchField<Type>(p, iF), phiName_(dict.lookupOrDefault<word>("phi", "phi")) { + this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); + this->refValue() = Field<Type>("outletValue", dict, p.size()); if (dict.found("value")) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C index 4004a663621..f92a4bf136d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -75,6 +75,8 @@ Foam::outletPhaseMeanVelocityFvPatchVectorField Umean_(readScalar(dict.lookup("Umean"))), alphaName_(dict.lookup("alpha")) { + patchType() = dict.lookupOrDefault<word>("patchType", word::null); + refValue() = Zero; refGrad() = Zero; valueFraction() = 0.0; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.C index 35655ab3b48..ff277584500 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -65,6 +65,7 @@ Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField transformFvPatchField<Type>(p, iF), valueFraction_("valueFraction", dict, p.size()) { + this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); evaluate(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C index 3fed1bf97b2..0dd82e8c443 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -65,6 +65,8 @@ phaseHydrostaticPressureFvPatchScalarField pRefValue_(readScalar(dict.lookup("pRefValue"))), pRefPoint_(dict.lookup("pRefPoint")) { + this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); + this->refValue() = pRefValue_; if (dict.found("value")) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C index 377408a867a..fc3e22c9b40 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -78,6 +78,7 @@ pressureDirectedInletOutletVelocityFvPatchVectorField rhoName_(dict.lookupOrDefault<word>("rho", "rho")), inletDir_("inletDirection", dict, p.size()) { + patchType() = dict.lookupOrDefault<word>("patchType", word::null); fvPatchVectorField::operator=(vectorField("value", dict, p.size())); refValue() = *this; refGrad() = Zero; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C index 0bfeff65aca..d86e95fa375 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -76,6 +76,7 @@ pressureInletOutletParSlipVelocityFvPatchVectorField phiName_(dict.lookupOrDefault<word>("phi", "phi")), rhoName_(dict.lookupOrDefault<word>("rho", "rho")) { + patchType() = dict.lookupOrDefault<word>("patchType", word::null); fvPatchVectorField::operator=(vectorField("value", dict, p.size())); refValue() = *this; refGrad() = Zero; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.C index 5b28ef39c5e..32f8aa2cfb2 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletVelocity/pressureInletOutletVelocityFvPatchVectorField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -77,6 +77,7 @@ pressureInletOutletVelocityFvPatchVectorField directionMixedFvPatchVectorField(p, iF), phiName_(dict.lookupOrDefault<word>("phi", "phi")) { + patchType() = dict.lookupOrDefault<word>("patchType", word::null); fvPatchVectorField::operator=(vectorField("value", dict, p.size())); if (dict.found("tangentialVelocity")) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C index 13ab7e6e18f..fb4c6776592 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -76,6 +76,7 @@ pressureNormalInletOutletVelocityFvPatchVectorField phiName_(dict.lookupOrDefault<word>("phi", "phi")), rhoName_(dict.lookupOrDefault<word>("rho", "rho")) { + patchType() = dict.lookupOrDefault<word>("patchType", word::null); fvPatchVectorField::operator=(vectorField("value", dict, p.size())); refValue() = *this; refGrad() = Zero; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.C index 5a60acfab93..4f22a43edad 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/rotatingPressureInletOutletVelocity/rotatingPressureInletOutletVelocityFvPatchVectorField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -88,6 +88,7 @@ rotatingPressureInletOutletVelocityFvPatchVectorField pressureInletOutletVelocityFvPatchVectorField(p, iF, dict), omega_(Function1<vector>::New("omega", dict)) { + patchType() = dict.lookupOrDefault<word>("patchType", word::null); calcTangentialVelocity(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C index 3f32156386a..ddfb7c790c2 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -69,6 +69,8 @@ supersonicFreestreamFvPatchVectorField TInf_(readScalar(dict.lookup("TInf"))), gamma_(readScalar(dict.lookup("gamma"))) { + patchType() = dict.lookupOrDefault<word>("patchType", word::null); + if (dict.found("value")) { fvPatchField<vector>::operator= diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C index b364efbb4ef..58dbd641267 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentIntensityKineticEnergyInlet/turbulentIntensityKineticEnergyInletFvPatchScalarField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -73,6 +73,7 @@ turbulentIntensityKineticEnergyInletFvPatchScalarField intensity_(readScalar(dict.lookup("intensity"))), UName_(dict.lookupOrDefault<word>("U", "U")) { + this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); this->phiName_ = dict.lookupOrDefault<word>("phi", "phi"); if (intensity_ < 0 || intensity_ > 1) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.C index 298d5efc076..1bf1f7b0814 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -63,6 +63,7 @@ Foam::uniformFixedGradientFvPatchField<Type>::uniformFixedGradientFvPatchField fixedGradientFvPatchField<Type>(p, iF), uniformGradient_(Function1<Type>::New("uniformGradient", dict)) { + this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); this->evaluate(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C index 577e0b6d598..4eacb7541c4 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -55,6 +55,7 @@ Foam::uniformInletOutletFvPatchField<Type>::uniformInletOutletFvPatchField phiName_(dict.lookupOrDefault<word>("phi", "phi")), uniformInletValue_(Function1<Type>::New("uniformInletValue", dict)) { + this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); this->refValue() = uniformInletValue_->value(this->db().time().timeOutputValue()); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C index 84dd2a40d2e..341d6134325 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -78,6 +78,7 @@ Foam::variableHeightFlowRateFvPatchScalarField lowerBound_(readScalar(dict.lookup("lowerBound"))), upperBound_(readScalar(dict.lookup("upperBound"))) { + patchType() = dict.lookupOrDefault<word>("patchType", word::null); this->refValue() = 0.0; if (dict.found("value")) -- GitLab