The cell-base momentum/pressure algorithm in the multiphaseEuler solver module
has been substantially updated to improve consistency, conservation and reduce
drag generated staggering patterns at sharp interfaces and the boundaries with
stationary phases. For most if not all cases this new algorithm can be used to
provide well resolved and reliable solutions where the faceMomentum algorithm
would have been chosen previously in order to obtain sufficiently smooth
solutions but at the expense of a noticeable loss in accuracy and resolution.
The first significant change in the momentum/pressure algorithm is in the
interpolation practice used to construct the flux predictor equation from the
cell momentum equation: rather than interpolating the H/A ratio to the faces
i.e. (H/A)_f the terms in the momentum equation are interpolated separately so
that H_f/A_f is used. The same approach is used for the drag i.e. (D_f/A_f) and
virtual mass contributions. The advantage of this change is that the phase
forces are now consistent in both the momentum and flux equations, i.e. sum to
zero for each pair of phases.
The second significant change is in the handling of ddtCorr which converts the
old-time time-derivative contributions in H from velocity to flux which is now
consistent due to the change to H/A interpolation and also generalised to use
the fvc::ddtCorr function which has been updated for multiphase. Additionally
ddtCorr may optionally be applied to the time-derivative in the virtual mass
term in a consistent manner so that the contributions to the flux equation sum
to zero for each pair of phases.
The third significant change is the addition of an optional drag correction term
to the momentum corrector to reduce the staggering patters generated in the
velocity field due to sudden changes in drag force between phase, e.g. at sharp
interfaces between phases or at the boundaries with stationary phases. This is
particularly beneficial for fluidised bed simulations. However this correction
is not and cannot be phase consistent, i.e. the correction does not sum to zero
for pairs of phases it is applied to so a small drag error is introduced, but
tests so far have shown that the error is small and outweighed by the benefit in
the reduction in numerical artefacts in the solution.
The final significant change is in the handling of residualAlpha for drag and
virtual mass to provide stable and physical phase velocities in the limit of the
phase-fraction -> 0. The new approach is phase asymmetric such that the
residual drag is applied only to the phase with a phase-fraction less than
residualAlpha and not to the carrier phase. This change ensures that the flow
of a pure phase is unaffected by the residualAlpha and residual drag of the
other phases that are stabilised in pure phase region.
There are now four options in the PIMPLE section of the fvSolutions dictionary
relating to the multiphase momentum/pressure algorithm:
PIMPLE
{
faceMomentum no;
VmDdtCorrection yes;
dragCorrection yes;
partialElimination no;
}
faceMomentum:
Switches between the cell and face momentum equation algorithms.
Provides much smoother and reliable solutions for even the most challenging
multiphase cases at the expense of a noticeable loss in accuracy and resolution.
Defaults to 'no'.
VmDdtCorrection:
Includes the ddtCorr correction term to the time-derivative part of the
virtual-mass term in the flux equation which ensures consistency between the
phase virtual mass force on the faces but generates solutions which are
slightly less smooth and more likely to contain numerical artefacts.
Defaults to 'no'.
Testing so far has shown that the loss in smoothness is small and there is
some noticeable improvement is some cases so in the future the default may
be changed to 'yes'.
dragCorrection:
Includes the momentum corrector drag correction term to reduce the
staggering patters generated in the velocity field due to sudden changes in
drag force at the expense of a small error in drag consistency.
Defaults to 'no'
partialElimination:
Switches the partial-elimination momentum corrector which inverts the drag
matrix for both the momentum equations and/or flux equations to provide a
drag implicit correction to the phase velocity and flux fields. The
algorithm is the same as previously but updated for the new consistent drag
interpolation.
All the tutorials/modules/multiphaseEuler tutorial cases have been updated and
tested with the above developments and the four options set appropriately for
each.
175 lines
4.5 KiB
C++
175 lines
4.5 KiB
C++
/*---------------------------------------------------------------------------*\
|
|
========= |
|
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
\\ / O peration | Website: https://openfoam.org
|
|
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
|
\\/ M anipulation |
|
|
-------------------------------------------------------------------------------
|
|
License
|
|
This file is part of OpenFOAM.
|
|
|
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
Class
|
|
Foam::dragModel
|
|
|
|
Description
|
|
Model for drag between phases
|
|
|
|
SourceFiles
|
|
dragModel.C
|
|
dragModelNew.C
|
|
|
|
\*---------------------------------------------------------------------------*/
|
|
|
|
#ifndef dragModel_H
|
|
#define dragModel_H
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
#include "volFields.H"
|
|
#include "dictionary.H"
|
|
#include "runTimeSelectionTables.H"
|
|
#include "BlendedInterfacialModel.H"
|
|
|
|
namespace Foam
|
|
{
|
|
|
|
/*---------------------------------------------------------------------------*\
|
|
Class dragModel Declaration
|
|
\*---------------------------------------------------------------------------*/
|
|
|
|
class dragModel
|
|
:
|
|
public regIOobject
|
|
{
|
|
public:
|
|
|
|
//- Runtime type information
|
|
TypeName("dragModel");
|
|
|
|
|
|
// Declare runtime construction
|
|
|
|
declareRunTimeSelectionTable
|
|
(
|
|
autoPtr,
|
|
dragModel,
|
|
dictionary,
|
|
(
|
|
const dictionary& dict,
|
|
const phaseInterface& interface,
|
|
const bool registerObject
|
|
),
|
|
(dict, interface, registerObject)
|
|
);
|
|
|
|
|
|
// Static Data Members
|
|
|
|
//- Coefficient dimensions
|
|
static const dimensionSet dimK;
|
|
|
|
//- This model MUST NOT be set to 0 on fixed flux boundaries
|
|
static const bool correctFixedFluxBCs = false;
|
|
|
|
|
|
// Constructors
|
|
|
|
// Construct from a dictionary and an interface
|
|
dragModel
|
|
(
|
|
const dictionary& dict,
|
|
const phaseInterface& interface,
|
|
const bool registerObject
|
|
);
|
|
|
|
|
|
//- Destructor
|
|
virtual ~dragModel();
|
|
|
|
|
|
// Selectors
|
|
|
|
static autoPtr<dragModel> New
|
|
(
|
|
const dictionary& dict,
|
|
const phaseInterface& interface,
|
|
const bool outer=true,
|
|
const bool registerObject=true
|
|
);
|
|
|
|
|
|
// Member Functions
|
|
|
|
//- Return the drag coefficient K
|
|
// used in the momentum equations
|
|
// ddt(alpha1*rho1*U1) + ... = ... K*(U1-U2)
|
|
// ddt(alpha2*rho2*U2) + ... = ... K*(U2-U1)
|
|
virtual tmp<volScalarField> K() const = 0;
|
|
|
|
//- Return the drag coefficient Kf
|
|
// used in the face-momentum equations
|
|
virtual tmp<surfaceScalarField> Kf() const = 0;
|
|
|
|
//- Dummy write for regIOobject
|
|
bool writeData(Ostream& os) const;
|
|
};
|
|
|
|
|
|
/*---------------------------------------------------------------------------*\
|
|
Class blendedDragModel Declaration
|
|
\*---------------------------------------------------------------------------*/
|
|
|
|
class blendedDragModel
|
|
:
|
|
public BlendedInterfacialModel<dragModel>
|
|
{
|
|
public:
|
|
|
|
// Constructors
|
|
|
|
//- Inherit base class constructors
|
|
using BlendedInterfacialModel<dragModel>::BlendedInterfacialModel;
|
|
|
|
|
|
// Selectors
|
|
|
|
static autoPtr<blendedDragModel> New
|
|
(
|
|
const dictionary& dict,
|
|
const phaseInterface& interface
|
|
);
|
|
|
|
|
|
// Member Functions
|
|
|
|
//- Return the drag coefficient K
|
|
tmp<volScalarField> K() const;
|
|
|
|
//- Return the drag coefficient Kf
|
|
tmp<surfaceScalarField> Kf() const;
|
|
};
|
|
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
} // End namespace Foam
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
#endif
|
|
|
|
// ************************************************************************* //
|