mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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.
This commit is contained in:
committed by
Andrew Heather
parent
3f5103235e
commit
076cf421f3
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user