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

BUG: sixDoFRigidBodyMotion: Corrected handling of acceleration update in first time-step

Resolves bug-report https://bugs.openfoam.org/view.php?id=2551
parent 5d3771a8
Branches
Tags
1 merge request!144Integration openfoam.org
......@@ -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
......@@ -273,7 +273,7 @@ void Foam::sixDoFRigidBodyMotion::updateAcceleration
const vector& tauGlobal
)
{
static bool first = false;
static bool first = true;
// Save the previous iteration accelerations for relaxation
vector aPrevIter = a();
......@@ -290,8 +290,10 @@ void Foam::sixDoFRigidBodyMotion::updateAcceleration
a() = aRelax_*a() + (1 - aRelax_)*aPrevIter;
tau() = aRelax_*tau() + (1 - aRelax_)*tauPrevIter;
}
first = false;
else
{
first = false;
}
}
......
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