Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
committed
Nov 14, 2015
1 parent
e8b453c
commit 6844e64
Showing
10 changed files
with
906 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 91 additions & 0 deletions
91
...multiphase/reactingEulerFoam/interfacialModels/liftModels/wallDampedLift/wallDampedLift.C
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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()); | ||
} | ||
|
||
|
||
// ************************************************************************* // |
112 changes: 112 additions & 0 deletions
112
...multiphase/reactingEulerFoam/interfacialModels/liftModels/wallDampedLift/wallDampedLift.H
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
||
// ************************************************************************* // |
108 changes: 108 additions & 0 deletions
108
...ltiphase/reactingEulerFoam/interfacialModels/wallDampingModels/linear/linearWallDamping.C
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
|
||
|
||
// ************************************************************************* // |
Oops, something went wrong.