/*---------------------------------------------------------------------------*\
  ==  == ====== ====   ====    |
                    \\     ||  | Multiphase Code Repository by HZDR
  ======   //   ||  || ===//   | Website: https://doi.org/10.14278/rodare.767
  ||  ||  //    ||  // || \\   | License: GPL-3.0-or-later
  ==  == ====== ====   ==  ==  |
-------------------------------------------------------------------------------
License
    This file is part of the Multiphase Code Repository by HZDR.

    Copyright (C) 2025 by Helmholtz-Zentrum Dresden-Rossendorf e.V. (HZDR),
    Website: https://hzdr.de

    Multiphase Code Repository by HZDR is based on the free software for
    computational fluid dynamics (CFD) from the OpenFOAM Foundation.
    Copyright (C) 2025 by OpenFOAM Foundation, Website: https://openfoam.org

    If you are interested in which files are original OpenFOAM Foundation
    files, which OpenFOAM Foundation files were modified, and which files were
    newly created, see FILES.md.

    Multiphase Code Repository by HZDR 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.

    Multiphase Code Repository by HZDR 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 the Multiphase Code Repository by HZDR. If not, see
    <http://www.gnu.org/licenses/>.

Class
    Foam::fv::droplet

Description
    Droplet entrainment model

    The area-specific mass transfer rate is computed based on a Weber number
    criterion. The model takes into account that the entrainment rate does not
    exceed a certain maximum. The entrainment vanishes on fine meshes assuming
    that the entrainment is resolved at a certain refinement level.

    The entrainment rate is computed by

    \f[
        \varepsilon
        = \frac{ \rho_f \nu_f }{ L_c } \min\left( C \,We, \; 0.5 \right)
    \f]

    with the capillary length

    \f[
        L_c = \sqrt{ \frac{\sigma}{g \, \rho_f} }
    \f]

    and the Weber number computed from the interfacial velocity jump:

    \f[
        We = \frac{\rho_g U_\text{rel}^2 L_c}{\sigma}, \quad
        U_\text{rel} = || U^+ - U^- ||
    \f]

    The constant \f$C\f$ is an empirical parameter.

    The corresponding volumetric mass source is obtained by:

    \f[
        ||\nabla\alpha||\varepsilon
    \f]

    The transfer is distributed over the interface, i.e. in cells with nonzero
    values of the interfacial area density \f$||\nabla\alpha||\f$ (IAD). Such a
    cell can only contribute to the transfer if it contains some pairContinuous.
    If not, the corresponding proportion of IAD is approximately added to a
    neighbour cell still containing pairContinuous to realise the whole transfer
    rate.

    References:
    \verbatim
        Wang, L.-S., Krull, B., Lucas, D., Meller, R., Schlegel, F.,
        Tekavčič, M., & Xu, J.-Y. (2023).
        Simulation of droplet entrainment in annular flow with a morphology
        adaptive multifield two-fluid model.
        Physics of Fluids, 35(10), 103312, 1–16.
    \endverbatim

Usage
    \table
        Property    | Description               | Required | Default
        coefficient | dimensionless coefficient | no       | 1e-2
    \endtable

SourceFiles
    droplet.C

\*---------------------------------------------------------------------------*/

#ifndef droplet_H
#define droplet_H

#include "entrainmentModel.H"
#include "segregatedPhaseInterface.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

namespace Foam
{

namespace fv
{

/*---------------------------------------------------------------------------*\
                           Class droplet Declaration
\*---------------------------------------------------------------------------*/

class droplet
:
    public entrainmentModel
{
    // Private Data

        //- Dimensionless coefficient
        const dimensionedScalar coefficient_;


protected:

    // Protected Member Functions

        //- Returns the droplet transfer rate
        virtual tmp<volScalarField> rate(const phaseModel&) const;


public:

    //- Runtime type information
    TypeName("droplet");


    // Constructors

        //- Construct from components
        droplet
        (
            const dictionary& dict,
            const dispersedPhaseInterface& interface
        );


    //- Destructor
    virtual ~droplet();
};


// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

} // End namespace fv
} // End namespace Foam

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#endif

// ************************************************************************* //
