From 8bfcd34ffe2f3a3234c23a619a9849fe73b38329 Mon Sep 17 00:00:00 2001 From: Vuko Vukcevic Date: Thu, 12 Jul 2018 13:36:39 +0200 Subject: [PATCH] Bugfix in periodicOscillation::stabilise Added missing motion amplitude and velocity amplitude when stabilising the constraint. --- .../periodicOscillation/periodicOscillation.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ODE/sixDOF/sixDOFODE/constraints/translationalConstraints/periodicOscillation/periodicOscillation.C b/src/ODE/sixDOF/sixDOFODE/constraints/translationalConstraints/periodicOscillation/periodicOscillation.C index 4eee40b9e..fafbc66e9 100644 --- a/src/ODE/sixDOF/sixDOFODE/constraints/translationalConstraints/periodicOscillation/periodicOscillation.C +++ b/src/ODE/sixDOF/sixDOFODE/constraints/translationalConstraints/periodicOscillation/periodicOscillation.C @@ -131,7 +131,7 @@ void Foam::periodicOscillation::stabilise x -= (x & dir_)*dir_; // ... then add the correct displacement - x += dir_*sin(omega_*t + phi_); + x += dir_*a_*sin(omega_*t + phi_); // Set the velocity according to periodic oscillation @@ -140,7 +140,7 @@ void Foam::periodicOscillation::stabilise u -= (u & dir_)*dir_; // ... then add the correct velocity - u += dir_*cos(omega_*t + phi_); + u += dir_*a_*omega_*cos(omega_*t + phi_); }