Skip to content
Snippets Groups Projects
Commit 3620876a authored by Henry Weller's avatar Henry Weller Committed by Andrew Heather
Browse files

CollidingCloud: Allow instantiation of the NoCollision model for steady-state operation

parent 62e3d373
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment