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.
This commit is contained in:
Henry Weller
2015-11-14 19:31:41 +00:00
parent f4695953aa
commit 6a59811e09
10 changed files with 906 additions and 0 deletions

View File

@ -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

View File

@ -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());
}
// ************************************************************************* //

View File

@ -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
// ************************************************************************* //

View File

@ -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;
}
// ************************************************************************* //

View File

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

View File

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

View File

@ -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/>.
Class
Foam::wallDampingModels::noWallDamping
Description
SourceFiles
noWallDamping.C
\*---------------------------------------------------------------------------*/
#ifndef noWallDamping_H
#define noWallDamping_H
#include "wallDampingModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class phasePair;
namespace wallDampingModels
{
/*---------------------------------------------------------------------------*\
Class noWallDamping Declaration
\*---------------------------------------------------------------------------*/
class noWallDamping
:
public wallDampingModel
{
public:
//- Runtime type information
TypeName("none");
// Constructors
//- Construct from components
noWallDamping
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
virtual ~noWallDamping();
// 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
// ************************************************************************* //

View File

@ -0,0 +1,59 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 "wallDampingModel.H"
#include "phasePair.H"
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::wallDampingModel> Foam::wallDampingModel::New
(
const dictionary& dict,
const phasePair& pair
)
{
word wallDampingModelType(dict.lookup("type"));
Info<< "Selecting wallDampingModel for "
<< pair << ": " << wallDampingModelType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(wallDampingModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorInFunction
<< "Unknown wallDampingModelType type "
<< wallDampingModelType << endl << endl
<< "Valid wallDampingModel types are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return cstrIter()(dict, pair);
}
// ************************************************************************* //

View File

@ -0,0 +1,59 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 "wallDampingModel.H"
#include "phasePair.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(wallDampingModel, 0);
defineRunTimeSelectionTable(wallDampingModel, dictionary);
}
const Foam::dimensionSet Foam::wallDampingModel::dimF(1, -2, -2, 0, 0);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::wallDampingModel::wallDampingModel
(
const dictionary& dict,
const phasePair& pair
)
:
wallDependentModel(pair.phase1().mesh()),
pair_(pair)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::wallDampingModel::~wallDampingModel()
{}
// ************************************************************************* //

View File

@ -0,0 +1,146 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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::wallDampingModel
Description
SourceFiles
wallDampingModel.C
newWallDampingModel.C
\*---------------------------------------------------------------------------*/
#ifndef wallDampingModel_H
#define wallDampingModel_H
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "wallDependentModel.H"
#include "volFields.H"
#include "dictionary.H"
#include "runTimeSelectionTables.H"
namespace Foam
{
class phasePair;
/*---------------------------------------------------------------------------*\
Class wallDampingModel Declaration
\*---------------------------------------------------------------------------*/
class wallDampingModel
:
public wallDependentModel
{
protected:
// Protected data
//- Phase pair
const phasePair& pair_;
public:
//- Runtime type information
TypeName("wallDampingModel");
// Declare runtime construction
declareRunTimeSelectionTable
(
autoPtr,
wallDampingModel,
dictionary,
(
const dictionary& dict,
const phasePair& pair
),
(dict, pair)
);
// Static data members
//- Coefficient dimensions
static const dimensionSet dimF;
// Constructors
//- Construct from components
wallDampingModel
(
const dictionary& dict,
const phasePair& pair
);
//- Destructor
virtual ~wallDampingModel();
// Selectors
static autoPtr<wallDampingModel> New
(
const dictionary& dict,
const phasePair& pair
);
// Member Functions
//- Return damped coefficient
virtual tmp<volScalarField> damp
(
const tmp<volScalarField>&
) const = 0;
//- Return damped force
virtual tmp<volVectorField> damp
(
const tmp<volVectorField>&
) const = 0;
//- Return damped face force
virtual tmp<surfaceScalarField> damp
(
const tmp<surfaceScalarField>&
) const = 0;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //