Skip to content

propellerInfo function object cannot find MRFProperties file

Summary

When using rotationMode MRF; in propellerInfo function object MRFProperties file is not found even if it exists in constant/MRFProperties

Steps to reproduce

  1. Modify propellerInfo file to use MRFProperties and run simpleFoam -postProcess
  2. It produces an error below.

What is the current bug behaviour?

Running for example simpleFoam -postProcess produces error below.

--> FOAM FATAL IO ERROR: (openfoam-2206)
Unable to find MRFProperties in the database. Is this an MRF case?

What is the expected correct behavior?

No errors and function object executed successfully.

Environment information

  • OpenFOAM version : v2206|v2112
  • Operating system : ubuntu 22.04

Possible fixes

const auto* MRFZones =
                new IOMRFZoneList(mesh_);

Using this code instead of the code below fixes the issue, but I think there might be a better way to do it, as I'm not OpenFOAM programming expert.

const auto* MRFZones =
                mesh_.cfindObject<IOMRFZoneList>("MRFProperties");

https://develop.openfoam.com/Development/openfoam/-/blob/master/src/functionObjects/forces/propellerInfo/propellerInfo.C#L82

https://develop.openfoam.com/Development/openfoam/-/blob/master/src/functionObjects/forces/propellerInfo/propellerInfo.C#L148