sunpeek.components.physical.HeatMeter#
- class sunpeek.components.physical.HeatMeter(name=None, plant=None, arrays=None, fluid_solar=None, sensor_map=None, **kwargs)#
Bases:
ComponentImplements a heat meter as the measured performance boundary for one or more collector arrays.
Heat meters are the natural component for measured thermal output sensors. Power Check evaluations can use them to compare the measured thermal power of a group of arrays with the sum of those arrays’ estimated power. Arrays may be associated with multiple heat meters, for example when individual field meters and a combined plant-level meter are both available.
- Variables:
name (
str) – Name of the heat meter. Must be unique within a plant.plant (
Plant) – Plant to which the heat meter belongs.arrays (
list[Array]) – Arrays measured by this heat meter.tp (
Sensor) – Thermal power measured by the heat meter, or a virtual sensor calculated from flow and temperatures.en (
Sensor) – Thermal energy / yield measured by the heat meter.te_out (vf, mf, te_in,) – Flow and temperature measurements used to calculate thermal power if no direct power sensor is mapped.
Methods
__init__([name, plant, arrays, fluid_solar, ...])A simple constructor that allows initialization from kwargs.
add_array(arrays)Convenience method for adding arrays measured by this heat meter.
add_component_attr(name[, unit, minimum, ...])all_subclasses([c])define_component_attrs()get_component_attribute(name)get_default_unit(name)Return default unit of a class attribute defined as ComponentParam.
get_raw_sensor(str_map[, raise_if_not_found])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)- add_array(arrays)#
Convenience method for adding arrays measured by this heat meter.
- classmethod get_default_unit(name)#
Return default unit of a class attribute defined as ComponentParam.
- Return type:
- 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:
- 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:
- 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:
- 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 nameofthe component selftowhich the virtual sensor will be mapped.)feedback (
CoreMethodFeedback,problems reported at config time,priortovsensor calculation.)
- set_sensors(**kwargs)#
Maps one or multiple sensors (by calling
map_sensor()) and handles configuring virtual sensors.