Skip to content
Permalink
Browse files

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
Will Bainbridge committed Mar 13, 2019
1 parent d411661 commit 081db9a3509c620222ee16777e3a1be4052e8590
Showing with 630 additions and 362 deletions.
  1. +3 −3 ...ediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelSubmodels.C
  2. +3 −3 src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelSubmodels.C
  3. +3 −3 src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelSubmodels.C
  4. +3 −1 src/lagrangian/intermediate/parcels/include/makeParcelForces.H
  5. +0 −65 src/lagrangian/intermediate/parcels/include/makeThermoParcelForces.H
  6. +118 −0 src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/DenseDrag/DenseDragForce.C
  7. +112 −0 src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/DenseDrag/DenseDragForce.H
  8. +9 −25 ...termediate/submodels/Kinematic/ParticleForces/Drag/DistortedSphereDrag/DistortedSphereDragForce.C
  9. +7 −14 ...termediate/submodels/Kinematic/ParticleForces/Drag/DistortedSphereDrag/DistortedSphereDragForce.H
  10. +12 −46 ...rangian/intermediate/submodels/Kinematic/ParticleForces/Drag/ErgunWenYuDrag/ErgunWenYuDragForce.C
  11. +11 −16 ...rangian/intermediate/submodels/Kinematic/ParticleForces/Drag/ErgunWenYuDrag/ErgunWenYuDragForce.H
  12. +4 −14 ...agrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/NonSphereDrag/NonSphereDragForce.C
  13. +26 −40 ...agrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/NonSphereDrag/NonSphereDragForce.H
  14. +16 −44 ...termediate/submodels/Kinematic/ParticleForces/Drag/PlessisMasliyahDrag/PlessisMasliyahDragForce.C
  15. +12 −17 ...termediate/submodels/Kinematic/ParticleForces/Drag/PlessisMasliyahDrag/PlessisMasliyahDragForce.H
  16. +92 −0 ...termediate/submodels/Kinematic/ParticleForces/Drag/SchillerNaumannDrag/SchillerNaumannDragForce.C
  17. +127 −0 ...termediate/submodels/Kinematic/ParticleForces/Drag/SchillerNaumannDrag/SchillerNaumannDragForce.H
  18. +4 −8 src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/SphereDrag/SphereDragForce.C
  19. +15 −7 src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/SphereDrag/SphereDragForce.H
  20. +24 −36 src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/WenYuDrag/WenYuDragForce.C
  21. +21 −17 src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/WenYuDrag/WenYuDragForce.H
  22. +3 −3 src/lagrangian/spray/parcels/derived/basicSprayParcel/makeBasicSprayParcelSubmodels.C
  23. +1 −0 tutorials/lagrangian/DPMFoam/Goldschmidt/constant/kinematicCloudProperties
  24. +1 −0 tutorials/lagrangian/MPPICFoam/Goldschmidt/constant/kinematicCloudProperties
  25. +1 −0 tutorials/lagrangian/MPPICFoam/column/constant/kinematicCloudProperties
  26. +1 −0 tutorials/lagrangian/MPPICFoam/cyclone/constant/kinematicCloudProperties
  27. +1 −0 tutorials/lagrangian/MPPICFoam/injectionChannel/constant/kinematicCloudProperties
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -28,7 +28,7 @@ License
#include "makeParcelCloudFunctionObjects.H"

// Kinematic
#include "makeThermoParcelForces.H" // thermo variant
#include "makeParcelForces.H"
#include "makeParcelDispersionModels.H"
#include "makeReactingMultiphaseParcelInjectionModels.H" // MP variant
#include "makeParcelPatchInteractionModels.H"
@@ -51,7 +51,7 @@ License
makeParcelCloudFunctionObjects(basicReactingMultiphaseCloud);

// Kinematic sub-models
makeThermoParcelForces(basicReactingMultiphaseCloud);
makeParcelForces(basicReactingMultiphaseCloud);
makeParcelDispersionModels(basicReactingMultiphaseCloud);
makeReactingMultiphaseParcelInjectionModels(basicReactingMultiphaseCloud);
makeParcelPatchInteractionModels(basicReactingMultiphaseCloud);
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -28,7 +28,7 @@ License
#include "makeParcelCloudFunctionObjects.H"

// Kinematic
#include "makeThermoParcelForces.H" // thermo variant
#include "makeParcelForces.H"
#include "makeParcelDispersionModels.H"
#include "makeReactingParcelInjectionModels.H" // Reacting variant
#include "makeParcelPatchInteractionModels.H"
@@ -47,7 +47,7 @@ License
makeParcelCloudFunctionObjects(basicReactingCloud);

// Kinematic sub-models
makeThermoParcelForces(basicReactingCloud);
makeParcelForces(basicReactingCloud);
makeParcelDispersionModels(basicReactingCloud);
makeReactingParcelInjectionModels(basicReactingCloud);
makeParcelPatchInteractionModels(basicReactingCloud);
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -28,7 +28,7 @@ License
#include "makeParcelCloudFunctionObjects.H"

// Kinematic
#include "makeThermoParcelForces.H" // thermo variant
#include "makeParcelForces.H"
#include "makeParcelDispersionModels.H"
#include "makeParcelInjectionModels.H"
#include "makeParcelPatchInteractionModels.H"
@@ -43,7 +43,7 @@ License
makeParcelCloudFunctionObjects(basicThermoCloud);

// Kinematic sub-models
makeThermoParcelForces(basicThermoCloud);
makeParcelForces(basicThermoCloud);
makeParcelDispersionModels(basicThermoCloud);
makeParcelInjectionModels(basicThermoCloud);
makeParcelPatchInteractionModels(basicThermoCloud);
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -30,6 +30,7 @@ License

#include "SphereDragForce.H"
#include "NonSphereDragForce.H"
#include "SchillerNaumannDragForce.H"
#include "WenYuDragForce.H"
#include "ErgunWenYuDragForce.H"
#include "PlessisMasliyahDragForce.H"
@@ -53,6 +54,7 @@ License
makeParticleForceModel(CloudType); \
makeParticleForceModelType(SphereDragForce, CloudType); \
makeParticleForceModelType(NonSphereDragForce, CloudType); \
makeParticleForceModelType(SchillerNaumannDragForce, CloudType); \
makeParticleForceModelType(WenYuDragForce, CloudType); \
makeParticleForceModelType(ErgunWenYuDragForce, CloudType); \
makeParticleForceModelType(PlessisMasliyahDragForce, CloudType); \

This file was deleted.

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


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

0 comments on commit 081db9a

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