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
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.
Unfortunately, we don’t do that for the density. Since this is a two-phase solver, I assume that your density field is called differently. What if you hard-code the name that this solver uses into lines 63 and 65 of ForceBase.C? You would then need to rebuild the adapter.
Does this mean that the current adapter does not support compressibleInterFoam?
Or I can specify density fields with different names in the FSI dictionary?
In the official OpenFoam example, there is no density field in the 0 folder, instead of the density field name is not “rho”.
I also didn’t see the definition of rho in the compressibleInterFoam solver, but I did see rhoPhi in CreateFields.H
I checked, and neither was the folder in the later time directories. I still haven’t figured out how the compressibleInterFoam handles the density field.