Skip to content
Snippets Groups Projects
Commit 5d55a1f6 authored by william's avatar william
Browse files

ENH: Added noLift model for twoPhaseEulerFoam

parent c63417b5
Branches
Tags
No related merge requests found
Showing
with 220 additions and 72 deletions
......@@ -14,6 +14,7 @@ heatTransferModels/RanzMarshall/RanzMarshall.C
liftModels/liftModel/liftModel.C
liftModels/liftModel/newLiftModel.C
liftModels/noLift/noLift.C
liftModels/constantCoefficient/constantCoefficient.C
LIB = $(FOAM_LIBBIN)/libcompressibleEulerianInterfacialModels
......@@ -56,7 +56,8 @@ Foam::liftModels::constantCoefficient::constantCoefficient
)
:
liftModel(dict, alpha1, phase1, phase2),
Cl_("Cl", dimless, dict.lookup("Cl"))
coeffDict_(dict.subDict(typeName + "Coeffs")),
Cl_("Cl", dimless, coeffDict_.lookup("Cl"))
{}
......
......@@ -53,6 +53,9 @@ class constantCoefficient
{
// Private data
//- Coefficient dictionary
const dictionary& coeffDict_;
//- Constant lift coefficient
dimensionedScalar Cl_;
......
......@@ -85,6 +85,10 @@ public:
// Constructors
//- Construct null
liftModel();
//- Construct from components
liftModel
(
const dictionary& dict,
......
......@@ -61,7 +61,7 @@ Foam::autoPtr<Foam::liftModel> Foam::liftModel::New
return
cstrIter()
(
dict.subDict(phase1.name()).subDict(liftModelType + "Coeffs"),
dict.subDict(phase1.name()),
alpha1,
phase1,
phase2
......
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 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 "noLift.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace liftModels
{
defineTypeNameAndDebug(noLift, 0);
addToRunTimeSelectionTable
(
liftModel,
noLift,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::liftModels::noLift::noLift
(
const dictionary& dict,
const volScalarField& alpha1,
const phaseModel& phase1,
const phaseModel& phase2
)
:
liftModel(dict, alpha1, phase1, phase2)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::liftModels::noLift::~noLift()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volVectorField> Foam::liftModels::noLift::F
(
const volVectorField& U
) const
{
return
tmp<volVectorField>
(
new volVectorField
(
IOobject
(
"zero",
U.time().timeName(),
U.mesh()
),
U.mesh(),
dimensionedVector
(
"zero",
dimensionSet(1, -2, -2, 0, 0, 0, 0),
vector::zero
)
)
);
}
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 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::noLift
Description
SourceFiles
noLift.C
\*---------------------------------------------------------------------------*/
#ifndef noLift_H
#define noLift_H
#include "liftModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace liftModels
{
/*---------------------------------------------------------------------------*\
Class noLift Declaration
\*---------------------------------------------------------------------------*/
class noLift
:
public liftModel
{
// Private data
//- Constant lift coefficient
dimensionedScalar Cl_;
public:
//- Runtime type information
TypeName("none");
// Constructors
//- Construct from components
noLift
(
const dictionary& dict,
const volScalarField& alpha1,
const phaseModel& phase1,
const phaseModel& phase2
);
//- Destructor
virtual ~noLift();
// Member Functions
//- Lift force
tmp<volVectorField> F(const volVectorField& U) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace liftModels
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
......@@ -55,19 +55,11 @@ lift
{
air
{
type constantCoefficient;
constantCoefficientCoeffs
{
Cl 0;
}
type none;
}
water
{
type constantCoefficient;
constantCoefficientCoeffs
{
Cl 0;
}
type none;
}
}
......
......@@ -55,19 +55,11 @@ lift
{
air
{
type constantCoefficient;
constantCoefficientCoeffs
{
Cl 0;
}
type none;
}
water
{
type constantCoefficient;
constantCoefficientCoeffs
{
Cl 0;
}
type none;
}
}
......
......@@ -54,19 +54,11 @@ lift
{
particles
{
type constantCoefficient;
constantCoefficientCoeffs
{
Cl 0;
}
type none;
}
air
{
type constantCoefficient;
constantCoefficientCoeffs
{
Cl 0;
}
type none;
}
}
......
......@@ -55,19 +55,11 @@ lift
{
air
{
type constantCoefficient;
constantCoefficientCoeffs
{
Cl 0;
}
type none;
}
water
{
type constantCoefficient;
constantCoefficientCoeffs
{
Cl 0;
}
type none;
}
}
......
......@@ -75,19 +75,11 @@ lift
{
air
{
type constantCoefficient;
constantCoefficientCoeffs
{
Cl 0;
}
type none;
}
water
{
type constantCoefficient;
constantCoefficientCoeffs
{
Cl 0;
}
type none;
}
}
......
......@@ -54,19 +54,11 @@ lift
{
particles
{
type constantCoefficient;
constantCoefficientCoeffs
{
Cl 0;
}
type none;
}
air
{
type constantCoefficient;
constantCoefficientCoeffs
{
Cl 0;
}
type none;
}
}
......
......@@ -55,19 +55,11 @@ lift
{
air
{
type constantCoefficient;
constantCoefficientCoeffs
{
Cl 0;
}
type none;
}
water
{
type constantCoefficient;
constantCoefficientCoeffs
{
Cl 0;
}
type none;
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment