Skip to content
Snippets Groups Projects
Commit ad789e23 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

parent 64477972
Branches
Tags
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -273,7 +273,7 @@ void Foam::sixDoFRigidBodyMotion::updateAcceleration ...@@ -273,7 +273,7 @@ void Foam::sixDoFRigidBodyMotion::updateAcceleration
const vector& tauGlobal const vector& tauGlobal
) )
{ {
static bool first = false; static bool first = true;
// Save the previous iteration accelerations for relaxation // Save the previous iteration accelerations for relaxation
vector aPrevIter = a(); vector aPrevIter = a();
...@@ -290,9 +290,11 @@ void Foam::sixDoFRigidBodyMotion::updateAcceleration ...@@ -290,9 +290,11 @@ void Foam::sixDoFRigidBodyMotion::updateAcceleration
a() = aRelax_*a() + (1 - aRelax_)*aPrevIter; a() = aRelax_*a() + (1 - aRelax_)*aPrevIter;
tau() = aRelax_*tau() + (1 - aRelax_)*tauPrevIter; tau() = aRelax_*tau() + (1 - aRelax_)*tauPrevIter;
} }
else
{
first = false; first = false;
} }
}
void Foam::sixDoFRigidBodyMotion::update void Foam::sixDoFRigidBodyMotion::update
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment