CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Bugs (
-   -   CrankNicholson returns wrong dimensions and sound speed when mesh is moving (

lillberg February 23, 2009 09:42

Hi, I've found that the fvc

I've found that the fvc::ddtPhiCorr(rUA, rho, U, phi) function returns wrong dimensions for CrankNicholson when the mesh is moving.

Also, the sound speed is approx. half the physical value for an planar acoustic wave when the mesh is moving and CN is used. Has nothing to do with ddtPhiCorr.

Looking at the source it seems that the handling of moving meshes is quite different from e.g. backward.

All other time schemes works Ok.

If mesh.update() is removed from the application code everything works fine.

Best regards


henry February 23, 2009 10:40

Which version of OpenFOAM are
Which version of OpenFOAM are you running and which solver?


lillberg February 23, 2009 12:44

Sorry, not used to posting bug
Sorry, not used to posting bugs ;-)

Latest git version

Home made solver for FSI using the couple manager


lillberg February 23, 2009 12:47

I didn't get the code truough
I didn't get the code truough but I'm pretty sure you could reproduce the problem by introducing a dynamicFvMesh and a mesh.update() in for example the coodles code.


lillberg February 23, 2009 14:53

Yepp, changing your ordinary c
Yepp, changing your ordinary coodles code by adding a dynamicFvMesh and doing mesh.update() at the same time as using CN timeScheme reproduces the bug.

I ran it on a simple 2D channel with slip walls, waveTransmissive outlet, an oscillating inlet velocity at 100 Hz and air as medium. The fvcDdtPhiCorr returns wrong dimensions, and if it's commented out the soundspeed is reduced to half its physical value.


lillberg April 29, 2009 05:24

Hi Henry,

Any news on this bug?


henry May 4, 2009 17:53


I haven't forgotten, it is still on my list of things to do and I will deal with it shortly.


All times are GMT -4. The time now is 08:32.