ENH: lagrangian/intermediate - improved sub-model restart behaviour

This commit is contained in:
andy
2012-05-31 14:04:56 +01:00
parent 3a036a2114
commit a54e7b9032
9 changed files with 49 additions and 41 deletions

View File

@ -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
@ -231,11 +231,7 @@ void Foam::LocalInteraction<CloudType>::info(Ostream& os)
<< ", " << mps[i] << nl;
}
if
(
this->owner().solution().transient()
&& this->owner().db().time().outputTime()
)
if (this->outputTime())
{
this->setModelProperty("nEscape", npe);
this->setModelProperty("massEscape", mpe);

View File

@ -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
@ -214,11 +214,7 @@ void Foam::StandardWallInteraction<CloudType>::info(Ostream& os)
<< " - escape = " << npe << ", " << mpe << nl
<< " - stick = " << nps << ", " << mps << nl;
if
(
this->owner().solution().transient()
&& this->owner().db().time().outputTime()
)
if (this->outputTime())
{
this->setModelProperty("nEscape", npe);
this->setModelProperty("massEscape", mpe);

View File

@ -275,9 +275,30 @@ void Foam::SurfaceFilmModel<CloudType>::setParcelProperties
template<class CloudType>
void Foam::SurfaceFilmModel<CloudType>::info(Ostream& os) const
void Foam::SurfaceFilmModel<CloudType>::info(Ostream& os)
{
// do nothing
label nTrans0 =
this->template getModelProperty<label>("nParcelsTransferred");
label nInject0 =
this->template getModelProperty<label>("nParcelsInjected");
label nTransTotal =
nTrans0 + returnReduce(nParcelsTransferred_, sumOp<label>());
label nInjectTotal =
nInject0 + returnReduce(nParcelsInjected_, sumOp<label>());
os << " Parcels absorbed into film = " << nTransTotal << nl
<< " New film detached parcels = " << nInjectTotal << endl;
if (this->outputTime())
{
this->setModelProperty("nParcelsTransferred", nTransTotal);
this->setModelProperty("nParcelsInjected", nInjectTotal);
nParcelsTransferred_ = 0;
nParcelsInjected_ = 0;
}
}

View File

@ -227,7 +227,7 @@ public:
// I-O
//- Write surface film info to stream
virtual void info(Ostream& os) const;
virtual void info(Ostream& os);
};

View File

@ -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
@ -193,11 +193,7 @@ void Foam::PhaseChangeModel<CloudType>::info(Ostream& os)
Info<< " Mass transfer phase change = " << massTotal << nl;
if
(
this->owner().solution().transient()
&& this->owner().db().time().outputTime()
)
if (this->outputTime())
{
this->setBaseProperty("mass", massTotal);
dMass_ = 0.0;

View File

@ -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
@ -117,11 +117,7 @@ void Foam::DevolatilisationModel<CloudType>::info(Ostream& os)
Info<< " Mass transfer devolatilisation = " << massTotal << nl;
if
(
this->owner().solution().transient()
&& this->owner().db().time().outputTime()
)
if (this->outputTime())
{
this->setBaseProperty("mass", massTotal);
dMass_ = 0.0;

View File

@ -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
@ -139,11 +139,7 @@ void Foam::SurfaceReactionModel<CloudType>::info(Ostream& os)
Info<< " Mass transfer surface reaction = " << massTotal << nl;
if
(
this->owner().solution().transient()
&& this->owner().db().time().outputTime()
)
if (this->outputTime())
{
this->setBaseProperty("mass", massTotal);
dMass_ = 0.0;

View File

@ -676,14 +676,21 @@ void Foam::ThermoSurfaceFilm<CloudType>::setParcelProperties
template<class CloudType>
void Foam::ThermoSurfaceFilm<CloudType>::info(Ostream& os) const
void Foam::ThermoSurfaceFilm<CloudType>::info(Ostream& os)
{
os << " Parcels absorbed into film = "
<< returnReduce(this->nParcelsTransferred(), sumOp<label>()) << nl
<< " New film detached parcels = "
<< returnReduce(this->nParcelsInjected(), sumOp<label>()) << nl
<< " New film splash parcels = "
<< returnReduce(nParcelsSplashed_, sumOp<label>()) << nl;
SurfaceFilmModel<CloudType>::info(os);
label nSplash0 = this->template getModelProperty<label>("nParcelsSplashed");
label nSplashTotal =
nSplash0 + returnReduce(nParcelsSplashed_, sumOp<label>());
os << " New film splash parcels = " << nSplashTotal << endl;
if (this->outputTime())
{
this->setModelProperty("nParcelsSplashed", nSplashTotal);
nParcelsSplashed_ = 0;
}
}

View File

@ -284,7 +284,7 @@ public:
// I-O
//- Write surface film info to stream
virtual void info(Ostream& os) const;
virtual void info(Ostream& os);
};