Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev

This commit is contained in:
Henry Weller
2023-09-08 15:11:19 +01:00
6 changed files with 52 additions and 6 deletions

View File

@ -28,7 +28,7 @@ License
using namespace Foam::constant;
// * * * * * * * * * * * * * Protectd Member Functions * * * * * * * * * * * //
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
template<class CloudType>
Foam::label Foam::ParticleErosion<CloudType>::applyToPatch

View File

@ -27,7 +27,7 @@ License
#include "OSspecific.H"
#include "setWriter.H"
// * * * * * * * * * * * * * Protectd Member Functions * * * * * * * * * * * //
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
template<class CloudType>
void Foam::SizeDistribution<CloudType>::write()

View File

@ -25,12 +25,12 @@ License
#include "VolumeFraction.H"
// * * * * * * * * * * * * * Protectd Member Functions * * * * * * * * * * * //
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
template<class CloudType>
void Foam::VolumeFraction<CloudType>::write()
{
this->owner().alpha()->write();
alpha_.write();
}
@ -44,7 +44,20 @@ Foam::VolumeFraction<CloudType>::VolumeFraction
const word& modelName
)
:
CloudFunctionObject<CloudType>(dict, owner, modelName, typeName)
CloudFunctionObject<CloudType>(dict, owner, modelName, typeName),
alpha_
(
IOobject
(
this->owner().name() + ":alpha",
this->owner().mesh().time().name(),
this->owner().mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
this->owner().mesh(),
dimensionedScalar(dimless, 0)
)
{}
@ -54,7 +67,8 @@ Foam::VolumeFraction<CloudType>::VolumeFraction
const VolumeFraction<CloudType>& vf
)
:
CloudFunctionObject<CloudType>(vf)
CloudFunctionObject<CloudType>(vf),
alpha_(this->owner().name() + ":alpha", vf.alpha_)
{}
@ -65,4 +79,15 @@ Foam::VolumeFraction<CloudType>::~VolumeFraction()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class CloudType>
void Foam::VolumeFraction<CloudType>::postEvolve()
{
alpha_ = this->owner().alpha();
CloudFunctionObject<CloudType>::postEvolve();
}
// ************************************************************************* //

View File

@ -36,6 +36,7 @@ SourceFiles
#define VolumeFraction_H
#include "CloudFunctionObject.H"
#include "volFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -53,6 +54,12 @@ class VolumeFraction
{
protected:
// Private Data
//- Volume fraction field
volScalarField alpha_;
// Protected Member Functions
//- Write post-processing info
@ -90,6 +97,14 @@ public:
//- Destructor
virtual ~VolumeFraction();
// Member Functions
// Evaluation
//- Post-evolve hook
virtual void postEvolve();
};

View File

@ -158,6 +158,11 @@ subModels
cloudFunctions
{
volumeFraction1
{
type volumeFraction;
}
massFlux1
{
type massFlux;

View File

@ -48,6 +48,7 @@ runTimeModifiable yes;
functions
{
#includeFunc volIntegrate(cloud:alpha)
#includeFunc patchFlowRate(patch=lowerInlet, cloud:massFlux)
#includeFunc patchFlowRate(patch=upperInlet, cloud:massFlux)
#includeFunc faceZoneFlowRate(faceZone=mid, cloud:massFlux)