Commit 9427d134 by Henry Weller

### sixDoFRigidBodyMotion: Time integration now switches between symplectic and Crank-Nicolson

```For explicit motion (and the first iteration of iterative motion
correction) the 2nd-order symplectic motion integrator is used.

For iterative correction a form of lagged Crank-Nicolson is used in
which the current time-step values correspond to the current iteration.
This converges to a 2nd-order implicit solution.```
parent d3e5ea49
 ... ... @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License ... ... @@ -204,18 +204,14 @@ void sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs() const pointPatch& ptPatch = this->patch(); // Store the motion state at the beginning of the time-step bool firstIter = false; if (curTimeIndex_ != t.timeIndex()) { motion_.newTime(); curTimeIndex_ = t.timeIndex(); firstIter = true; } // Patch force data is valid for the current positions, so // calculate the forces on the motion object from this data, then // update the positions motion_.updatePosition(t.deltaTValue(), t.deltaT0Value()); dictionary forcesDict; forcesDict.add("type", forces::typeName); ... ... @@ -228,6 +224,11 @@ void sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs() f.calcForcesMoment(); // Patch force data is valid for the current positions, so // calculate the forces on the motion object from this data, then // update the positions motion_.updatePosition(firstIter, t.deltaTValue(), t.deltaT0Value()); // Get the forces on the patch faces at the current positions if (lookupGravity_ == 1) ... ... @@ -243,9 +244,11 @@ void sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs() motion_.updateAcceleration ( firstIter, ramp*(f.forceEff() + motion_.mass()*g_), ramp*(f.momentEff() + motion_.mass()*(motion_.momentArm() ^ g_)), t.deltaTValue() t.deltaTValue(), t.deltaT0Value() ); Field::operator= ... ...
 ... ... @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License ... ... @@ -152,13 +152,15 @@ void uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs() const Time& t = mesh.time(); // Store the motion state at the beginning of the time-step bool firstIter = false; if (curTimeIndex_ != t.timeIndex()) { motion_.newTime(); curTimeIndex_ = t.timeIndex(); firstIter = true; } motion_.updatePosition(t.deltaTValue(), t.deltaT0Value()); motion_.updatePosition(firstIter, t.deltaTValue(), t.deltaT0Value()); vector gravity = vector::zero; ... ... @@ -173,9 +175,11 @@ void uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs() // Do not modify the accelerations, except with gravity, where available motion_.updateAcceleration ( firstIter, gravity*motion_.mass(), vector::zero, t.deltaTValue() t.deltaTValue(), t.deltaT0Value() ); Field::operator= ... ...