## AMR in interDyMFoam with CrankNicolson is buggy

When using ddtSchemes "CrankNicolson 0.9" with AMR (dynamicRefineFvMesh), the solution does not make sense. Only the ddtSchemes "Euler" works fine.

A test case can be provided on demand.

# Some hints below (these suggestions might not be right !!)

The problem might be linked to applications/solvers/multiphase/VoF/alphaEqn.H where there are these lines :

` 55 // Set the time blending factor, 1 for Euler 56 scalar cnCoeff = 1.0/(1.0 + ocCoeff); 57 [...] 91 tmp<surfaceScalarField> phiCN(phi); 92 93 // Calculate the Crank-Nicolson off-centred volumetric flux 94 if (ocCoeff > 0) 95 { 96 phiCN = cnCoeff*phi + (1.0 - cnCoeff)*phi.oldTime(); 97 }`

where ocCoeff seems to be the CrankNicolson coefficient entered by the user in the fvSchemes (e.g. 0.9).

The line 96 initializes phiCN with a linear combination of phi and phi.oldTime. But, phi and phi.oldTime might correspond to a different number of mesh faces because of the AMR.

## Reattaching the author to the issue ticket: @Lionel.Gamet ##