/*---------------------------------------------------------------------------*\
  ==  == ====== ====   ====    |
                    \\     ||  | 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::populationBalance::coalescenceModels::BrownianCollisions

Description
    Model describing coagulation due to Brownian motion. Utilises collisional
    diameters and the Cunningham slip correction. The slip correction
    coefficient is implemented in the following form:

    \f[
        C_{c_i} = 1 + \lambda [A_1 + A_2 \exp(-A_3 d_i/\lambda)]/d_i\,.
    \f]

    The coefficients default to the values proposed by Davis (1945). The mean
    free path is computed by

    \f[
        \lambda = \frac{kT}{\sqrt{2} \pi p \sigma^{2}}\,.
    \f]

    \vartable
        A_1       | Coefficient [-]
        A_2       | Coefficient [-]
        A_3       | Coefficient [-]
        \sigma    | Lennard-Jones parameter [m]
    \endvartable

    Reference:
    \verbatim
        Davies, C. N. (1945).
        Definitive equations for the fluid resistance of spheres.
        Proceedings of the Physical Society, 57(4), 259.
    \endverbatim

Usage
    \table
        Property    | Description                | Required    | Default value
        A1          | Coefficient A1             | no          | 2.514
        A2          | Coefficient A2             | no          | 0.8
        A3          | Coefficient A2             | no          | 0.55
        sigma       | Lennard-Jones parameter    | yes         | none
    \endtable

SourceFiles
    BrownianCollisions.C

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

#ifndef BrownianCollisions_H
#define BrownianCollisions_H

#include "coalescenceModel.H"

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

namespace Foam
{
namespace populationBalance
{
namespace coalescenceModels
{

/*---------------------------------------------------------------------------*\
                     Class BrownianCollisions Declaration
\*---------------------------------------------------------------------------*/

class BrownianCollisions
:
    public coalescenceModel
{
    // Private Data

        //- Cunningham slip correction coefficient A1
        const dimensionedScalar A1_;

        //- Cunningham slip correction coefficient A2
        const dimensionedScalar A2_;

        //- Cunningham slip correction coefficient A3
        const dimensionedScalar A3_;

        //- Lennard-Jones sigma parameter
        const dimensionedScalar sigma_;

        //- Mean free path
        volScalarField::Internal lambda_;


public:

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

    // Constructor

        BrownianCollisions
        (
            const populationBalanceModel& popBal,
            const dictionary& dict
        );


    //- Destructor
    virtual ~BrownianCollisions()
    {}


    // Member Functions

        //- Precompute diameter independent expressions
        virtual void precompute();

        //- Add to coalescenceRate
        virtual void addToCoalescenceRate
        (
            volScalarField::Internal& coalescenceRate,
            const label i,
            const label j
        );
};


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

} // End namespace coalescenceModels
} // End namespace populationBalance
} // End namespace Foam

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

#endif

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