rhoCentralDyMFoam + maxwellSlipU = Crash
rhoCentralDyMFoam to simulate a case with dynamic mesh and
maxwellSlipU boundary condition results in immediate crash at the first time step.
Steps to reproduce
Take the movingCone tutorial case for
rhoCentralDyMFoam and change one of the slip boundary conditions for U to
maxwellSlipU. Start the simulation.
Here movingCone.zip is said movingCone tutorial case with maxwellSlipU boundary condition. Just create the mesh with
blockMesh and use
rhoCentralDyMFoam to start the simulation.
- OpenFOAM version : v2006, v2012
- Operating system : Linux
- Compiler : GCC
The reason for the crash is as following: at the beginning of the time loop, mesh.update() is called, where the velocity boundary field is updated: U.correctBoundaryConditions(). There, the maxwellSlipU boundary condition is called looking for the volTensorField tauMC. However, this volTensorField is created inside the time loop of rhoCentralDyMFoam after (!) mesh.update() is called. Therefore, it cannot be found.
A simple fix would be to create the volTensorField tauMC in createFields.H and then update it at its current position. Therefore, it would be present when mesh.update() calls the maxwellSlipU boundary condition at the very first time step.