mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: MRF - added function to return the frame absolute flux
This commit is contained in:
committed by
Kutalmış Berçin
parent
06ee000cb8
commit
bf9b9204c3
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2012-2017 OpenFOAM Foundation
|
Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2021 OpenCFD Ltd.
|
Copyright (C) 2021-2024 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -28,6 +28,7 @@ License
|
|||||||
|
|
||||||
#include "MRFZoneList.H"
|
#include "MRFZoneList.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
|
#include "surfaceFields.H"
|
||||||
#include "fixedValueFvsPatchFields.H"
|
#include "fixedValueFvsPatchFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
@ -216,6 +217,26 @@ Foam::tmp<Foam::volVectorField> Foam::MRFZoneList::DDt
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::surfaceScalarField> Foam::MRFZoneList::phi() const
|
||||||
|
{
|
||||||
|
auto tphi = surfaceScalarField::New
|
||||||
|
(
|
||||||
|
"phiMRF",
|
||||||
|
IOobject::NO_REGISTER,
|
||||||
|
mesh_,
|
||||||
|
dimensionedScalar(dimVelocity*dimArea, Zero)
|
||||||
|
);
|
||||||
|
auto& phi = tphi.ref();
|
||||||
|
|
||||||
|
for (const auto& mrf : *this)
|
||||||
|
{
|
||||||
|
mrf.makeAbsolute(phi);
|
||||||
|
}
|
||||||
|
|
||||||
|
return tphi;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::MRFZoneList::makeRelative(volVectorField& U) const
|
void Foam::MRFZoneList::makeRelative(volVectorField& U) const
|
||||||
{
|
{
|
||||||
for (const auto& mrf: *this)
|
for (const auto& mrf: *this)
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2012-2018 OpenFOAM Foundation
|
Copyright (C) 2012-2018 OpenFOAM Foundation
|
||||||
Copyright (C) 2021 OpenCFD Ltd.
|
Copyright (C) 2021-2024 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -127,6 +127,9 @@ public:
|
|||||||
const volVectorField& U
|
const volVectorField& U
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
//- Return the MRF absolute flux
|
||||||
|
tmp<surfaceScalarField> phi() const;
|
||||||
|
|
||||||
//- Make the given absolute velocity relative within the MRF region
|
//- Make the given absolute velocity relative within the MRF region
|
||||||
void makeRelative(volVectorField& U) const;
|
void makeRelative(volVectorField& U) const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user