mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -122,7 +122,6 @@ filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
|
|||||||
filmRegionName_("surfaceFilmProperties"),
|
filmRegionName_("surfaceFilmProperties"),
|
||||||
pyrolysisRegionName_("pyrolysisProperties"),
|
pyrolysisRegionName_("pyrolysisProperties"),
|
||||||
TnbrName_("undefined-Tnbr"),
|
TnbrName_("undefined-Tnbr"),
|
||||||
QrNbrName_("undefined-QrNbr"),
|
|
||||||
QrName_("undefined-Qr"),
|
QrName_("undefined-Qr"),
|
||||||
convectiveScaling_(1.0),
|
convectiveScaling_(1.0),
|
||||||
filmDeltaDry_(0.0),
|
filmDeltaDry_(0.0),
|
||||||
@ -148,7 +147,6 @@ filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
|
|||||||
filmRegionName_(psf.filmRegionName_),
|
filmRegionName_(psf.filmRegionName_),
|
||||||
pyrolysisRegionName_(psf.pyrolysisRegionName_),
|
pyrolysisRegionName_(psf.pyrolysisRegionName_),
|
||||||
TnbrName_(psf.TnbrName_),
|
TnbrName_(psf.TnbrName_),
|
||||||
QrNbrName_(psf.QrNbrName_),
|
|
||||||
QrName_(psf.QrName_),
|
QrName_(psf.QrName_),
|
||||||
convectiveScaling_(psf.convectiveScaling_),
|
convectiveScaling_(psf.convectiveScaling_),
|
||||||
filmDeltaDry_(psf.filmDeltaDry_),
|
filmDeltaDry_(psf.filmDeltaDry_),
|
||||||
@ -175,7 +173,6 @@ filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
|
|||||||
dict.lookupOrDefault<word>("pyrolysisRegion", "pyrolysisProperties")
|
dict.lookupOrDefault<word>("pyrolysisRegion", "pyrolysisProperties")
|
||||||
),
|
),
|
||||||
TnbrName_(dict.lookup("Tnbr")),
|
TnbrName_(dict.lookup("Tnbr")),
|
||||||
QrNbrName_(dict.lookup("QrNbr")),
|
|
||||||
QrName_(dict.lookup("Qr")),
|
QrName_(dict.lookup("Qr")),
|
||||||
convectiveScaling_(dict.lookupOrDefault<scalar>("convectiveScaling", 1.0)),
|
convectiveScaling_(dict.lookupOrDefault<scalar>("convectiveScaling", 1.0)),
|
||||||
filmDeltaDry_(readScalar(dict.lookup("filmDeltaDry"))),
|
filmDeltaDry_(readScalar(dict.lookup("filmDeltaDry"))),
|
||||||
@ -231,7 +228,6 @@ filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
|
|||||||
filmRegionName_(psf.filmRegionName_),
|
filmRegionName_(psf.filmRegionName_),
|
||||||
pyrolysisRegionName_(psf.pyrolysisRegionName_),
|
pyrolysisRegionName_(psf.pyrolysisRegionName_),
|
||||||
TnbrName_(psf.TnbrName_),
|
TnbrName_(psf.TnbrName_),
|
||||||
QrNbrName_(psf.QrNbrName_),
|
|
||||||
QrName_(psf.QrName_),
|
QrName_(psf.QrName_),
|
||||||
convectiveScaling_(psf.convectiveScaling_),
|
convectiveScaling_(psf.convectiveScaling_),
|
||||||
filmDeltaDry_(psf.filmDeltaDry_),
|
filmDeltaDry_(psf.filmDeltaDry_),
|
||||||
@ -241,8 +237,7 @@ filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::
|
void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs()
|
||||||
updateCoeffs()
|
|
||||||
{
|
{
|
||||||
if (updated())
|
if (updated())
|
||||||
{
|
{
|
||||||
@ -294,34 +289,49 @@ updateCoeffs()
|
|||||||
const pyrolysisModelType& pyrolysis = pyrModel();
|
const pyrolysisModelType& pyrolysis = pyrModel();
|
||||||
const filmModelType& film = filmModel();
|
const filmModelType& film = filmModel();
|
||||||
|
|
||||||
label myPatchINrbPatchI = -1;
|
|
||||||
|
|
||||||
// Obtain Rad heat (Qr)
|
// Obtain Rad heat (Qr)
|
||||||
scalarField Qr(patch().size(), 0.0);
|
scalarField Qr(patch().size(), 0.0);
|
||||||
if (QrName_ != "none") // primary region (region0)
|
|
||||||
|
label coupledPatchI = -1;
|
||||||
|
if (pyrolysisRegionName_ == mesh.name())
|
||||||
{
|
{
|
||||||
Qr = patch().lookupPatchField<volScalarField, scalar>(QrName_);
|
coupledPatchI = patchI;
|
||||||
myPatchINrbPatchI = nbrPatch.index();
|
if (QrName_ != "none")
|
||||||
|
{
|
||||||
|
Qr = nbrPatch.lookupPatchField<volScalarField, scalar>(QrName_);
|
||||||
|
mpp.distribute(Qr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (pyrolysis.primaryMesh().name() == mesh.name())
|
||||||
|
{
|
||||||
|
coupledPatchI = nbrPatch.index();
|
||||||
|
if (QrName_ != "none")
|
||||||
|
{
|
||||||
|
Qr = patch().lookupPatchField<volScalarField, scalar>(QrName_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::"
|
||||||
|
"updateCoeffs()"
|
||||||
|
)
|
||||||
|
<< type() << " condition is intended to be applied to either the "
|
||||||
|
<< "primary or pyrolysis regions only"
|
||||||
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (QrNbrName_ != "none") // pyrolysis region
|
const label filmPatchI = pyrolysis.nbrCoupledPatchID(film, coupledPatchI);
|
||||||
{
|
|
||||||
Qr = nbrPatch.lookupPatchField<volScalarField, scalar>(QrNbrName_);
|
|
||||||
mpp.distribute(Qr);
|
|
||||||
myPatchINrbPatchI = patchI;
|
|
||||||
}
|
|
||||||
|
|
||||||
const label filmPatchI =
|
|
||||||
pyrolysis.nbrCoupledPatchID(film, myPatchINrbPatchI);
|
|
||||||
|
|
||||||
const scalarField htcw(film.htcw().h()().boundaryField()[filmPatchI]);
|
const scalarField htcw(film.htcw().h()().boundaryField()[filmPatchI]);
|
||||||
|
|
||||||
// Obtain htcw
|
// Obtain htcw
|
||||||
htcwfilm =
|
htcwfilm =
|
||||||
const_cast<pyrolysisModelType&>(pyrolysis).mapRegionPatchField
|
pyrolysis.mapRegionPatchField
|
||||||
(
|
(
|
||||||
film,
|
film,
|
||||||
myPatchINrbPatchI,
|
coupledPatchI,
|
||||||
filmPatchI,
|
filmPatchI,
|
||||||
htcw,
|
htcw,
|
||||||
true
|
true
|
||||||
@ -335,11 +345,11 @@ updateCoeffs()
|
|||||||
|
|
||||||
// Obtain delta
|
// Obtain delta
|
||||||
filmDelta =
|
filmDelta =
|
||||||
const_cast<pyrolysisModelType&>(pyrolysis).mapRegionPatchField<scalar>
|
pyrolysis.mapRegionPatchField<scalar>
|
||||||
(
|
(
|
||||||
film,
|
film,
|
||||||
"deltaf",
|
"deltaf",
|
||||||
myPatchINrbPatchI,
|
coupledPatchI,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -414,14 +424,13 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::write
|
|||||||
pyrolysisRegionName_
|
pyrolysisRegionName_
|
||||||
);
|
);
|
||||||
os.writeKeyword("Tnbr")<< TnbrName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("Tnbr")<< TnbrName_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("QrNbr")<< QrNbrName_ << token::END_STATEMENT << nl;
|
|
||||||
os.writeKeyword("Qr")<< QrName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("Qr")<< QrName_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("convectiveScaling") << convectiveScaling_
|
os.writeKeyword("convectiveScaling") << convectiveScaling_
|
||||||
<< token::END_STATEMENT << nl;
|
<< token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("filmDeltaDry") << filmDeltaDry_ <<
|
os.writeKeyword("filmDeltaDry") << filmDeltaDry_
|
||||||
token::END_STATEMENT << nl;
|
<< token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("filmDeltaWet") << filmDeltaWet_ <<
|
os.writeKeyword("filmDeltaWet") << filmDeltaWet_
|
||||||
token::END_STATEMENT << endl;
|
<< token::END_STATEMENT << endl;
|
||||||
temperatureCoupledBase::write(os);
|
temperatureCoupledBase::write(os);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,6 @@ Description
|
|||||||
type filmPyrolysisRadiativeCoupledMixed;
|
type filmPyrolysisRadiativeCoupledMixed;
|
||||||
Tnbr T;
|
Tnbr T;
|
||||||
kappa fluidThermo;
|
kappa fluidThermo;
|
||||||
QrNbr none;
|
|
||||||
Qr Qr;
|
Qr Qr;
|
||||||
kappaName none;
|
kappaName none;
|
||||||
filmDeltaDry 0.0;
|
filmDeltaDry 0.0;
|
||||||
@ -91,7 +90,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class filmPyrolysisRadiativeCoupledMixedFvPatchScalarField Declaration
|
Class filmPyrolysisRadiativeCoupledMixedFvPatchScalarField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
|
class filmPyrolysisRadiativeCoupledMixedFvPatchScalarField
|
||||||
@ -121,10 +120,7 @@ private:
|
|||||||
//- Name of field on the neighbour region
|
//- Name of field on the neighbour region
|
||||||
const word TnbrName_;
|
const word TnbrName_;
|
||||||
|
|
||||||
//- Name of the radiative heat flux in the neighbout region
|
//- Name of the radiative heat flux
|
||||||
const word QrNbrName_;
|
|
||||||
|
|
||||||
//- Name of the radiative heat flux in local region
|
|
||||||
const word QrName_;
|
const word QrName_;
|
||||||
|
|
||||||
//- Convective Scaling Factor (as determined by Prateep's tests)
|
//- Convective Scaling Factor (as determined by Prateep's tests)
|
||||||
|
|||||||
@ -197,7 +197,7 @@ Foam::regionModels::regionModel::interRegionAMI
|
|||||||
const label regionPatchI,
|
const label regionPatchI,
|
||||||
const label nbrPatchI,
|
const label nbrPatchI,
|
||||||
const bool flip
|
const bool flip
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
label nbrRegionID = findIndex(interRegionAMINames_, nbrRegion.name());
|
label nbrRegionID = findIndex(interRegionAMINames_, nbrRegion.name());
|
||||||
|
|
||||||
|
|||||||
@ -125,10 +125,11 @@ protected:
|
|||||||
// Inter-region AMI interpolation caching
|
// Inter-region AMI interpolation caching
|
||||||
|
|
||||||
//- List of region names this region is coupled to
|
//- List of region names this region is coupled to
|
||||||
wordList interRegionAMINames_;
|
mutable wordList interRegionAMINames_;
|
||||||
|
|
||||||
//- List of AMI objects per coupled region
|
//- List of AMI objects per coupled region
|
||||||
PtrList<PtrList<AMIPatchToPatchInterpolation> > interRegionAMI_;
|
mutable PtrList<PtrList<AMIPatchToPatchInterpolation> >
|
||||||
|
interRegionAMI_;
|
||||||
|
|
||||||
|
|
||||||
// Protected member functions
|
// Protected member functions
|
||||||
@ -146,7 +147,7 @@ protected:
|
|||||||
const label regionPatchI,
|
const label regionPatchI,
|
||||||
const label nbrPatchI,
|
const label nbrPatchI,
|
||||||
const bool flip
|
const bool flip
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -257,7 +258,7 @@ public:
|
|||||||
const label nbrPatchI,
|
const label nbrPatchI,
|
||||||
const Field<Type>& nbrField,
|
const Field<Type>& nbrField,
|
||||||
const bool flip = false
|
const bool flip = false
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Map patch field from another region model to local patch
|
//- Map patch field from another region model to local patch
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -267,7 +268,7 @@ public:
|
|||||||
const word& fieldName,
|
const word& fieldName,
|
||||||
const label regionPatchI,
|
const label regionPatchI,
|
||||||
const bool flip = false
|
const bool flip = false
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Map patch internal field from another region model to local
|
//- Map patch internal field from another region model to local
|
||||||
// patch
|
// patch
|
||||||
@ -278,7 +279,7 @@ public:
|
|||||||
const word& fieldName,
|
const word& fieldName,
|
||||||
const label regionPatchI,
|
const label regionPatchI,
|
||||||
const bool flip = false
|
const bool flip = false
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Convert a local region field to the primary region
|
//- Convert a local region field to the primary region
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -32,7 +32,7 @@ Foam::regionModels::regionModel::mapRegionPatchField
|
|||||||
const label nbrPatchI,
|
const label nbrPatchI,
|
||||||
const Field<Type>& nbrField,
|
const Field<Type>& nbrField,
|
||||||
const bool flip
|
const bool flip
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
int oldTag = UPstream::msgType();
|
int oldTag = UPstream::msgType();
|
||||||
UPstream::msgType() = oldTag + 1;
|
UPstream::msgType() = oldTag + 1;
|
||||||
@ -56,7 +56,7 @@ Foam::regionModels::regionModel::mapRegionPatchField
|
|||||||
const word& fieldName,
|
const word& fieldName,
|
||||||
const label regionPatchI,
|
const label regionPatchI,
|
||||||
const bool flip
|
const bool flip
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
typedef GeometricField<Type, fvPatchField, volMesh> fieldType;
|
typedef GeometricField<Type, fvPatchField, volMesh> fieldType;
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ Foam::regionModels::regionModel::mapRegionPatchInternalField
|
|||||||
const word& fieldName,
|
const word& fieldName,
|
||||||
const label regionPatchI,
|
const label regionPatchI,
|
||||||
const bool flip
|
const bool flip
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
typedef GeometricField<Type, fvPatchField, volMesh> fieldType;
|
typedef GeometricField<Type, fvPatchField, volMesh> fieldType;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user