Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lagrangian: drag: Various improvements
The dense drag models (WenYu, ErgunWenYu and PlessisMasliyah) have been extended so that they can create their own void-fraction field when one is not otherwise available. The duplicated functionality in the drag models has been generalised and is now utilised by multiple models. References have been added for all models for which they could be found. In addition, an additional drag model, SchillerNaumann, has been added. This is of the same form as sphereDrag, and is designed for the same scenario; sparsely distributed spherical particles. The SchillerNaumann form is more widely referenced and should now be considered standard. The thermo-parcel-specific force instantiation macro has been removed, as all the force models are now possible to use with all parcel types. Resolves bug report https://bugs.openfoam.org/view.php?id=3191
- Loading branch information
Will Bainbridge
committed
Mar 15, 2019
1 parent
d411661
commit 081db9a
Showing
27 changed files
with
630 additions
and
362 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
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
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
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
65 changes: 0 additions & 65 deletions
65
src/lagrangian/intermediate/parcels/include/makeThermoParcelForces.H
This file was deleted.
Oops, something went wrong.
118 changes: 118 additions & 0 deletions
118
...agrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/DenseDrag/DenseDragForce.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,118 @@ | ||
/*---------------------------------------------------------------------------*\ | ||
========= | | ||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox | ||
\\ / O peration | Website: https://openfoam.org | ||
\\ / A nd | Copyright (C) 2019 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 "DenseDragForce.H" | ||
#include "SchillerNaumannDragForce.H" | ||
#include "volFields.H" | ||
|
||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // | ||
|
||
template<class CloudType> | ||
Foam::DenseDragForce<CloudType>::DenseDragForce | ||
( | ||
CloudType& owner, | ||
const fvMesh& mesh, | ||
const dictionary& dict, | ||
const word& typeName | ||
) | ||
: | ||
ParticleForce<CloudType>(owner, mesh, dict, typeName, true), | ||
alphacName_(this->coeffs().lookup("alphac")), | ||
alphacPtr_(nullptr), | ||
alphacInterpPtr_(nullptr) | ||
{} | ||
|
||
|
||
template<class CloudType> | ||
Foam::DenseDragForce<CloudType>::DenseDragForce | ||
( | ||
const DenseDragForce<CloudType>& df | ||
) | ||
: | ||
ParticleForce<CloudType>(df), | ||
alphacName_(df.alphacName_), | ||
alphacPtr_(nullptr), | ||
alphacInterpPtr_(nullptr) | ||
{} | ||
|
||
|
||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // | ||
|
||
template<class CloudType> | ||
Foam::DenseDragForce<CloudType>::~DenseDragForce() | ||
{} | ||
|
||
|
||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // | ||
|
||
template<class CloudType> | ||
const Foam::interpolation<Foam::scalar>& | ||
Foam::DenseDragForce<CloudType>::alphacInterp() const | ||
{ | ||
if (!alphacInterpPtr_.valid()) | ||
{ | ||
FatalErrorInFunction | ||
<< "Carrier phase volume-fraction interpolation object not set" | ||
<< abort(FatalError); | ||
} | ||
|
||
return alphacInterpPtr_(); | ||
} | ||
|
||
|
||
template<class CloudType> | ||
void Foam::DenseDragForce<CloudType>::cacheFields(const bool store) | ||
{ | ||
if (store) | ||
{ | ||
if (!this->mesh().template foundObject<volVectorField>(alphacName_)) | ||
{ | ||
alphacPtr_.reset | ||
( | ||
new volScalarField(alphacName_, 1 - this->owner().theta()) | ||
); | ||
} | ||
|
||
const volScalarField& alphac = | ||
this->mesh().template lookupObject<volScalarField>(alphacName_); | ||
|
||
alphacInterpPtr_.reset | ||
( | ||
interpolation<scalar>::New | ||
( | ||
this->owner().solution().interpolationSchemes(), | ||
alphac | ||
).ptr() | ||
); | ||
} | ||
else | ||
{ | ||
alphacInterpPtr_.clear(); | ||
alphacPtr_.clear(); | ||
} | ||
} | ||
|
||
|
||
// ************************************************************************* // |
Oops, something went wrong.