本文整理汇总了C++中refGrad函数的典型用法代码示例。如果您正苦于以下问题:C++ refGrad函数的具体用法?C++ refGrad怎么用?C++ refGrad使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了refGrad函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: mixedFvPatchScalarField
thermalBaffle1DFvPatchScalarField<solidType>::
thermalBaffle1DFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
mappedPatchBase
(
p.patch(),
p.boundaryMesh().mesh().name(),
NEARESTPATCHFACE,
dict.lookup("samplePatch"),
0.0
),
mixedFvPatchScalarField(p, iF),
TName_("T"),
baffleActivated_(dict.lookupOrDefault<bool>("baffleActivated", true)),
thickness_(),
Qs_(p.size(), 0),
solidDict_(dict),
solidPtr_(),
QrPrevious_(p.size(), 0.0),
QrRelaxation_(dict.lookupOrDefault<scalar>("relaxation", 0)),
QrName_(dict.lookupOrDefault<word>("Qr", "none"))
{
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
if (dict.found("thickness"))
{
thickness_ = scalarField("thickness", dict, p.size());
}
if (dict.found("Qs"))
{
Qs_ = scalarField("Qs", dict, p.size());
}
if (dict.found("QrPrevious"))
{
QrPrevious_ = scalarField("QrPrevious", dict, p.size());
}
if (dict.found("refValue") && baffleActivated_)
{
// Full restart
refValue() = scalarField("refValue", dict, p.size());
refGrad() = scalarField("refGradient", dict, p.size());
valueFraction() = scalarField("valueFraction", dict, p.size());
}
else
{
// Start from user entered data. Assume zeroGradient.
refValue() = *this;
refGrad() = 0.0;
valueFraction() = 0.0;
}
}
开发者ID:Al-th,项目名称:OpenFOAM-2.2.x,代码行数:60,代码来源:thermalBaffle1DFvPatchScalarField.C
示例2: mixedFvPatchScalarField
filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::
filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
mixedFvPatchScalarField(p, iF),
temperatureCoupledBase(patch(), dict),
filmRegionName_
(
dict.lookupOrDefault<word>("filmRegion", "surfaceFilmProperties")
),
pyrolysisRegionName_
(
dict.lookupOrDefault<word>("pyrolysisRegion", "pyrolysisProperties")
),
TnbrName_(dict.lookup("Tnbr")),
QrName_(dict.lookup("Qr")),
convectiveScaling_(dict.lookupOrDefault<scalar>("convectiveScaling", 1.0)),
filmDeltaDry_(readScalar(dict.lookup("filmDeltaDry"))),
filmDeltaWet_(readScalar(dict.lookup("filmDeltaWet")))
{
if (!isA<mappedPatchBase>(this->patch().patch()))
{
FatalErrorIn
(
"filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::"
"filmPyrolysisRadiativeCoupledMixedFvPatchScalarField\n"
"(\n"
" const fvPatch& p,\n"
" const DimensionedField<scalar, volMesh>& iF,\n"
" const dictionary& dict\n"
")\n"
) << "\n patch type '" << p.type()
<< "' not type '" << mappedPatchBase::typeName << "'"
<< "\n for patch " << p.name()
<< " of field " << dimensionedInternalField().name()
<< " in file " << dimensionedInternalField().objectPath()
<< exit(FatalError);
}
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
if (dict.found("refValue"))
{
// Full restart
refValue() = scalarField("refValue", dict, p.size());
refGrad() = scalarField("refGradient", dict, p.size());
valueFraction() = scalarField("valueFraction", dict, p.size());
}
else
{
// Start from user entered data. Assume fixedValue.
refValue() = *this;
refGrad() = 0.0;
valueFraction() = 1.0;
}
}
开发者ID:Al-th,项目名称:OpenFOAM-2.2.x,代码行数:60,代码来源:filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C
示例3: mixedFvPatchScalarField
CFDHAMfluidMoistureCoupledMixedFvPatchScalarField::
CFDHAMfluidMoistureCoupledMixedFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
mixedFvPatchScalarField(p, iF),
temperatureCoupledBase(patch(), dict),
wnbrName_(dict.lookupOrDefault<word>("wnbr", "none")),
TnbrName_(dict.lookupOrDefault<word>("Tnbr", "none")),
QrNbrName_(dict.lookupOrDefault<word>("QrNbr", "none")),
QrName_(dict.lookupOrDefault<word>("Qr", "none")),
QsNbrName_(dict.lookupOrDefault<word>("QsNbr", "none")),
QsName_(dict.lookupOrDefault<word>("Qs", "none"))
{
if (!isA<mappedPatchBase>(this->patch().patch()))
{
FatalErrorIn
(
"CFDHAMfluidMoistureCoupledMixedFvPatchScalarField::"
"CFDHAMfluidMoistureCoupledMixedFvPatchScalarField\n"
"(\n"
" const fvPatch& p,\n"
" const DimensionedField<scalar, volMesh>& iF,\n"
" const dictionary& dict\n"
")\n"
) << "\n patch type '" << p.type()
<< "' not type '" << mappedPatchBase::typeName << "'"
<< "\n for patch " << p.name()
<< " of field " << dimensionedInternalField().name()
<< " in file " << dimensionedInternalField().objectPath()
<< exit(FatalError);
}
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
if (dict.found("refValue"))
{
// Full restart
refValue() = scalarField("refValue", dict, p.size());
refGrad() = scalarField("refGradient", dict, p.size());
valueFraction() = scalarField("valueFraction", dict, p.size());
}
else
{
// Start from user entered data. Assume fixedValue.
refValue() = *this;
refGrad() = 0.0;
valueFraction() = 1.0;
}
}
开发者ID:lento234,项目名称:OF-2.3.x,代码行数:53,代码来源:CFDHAMfluidMoistureCoupledMixedFvPatchScalarField.C
示例4: mixedFvPatchScalarField
thermalBaffle1DFvPatchScalarField<solidType>::
thermalBaffle1DFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
mixedFvPatchScalarField(p, iF),
TName_("T"),
baffleActivated_(readBool(dict.lookup("baffleActivated"))),
thickness_(scalarField("thickness", dict, p.size())),
Qs_(scalarField("Qs", dict, p.size())),
solidDict_(dict),
solidPtr_(new solidType(dict))
{
if (!isA<mappedPatchBase>(this->patch().patch()))
{
FatalErrorIn
(
"thermalBaffle1DFvPatchScalarField::"
"thermalBaffle1DFvPatchScalarField"
"("
"const fvPatch&,\n"
"const DimensionedField<scalar, volMesh>&, "
"const dictionary&"
")"
) << "\n patch type '" << patch().type()
<< "' not type '" << mappedPatchBase::typeName << "'"
<< "\n for patch " << patch().name()
<< " of field " << dimensionedInternalField().name()
<< " in file " << dimensionedInternalField().objectPath()
<< exit(FatalError);
}
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
if (dict.found("refValue") && baffleActivated_)
{
// Full restart
refValue() = scalarField("refValue", dict, p.size());
refGrad() = scalarField("refGradient", dict, p.size());
valueFraction() = scalarField("valueFraction", dict, p.size());
}
else
{
// Start from user entered data. Assume zeroGradient.
refValue() = *this;
refGrad() = 0.0;
valueFraction() = 0.0;
}
}
开发者ID:MarinusvanderMeijs,项目名称:OpenFOAM-2.2.x,代码行数:53,代码来源:thermalBaffle1DFvPatchScalarField.C
示例5: mixedFvPatchScalarField
surfaceChargeCoupledFvPatchScalarField::
surfaceChargeCoupledFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
mixedFvPatchScalarField(p, iF),
temperatureCoupledBase(patch(), dict),
neighbourFieldName_(dict.lookup("neighbourFieldName")),
surfCharge_(readScalar(dict.lookup("surfaceCharge"))),
myEpr_(readScalar(dict.lookup("myEpr"))),
nbrEpr_(readScalar(dict.lookup("nbrEpr")))
{
if (!isA<mappedPatchBase>(this->patch().patch()))
{
FatalErrorIn
(
"surfaceChargeCoupledFvPatchScalarField::"
"surfaceChargeCoupledFvPatchScalarField\n"
"(\n"
" const fvPatch& p,\n"
" const DimensionedField<scalar, volMesh>& iF,\n"
" const dictionary& dict\n"
")\n"
) << "\n patch type '" << p.type()
<< "' not type '" << mappedPatchBase::typeName << "'"
<< "\n for patch " << p.name()
<< " of field " << dimensionedInternalField().name()
<< " in file " << dimensionedInternalField().objectPath()
<< exit(FatalError);
}
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
if (dict.found("refValue"))
{
// Full restart
refValue() = scalarField("refValue", dict, p.size());
refGrad() = scalarField("refGradient", dict, p.size());
valueFraction() = scalarField("valueFraction", dict, p.size());
}
else
{
// Start from user entered data. Assume fixedValue.
refValue() = *this;
refGrad() = 0.0;
valueFraction() = 1.0;
}
}
开发者ID:maoyanren,项目名称:surfaceChargeCoupledBoundaryCondition,代码行数:51,代码来源:surfaceChargeCoupledFvPatchScalarField.C
示例6: db
void Foam::mixedInternalEnergyFvPatchScalarField::updateCoeffs()
{
if (updated())
{
return;
}
const basicThermo& thermo = db().lookupObject<basicThermo>
(
"thermophysicalProperties"
);
const label patchi = patch().index();
mixedFvPatchScalarField& Tw = refCast<mixedFvPatchScalarField>
(
const_cast<fvPatchScalarField&>(thermo.T().boundaryField()[patchi])
);
Tw.evaluate();
valueFraction() = Tw.valueFraction();
refValue() = thermo.e(Tw.refValue(), patchi);
refGrad() =
thermo.Cv(Tw, patchi)*Tw.refGrad()
+ patch().deltaCoeffs()*
(
thermo.e(Tw, patchi)
- thermo.e(Tw, patch().faceCells())
);
mixedFvPatchScalarField::updateCoeffs();
}
开发者ID:AmaneShino,项目名称:OpenFOAM-2.0.x,代码行数:33,代码来源:mixedInternalEnergyFvPatchScalarField.C
示例7: mixedFvPatchScalarField
Foam::MarshakRadiationFixedTMixedFvPatchScalarField::
MarshakRadiationFixedTMixedFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
mixedFvPatchScalarField(p, iF),
Trad_("Trad", dict, p.size()),
emissivity_(readScalar(dict.lookup("emissivity")))
{
refValue() = 4.0*radiation::sigmaSB.value()*pow4(Trad_);
refGrad() = 0.0;
if (dict.found("value"))
{
fvPatchScalarField::operator=
(
scalarField("value", dict, p.size())
);
}
else
{
fvPatchScalarField::operator=(refValue());
}
}
开发者ID:Cescfangs,项目名称:OpenFOAM-1.7.x,代码行数:27,代码来源:MarshakRadiationFixedTMixedFvPatchScalarField.C
示例8: Tinf_
Foam::constHTemperatureFvPatchScalarField::
constHTemperatureFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
mixedFvPatchField<scalar>(p, iF),
Tinf_("Tinf", dict, p.size()),
h_("h", dict, p.size())
{
refValue() = Tinf_;
refGrad() = 0.0;
valueFraction() = 0.0;
if (dict.found("value"))
{
fvPatchField<scalar>::operator=
(
Field<scalar>("value", dict, p.size())
);
}
else
{
fvPatchField<scalar>::operator=(refValue());
}
}
开发者ID:ashishvinayak,项目名称:fireFoam-2.4.x,代码行数:28,代码来源:constHTemperatureFvPatchScalarField.C
示例9: patch
void Foam::constHTemperatureFvPatchScalarField::updateCoeffs()
{
if (this->updated())
{
return;
}
// scalarField K_ = patch().lookupPatchField<volScalarField, scalar>("K");
const fvMesh& mesh = patch().boundaryMesh().mesh();
const solidThermo& thermo =
mesh.lookupObject<solidThermo>("thermophysicalProperties");
scalarField K_(thermo.kappa(patch().index()));
refValue() = Tinf_;
refGrad() = 0.0;
valueFraction() =
1.0/(1.0 + K_/max(h_,SMALL)*patch().deltaCoeffs());
mixedFvPatchField<scalar>::updateCoeffs();
}
开发者ID:ashishvinayak,项目名称:fireFoam-2.4.x,代码行数:25,代码来源:constHTemperatureFvPatchScalarField.C
示例10: directionMixedFvPatchVectorField
solidDirectionMixedFvPatchVectorField::solidDirectionMixedFvPatchVectorField
(
const fvPatch& p,
const DimensionedField<vector, volMesh>& iF,
const dictionary& dict
)
:
directionMixedFvPatchVectorField(p, iF, dict),
fieldName_(dimensionedInternalField().name())
{
Field<vector> normalValue = transform(valueFraction(), refValue());
Field<vector> gradValue =
this->patchInternalField() + refGrad()/this->patch().deltaCoeffs();
//- non-ortho corrected gradValue
//- gradField will not have been created so I must do this during updateCoeffs
/*const fvPatchField<tensor>& gradField =
patch().lookupPatchField<volTensorField, tensor>("grad(" +fieldName_ + ")");
vectorField n = patch().nf();
vectorField delta = patch().delta();
vectorField k = delta - n*(n&delta);
Field<vector> gradValue = this->patchInternalField()
+ (k&gradField.patchInternalField())
+ refGrad()/this->patch().deltaCoeffs();
*/
Field<vector> transformGradValue =
transform(I - valueFraction(), gradValue);
Field<vector>::operator=(normalValue + transformGradValue);
}
开发者ID:TsukasaHori,项目名称:openfoam-extend-foam-extend-3.1,代码行数:32,代码来源:solidDirectionMixedFvPatchVectorField.C
示例11: db
void mixedUnburntEnthalpyFvPatchScalarField::updateCoeffs()
{
if (updated())
{
return;
}
const hhuCombustionThermo& thermo = db().lookupObject<hhuCombustionThermo>
(
"thermophysicalProperties"
);
const label patchi = patch().index();
mixedFvPatchScalarField& Tw = refCast<mixedFvPatchScalarField>
(
const_cast<fvPatchScalarField&>(thermo.Tu().boundaryField()[patchi])
);
Tw.evaluate();
valueFraction() = Tw.valueFraction();
refValue() = thermo.hu(Tw.refValue(), patchi);
refGrad() = thermo.Cp(Tw, patchi)*Tw.refGrad()
+ patch().deltaCoeffs()*
(
thermo.hu(Tw, patchi)
- thermo.hu(Tw, patch().faceCells())
);
mixedFvPatchScalarField::updateCoeffs();
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-Core-OpenFOAM-1.5-dev,代码行数:32,代码来源:mixedUnburntEnthalpyFvPatchScalarField.C
示例12: patchInternalField
// Update the coefficients associated with the patch field
void nusseltFvPatchScalarField::updateCoeffs()
{
if (updated())
{
return;
}
scalarField Tinternal = patchInternalField();
// Lookup temperature diffusivity of the patch
const fvPatchField<scalar>& DT =
this->patch().lookupPatchField<volScalarField, scalar>(DTName_);
// Calculate flux
scalarField tempFlux = alpha_*(Tinternal - Tinf_);
refValue() =
neg(tempFlux)*
min
(
Tinternal - tempFlux/(DT*patch().deltaCoeffs()),
Tinf_
)
+ pos(tempFlux)*
max
(
Tinternal - tempFlux/(DT*patch().deltaCoeffs()),
Tinf_
);
refGrad() = -tempFlux;
valueFraction() = pos(tempFlux);
mixedFvPatchScalarField::updateCoeffs();
}
开发者ID:GoldenMan123,项目名称:openfoam-extend-foam-extend-3.1,代码行数:36,代码来源:nusseltFvPatchScalarField.C
示例13: phiName_
Foam::fixedEnthalpyFluxTemperatureFvPatchScalarField::
fixedEnthalpyFluxTemperatureFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
mixedFvPatchField<scalar>(p, iF),
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
rhoName_(dict.lookupOrDefault<word>("rho", "none")),
Tinf_("Tinf", dict, p.size())
{
refValue() = Tinf_;
refGrad() = 0.0;
valueFraction() = 0.0;
if (dict.found("value"))
{
fvPatchField<scalar>::operator=
(
Field<scalar>("value", dict, p.size())
);
}
else
{
fvPatchField<scalar>::operator=(refValue());
}
}
开发者ID:ashishvinayak,项目名称:fireFoam-2.4.x,代码行数:29,代码来源:fixedEnthalpyFluxTemperatureFvPatchScalarField.C
示例14: transform
void solidDirectionMixedFvPatchVectorField::evaluate(const Pstream::commsTypes)
{
if (!this->updated())
{
this->updateCoeffs();
}
Field<vector> normalValue = transform(valueFraction(), refValue());
//- no correction
//Field<vector> gradValue =
//this->patchInternalField() + refGrad()/this->patch().deltaCoeffs();
//- non-ortho corrected gradValue
const fvPatchField<tensor>& gradField =
patch().lookupPatchField<volTensorField, tensor>
(
"grad(" +fieldName_ + ")"
);
vectorField n = patch().nf();
vectorField delta = patch().delta();
vectorField k = delta - n*(n&delta);
Field<vector> gradValue = this->patchInternalField()
+ (k&gradField.patchInternalField())
+ refGrad()/this->patch().deltaCoeffs();
Field<vector> transformGradValue =
transform(I - valueFraction(), gradValue);
Field<vector>::operator=(normalValue + transformGradValue);
fvPatchField<vector>::evaluate();
}
开发者ID:TsukasaHori,项目名称:openfoam-extend-foam-extend-3.1,代码行数:33,代码来源:solidDirectionMixedFvPatchVectorField.C
示例15: mixedFvPatchScalarField
Foam::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
mixedFvPatchScalarField(p, iF),
radiationCoupledBase(p, dict),
TName_(dict.lookupOrDefault<word>("T", "T"))
{
if (dict.found("value"))
{
refValue() = scalarField("value", dict, p.size());
}
else
{
refValue() = 0.0;
}
// zero gradient
refGrad() = 0.0;
valueFraction() = 1.0;
fvPatchScalarField::operator=(refValue());
}
开发者ID:BarisCumhur,项目名称:OpenFOAM-dev,代码行数:27,代码来源:MarshakRadiationFvPatchScalarField.C
示例16: mixedFvPatchScalarField
Foam::wallHeatTransferFvPatchScalarField::wallHeatTransferFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
mixedFvPatchScalarField(p, iF),
Tinf_("Tinf", dict, p.size()),
alphaWall_("alphaWall", dict, p.size())
{
refValue() = Tinf_;
refGrad() = 0.0;
valueFraction() = 0.0;
if (dict.found("value"))
{
fvPatchField<scalar>::operator=
(
scalarField("value", dict, p.size())
);
}
else
{
evaluate();
}
}
开发者ID:000861,项目名称:OpenFOAM-2.1.x,代码行数:27,代码来源:wallHeatTransferFvPatchScalarField.C
示例17: phiName_
Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::
totalFlowRateAdvectiveDiffusiveFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
mixedFvPatchField<scalar>(p, iF),
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
rhoName_(dict.lookupOrDefault<word>("rho", "none")),
massFluxFraction_(dict.lookupOrDefault<scalar>("massFluxFraction", 1.0))
{
refValue() = 1.0;
refGrad() = 0.0;
valueFraction() = 0.0;
if (dict.found("value"))
{
fvPatchField<scalar>::operator=
(
Field<scalar>("value", dict, p.size())
);
}
else
{
fvPatchField<scalar>::operator=(refValue());
}
}
开发者ID:OpenFOAM,项目名称:OpenFOAM-dev,代码行数:30,代码来源:totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C
示例18: mixedFvPatchScalarField
nusseltFvPatchScalarField::nusseltFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
mixedFvPatchScalarField(p, iF),
DTName_(dict.lookup("DT")),
Tinf_(readScalar(dict.lookup("Tinf"))),
alpha_("alpha", dict, p.size())
{
if (dict.found("value"))
{
fvPatchField<scalar>::operator=
(
scalarField("value", dict, p.size())
);
}
else
{
fvPatchField<scalar>::operator=(patchInternalField());
}
refValue() = *this;
refGrad() = 0.0;
valueFraction() = 0.0;
if (Tinf_ < SMALL)
{
FatalIOErrorIn
(
"nusseltFvPatchScalarField::nusseltFvPatchScalarField\n"
"(\n"
" const fvPatch&,\n"
" const DimensionedField<scalar, volMesh>&,\n"
" const dictionary&\n"
")",
dict
) << "unphysical Tinf specified (Tinf = 0 or negative)"
<< exit(FatalError);
}
if (min(alpha_) < -SMALL)
{
FatalIOErrorIn
(
"nusseltFvPatchScalarField::nusseltFvPatchScalarField\n"
"(\n"
" const fvPatch&,\n"
" const DimensionedField<scalar, volMesh>&,\n"
" const dictionary&\n"
")",
dict
) << "unphysical alpha specified (alpha = 0 or negative)" << endl
<< exit(FatalError);
}
}
开发者ID:GoldenMan123,项目名称:openfoam-extend-foam-extend-3.1,代码行数:58,代码来源:nusseltFvPatchScalarField.C
示例19: mixedFvPatchScalarField
smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
mixedFvPatchScalarField(p, iF),
accommodationCoeff_(readScalar(dict.lookup("accommodationCoeff"))),
Twall_("Twall", dict, p.size())
{
if
(
mag(accommodationCoeff_) < SMALL
||
mag(accommodationCoeff_) > 2.0
)
{
FatalIOErrorIn
(
"smoluchowskiJumpTFvPatchScalarField::"
"smoluchowskiJumpTFvPatchScalarField"
"("
" const fvPatch&,"
" const DimensionedField<scalar, volMesh>&,"
" const dictionary&"
")",
dict
) << "unphysical accommodationCoeff_ specified"
<< "(0 < accommodationCoeff_ <= 1)" << endl
<< exit(FatalError);
}
if (dict.found("value"))
{
fvPatchField<scalar>::operator=
(
scalarField("value", dict, p.size())
);
}
else
{
fvPatchField<scalar>::operator=(patchInternalField());
}
if (dict.found("gamma"))
{
gamma_ = readScalar(dict.lookup("gamma"));
}
else
{
gamma_ = 1.4;
}
refValue() = *this;
refGrad() = 0.0;
valueFraction() = 0.0;
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:openfoam-extend-Core-OpenFOAM-1.5-dev,代码行数:58,代码来源:smoluchowskiJumpTFvPatchScalarField.C
示例20: mixedFvPatchScalarField
greyDiffusiveRadiationMixedFvPatchScalarField::
greyDiffusiveRadiationMixedFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
mixedFvPatchScalarField(p, iF),
TName_(dict.lookup("T")),
emissivity_(readScalar(dict.lookup("emissivity"))),
sumOutgoingAnglesPtr_(NULL)
{
if (dict.found("refValue"))
{
refValue() = scalarField("value", dict, p.size());
fvPatchScalarField::operator=
(
refValue()
);
refGrad() = scalarField("refGradient", dict, p.size());
valueFraction() = scalarField("valueFraction", dict, p.size());
}
else
{
// No value given. Restart as fixedValue b.c.
// Bugfix: Do not initialize from temperautre because it is unavailable
// when running, e.g. decomposePar and loading radiation as
// shared library. Initialize to zero instead.
// 26 Mar 2014 - DC
refValue() = 0;
refGrad() = 0;
valueFraction() = 1;
fvPatchScalarField::operator=(refValue());
}
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:foam-extend-foam-extend-3.2,代码行数:42,代码来源:greyDiffusiveRadiationMixedFvPatchScalarField.C
注:本文中的refGrad函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论