fvPatchFields: Constructors from dictionary now call the corresponding constructor of the fvPatchField base-class
to ensure 'patchType' is set as specified. Required substantial change to the organization of the reading of the 'value' entry requiring careful testing and there may be some residual issues remaining. Please report any problems with the reading and initialization of patch fields. Resolves bug-report http://bugs.openfoam.org/view.php?id=2266
This commit is contained in:
parent
93530f1747
commit
b6feaea53b
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -63,13 +63,8 @@ adjointOutletPressureFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF)
|
||||
{
|
||||
fvPatchField<scalar>::operator=
|
||||
(
|
||||
scalarField("value", dict, p.size())
|
||||
);
|
||||
}
|
||||
fixedValueFvPatchScalarField(p, iF, dict)
|
||||
{}
|
||||
|
||||
|
||||
Foam::adjointOutletPressureFvPatchScalarField::
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -50,10 +50,8 @@ adjointOutletVelocityFvPatchVectorField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(p, iF)
|
||||
{
|
||||
fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
|
||||
}
|
||||
fixedValueFvPatchVectorField(p, iF, dict)
|
||||
{}
|
||||
|
||||
|
||||
Foam::adjointOutletVelocityFvPatchVectorField::
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -56,7 +56,7 @@ atmBoundaryLayerInletEpsilonFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
fixedValueFvPatchScalarField(p, iF, dict, false),
|
||||
atmBoundaryLayer(patch().Cf(), dict)
|
||||
{
|
||||
scalarField::operator=(epsilon(patch().Cf()));
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -56,7 +56,7 @@ atmBoundaryLayerInletKFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
fixedValueFvPatchScalarField(p, iF, dict, false),
|
||||
atmBoundaryLayer(patch().Cf(), dict)
|
||||
{
|
||||
scalarField::operator=(k(patch().Cf()));
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -56,7 +56,7 @@ atmBoundaryLayerInletVelocityFvPatchVectorField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(p, iF),
|
||||
fixedValueFvPatchVectorField(p, iF, dict, false),
|
||||
atmBoundaryLayer(patch().Cf(), dict)
|
||||
{
|
||||
vectorField::operator=(U(patch().Cf()));
|
||||
|
@ -50,7 +50,7 @@ Foam::fixedShearStressFvPatchVectorField::fixedShearStressFvPatchVectorField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(p, iF),
|
||||
fixedValueFvPatchVectorField(p, iF, dict, false),
|
||||
tau0_(dict.lookupOrDefault<vector>("tau", Zero))
|
||||
{
|
||||
fvPatchField<vector>::operator=(patchInternalField());
|
||||
|
@ -64,12 +64,10 @@ Foam::SRFVelocityFvPatchVectorField::SRFVelocityFvPatchVectorField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(p, iF),
|
||||
fixedValueFvPatchVectorField(p, iF, dict),
|
||||
relative_(dict.lookup("relative")),
|
||||
inletValue_("inletValue", dict, p.size())
|
||||
{
|
||||
fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
|
||||
}
|
||||
{}
|
||||
|
||||
|
||||
Foam::SRFVelocityFvPatchVectorField::SRFVelocityFvPatchVectorField
|
||||
|
@ -60,10 +60,8 @@ Foam::SRFWallVelocityFvPatchVectorField::SRFWallVelocityFvPatchVectorField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(p, iF)
|
||||
{
|
||||
fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
|
||||
}
|
||||
fixedValueFvPatchVectorField(p, iF, dict)
|
||||
{}
|
||||
|
||||
|
||||
Foam::SRFWallVelocityFvPatchVectorField::SRFWallVelocityFvPatchVectorField
|
||||
|
@ -71,11 +71,12 @@ Foam::coupledFvPatchField<Type>::coupledFvPatchField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
const dictionary& dict,
|
||||
const bool valueRequired
|
||||
)
|
||||
:
|
||||
LduInterfaceField<Type>(refCast<const lduInterface>(p)),
|
||||
fvPatchField<Type>(p, iF, dict)
|
||||
fvPatchField<Type>(p, iF, dict, valueRequired)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -86,7 +86,8 @@ public:
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<Type, volMesh>&,
|
||||
const dictionary&
|
||||
const dictionary&,
|
||||
const bool valueRequired=true
|
||||
);
|
||||
|
||||
//- Construct by mapping the given coupledFvPatchField onto a new patch
|
||||
|
@ -46,12 +46,13 @@ extrapolatedCalculatedFvPatchField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, volMesh>& iF,
|
||||
const dictionary& dict,
|
||||
const bool valueRequired
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
calculatedFvPatchField<Type>(p, iF, dict, valueRequired)
|
||||
{}
|
||||
calculatedFvPatchField<Type>(p, iF, dict, false)
|
||||
{
|
||||
evaluate();
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
|
@ -87,8 +87,7 @@ public:
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<Type, volMesh>&,
|
||||
const dictionary&,
|
||||
const bool valueRequired=false
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given patchField<Type> onto a new patch
|
||||
|
@ -48,7 +48,7 @@ Foam::fixedGradientFvPatchField<Type>::fixedGradientFvPatchField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fvPatchField<Type>(p, iF, dict),
|
||||
fvPatchField<Type>(p, iF, dict, false),
|
||||
gradient_("gradient", dict, p.size())
|
||||
{
|
||||
evaluate();
|
||||
|
@ -55,10 +55,11 @@ Foam::fixedValueFvPatchField<Type>::fixedValueFvPatchField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
const dictionary& dict,
|
||||
const bool valueRequired
|
||||
)
|
||||
:
|
||||
fvPatchField<Type>(p, iF, dict, true)
|
||||
fvPatchField<Type>(p, iF, dict, valueRequired)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -99,7 +99,8 @@ public:
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<Type, volMesh>&,
|
||||
const dictionary&
|
||||
const dictionary&,
|
||||
const bool valueRequired=true
|
||||
);
|
||||
|
||||
//- Construct by mapping the given fixedValueFvPatchField<Type>
|
||||
|
@ -49,7 +49,7 @@ Foam::mixedFvPatchField<Type>::mixedFvPatchField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fvPatchField<Type>(p, iF, dict),
|
||||
fvPatchField<Type>(p, iF, dict, false),
|
||||
refValue_("refValue", dict, p.size()),
|
||||
refGrad_("refGradient", dict, p.size()),
|
||||
valueFraction_("valueFraction", dict, p.size())
|
||||
|
@ -61,7 +61,7 @@ Foam::slicedFvPatchField<Type>::slicedFvPatchField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fvPatchField<Type>(p, iF, dict)
|
||||
fvPatchField<Type>(p, iF, dict, false)
|
||||
{
|
||||
NotImplemented;
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ Foam::transformFvPatchField<Type>::transformFvPatchField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fvPatchField<Type>(p, iF, dict)
|
||||
fvPatchField<Type>(p, iF, dict, false)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -47,7 +47,7 @@ Foam::zeroGradientFvPatchField<Type>::zeroGradientFvPatchField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fvPatchField<Type>(p, iF, dict)
|
||||
fvPatchField<Type>(p, iF, dict, false)
|
||||
{
|
||||
fvPatchField<Type>::operator=(this->patchInternalField());
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ Foam::cyclicFvPatchField<Type>::cyclicFvPatchField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
coupledFvPatchField<Type>(p, iF, dict),
|
||||
coupledFvPatchField<Type>(p, iF, dict, false),
|
||||
cyclicPatch_(refCast<const cyclicFvPatch>(p))
|
||||
{
|
||||
if (!isA<cyclicFvPatch>(p))
|
||||
|
@ -41,6 +41,38 @@ Foam::cyclicACMIFvPatchField<Type>::cyclicACMIFvPatchField
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::cyclicACMIFvPatchField<Type>::cyclicACMIFvPatchField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
cyclicACMILduInterfaceField(),
|
||||
coupledFvPatchField<Type>(p, iF, dict, dict.found("value")),
|
||||
cyclicACMIPatch_(refCast<const cyclicACMIFvPatch>(p))
|
||||
{
|
||||
if (!isA<cyclicACMIFvPatch>(p))
|
||||
{
|
||||
FatalIOErrorInFunction
|
||||
(
|
||||
dict
|
||||
) << " patch type '" << p.type()
|
||||
<< "' not constraint type '" << typeName << "'"
|
||||
<< "\n for patch " << p.name()
|
||||
<< " of field " << this->internalField().name()
|
||||
<< " in file " << this->internalField().objectPath()
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
if (!dict.found("value") && this->coupled())
|
||||
{
|
||||
this->evaluate(Pstream::blocking);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::cyclicACMIFvPatchField<Type>::cyclicACMIFvPatchField
|
||||
(
|
||||
@ -66,37 +98,6 @@ Foam::cyclicACMIFvPatchField<Type>::cyclicACMIFvPatchField
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::cyclicACMIFvPatchField<Type>::cyclicACMIFvPatchField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
cyclicACMILduInterfaceField(),
|
||||
coupledFvPatchField<Type>(p, iF, dict),
|
||||
cyclicACMIPatch_(refCast<const cyclicACMIFvPatch>(p))
|
||||
{
|
||||
if (!isA<cyclicACMIFvPatch>(p))
|
||||
{
|
||||
FatalIOErrorInFunction
|
||||
(
|
||||
dict
|
||||
) << " patch type '" << p.type()
|
||||
<< "' not constraint type '" << typeName << "'"
|
||||
<< "\n for patch " << p.name()
|
||||
<< " of field " << this->internalField().name()
|
||||
<< " in file " << this->internalField().objectPath()
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
if (!dict.found("value") && this->coupled())
|
||||
{
|
||||
this->evaluate(Pstream::blocking);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::cyclicACMIFvPatchField<Type>::cyclicACMIFvPatchField
|
||||
|
@ -38,31 +38,6 @@ Foam::cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField
|
||||
(
|
||||
const cyclicAMIFvPatchField<Type>& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
cyclicAMILduInterfaceField(),
|
||||
coupledFvPatchField<Type>(ptf, p, iF, mapper),
|
||||
cyclicAMIPatch_(refCast<const cyclicAMIFvPatch>(p))
|
||||
{
|
||||
if (!isA<cyclicAMIFvPatch>(this->patch()))
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "' not constraint type '" << typeName << "'"
|
||||
<< "\n for patch " << p.name()
|
||||
<< " of field " << this->internalField().name()
|
||||
<< " in file " << this->internalField().objectPath()
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField
|
||||
(
|
||||
@ -72,7 +47,7 @@ Foam::cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField
|
||||
)
|
||||
:
|
||||
cyclicAMILduInterfaceField(),
|
||||
coupledFvPatchField<Type>(p, iF, dict),
|
||||
coupledFvPatchField<Type>(p, iF, dict, dict.found("value")),
|
||||
cyclicAMIPatch_(refCast<const cyclicAMIFvPatch>(p))
|
||||
{
|
||||
if (!isA<cyclicAMIFvPatch>(p))
|
||||
@ -95,6 +70,31 @@ Foam::cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField
|
||||
(
|
||||
const cyclicAMIFvPatchField<Type>& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
cyclicAMILduInterfaceField(),
|
||||
coupledFvPatchField<Type>(ptf, p, iF, mapper),
|
||||
cyclicAMIPatch_(refCast<const cyclicAMIFvPatch>(p))
|
||||
{
|
||||
if (!isA<cyclicAMIFvPatch>(this->patch()))
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "' not constraint type '" << typeName << "'"
|
||||
<< "\n for patch " << p.name()
|
||||
<< " of field " << this->internalField().name()
|
||||
<< " in file " << this->internalField().objectPath()
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField
|
||||
(
|
||||
|
@ -85,7 +85,7 @@ activeBaffleVelocityFvPatchVectorField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(p, iF),
|
||||
fixedValueFvPatchVectorField(p, iF, dict, false),
|
||||
pName_(dict.lookupOrDefault<word>("p", "p")),
|
||||
cyclicPatchName_(dict.lookup("cyclicPatch")),
|
||||
cyclicPatchLabel_(p.patch().boundaryMesh().findPatchID(cyclicPatchName_)),
|
||||
|
@ -91,7 +91,7 @@ activePressureForceBaffleVelocityFvPatchVectorField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(p, iF),
|
||||
fixedValueFvPatchVectorField(p, iF, dict, false),
|
||||
pName_(dict.lookupOrDefault<word>("p", "p")),
|
||||
cyclicPatchName_(dict.lookup("cyclicPatch")),
|
||||
cyclicPatchLabel_(p.patch().boundaryMesh().findPatchID(cyclicPatchName_)),
|
||||
|
@ -64,7 +64,7 @@ Foam::fixedProfileFvPatchField<Type>::fixedProfileFvPatchField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<Type>(p, iF),
|
||||
fixedValueFvPatchField<Type>(p, iF, dict, false),
|
||||
profile_(Function1<Type>::New("profile", dict)),
|
||||
dir_(dict.lookup("direction")),
|
||||
origin_(readScalar(dict.lookup("origin")))
|
||||
|
@ -54,7 +54,7 @@ flowRateInletVelocityFvPatchVectorField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<vector>(p, iF),
|
||||
fixedValueFvPatchField<vector>(p, iF, dict, false),
|
||||
rhoInlet_(dict.lookupOrDefault<scalar>("rhoInlet", -VGREAT)),
|
||||
extrapolateProfile_
|
||||
(
|
||||
|
@ -50,10 +50,8 @@ movingWallVelocityFvPatchVectorField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(p, iF)
|
||||
{
|
||||
fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
|
||||
}
|
||||
fixedValueFvPatchVectorField(p, iF, dict)
|
||||
{}
|
||||
|
||||
|
||||
Foam::movingWallVelocityFvPatchVectorField::
|
||||
|
@ -65,7 +65,7 @@ Foam::plenumPressureFvPatchScalarField::plenumPressureFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
fixedValueFvPatchScalarField(p, iF, dict),
|
||||
gamma_(readScalar(dict.lookup("gamma"))),
|
||||
R_(readScalar(dict.lookup("R"))),
|
||||
supplyMassFlowRate_(readScalar(dict.lookup("supplyMassFlowRate"))),
|
||||
@ -87,8 +87,6 @@ Foam::plenumPressureFvPatchScalarField::plenumPressureFvPatchScalarField
|
||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
||||
UName_(dict.lookupOrDefault<word>("U", "U"))
|
||||
{
|
||||
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
||||
|
||||
if (dict.found("rho"))
|
||||
{
|
||||
rho_ = readScalar(dict.lookup("rho"));
|
||||
|
@ -70,13 +70,11 @@ pressureDirectedInletVelocityFvPatchVectorField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(p, iF),
|
||||
fixedValueFvPatchVectorField(p, iF, dict),
|
||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||
inletDir_("inletDirection", dict, p.size())
|
||||
{
|
||||
fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
|
||||
}
|
||||
{}
|
||||
|
||||
|
||||
Foam::pressureDirectedInletVelocityFvPatchVectorField::
|
||||
|
@ -66,12 +66,10 @@ pressureInletVelocityFvPatchVectorField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(p, iF),
|
||||
fixedValueFvPatchVectorField(p, iF, dict),
|
||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho"))
|
||||
{
|
||||
fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
|
||||
}
|
||||
{}
|
||||
|
||||
|
||||
Foam::pressureInletVelocityFvPatchVectorField::
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -52,7 +52,7 @@ prghPressureFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
fixedValueFvPatchScalarField(p, iF, dict, false),
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||
p_("p", dict, p.size())
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -55,7 +55,7 @@ prghTotalPressureFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
fixedValueFvPatchScalarField(p, iF, dict, false),
|
||||
UName_(dict.lookupOrDefault<word>("U", "U")),
|
||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||
|
@ -52,7 +52,7 @@ rotatingWallVelocityFvPatchVectorField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<vector>(p, iF),
|
||||
fixedValueFvPatchField<vector>(p, iF, dict, false),
|
||||
origin_(dict.lookup("origin")),
|
||||
axis_(dict.lookup("axis")),
|
||||
omega_(Function1<scalar>::New("omega", dict))
|
||||
|
@ -50,7 +50,7 @@ surfaceNormalFixedValueFvPatchVectorField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(p, iF),
|
||||
fixedValueFvPatchVectorField(p, iF, dict, false),
|
||||
refValue_("refValue", dict, p.size())
|
||||
{
|
||||
fvPatchVectorField::operator=(refValue_*patch().nf());
|
||||
|
@ -50,7 +50,7 @@ Foam::syringePressureFvPatchScalarField::syringePressureFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
fixedValueFvPatchScalarField(p, iF, dict, false),
|
||||
Ap_(readScalar(dict.lookup("Ap"))),
|
||||
Sp_(readScalar(dict.lookup("Sp"))),
|
||||
VsI_(readScalar(dict.lookup("VsI"))),
|
||||
|
@ -63,7 +63,7 @@ timeVaryingMappedFixedValueFvPatchField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<Type>(p, iF),
|
||||
fixedValueFvPatchField<Type>(p, iF, dict, false),
|
||||
fieldTableName_(iF.name()),
|
||||
setAverage_(dict.lookupOrDefault("setAverage", false)),
|
||||
perturb_(dict.lookupOrDefault("perturb", 1e-5)),
|
||||
|
@ -55,7 +55,7 @@ Foam::totalPressureFvPatchScalarField::totalPressureFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
fixedValueFvPatchScalarField(p, iF, dict, false),
|
||||
UName_(dict.lookupOrDefault<word>("U", "U")),
|
||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -70,7 +70,7 @@ Foam::totalTemperatureFvPatchScalarField::totalTemperatureFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
fixedValueFvPatchScalarField(p, iF, dict, false),
|
||||
UName_(dict.lookupOrDefault<word>("U", "U")),
|
||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
||||
psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")),
|
||||
|
@ -49,7 +49,7 @@ translatingWallVelocityFvPatchVectorField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<vector>(p, iF),
|
||||
fixedValueFvPatchField<vector>(p, iF, dict, false),
|
||||
U_(Function1<vector>::New("U", dict))
|
||||
{
|
||||
// Evaluate the wall velocity
|
||||
|
@ -51,7 +51,7 @@ Foam::turbulentInletFvPatchField<Type>::turbulentInletFvPatchField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<Type>(p, iF),
|
||||
fixedValueFvPatchField<Type>(p, iF, dict, false),
|
||||
ranGen_(label(0)),
|
||||
fluctuationScale_(pTraits<Type>(dict.lookup("fluctuationScale"))),
|
||||
referenceField_("referenceField", dict, p.size()),
|
||||
|
@ -54,7 +54,7 @@ uniformDensityHydrostaticPressureFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
fixedValueFvPatchScalarField(p, iF, dict, false),
|
||||
rho_(readScalar(dict.lookup("rho"))),
|
||||
pRefValue_(readScalar(dict.lookup("pRefValue"))),
|
||||
pRefPoint_(dict.lookup("pRefPoint"))
|
||||
|
@ -60,7 +60,7 @@ Foam::uniformFixedValueFvPatchField<Type>::uniformFixedValueFvPatchField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<Type>(p, iF),
|
||||
fixedValueFvPatchField<Type>(p, iF, dict, false),
|
||||
uniformValue_(Function1<Type>::New("uniformValue", dict))
|
||||
{
|
||||
this->evaluate();
|
||||
|
@ -56,7 +56,7 @@ uniformTotalPressureFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
fixedValueFvPatchScalarField(p, iF, dict, false),
|
||||
UName_(dict.lookupOrDefault<word>("U", "U")),
|
||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||
|
@ -82,16 +82,11 @@ waveSurfacePressureFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
fixedValueFvPatchScalarField(p, iF, dict),
|
||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
||||
zetaName_(dict.lookupOrDefault<word>("zeta", "zeta")),
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho"))
|
||||
{
|
||||
fvPatchField<scalar>::operator=
|
||||
(
|
||||
scalarField("value", dict, p.size())
|
||||
);
|
||||
}
|
||||
{}
|
||||
|
||||
|
||||
Foam::waveSurfacePressureFvPatchScalarField::
|
||||
|
@ -114,24 +114,23 @@ Foam::fvPatchField<Type>::fvPatchField
|
||||
manipulatedMatrix_(false),
|
||||
patchType_(dict.lookupOrDefault<word>("patchType", word::null))
|
||||
{
|
||||
if (dict.found("value"))
|
||||
if (valueRequired)
|
||||
{
|
||||
Field<Type>::operator=
|
||||
(
|
||||
Field<Type>("value", dict, p.size())
|
||||
);
|
||||
}
|
||||
else if (!valueRequired)
|
||||
{
|
||||
Field<Type>::operator=(Zero);
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalIOErrorInFunction
|
||||
(
|
||||
dict
|
||||
) << "Essential entry 'value' missing"
|
||||
<< exit(FatalIOError);
|
||||
if (dict.found("value"))
|
||||
{
|
||||
Field<Type>::operator=
|
||||
(
|
||||
Field<Type>("value", dict, p.size())
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalIOErrorInFunction
|
||||
(
|
||||
dict
|
||||
) << "Essential entry 'value' missing"
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@ public:
|
||||
const fvPatch&,
|
||||
const DimensionedField<Type, volMesh>&,
|
||||
const dictionary&,
|
||||
const bool valueRequired=false
|
||||
const bool valueRequired=true
|
||||
);
|
||||
|
||||
//- Construct by mapping the given fvPatchField onto a new patch
|
||||
|
@ -63,10 +63,8 @@ Foam::cellMotionFvPatchField<Type>::cellMotionFvPatchField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<Type>(p, iF)
|
||||
{
|
||||
fvPatchField<Type>::operator=(Field<Type>("value", dict, p.size()));
|
||||
}
|
||||
fixedValueFvPatchField<Type>(p, iF, dict)
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
|
@ -63,7 +63,7 @@ timeVaryingMappedFixedValuePointPatchField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<Type>(p, iF),
|
||||
fixedValuePointPatchField<Type>(p, iF, dict, false),
|
||||
fieldTableName_(iF.name()),
|
||||
setAverage_(dict.lookupOrDefault("setAverage", false)),
|
||||
perturb_(dict.lookupOrDefault("perturb", 1e-5)),
|
||||
|
@ -53,7 +53,7 @@ Foam::genericFvPatchField<Type>::genericFvPatchField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
calculatedFvPatchField<Type>(p, iF, dict, false),
|
||||
calculatedFvPatchField<Type>(p, iF, dict),
|
||||
actualTypeName_(dict.lookup("type")),
|
||||
dict_(dict)
|
||||
{
|
||||
|
@ -71,7 +71,7 @@ filmPyrolysisTemperatureCoupledFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
fixedValueFvPatchScalarField(p, iF, dict),
|
||||
filmRegionName_
|
||||
(
|
||||
dict.lookupOrDefault<word>("filmRegion", "surfaceFilmProperties")
|
||||
@ -82,9 +82,7 @@ filmPyrolysisTemperatureCoupledFvPatchScalarField
|
||||
),
|
||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho"))
|
||||
{
|
||||
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
||||
}
|
||||
{}
|
||||
|
||||
|
||||
Foam::filmPyrolysisTemperatureCoupledFvPatchScalarField::
|
||||
|
@ -71,7 +71,7 @@ filmPyrolysisVelocityCoupledFvPatchVectorField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(p, iF),
|
||||
fixedValueFvPatchVectorField(p, iF, dict),
|
||||
filmRegionName_
|
||||
(
|
||||
dict.lookupOrDefault<word>("filmRegion", "surfaceFilmProperties")
|
||||
@ -82,9 +82,7 @@ filmPyrolysisVelocityCoupledFvPatchVectorField
|
||||
),
|
||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho"))
|
||||
{
|
||||
fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
|
||||
}
|
||||
{}
|
||||
|
||||
|
||||
Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -68,13 +68,11 @@ filmHeightInletVelocityFvPatchVectorField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(p, iF),
|
||||
fixedValueFvPatchVectorField(p, iF, dict),
|
||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||
deltafName_(dict.lookupOrDefault<word>("deltaf", "deltaf"))
|
||||
{
|
||||
fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
|
||||
}
|
||||
{}
|
||||
|
||||
|
||||
Foam::filmHeightInletVelocityFvPatchVectorField::
|
||||
|
@ -68,13 +68,11 @@ inclinedFilmNusseltHeightFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
fixedValueFvPatchScalarField(p, iF, dict),
|
||||
GammaMean_(Function1<scalar>::New("GammaMean", dict)),
|
||||
a_(Function1<scalar>::New("a", dict)),
|
||||
omega_(Function1<scalar>::New("omega", dict))
|
||||
{
|
||||
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
||||
}
|
||||
{}
|
||||
|
||||
|
||||
Foam::inclinedFilmNusseltHeightFvPatchScalarField::
|
||||
|
@ -68,13 +68,11 @@ inclinedFilmNusseltInletVelocityFvPatchVectorField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchVectorField(p, iF),
|
||||
fixedValueFvPatchVectorField(p, iF, dict),
|
||||
GammaMean_(Function1<scalar>::New("GammaMean", dict)),
|
||||
a_(Function1<scalar>::New("a", dict)),
|
||||
omega_(Function1<scalar>::New("omega", dict))
|
||||
{
|
||||
fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
|
||||
}
|
||||
{}
|
||||
|
||||
|
||||
Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::
|
||||
|
@ -72,7 +72,7 @@ greyDiffusiveViewFactorFixedValueFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
fixedValueFvPatchScalarField(p, iF, dict, false),
|
||||
radiationCoupledBase(p, dict),
|
||||
Qro_("Qro", dict, p.size())
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -66,7 +66,7 @@ alphaFixedPressureFvPatchScalarField
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
fixedValueFvPatchScalarField(p, iF, dict, false),
|
||||
p_("p", dict, p.size())
|
||||
{
|
||||
if (dict.found("value"))
|
||||
|
Loading…
Reference in New Issue
Block a user