mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: patchFields: set patchType() by hand if construct-from-parts. Related to #315.
This commit is contained in:
@ -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=
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
||||
@ -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());
|
||||
}
|
||||
|
||||
|
||||
@ -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());
|
||||
|
||||
@ -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"))
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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"))
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
||||
@ -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"))
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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"))
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
||||
@ -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=
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
||||
@ -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());
|
||||
|
||||
|
||||
@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user