atmosphericModels using incorrect value for groundMin
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.
I believe this line of code may be the culprit: atmBoundaryLayer.C#L72
refers to the globalPoints (all points in domain), as opposed to all points in the patch.
I believe changing that line to:
will fix the issue.