Commit e811fd25 authored by Henry Weller's avatar Henry Weller Committed by Andrew Heather
Browse files

cloudSolution: Check consistency between the transient option

and the continuous-phase simulation type

For LTS and steady-state simulations the transient option does not need to be
provided as only steady-state tracking is appropriate.  For transient running
the Lagrangian tracking may be steady or transient.
parent 7280f0ad
......@@ -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 "cloudSolution.H"
#include "Time.H"
#include "localEulerDdtScheme.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
......@@ -119,7 +120,31 @@ Foam::cloudSolution::~cloudSolution()
void Foam::cloudSolution::read()
{
dict_.lookup("transient") >> transient_;
// For transient runs the Lagrangian tracking may be transient or steady
transient_ = dict_.lookupOrDefault("transient", false);
// For LTS and steady-state runs the Lagrangian tracking cannot be transient
if (transient_)
{
if (fv::localEulerDdt::enabled(mesh_))
{
IOWarningInFunction(dict_)
<< "Transient tracking is not supported for LTS"
" simulations, switching to steady state tracking."
<< endl;
transient_ = false;
}
if (mesh_.steady())
{
IOWarningInFunction(dict_)
<< "Transient tracking is not supported for steady-state"
" simulations, switching to steady state tracking."
<< endl;
transient_ = false;
}
}
dict_.lookup("coupled") >> coupled_;
dict_.lookup("cellValueSourceCorrection") >> cellValueSourceCorrection_;
dict_.readIfPresent("maxCo", maxCo_);
......
......@@ -19,7 +19,6 @@ solution
{
active yes;
transient no; // yes;
calcFrequency 10;
maxTrackTime 5.0;
maxCo 0.3;
......
......@@ -19,7 +19,6 @@ solution
{
active yes;
transient no; // yes;
calcFrequency 10;
maxTrackTime 5.0;
maxCo 0.3;
......
Markdown is supported
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