sunpeek.components.physical.MountingSingleAxis#

class sunpeek.components.physical.MountingSingleAxis(axis_azimuth=None, max_angle=None, name=None, plant=None, sensor_map=None)#

Bases: Mounting

Mounting class for single-axis tracking solar collector installations.

For single-axis tracking, surface_tilt and surface_azimuth are time-varying and calculated from the sun position using pvlib.tracking.singleaxis().

The axis_tilt and cross_axis_tilt are automatically calculated from the array’s ground_tilt and ground_azim using pvlib algorithms via update_singleaxis_properties().

Parameters:
  • axis_azimuth (pint.Quantity) – Azimuth angle of the rotation axis. North=0, East=90, South=180, West=270. Can be specified in any direction (0-360 degrees), but will be internally normalized to point more towards south (90-270 degrees) for pvlib compatibility.

  • max_angle (pint.Quantity, optional) – Maximum rotation angle of the tracker from horizontal position (0-90 degrees). Default is 90 degrees.

  • name (str, optional) – Name of the mounting configuration.

Variables:
  • axis_tilt (pint.Quantity) – Tilt angle of the rotation axis from horizontal (0-90 degrees). Automatically calculated from ground parameters, not set during initialization.

  • cross_axis_tilt (pint.Quantity) – Cross-axis tilt angle. Automatically calculated from ground parameters.

Methods

__init__([axis_azimuth, max_angle, name, ...])

A simple constructor that allows initialization from kwargs.

add_component_attr(name[, unit, minimum, ...])

all_subclasses([c])

define_component_attrs()

get_axis_tilt__pvlib_algo(ground_tilt, ...)

Calculates the axis tilt using the pvlib algorithm based on ground parameters and the axis azimuth.

get_component_attribute(name)

get_cross_axis_tilt__pvlib_algo(ground_tilt, ...)

Calculates the cross axis tilt using pvlib method pvlib.tracking.calc_cross_axis_tilt.

get_default_unit(name)

Return default unit of a class attribute defined as ComponentParam.

get_raw_sensor(str_map[, raise_if_not_found])

get_real_slots()

Get component's slot names for (possibly or always) real (not virtual) sensors

has_virtual_slot_named(slot_name)

Assert component has a (possibly or always) virtual sensor slot named slot_name.

is_attrib_missing(attrib_name)

Return True if component attribute is None or not a ComponentParam holding a Quantity.

is_real_sensor_missing(slot_name, check_mode)

Like is_sensor_missing, but additionally checks if sensor in named slot is real (not virtual).

is_sensor_missing(slot_name, check_mode)

Return True if component slot has no sensor mapped or sensor is not ready for calculations.

map_sensor(sensor, slot_name)

Maps sensor to slot_name of given component, including some sanity checks.

map_vsensor(slot_name, feedback)

Create virtual Sensor and map it to component.slot_name, or map None if it cannot be calculated.

register_callback(callback_type, func)

set_component_attribute(name, value, array_type)

set_sensors(**kwargs)

Maps one or multiple sensors (by calling map_sensor()) and handles configuring virtual sensors.

update_sensors(is_remove)

update_singleaxis_properties(ground_tilt, ...)

Updates the axis_tilt and cross_axis_tilt properties of a single-axis mounting system based on the specified ground tilt and azimuth.

get_axis_tilt__pvlib_algo(ground_tilt, ground_azim)#

Calculates the axis tilt using the pvlib algorithm based on ground parameters and the axis azimuth. The axis tilt is computed to align with the provided ground azimuth and tilt values.

Parameters:
  • ground_tilt (pint.Quantity) – The tilt angle of the ground surface. Measured in degrees.

  • ground_azim (pint.Quantity) – The azimuth angle of the ground surface. Measured in degrees.

Returns:

The calculated axis tilt is a dimensioned quantity in degrees. Defined by pvlib as the angle, relative to horizontal, of the line formed by the intersection between the slope containing the tracker axes and a plane perpendicular to the tracker axes.

Return type:

pint.Quantity

get_cross_axis_tilt__pvlib_algo(ground_tilt, ground_azim, axis_tilt)#

Calculates the cross axis tilt using pvlib method pvlib.tracking.calc_cross_axis_tilt. The algorithm is based on ground parameters and orientation of the tracking axis (azimuth and tilt). The cross axis tilt is the angle, relative to horizontal, of the line formed by the intersection between the slope containing the tracker axes and a plane perpendicular to the tracker axes [degrees].

Parameters:
  • ground_tilt (pint.Quantity) – The ground slope tilt in degrees, provided as a quantity object.

  • ground_azim (pint.Quantity) – The ground slope azimuth in degrees, provided as a quantity object.

  • axis_tilt (pint.Quantity) – tilt of trackers relative to horizontal. axis_tilt must be >= 0 and <= 90. [degree]

Returns:

The computed cross-axis tilt in degrees, returned as a quantity object. Defined by pvlib as the angle, relative to horizontal, of the line formed by the intersection between the slope containing the tracker axes and a plane perpendicular to the tracker axes.

Return type:

pint.Quantity

classmethod get_default_unit(name)#

Return default unit of a class attribute defined as ComponentParam.

Return type:

str

classmethod get_real_slots()#

Get component’s slot names for (possibly or always) real (not virtual) sensors

has_virtual_slot_named(slot_name)#

Assert component has a (possibly or always) virtual sensor slot named slot_name.

is_attrib_missing(attrib_name)#

Return True if component attribute is None or not a ComponentParam holding a Quantity.

Return type:

bool

is_real_sensor_missing(slot_name, check_mode)#

Like is_sensor_missing, but additionally checks if sensor in named slot is real (not virtual).

Return type:

bool

is_sensor_missing(slot_name, check_mode)#

Return True if component slot has no sensor mapped or sensor is not ready for calculations.

Return type:

bool

map_sensor(sensor, slot_name)#

Maps sensor to slot_name of given component, including some sanity checks.

map_vsensor(slot_name, feedback)#

Create virtual Sensor and map it to component.slot_name, or map None if it cannot be calculated.

Parameters:
  • slot_name (str, slot / channel name of the component self to which the virtual sensor will be mapped.)

  • feedback (CoreMethodFeedback, problems reported at config time, prior to vsensor calculation.)

set_sensors(**kwargs)#

Maps one or multiple sensors (by calling map_sensor()) and handles configuring virtual sensors.

update_singleaxis_properties(ground_tilt, ground_azim)#

Updates the axis_tilt and cross_axis_tilt properties of a single-axis mounting system based on the specified ground tilt and azimuth. This function performs calculations to derive the appropriate tilt angles based on the input and current state of the mounting system. If specific conditions are met, it resets related tilts to zero or assigns default values.

Parameters:
  • ground_tilt (pint.Quantity) – The tilt of the ground in degrees. This parameter is used to calculate the primary and cross-axis tilts for the mounting system. If ground_tilt is 0 degrees, special cases for tilt initialization will be applied.

  • ground_azim (pint.Quantity) – The azimuth of the ground, typically measured in degrees. It represents the directional orientation of the ground for determining the axis tilt. If not None, it must be a pint.Quantity instance.

Raises:

ValueError – If an undefined case is encountered that does not match the expected input conditions. This error highlights scenarios not yet handled in the logic.