Skip to content

[Bug]: Panel area calculation in solar_equations.py #4043

Description

@andrecguerreiro

What happened?

Hi,
The following code snippet is related to the calculation of installed module area:

    sensors_metadata_clean['area_installed_module_m2'] = np.where(sensors_metadata_clean['tilt_deg'] >= 5,
                                                                  sensors_metadata_clean.AREA_m2,
                                                                  roof_coverage * area_per_module_m2 *
                                                                (sensors_metadata_clean.AREA_m2 /
                                                                   module_flat_surface_area_m2))

The issue here is that if the panel module area is larger than the area of a sensor, the panel is still installed. Take as an example a panel module with area 2 $m^2$ for a sensor of 1 $m^2$:
area_installed_module_m2 = area_per_module_m2 * (AREA_m2 / module_flat_surface_area_m2) = 2*(1/1.87) = 1.06 $m^2$
So, for this case, the area of panel installed would be larger than the sensor area.
A possible solution could be:

    sensors_metadata_clean['area_installed_module_m2'] = np.where(sensors_metadata_clean['tilt_deg'] >= 5,
                                                                  sensors_metadata_clean.AREA_m2,
                                                                  roof_coverage * area_per_module_m2 *
                                                                np.floor(sensors_metadata_clean.AREA_m2 /
                                                                   module_flat_surface_area_m2))

Let me know your thoughts.

How can we reproduce this?

Ran photovoltaic.py in debugger with a breakpoint in solar_equations.py line 423.

Operating System

Windows

CEA Version

3.12.11

Additional information (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions