Commit 1f50c1ea authored by andy's avatar andy
Browse files

ENH: Updated region model boundary conditions

parent c4097f16
......@@ -118,17 +118,10 @@ void Foam::filmPyrolysisTemperatureCoupledFvPatchScalarField::updateCoeffs()
UPstream::msgType() = oldTag+1;
bool filmOk =
db().objectRegistry::foundObject<filmModelType>
(
"surfaceFilmProperties"
);
db().time().foundObject<filmModelType>("surfaceFilmProperties");
bool pyrOk =
db().objectRegistry::foundObject<pyrModelType>
(
"pyrolysisProperties"
);
bool pyrOk = db().time().foundObject<pyrModelType>("pyrolysisProperties");
if (!filmOk || !pyrOk)
{
......@@ -142,7 +135,7 @@ void Foam::filmPyrolysisTemperatureCoupledFvPatchScalarField::updateCoeffs()
// Retrieve film model
const filmModelType& filmModel =
db().lookupObject<filmModelType>("surfaceFilmProperties");
db().time().lookupObject<filmModelType>("surfaceFilmProperties");
const label filmPatchI = filmModel.regionPatchID(patchI);
......@@ -154,7 +147,7 @@ void Foam::filmPyrolysisTemperatureCoupledFvPatchScalarField::updateCoeffs()
// Retrieve pyrolysis model
const pyrModelType& pyrModel =
db().lookupObject<pyrModelType>("pyrolysisProperties");
db().time().lookupObject<pyrModelType>("pyrolysisProperties");
const label pyrPatchI = pyrModel.regionPatchID(patchI);
......
......@@ -117,20 +117,13 @@ void Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::updateCoeffs()
int oldTag = UPstream::msgType();
UPstream::msgType() = oldTag+1;
bool filmOk =
db().objectRegistry::foundObject<filmModelType>
(
"surfaceFilmProperties"
);
bool foundFilm =
db().time().foundObject<filmModelType>("surfaceFilmProperties");
bool pyrOk =
db().objectRegistry::foundObject<pyrModelType>
(
"pyrolysisProperties"
);
bool foundPyrolysis =
db().time().foundObject<pyrModelType>("pyrolysisProperties");
if (!filmOk || !pyrOk)
if (!foundFilm || !foundPyrolysis)
{
// do nothing on construction - film model doesn't exist yet
return;
......@@ -142,10 +135,7 @@ void Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::updateCoeffs()
// Retrieve film model
const filmModelType& filmModel =
db().objectRegistry::lookupObject<filmModelType>
(
"surfaceFilmProperties"
);
db().time().lookupObject<filmModelType>("surfaceFilmProperties");
const label filmPatchI = filmModel.regionPatchID(patchI);
......@@ -157,10 +147,7 @@ void Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::updateCoeffs()
// Retrieve pyrolysis model
const pyrModelType& pyrModel =
db().objectRegistry::lookupObject<pyrModelType>
(
"pyrolysisProperties"
);
db().time().lookupObject<pyrModelType>("pyrolysisProperties");
const label pyrPatchI = pyrModel.regionPatchID(patchI);
......
......@@ -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-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -49,14 +49,10 @@ makeDeltaCoeffs(scalarField& dc) const
const mappedVariableThicknessWallPolyPatch& pp =
refCast<const mappedVariableThicknessWallPolyPatch>(patch());
const mappedPatchBase& mpp = refCast<const mappedPatchBase>(patch());
const polyMesh& nbrMesh = mpp.sampleMesh();
typedef regionModels::regionModel1D modelType;
const modelType& region1D =
nbrMesh.objectRegistry::lookupObject<modelType>
patch().boundaryMesh().mesh().time().lookupObject<modelType>
(
"thermoBaffleProperties"
);
......
......@@ -120,7 +120,10 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs()
// retrieve the film region from the database
const regionModels::regionModel& region =
db().lookupObject<regionModels::regionModel>("surfaceFilmProperties");
db().time().lookupObject<regionModels::regionModel>
(
"surfaceFilmProperties"
);
const regionModels::surfaceFilmModels::kinematicSingleLayer& film =
dynamic_cast
......
......@@ -120,7 +120,10 @@ void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::updateCoeffs()
// retrieve the film region from the database
const regionModels::regionModel& region =
db().lookupObject<regionModels::regionModel>("surfaceFilmProperties");
db().time().lookupObject<regionModels::regionModel>
(
"surfaceFilmProperties"
);
const regionModels::surfaceFilmModels::kinematicSingleLayer& film =
dynamic_cast
......
......@@ -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-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -141,10 +141,10 @@ void alphatFilmWallFunctionFvPatchScalarField::updateCoeffs()
int oldTag = UPstream::msgType();
UPstream::msgType() = oldTag+1;
bool ok =
db().objectRegistry::foundObject<modelType>("surfaceFilmProperties");
bool foundFilm =
db().time().foundObject<modelType>("surfaceFilmProperties");
if (!ok)
if (!foundFilm)
{
// do nothing on construction - film model doesn't exist yet
return;
......@@ -154,7 +154,7 @@ void alphatFilmWallFunctionFvPatchScalarField::updateCoeffs()
// Retrieve phase change mass from surface film model
const modelType& filmModel =
db().objectRegistry::lookupObject<modelType>("surfaceFilmProperties");
db().time().lookupObject<modelType>("surfaceFilmProperties");
const label filmPatchI = filmModel.regionPatchID(patchI);
......@@ -216,7 +216,6 @@ void alphatFilmWallFunctionFvPatchScalarField::updateCoeffs()
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void alphatFilmWallFunctionFvPatchScalarField::write(Ostream& os) const
......
......@@ -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-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -53,10 +53,10 @@ tmp<scalarField> mutkFilmWallFunctionFvPatchScalarField::calcUTau
typedef regionModels::surfaceFilmModels::surfaceFilmModel modelType;
bool ok =
db().objectRegistry::foundObject<modelType>("surfaceFilmProperties");
bool foundFilm =
db().time().foundObject<modelType>("surfaceFilmProperties");
if (!ok)
if (!foundFilm)
{
// do nothing on construction - film model doesn't exist yet
return tuTau;
......@@ -66,7 +66,7 @@ tmp<scalarField> mutkFilmWallFunctionFvPatchScalarField::calcUTau
// Retrieve phase change mass from surface film model
const modelType& filmModel =
db().objectRegistry::lookupObject<modelType>("surfaceFilmProperties");
db().time().lookupObject<modelType>("surfaceFilmProperties");
const label filmPatchI = filmModel.regionPatchID(patchI);
......
......@@ -33,7 +33,6 @@ namespace Foam
namespace compressible
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
temperatureThermoBaffleFvPatchScalarField::
......@@ -173,11 +172,7 @@ void temperatureThermoBaffleFvPatchScalarField::updateCoeffs()
const fvMesh& thisMesh = patch().boundaryMesh().mesh();
if
(
thisMesh.name() == polyMesh::defaultRegion
&& owner_
)
if (owner_ && thisMesh.name() == polyMesh::defaultRegion)
{
baffle_->evolve();
}
......@@ -241,7 +236,5 @@ makePatchTypeField
} // End namespace compressible
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment