Problem "Did not find the correct rho." Using compressibleInterFoam base on OpenFoam-9 couple with solids4foam

Hello, I am trying to run a simulation by using compressibleInterFoam base on OpenFoam-9 couple with solids4foam. it’s a simple coupling case between depthCharge2D and perpendicular-flap, which both of them coming from official tutorials.

But in the fluid terminal show an error " Did not find the correct rho. ", and " From function Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > preciceAdapter::FSI::ForceBase::rho() const
in file FSI/ForceBase.C at line 85.
"

I check out the source code of openfoam-adapter which located in FSI/ForceBase.C at line 85.
It seems need to find a field rho in compressible problem,but there is not a rho field in the folder 0.

This problem has been bothering me for two weeks, I don’t know why


Hi zeng,

I think the rho is in the preciseDict file, you can check if the rho is set correctly.

Hello Gong,
I have checked the preciceDict and set solverType to compressible in the FSI subdictionary, which seems to not specify the rho fields according to the ForceBase.C description.