Skip to content
Permalink
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.
  • Loading branch information
Henry Weller
Henry Weller committed Nov 14, 2015
1 parent e8b453c commit 6844e64010ab04799b98613c4e55bb9870b35b7b
@@ -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
@@ -0,0 +1,91 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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());
}


// ************************************************************************* //
@@ -0,0 +1,112 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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

// ************************************************************************* //
@@ -0,0 +1,108 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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;
}


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

0 comments on commit 6844e64

Please sign in to comment.
You can’t perform that action at this time.