View Issue Details

IDProjectCategoryView StatusLast Update
0001779OpenFOAMBugpublic2015-10-12 21:37
Reporterjkau Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version15.04
Summary0001779: Stability of sixDoFRigidBodyMotion
DescriptionThis is somehow related to report 0001763.
I think in "sixDoFRigidBodyMotionSolver::solve()" and "sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs()" resp. updatePosition should be called after update acceleration, otherwise one gets hardly convergence within one timestep. With this modification, one can also increase the acceleration relaxation factor to higher values to obtain faster convergence without stability issues. With the original formulation, stability even decreases with increasing outer iterations!
The attached example is from: http://www.cfd-online.com/Forums/openfoam-solving/153783-interdymfoam-floating-object-snappyhexmesh-not-solving.html
It not a perfect test case, but should be good enough to demonstrate the general problem. Just run for one time step with high number of outer iterations.
Steps To ReproduceDownload attached file float3.tgz
extract with 'tar xvzf float.tgz'
run Allrun
run the case with interDyMFoam for one time step with something like 20 outer iterations
plot the Linear or Angular velocity vs. iterations, e.g. in gnuplot:

p "<grep Linear log.interDyMFoam | awk '{print FNR,$5}' | tr -d '()'" w l

Modify sixDoFRigidBodyDisplacementPointPatchVectorField.C as desribed in Description.
Run again. See (different) convergence of linear and angular velocity.
TagsNo tags attached.

Activities

jkau

2015-07-09 13:03

reporter  

float3.tgz (24,714 bytes)

henry

2015-07-09 13:42

manager   ~0005056

The ordering of updatePosition and update acceleration relates to the specification of the method to conserve both linear and angular momentum using a leap-frog approach. However, the method is explicit and should be called once per time-step. It is not clear how the method should be adapted to conserve both linear and angular momentum when applied iteratively with relaxation and also to maximize convergence rate. It would be useful if someone would analyse the method in detail and propose an alternative formulation which has the desired behavior.

jkau

2015-07-09 14:22

reporter   ~0005058

Ok, thanks for the feedback. I hope, I will find some time to go into details and can propose an alternative formulation.

henry

2015-10-09 17:50

manager   ~0005387

I have tested your proposal on some simple cases with analytical solutions and the results are TERRIBLE!

While the simplectic nature of the algorithm is slightly compromised by iterating within a time-step the error is small and does not accumulate. However, changing the order of update of the velocity, acceleration and position completely destroys the algorithm resulting in serious phase and amplitude errors in all variables.

In order construct an more stable algorithm consistent with iteration over the force and position updates the current simplectic approach would need to be completely replaced. If you have time to work on this please re-open this report with the details when you have something working.

henry

2015-10-12 21:37

manager   ~0005389

commit 57c32b05036b9157ce6de2cd8fd1f1b5e8523368
Author: Henry Weller <http://cfd.direct>
Date: Mon Oct 12 21:27:42 2015 +0100

    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.

Issue History

Date Modified Username Field Change
2015-07-09 13:03 jkau New Issue
2015-07-09 13:03 jkau File Added: float3.tgz
2015-07-09 13:42 henry Note Added: 0005056
2015-07-09 14:22 jkau Note Added: 0005058
2015-10-09 17:50 henry Note Added: 0005387
2015-10-09 17:50 henry Status new => closed
2015-10-09 17:51 henry Assigned To => henry
2015-10-09 17:51 henry Resolution open => fixed
2015-10-12 21:37 henry Note Added: 0005389