View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002551 | OpenFOAM | Bug | public | 2017-05-16 02:51 | 2017-05-18 16:33 |
Reporter | morefool | Assigned To | henry | ||
Priority | normal | Severity | trivial | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Summary | 0002551: Foam::sixDoFRigidBodyMotion::updateAcceleration implementation does not fit the specification | ||||
Description | the implementation reads void Foam::sixDoFRigidBodyMotion::updateAcceleration ( const vector& fGlobal, const vector& tauGlobal ) { static bool first = false; // Save the previous iteration accelerations for relaxation vector aPrevIter = a(); vector tauPrevIter = tau(); // Calculate new accelerations a() = fGlobal/mass_; tau() = (Q().T() & tauGlobal); applyRestraints(); // Relax accelerations on all but first iteration if (!first) { a() = aRelax_*a() + (1 - aRelax_)*aPrevIter; tau() = aRelax_*tau() + (1 - aRelax_)*tauPrevIter; } first = false; } where the accelerations is always relaxed. However, according to the comments, the accelerations are relaxed on all but the first iteration and it would be implemented as void Foam::sixDoFRigidBodyMotion::updateAcceleration ( const vector& fGlobal, const vector& tauGlobal ) { static bool first = true; // Save the previous iteration accelerations for relaxation vector aPrevIter = a(); vector tauPrevIter = tau(); // Calculate new accelerations a() = fGlobal/mass_; tau() = (Q().T() & tauGlobal); applyRestraints(); // Relax accelerations on all but first iteration if (!first) { a() = aRelax_*a() + (1 - aRelax_)*aPrevIter; tau() = aRelax_*tau() + (1 - aRelax_)*tauPrevIter; } else { first = false; } } | ||||
Tags | No tags attached. | ||||