atmosphericModels using incorrect value for groundMin
Summary
When using the atmosphericModels library, the value groundMin is added to the log law equation to prevent Z value to be below 0. It appears that the groundMin value used is the minimum value of Z in the entire computation domain, as opposed to the patch where the ABL is applied.
Steps to reproduce
Create a computational domain, where the exterior edges's z = 0, and inside the domain, have a protrusion below ground, where z is less than 0.
When measuring the ABLInlet U value at the inlet, the profile will be calculated using the groundMin value of the protrusion, instead of the minimum z height of the patch. This, unfortunately, changes the profile at the inlet, tho the results may still be ok if a wall function is applied and enough distance between the inlet and object of interest is provided.
Possible fixes
I believe this line of code may be the culprit: atmBoundaryLayer.C#L72
Where:
ppMin_((boundBox(pp.points())).min()),
refers to the globalPoints (all points in domain), as opposed to all points in the patch.
I believe changing that line to:
ppMin_((boundBox(pp.localPoints())).min()),
will fix the issue.