Commit 6a59811e authored by Henry Weller's avatar Henry Weller
Browse files

reactingEulerFoam/interfacialModels/liftModels: wallDampedLift

New lift model supporting near-wall damping using the new
wallDampingModels.

e.g.

lift
(
    (air in water)
    {
        type            wallDamped;
        lift
        {
            type            constantCoefficient;
            Cl              0.5;
        }
        wallDamping
        {
            type            linear;
            Cd              0.5;
        }
    }
);

in which a linear near-wall damping function min(y/(Cd*d), 1) is applied to the constant
coefficient lift model.  Additional wall-damping functions will be added.
parent f4695953
......@@ -25,6 +25,7 @@ liftModels/constantLiftCoefficient/constantLiftCoefficient.C
liftModels/Moraga/Moraga.C
liftModels/LegendreMagnaudet/LegendreMagnaudet.C
liftModels/TomiyamaLift/TomiyamaLift.C
liftModels/wallDampedLift/wallDampedLift.C
heatTransferModels/heatTransferModel/heatTransferModel.C
heatTransferModels/heatTransferModel/newHeatTransferModel.C
......@@ -61,4 +62,9 @@ aspectRatioModels/Wellek/Wellek.C
wallDependentModel/wallDependentModel.C
wallDampingModels/wallDampingModel/wallDampingModel.C
wallDampingModels/wallDampingModel/newWallDampingModel.C
wallDampingModels/noWallDamping/noWallDamping.C
wallDampingModels/linear/linearWallDamping.C
LIB = $(FOAM_LIBBIN)/libreactingEulerianInterfacialModels
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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/>.
\*---------------------------------------------------------------------------*/
#include "wallDampedLift.H"
#include "phasePair.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace liftModels
{
defineTypeNameAndDebug(wallDamped, 0);
addToRunTimeSelectionTable(liftModel, wallDamped, dictionary);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::liftModels::wallDamped::wallDamped
(
const dictionary& dict,
const phasePair& pair
)
:
liftModel(dict, pair),
liftModel_(liftModel::New(dict.subDict("lift"), pair)),
wallDampingModel_
(
wallDampingModel::New(dict.subDict("wallDamping"), pair)
)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::liftModels::wallDamped::~wallDamped()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::liftModels::wallDamped::Cl() const
{
return wallDampingModel_->damp(liftModel_->Cl());
}
Foam::tmp<Foam::volVectorField> Foam::liftModels::wallDamped::Fi() const
{
return wallDampingModel_->damp(liftModel_->Fi());
}
Foam::tmp<Foam::volVectorField> Foam::liftModels::wallDamped::F() const
{
return wallDampingModel_->damp(liftModel_->F());
}
Foam::tmp<Foam::surfaceScalarField> Foam::liftModels::wallDamped::Ff() const
{
return wallDampingModel_->damp(liftModel_->Ff());
}
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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::liftModels::wallDamped
Description
SourceFiles
wallDamped.C
\*---------------------------------------------------------------------------*/
#ifndef wallDampedLift_H
#define wallDampedLift_H
#include "liftModel.H"
#include "wallDampingModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phasePair;
namespace liftModels
{
/*---------------------------------------------------------------------------*\
Class wallDamped Declaration
\*---------------------------------------------------------------------------*/
class wallDamped
:
public liftModel
{
// Private data
//- The lift model to damp
autoPtr<liftModel> liftModel_;
//- The wall-damping model
autoPtr<wallDampingModel> wallDampingModel_;
public:
//- Runtime type information
TypeName("wallDamped");
// Constructors
//- Construct from a dictionary and a phase pair
wallDamped
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
virtual ~wallDamped();
// Member Functions
//- Return lift coefficient
virtual tmp<volScalarField> Cl() const;
//- Return phase-intensive lift force
virtual tmp<volVectorField> Fi() const;
//- Return lift force
virtual tmp<volVectorField> F() const;
//- Return face lift force
virtual tmp<surfaceScalarField> Ff() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace liftModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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/>.
\*---------------------------------------------------------------------------*/
#include "linearWallDamping.H"
#include "phasePair.H"
#include "surfaceInterpolate.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace wallDampingModels
{
defineTypeNameAndDebug(linear, 0);
addToRunTimeSelectionTable
(
wallDampingModel,
linear,
dictionary
);
}
}
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::wallDampingModels::linear::limiter() const
{
return min(yWall()/(Cd_*pair_.dispersed().d()), 1.0);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::wallDampingModels::linear::linear
(
const dictionary& dict,
const phasePair& pair
)
:
wallDampingModel(dict, pair),
Cd_("Cd", dimless, dict)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::wallDampingModels::linear::~linear()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::wallDampingModels::linear::damp
(
const tmp<volScalarField>& F
) const
{
return limiter()*F;
}
Foam::tmp<Foam::volVectorField>
Foam::wallDampingModels::linear::damp
(
const tmp<volVectorField>& F
) const
{
return limiter()*F;
}
Foam::tmp<Foam::surfaceScalarField>
Foam::wallDampingModels::linear::damp
(
const tmp<surfaceScalarField>& Ff
) const
{
return fvc::interpolate(limiter())*Ff;
}
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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::wallDampingModels::linear
Description
SourceFiles
linearWallDamping.C
\*---------------------------------------------------------------------------*/
#ifndef linearWallDamping_H
#define linearWallDamping_H
#include "wallDampingModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phasePair;
namespace wallDampingModels
{
/*---------------------------------------------------------------------------*\
Class linear Declaration
\*---------------------------------------------------------------------------*/
class linear
:
public wallDampingModel
{
// Private data
//- Diameter coefficient
const dimensionedScalar Cd_;
// Private member functions
//- Return the force limiter field
tmp<volScalarField> limiter() const;
public:
//- Runtime type information
TypeName("linear");
// Constructors
//- Construct from components
linear
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
virtual ~linear();
// Member Functions
//- Return damped coefficient
virtual tmp<volScalarField> damp
(
const tmp<volScalarField>&
) const;
//- Return damped force
virtual tmp<volVectorField> damp
(
const tmp<volVectorField>&
) const;
//- Return damped face force
virtual tmp<surfaceScalarField> damp
(
const tmp<surfaceScalarField>&
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace wallDampingModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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/>.
\*---------------------------------------------------------------------------*/
#include "noWallDamping.H"
#include "phasePair.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace wallDampingModels
{
defineTypeNameAndDebug(noWallDamping, 0);
addToRunTimeSelectionTable
(
wallDampingModel,
noWallDamping,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::wallDampingModels::noWallDamping::noWallDamping
(
const dictionary& dict,
const phasePair& pair
)
:
wallDampingModel(dict, pair)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::wallDampingModels::noWallDamping::~noWallDamping()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::wallDampingModels::noWallDamping::damp
(
const tmp<volScalarField>& Cl
) const
{
return Cl;
}
Foam::tmp<Foam::volVectorField>
Foam::wallDampingModels::noWallDamping::damp
(
const tmp<volVectorField>& F
) const
{
return F;
}
Foam::tmp<Foam::surfaceScalarField>
Foam::wallDampingModels::noWallDamping::damp
(
const tmp<surfaceScalarField>& Ff
) const
{
return Ff;
}
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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/>.