solidDisplacementFoam: Correct handling of the re-reading of the controls

when the fvSolution file is changed during the run

Resolves bug-report https://bugs.openfoam.org/view.php?id=3498
This commit is contained in:
Henry Weller
2020-05-25 11:08:59 +01:00
parent 4d73bfad2a
commit cf36a5de3c
4 changed files with 14 additions and 7 deletions

View File

@ -1,3 +1,8 @@
nCorr = stressControl.lookupOrDefault<int>("nCorrectors", 1);
convergenceTolerance = stressControl.lookup<scalar>("D");
stressControl.lookup("compactNormalStress") >> compactNormalStress;
{
const dictionary& stressControl =
mesh.solutionDict().subDict("stressAnalysis");
nCorr = stressControl.lookupOrDefault<int>("nCorrectors", 1);
convergenceTolerance = stressControl.lookup<scalar>("D");
stressControl.lookup("compactNormalStress") >> compactNormalStress;
}

View File

@ -1 +0,0 @@
const dictionary& stressControl = mesh.solutionDict().subDict("stressAnalysis");

View File

@ -1 +1,5 @@
scalar accFac(stressControl.lookup<scalar>("accelerationFactor"));
const scalar accFac
(
mesh.solutionDict().subDict("stressAnalysis")
.lookup<scalar>("accelerationFactor")
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,7 +48,6 @@ int main(int argc, char *argv[])
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControls.H"
#include "createFields.H"
#include "createFieldRefs.H"