ENH: Film models - added output of injected mass per patch
This commit is contained in:
parent
7816177cba
commit
c1268eb061
@ -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-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -148,7 +148,7 @@ void pyrolysisModelCollection::evolve()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void pyrolysisModelCollection::info() const
|
void pyrolysisModelCollection::info()
|
||||||
{
|
{
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
{
|
{
|
||||||
|
@ -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-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -99,7 +99,7 @@ public:
|
|||||||
virtual void evolve();
|
virtual void evolve();
|
||||||
|
|
||||||
//- Provide some feedback from pyrolysis regions
|
//- Provide some feedback from pyrolysis regions
|
||||||
virtual void info() const;
|
virtual void info();
|
||||||
|
|
||||||
//- Return max diffusivity allowed in the solid
|
//- Return max diffusivity allowed in the solid
|
||||||
virtual scalar maxDiff() const;
|
virtual scalar maxDiff() const;
|
||||||
|
@ -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-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -729,7 +729,7 @@ void reactingOneDim::evolveRegion()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void reactingOneDim::info() const
|
void reactingOneDim::info()
|
||||||
{
|
{
|
||||||
Info<< "\nPyrolysis in region: " << regionMesh().name() << endl;
|
Info<< "\nPyrolysis in region: " << regionMesh().name() << endl;
|
||||||
|
|
||||||
|
@ -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-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -285,7 +285,7 @@ public:
|
|||||||
// I-O
|
// I-O
|
||||||
|
|
||||||
//- Provide some feedback
|
//- Provide some feedback
|
||||||
virtual void info() const;
|
virtual void info();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -579,7 +579,7 @@ void Foam::regionModels::regionModel::postEvolveRegion()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::regionModels::regionModel::info() const
|
void Foam::regionModels::regionModel::info()
|
||||||
{
|
{
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
@ -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-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -343,7 +343,7 @@ public:
|
|||||||
// I-O
|
// I-O
|
||||||
|
|
||||||
//- Provide some feedback
|
//- Provide some feedback
|
||||||
virtual void info() const;
|
virtual void info();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1074,7 +1074,7 @@ const volScalarField& kinematicSingleLayer::cloudDiameterTrans() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void kinematicSingleLayer::info() const
|
void kinematicSingleLayer::info()
|
||||||
{
|
{
|
||||||
Info<< "\nSurface film: " << type() << endl;
|
Info<< "\nSurface film: " << type() << endl;
|
||||||
|
|
||||||
|
@ -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-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -525,7 +525,7 @@ public:
|
|||||||
// I-O
|
// I-O
|
||||||
|
|
||||||
//- Provide some feedback
|
//- Provide some feedback
|
||||||
virtual void info() const;
|
virtual void info();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -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-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -61,7 +61,7 @@ protected:
|
|||||||
// Protected data
|
// Protected data
|
||||||
|
|
||||||
//- Reference to the owner surface film model
|
//- Reference to the owner surface film model
|
||||||
const surfaceFilmModel& owner_;
|
surfaceFilmModel& owner_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -103,9 +103,12 @@ public:
|
|||||||
//- Flag to indicate when to write a property
|
//- Flag to indicate when to write a property
|
||||||
virtual bool outputTime() const;
|
virtual bool outputTime() const;
|
||||||
|
|
||||||
//- Return the reference to the owner surface film model
|
//- Return const access to the owner surface film model
|
||||||
inline const surfaceFilmModel& owner() const;
|
inline const surfaceFilmModel& owner() const;
|
||||||
|
|
||||||
|
//- Return the reference to the owner surface film model
|
||||||
|
inline surfaceFilmModel& owner();
|
||||||
|
|
||||||
template<class FilmType>
|
template<class FilmType>
|
||||||
inline const FilmType& filmType() const;
|
inline const FilmType& filmType() const;
|
||||||
};
|
};
|
||||||
|
@ -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-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -40,6 +40,12 @@ inline const surfaceFilmModel& filmSubModelBase::owner() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline surfaceFilmModel& filmSubModelBase::owner()
|
||||||
|
{
|
||||||
|
return owner_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace surfaceFilmModels
|
} // End namespace surfaceFilmModels
|
||||||
|
@ -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-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -39,8 +39,7 @@ namespace surfaceFilmModels
|
|||||||
injectionModelList::injectionModelList(surfaceFilmModel& owner)
|
injectionModelList::injectionModelList(surfaceFilmModel& owner)
|
||||||
:
|
:
|
||||||
PtrList<injectionModel>(),
|
PtrList<injectionModel>(),
|
||||||
owner_(owner),
|
filmSubModelBase(owner)
|
||||||
dict_(dictionary::null)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -51,8 +50,15 @@ injectionModelList::injectionModelList
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
PtrList<injectionModel>(),
|
PtrList<injectionModel>(),
|
||||||
owner_(owner),
|
filmSubModelBase
|
||||||
dict_(dict)
|
(
|
||||||
|
"injectionModelList",
|
||||||
|
owner,
|
||||||
|
dict,
|
||||||
|
"injectionModelList",
|
||||||
|
"injectionModelList"
|
||||||
|
),
|
||||||
|
massInjected_(owner.intCoupledPatchIDs().size(), 0.0)
|
||||||
{
|
{
|
||||||
const wordList activeModels(dict.lookup("injectionModels"));
|
const wordList activeModels(dict.lookup("injectionModels"));
|
||||||
|
|
||||||
@ -71,11 +77,7 @@ injectionModelList::injectionModelList
|
|||||||
forAllConstIter(wordHashSet, models, iter)
|
forAllConstIter(wordHashSet, models, iter)
|
||||||
{
|
{
|
||||||
const word& model = iter.key();
|
const word& model = iter.key();
|
||||||
set
|
set(i, injectionModel::New(owner, dict, model));
|
||||||
(
|
|
||||||
i,
|
|
||||||
injectionModel::New(owner, dict, model)
|
|
||||||
);
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -91,6 +93,7 @@ injectionModelList::injectionModelList
|
|||||||
injectionModelList::~injectionModelList()
|
injectionModelList::~injectionModelList()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void injectionModelList::correct
|
void injectionModelList::correct
|
||||||
@ -110,10 +113,19 @@ void injectionModelList::correct
|
|||||||
// Push values to boundaries ready for transfer to the primary region
|
// Push values to boundaries ready for transfer to the primary region
|
||||||
massToInject.correctBoundaryConditions();
|
massToInject.correctBoundaryConditions();
|
||||||
diameterToInject.correctBoundaryConditions();
|
diameterToInject.correctBoundaryConditions();
|
||||||
|
|
||||||
|
const labelList& patchIDs = owner().intCoupledPatchIDs();
|
||||||
|
|
||||||
|
forAll(patchIDs, i)
|
||||||
|
{
|
||||||
|
label patchI = patchIDs[i];
|
||||||
|
massInjected_[i] =
|
||||||
|
massInjected_[i] + sum(massToInject.boundaryField()[patchI]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void injectionModelList::info(Ostream& os) const
|
void injectionModelList::info(Ostream& os)
|
||||||
{
|
{
|
||||||
scalar injectedMass = 0.0;
|
scalar injectedMass = 0.0;
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
@ -123,6 +135,29 @@ void injectionModelList::info(Ostream& os) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
os << indent << "injected mass = " << injectedMass << nl;
|
os << indent << "injected mass = " << injectedMass << nl;
|
||||||
|
|
||||||
|
scalarList mass0(massInjected_.size(), 0.0);
|
||||||
|
this->getModelProperty("massInjected", mass0);
|
||||||
|
|
||||||
|
scalarList mass(massInjected_);
|
||||||
|
Pstream::listCombineGather(mass, plusEqOp<scalar>());
|
||||||
|
mass = mass + mass0;
|
||||||
|
|
||||||
|
const polyBoundaryMesh& pbm = owner().regionMesh().boundaryMesh();
|
||||||
|
const labelList& patchIDs = owner().intCoupledPatchIDs();
|
||||||
|
|
||||||
|
forAll(patchIDs, i)
|
||||||
|
{
|
||||||
|
label patchI = patchIDs[i];
|
||||||
|
Info<< indent << " - patch: " << pbm[patchI].name() << ": "
|
||||||
|
<< mass[i] << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (owner().time().outputTime())
|
||||||
|
{
|
||||||
|
setModelProperty("massInjected", mass);
|
||||||
|
massInjected_ = 0.0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -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-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -37,6 +37,7 @@ SourceFiles
|
|||||||
|
|
||||||
#include "PtrList.H"
|
#include "PtrList.H"
|
||||||
#include "injectionModel.H"
|
#include "injectionModel.H"
|
||||||
|
#include "filmSubModelBase.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -53,17 +54,15 @@ namespace surfaceFilmModels
|
|||||||
|
|
||||||
class injectionModelList
|
class injectionModelList
|
||||||
:
|
:
|
||||||
public PtrList<injectionModel>
|
public PtrList<injectionModel>,
|
||||||
|
public filmSubModelBase
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Reference to the owner surface film model
|
//- List of mass injected per patch
|
||||||
surfaceFilmModel& owner_;
|
scalarField massInjected_;
|
||||||
|
|
||||||
//- Dictionary
|
|
||||||
dictionary dict_;
|
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
@ -110,7 +109,7 @@ public:
|
|||||||
// I-O
|
// I-O
|
||||||
|
|
||||||
//- Provide some info
|
//- Provide some info
|
||||||
void info(Ostream& os) const;
|
virtual void info(Ostream& os);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -730,7 +730,7 @@ tmp<volScalarField> thermoSingleLayer::primaryMassTrans() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void thermoSingleLayer::info() const
|
void thermoSingleLayer::info()
|
||||||
{
|
{
|
||||||
kinematicSingleLayer::info();
|
kinematicSingleLayer::info();
|
||||||
|
|
||||||
|
@ -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-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -404,7 +404,7 @@ public:
|
|||||||
// I-O
|
// I-O
|
||||||
|
|
||||||
//- Provide some feedback
|
//- Provide some feedback
|
||||||
virtual void info() const;
|
virtual void info();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -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-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -107,13 +107,13 @@ void thermalBaffle::solveEnergy()
|
|||||||
forAll(ppCoupled, localFaceI)
|
forAll(ppCoupled, localFaceI)
|
||||||
{
|
{
|
||||||
const labelList& cells = boundaryFaceCells_[localFaceI];
|
const labelList& cells = boundaryFaceCells_[localFaceI];
|
||||||
forAll (cells, i)
|
forAll(cells, i)
|
||||||
{
|
{
|
||||||
const label cellId = cells[i];
|
const label cellId = cells[i];
|
||||||
|
|
||||||
Q[cellId] =
|
Q[cellId] =
|
||||||
Qs_.boundaryField()[patchI][localFaceI]
|
Qs_.boundaryField()[patchI][localFaceI]
|
||||||
/thickness_[localFaceI];
|
/thickness_[localFaceI];
|
||||||
|
|
||||||
rho[cellId] *= delta_.value()/thickness_[localFaceI];
|
rho[cellId] *= delta_.value()/thickness_[localFaceI];
|
||||||
|
|
||||||
@ -352,7 +352,7 @@ const solidThermo& thermalBaffle::thermo() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void thermalBaffle::info() const
|
void thermalBaffle::info()
|
||||||
{
|
{
|
||||||
const labelList& coupledPatches = intCoupledPatchIDs();
|
const labelList& coupledPatches = intCoupledPatchIDs();
|
||||||
|
|
||||||
@ -361,7 +361,7 @@ void thermalBaffle::info() const
|
|||||||
const label patchI = coupledPatches[i];
|
const label patchI = coupledPatches[i];
|
||||||
const fvPatchScalarField& ph = h_.boundaryField()[patchI];
|
const fvPatchScalarField& ph = h_.boundaryField()[patchI];
|
||||||
const word patchName = regionMesh().boundary()[patchI].name();
|
const word patchName = regionMesh().boundary()[patchI].name();
|
||||||
Info << indent << "Q : " << patchName << indent <<
|
Info<< indent << "Q : " << patchName << indent <<
|
||||||
gSum
|
gSum
|
||||||
(
|
(
|
||||||
mag(regionMesh().Sf().boundaryField()[patchI])
|
mag(regionMesh().Sf().boundaryField()[patchI])
|
||||||
|
@ -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-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -199,7 +199,7 @@ public:
|
|||||||
// I-O
|
// I-O
|
||||||
|
|
||||||
//- Provide some feedback
|
//- Provide some feedback
|
||||||
virtual void info() const;
|
virtual void info();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user