Skip to content

variableHeightFlowRateInletVelocity & dynamic meshes

Summary

A colleague (Bernardas Jankauskas) and I have been investigating a problem where variableHeightFlowRateInletVelocity doesn't seem to work with dynamic meshes. The problem has also been mentioned on CFD Online by another user.

Steps to reproduce

  1. Copy the weirOverflow tutorial for interFoam
  2. Add a constant/dynamicMeshDict file
  3. Add a 0.orig/pointDisplacement file
  4. Amend system/fvSolution to include a solver for cellDisplacement
  5. Run without making any changes to the boundary condition (it crashes)
  6. Run after changing value in the inlet boundary condition in 0.orig/alpha.water to 0.000001 (it doesn't crash)

Example case

weirOverflow.zip

What is the current bug behaviour?

Divide by zero on this line

What is the expected correct behavior?

It shouldn't divide by zero

Relevant logs

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in /lib64/libpthread.so.0
#3  Foam::variableHeightFlowRateInletVelocityFvPatchVectorField::updateCoeffs() at ??:?
#4  Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::Boundary::evaluate() at ??:?
#5  Foam::dynamicMotionSolverFvMesh::update() at ??:?
#6  ? at ??:?
#7  __libc_start_main in /lib64/libc.so.6
#8  ? at ??:?

Environment information

  • OpenFOAM version: v2112

Possible fixes

(alphap + VSMALL) but that wouldn't explain why it thinks alphap is zero only when a dynamic mesh is used?