mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: moved phase change output to phase change model
This commit is contained in:
@ -69,4 +69,10 @@ void Foam::surfaceFilmModels::noPhaseChange::correct
|
||||
}
|
||||
|
||||
|
||||
void Foam::surfaceFilmModels::noPhaseChange::info() const
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -90,6 +90,12 @@ public:
|
||||
scalarField& dMass,
|
||||
scalarField& dEnergy
|
||||
);
|
||||
|
||||
|
||||
// Input/output
|
||||
|
||||
//- Output model statistics
|
||||
virtual void info() const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -143,6 +143,12 @@ public:
|
||||
scalarField& dMass,
|
||||
scalarField& dEnergy
|
||||
) = 0;
|
||||
|
||||
|
||||
// Input/output
|
||||
|
||||
//- Output model statistics
|
||||
virtual void info() const = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user