CollidingCloud: Allow instantiation of the NoCollision model for steady-state operation
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,6 +25,7 @@ License
|
||||
|
||||
#include "CollidingCloud.H"
|
||||
#include "CollisionModel.H"
|
||||
#include "NoCollision.H"
|
||||
|
||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||
|
||||
@ -95,13 +96,6 @@ Foam::CollidingCloud<CloudType>::CollidingCloud
|
||||
constProps_(this->particleProperties()),
|
||||
collisionModel_(nullptr)
|
||||
{
|
||||
if (this->solution().steadyState())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Collision modelling not currently available for steady state "
|
||||
<< "calculations" << exit(FatalError);
|
||||
}
|
||||
|
||||
if (this->solution().active())
|
||||
{
|
||||
setModels();
|
||||
@ -111,6 +105,17 @@ Foam::CollidingCloud<CloudType>::CollidingCloud
|
||||
parcelType::readFields(*this);
|
||||
this->deleteLostParticles();
|
||||
}
|
||||
|
||||
if
|
||||
(
|
||||
this->solution().steadyState()
|
||||
&& !isType<NoCollision<CollidingCloud<CloudType>>>(collisionModel_())
|
||||
)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Collision modelling not currently available "
|
||||
<< "for steady state calculations" << exit(FatalError);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user