Skip to content

anisotropic_sky: is albedo intentionally not applied to the diffuse part of sunlit_surface? #137

Description

@songololo

Hello, a question about an expression in anisotropic_sky.py, since the intent is not obvious from the code alone.

The reflected shortwave from sunlit building surfaces is:

sunlit_surface = ((albedo * (radI * np.cos(solar_altitude * deg2rad)) + (radD * 0.5)) / np.pi)

The parentheses close after the direct-beam term, so albedo scales only radI * cos(alt); the diffuse part radD * 0.5 enters unscaled. The companion line for shaded surfaces does apply albedo to the same diffuse term:

shaded_surface = ((albedo * radD * 0.5) / np.pi)

Reading the two together, the intended form might be:

sunlit_surface = (albedo * (radI * np.cos(solar_altitude * deg2rad) + radD * 0.5)) / np.pi

With a wall albedo of 0.2 the current expression makes the diffuse contribution to the sunlit-surface reflection five times larger than the shaded-surface treatment would suggest. It only touches the sunlit-patch reflection term, so the overall effect is bounded, but it is systematic whenever the sun is up.

Is the current form intended? If there is a physical basis for reflecting the diffuse component without the albedo factor on sunlit surfaces, a short comment in the code would settle it for future readers. If it is a typo, a one-line PR is no problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions