ENH: moved phase change output to phase change model

This commit is contained in:
andy
2010-09-16 13:18:17 +01:00
parent 4d28190435
commit f472fe31a4
6 changed files with 51 additions and 7 deletions

View File

@ -69,4 +69,10 @@ void Foam::surfaceFilmModels::noPhaseChange::correct
}
void Foam::surfaceFilmModels::noPhaseChange::info() const
{
// do nothing
}
// ************************************************************************* //

View File

@ -90,6 +90,12 @@ public:
scalarField& dMass,
scalarField& dEnergy
);
// Input/output
//- Output model statistics
virtual void info() const;
};

View File

@ -143,6 +143,12 @@ public:
scalarField& dMass,
scalarField& dEnergy
) = 0;
// Input/output
//- Output model statistics
virtual void info() const = 0;
};

View File

@ -76,7 +76,9 @@ Foam::surfaceFilmModels::standardPhaseChange::standardPhaseChange
phaseChangeModel(typeName, owner, dict),
Tb_(readScalar(coeffs_.lookup("Tb"))),
deltaMin_(readScalar(coeffs_.lookup("deltaMin"))),
L_(readScalar(coeffs_.lookup("L")))
L_(readScalar(coeffs_.lookup("L"))),
totalMass_(0.0),
vapourRate_(0.0)
{}
@ -191,6 +193,19 @@ void Foam::surfaceFilmModels::standardPhaseChange::correct
dEnergy[cellI] = dMass[cellI]*hVap;
}
}
const scalar sumdMass = sum(dMass);
totalMass_ += sumdMass;
vapourRate_ = sumdMass/owner().time().deltaTValue();
}
void Foam::surfaceFilmModels::standardPhaseChange::info() const
{
Info<< indent << "mass phase change = "
<< returnReduce(totalMass_, sumOp<scalar>()) << nl
<< indent << "vapourisation rate = "
<< returnReduce(vapourRate_, sumOp<scalar>()) << nl;
}

View File

@ -76,6 +76,12 @@ protected:
//- Length scale / [m]
const scalar L_;
//- Total mass evolved / [kg]
scalar totalMass_;
//- Vapouristaion rate / kg/s
scalar vapourRate_;
// Protected member functions
@ -114,6 +120,12 @@ public:
scalarField& dMass,
scalarField& dEnergy
);
// Input/output
//- Output model statistics
virtual void info() const;
};

View File

@ -212,7 +212,8 @@ void Foam::surfaceFilmModels::thermoSingleLayer::solveEnergy()
fvm::ddt(deltaRho_, hs_)
+ fvm::div(phi_, hs_)
==
fvm::Sp(hsSp_/hs_, hs_)
// fvm::Sp(hsSp_/hs_, hs_)
hsSp_
+ q(hs_)
- fvm::Sp(massForPrimary_/magSf_/time_.deltaT(), hs_)
);
@ -570,11 +571,9 @@ void Foam::surfaceFilmModels::thermoSingleLayer::info() const
kinematicSingleLayer::info();
Info<< indent << "min/max(T) = " << min(T_).value() << ", "
<< max(T_).value() << nl
<< indent << "mass phase change = "
<< returnReduce(totalMassPhaseChange_, sumOp<scalar>()) << nl
<< indent << "vapourisation rate = "
<< sum(massPhaseChangeForPrimary_).value()/time_.deltaTValue() << nl;
<< max(T_).value() << nl;
phaseChange_->info();
}