Thermal Storage Configuration Models

pydantic model encodapy.components.thermal_storage.thermal_storage_config.DataPointCalculationMethod[source]

Bases: DataPointGeneral

Model for datapoints of the controller component which define the calculation method.

Variables:
  • value – The value of the datapoint, which is a string representing the calculation method

  • unit – Optional unit of the datapoint, if applicable

  • time – Optional timestamp of the datapoint, if applicable

Show JSON schema
{
   "title": "DataPointCalculationMethod",
   "description": "Model for datapoints of the controller component which define the calculation method.\n\nAttributes:\n    value: The value of the datapoint, which is a string representing the calculation method\n    unit: Optional unit of the datapoint, if applicable\n    time: Optional timestamp of the datapoint, if applicable",
   "type": "object",
   "properties": {
      "value": {
         "$ref": "#/$defs/ThermalStorageCalculationMethods"
      }
   },
   "$defs": {
      "ThermalStorageCalculationMethods": {
         "description": "Enum for the calculation methods of the thermal storage service.\n\nMembers:\n    STATIC_LIMITS: Static limits given by the configuration\n    CONNECTION_LIMITS: Uses the temperature sensors from the in- and outflow as limits\n    HISTORICAL_LIMITS: Uses historical data to determine the limits",
         "enum": [
            "static_limits",
            "connection_limits",
            "historical_limits"
         ],
         "title": "ThermalStorageCalculationMethods",
         "type": "string"
      }
   },
   "required": [
      "value"
   ]
}

field value: ThermalStorageCalculationMethods [Required]
pydantic model encodapy.components.thermal_storage.thermal_storage_config.DataPointGeneral[source]

Bases: BaseModel

Mock-Class for Sphinx documentation.

For more information, see the real DataPointGeneral class: encodapy.utils.datapoints.DataPointGeneral.

Show JSON schema
{
   "title": "DataPointGeneral",
   "description": "Mock-Class for Sphinx documentation.\n\nFor more information, see the real DataPointGeneral class:             :class:`encodapy.utils.datapoints.DataPointGeneral`.",
   "type": "object",
   "properties": {}
}

pydantic model encodapy.components.thermal_storage.thermal_storage_config.DataPointSensorConfig[source]

Bases: DataPointGeneral

Model for datapoints of the controller component which define the sensor configuration.

Variables:
  • value – The value of the datapoint, which is a SensorConfig representing the sensor configuration

  • unit – Optional unit of the datapoint, if applicable

  • time – Optional timestamp of the datapoint, if applicable

Show JSON schema
{
   "title": "DataPointSensorConfig",
   "description": "Model for datapoints of the controller component which define the sensor configuration.\n\nAttributes:\n    value: The value of the datapoint, which is a SensorConfig             representing the sensor configuration\n    unit: Optional unit of the datapoint, if applicable\n    time: Optional timestamp of the datapoint, if applicable",
   "type": "object",
   "properties": {
      "value": {
         "$ref": "#/$defs/ThermalStorageTemperatureSensors"
      }
   },
   "$defs": {
      "StorageSensorConfig": {
         "description": "Configuration for the storage sensor in the thermal storage\n\nAttributes:\n    name: Optional name of the sensor\n    height: Height of the sensor in percent (0=top, 100=bottom)\n    limits (:class:`encodapy.components.thermal_storage.TemperatureLimits`):             Temperature limits for the sensor",
         "properties": {
            "name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional name of the sensor",
               "title": "Name"
            },
            "height": {
               "description": "Height of the sensor in percent (0=top, 100=bottom)",
               "maximum": 100.0,
               "minimum": 0.0,
               "title": "Height",
               "type": "number"
            },
            "limits": {
               "$ref": "#/$defs/TemperatureLimits"
            },
            "temperature_check": {
               "default": false,
               "description": "Whether the sensor should be used for the state of charge check\n        by temperature limits",
               "title": "Temperature Check",
               "type": "boolean"
            },
            "protected_upper_limit": {
               "default": false,
               "description": "Whether the upper limit of the sensor should not be adjusted during calibration",
               "title": "Protected Upper Limit",
               "type": "boolean"
            },
            "protected_lower_limit": {
               "default": false,
               "description": "Whether the lower limit of the sensor should not be adjusted during calibration",
               "title": "Protected Lower Limit",
               "type": "boolean"
            }
         },
         "required": [
            "height",
            "limits"
         ],
         "title": "StorageSensorConfig",
         "type": "object"
      },
      "TemperatureLimits": {
         "description": "Configuration of the temperature limits in the termal storage\n\nAttributes:\n    minimal_temperature: Minimal temperature in the thermal storage in \u00b0C\n    maximal_temperature: Maximal temperature in the thermal storage in \u00b0C\n    reference_temperature: Reference temperature in the storage in \u00b0C (default: 0\u00b0C)\n\nRaises:\n    ValueError: if the minimal temperature is heighter than the maximal temperature",
         "properties": {
            "minimal_temperature": {
               "description": "Minimal temperature in the thermal storage in \u00b0C",
               "title": "Minimal Temperature",
               "type": "number"
            },
            "maximal_temperature": {
               "description": "Maximal temperature in the storage in \u00b0C",
               "title": "Maximal Temperature",
               "type": "number"
            },
            "reference_temperature": {
               "default": 0,
               "description": "Reference temperature in the storage in \u00b0C",
               "title": "Reference Temperature",
               "type": "number"
            }
         },
         "required": [
            "minimal_temperature",
            "maximal_temperature"
         ],
         "title": "TemperatureLimits",
         "type": "object"
      },
      "ThermalStorageTemperatureSensors": {
         "description": "Configuration for the temperature sensors in the thermal storage\n\nAttributes:\n    storage_sensors: List of temperature sensors in the thermal storage\n\nIt is required to set at least 3 sensors and no more than 10 sensors. The heights of the sensors\nmust be between 0 and 100 percent and in ascending order.\n\nIt is possible to add more information to sensors, thats the reason why this model is used.",
         "properties": {
            "storage_sensors": {
               "description": "List of temperature sensors (3\u201310 sensors)",
               "items": {
                  "$ref": "#/$defs/StorageSensorConfig"
               },
               "title": "Storage Sensors",
               "type": "array"
            }
         },
         "required": [
            "storage_sensors"
         ],
         "title": "ThermalStorageTemperatureSensors",
         "type": "object"
      }
   },
   "required": [
      "value"
   ]
}

field value: ThermalStorageTemperatureSensors [Required]
pydantic model encodapy.components.thermal_storage.thermal_storage_config.DataPointThermalStorageCalibrationConfig[source]

Bases: DataPointGeneral

Model for datapoints of the controller component which define the calibration configuration.

Show JSON schema
{
   "title": "DataPointThermalStorageCalibrationConfig",
   "description": "Model for datapoints of the controller component         which define the calibration configuration.",
   "type": "object",
   "properties": {
      "value": {
         "allOf": [
            {
               "$ref": "#/$defs/ThermalStorageCalibrationConfig"
            }
         ],
         "default": {
            "historical_data_margin": 5.0,
            "historical_timerange_minimum": 1,
            "historical_timerange_retention": 48,
            "db_path": "./thermal_storage_calibration_data"
         },
         "description": "Value of the datapoint, which is a ThermalStorageCalibrationConfig "
      }
   },
   "$defs": {
      "ThermalStorageCalibrationConfig": {
         "description": "Configuration for the calibration of the thermal storage service.",
         "properties": {
            "historical_data_margin": {
               "default": 5.0,
               "description": "Margin in percent to adjust historical data temperatures for state of charge calculation (0-100)",
               "maximum": 100.0,
               "minimum": 0.0,
               "title": "Historical Data Margin",
               "type": "number"
            },
            "historical_timerange_minimum": {
               "default": 1,
               "description": "Minimum timerange in hours for historical data to be considered ",
               "minimum": 0,
               "title": "Historical Timerange Minimum",
               "type": "integer"
            },
            "historical_timerange_retention": {
               "default": 48,
               "description": "Retention timerange in hours for historical data to be considered,\n        data older than this will be deleted,\n        higher values lead to more data being stored",
               "minimum": 0,
               "title": "Historical Timerange Retention",
               "type": "integer"
            },
            "db_path": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": "./thermal_storage_calibration_data",
               "description": "Path to store calibration data (optional)",
               "title": "Db Path"
            }
         },
         "title": "ThermalStorageCalibrationConfig",
         "type": "object"
      }
   }
}

field value: ThermalStorageCalibrationConfig = ThermalStorageCalibrationConfig(historical_data_margin=5.0, historical_timerange_minimum=1, historical_timerange_retention=48, db_path='./thermal_storage_calibration_data')

Value of the datapoint, which is a ThermalStorageCalibrationConfig

pydantic model encodapy.components.thermal_storage.thermal_storage_config.DataPointThermalStorageLoadLevelCheck[source]

Bases: DataPointGeneral

Model for datapoints of the controller component which define the state of charge check configuration.

Show JSON schema
{
   "title": "DataPointThermalStorageLoadLevelCheck",
   "description": "Model for datapoints of the controller component         which define the state of charge check configuration.",
   "type": "object",
   "properties": {
      "value": {
         "allOf": [
            {
               "$ref": "#/$defs/ThermalStorageLoadLevelCheck"
            }
         ],
         "default": {
            "enabled": true,
            "minimal_level": 35.0,
            "historical_temperature_limit": 5
         },
         "description": "Value of the datapoint, which is a ThermalStorageLoadLevelCheck "
      }
   },
   "$defs": {
      "ThermalStorageLoadLevelCheck": {
         "description": "Model for the state of charge check information of the thermal storage service.\n\nThis check monitors the relevant sensors and adjusts the charge level\nif the temperature falls below the required level. It would be advisable\nto check the sensors at the outlet of the storage tank.",
         "properties": {
            "enabled": {
               "default": true,
               "description": "Enable or disable the state of charge check",
               "title": "Enabled",
               "type": "boolean"
            },
            "minimal_level": {
               "default": 35.0,
               "description": "Threshold percentage for the upper temperature sensor.\n        When the top sensor falls below this percentage of the temperature range,\n        the state of charge is adjusted. (0-100)",
               "exclusiveMinimum": 0.0,
               "maximum": 100.0,
               "title": "Minimal Level",
               "type": "number"
            },
            "historical_temperature_limit": {
               "default": 5,
               "description": "\n        Minutes for historical temperature data to be considered for the state of charge check.",
               "minimum": 0,
               "title": "Historical Temperature Limit",
               "type": "integer"
            }
         },
         "title": "ThermalStorageLoadLevelCheck",
         "type": "object"
      }
   }
}

field value: ThermalStorageLoadLevelCheck = ThermalStorageLoadLevelCheck(enabled=True, minimal_level=35.0, historical_temperature_limit=5)

Value of the datapoint, which is a ThermalStorageLoadLevelCheck

pydantic model encodapy.components.thermal_storage.thermal_storage_config.StorageSensorConfig[source]

Bases: BaseModel

Configuration for the storage sensor in the thermal storage

Variables:
  • name – Optional name of the sensor

  • height – Height of the sensor in percent (0=top, 100=bottom)

  • limits (encodapy.components.thermal_storage.TemperatureLimits) – Temperature limits for the sensor

Show JSON schema
{
   "title": "StorageSensorConfig",
   "description": "Configuration for the storage sensor in the thermal storage\n\nAttributes:\n    name: Optional name of the sensor\n    height: Height of the sensor in percent (0=top, 100=bottom)\n    limits (:class:`encodapy.components.thermal_storage.TemperatureLimits`):             Temperature limits for the sensor",
   "type": "object",
   "properties": {
      "name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Optional name of the sensor",
         "title": "Name"
      },
      "height": {
         "description": "Height of the sensor in percent (0=top, 100=bottom)",
         "maximum": 100.0,
         "minimum": 0.0,
         "title": "Height",
         "type": "number"
      },
      "limits": {
         "$ref": "#/$defs/TemperatureLimits"
      },
      "temperature_check": {
         "default": false,
         "description": "Whether the sensor should be used for the state of charge check\n        by temperature limits",
         "title": "Temperature Check",
         "type": "boolean"
      },
      "protected_upper_limit": {
         "default": false,
         "description": "Whether the upper limit of the sensor should not be adjusted during calibration",
         "title": "Protected Upper Limit",
         "type": "boolean"
      },
      "protected_lower_limit": {
         "default": false,
         "description": "Whether the lower limit of the sensor should not be adjusted during calibration",
         "title": "Protected Lower Limit",
         "type": "boolean"
      }
   },
   "$defs": {
      "TemperatureLimits": {
         "description": "Configuration of the temperature limits in the termal storage\n\nAttributes:\n    minimal_temperature: Minimal temperature in the thermal storage in \u00b0C\n    maximal_temperature: Maximal temperature in the thermal storage in \u00b0C\n    reference_temperature: Reference temperature in the storage in \u00b0C (default: 0\u00b0C)\n\nRaises:\n    ValueError: if the minimal temperature is heighter than the maximal temperature",
         "properties": {
            "minimal_temperature": {
               "description": "Minimal temperature in the thermal storage in \u00b0C",
               "title": "Minimal Temperature",
               "type": "number"
            },
            "maximal_temperature": {
               "description": "Maximal temperature in the storage in \u00b0C",
               "title": "Maximal Temperature",
               "type": "number"
            },
            "reference_temperature": {
               "default": 0,
               "description": "Reference temperature in the storage in \u00b0C",
               "title": "Reference Temperature",
               "type": "number"
            }
         },
         "required": [
            "minimal_temperature",
            "maximal_temperature"
         ],
         "title": "TemperatureLimits",
         "type": "object"
      }
   },
   "required": [
      "height",
      "limits"
   ]
}

field name: Optional[str] = None

Optional name of the sensor

field height: float [Required]

Height of the sensor in percent (0=top, 100=bottom)

Constraints:
  • ge = 0

  • le = 100

field limits: TemperatureLimits [Required]
field temperature_check: bool = False

Whether the sensor should be used for the state of charge check by temperature limits

field protected_upper_limit: bool = False

Whether the upper limit of the sensor should not be adjusted during calibration

field protected_lower_limit: bool = False

Whether the lower limit of the sensor should not be adjusted during calibration

pydantic model encodapy.components.thermal_storage.thermal_storage_config.TemperatureExtrema[source]

Bases: BaseModel

Model for storing temperature extrema (min and max) for a sensor.

Show JSON schema
{
   "title": "TemperatureExtrema",
   "description": "Model for storing temperature extrema (min and max) for a sensor.",
   "type": "object",
   "properties": {
      "minimal_temperature": {
         "description": "Minimal recorded temperature for the sensor in \u00b0C",
         "title": "Minimal Temperature",
         "type": "number"
      },
      "maximal_temperature": {
         "description": "Maximal recorded temperature for the sensor in \u00b0C",
         "title": "Maximal Temperature",
         "type": "number"
      },
      "time": {
         "description": "Timestamp of when the extrema were recorded",
         "format": "date-time",
         "title": "Time",
         "type": "string"
      }
   },
   "required": [
      "minimal_temperature",
      "maximal_temperature",
      "time"
   ]
}

field minimal_temperature: float [Required]

Minimal recorded temperature for the sensor in °C

field maximal_temperature: float [Required]

Maximal recorded temperature for the sensor in °C

field time: datetime [Required]

Timestamp of when the extrema were recorded

pydantic model encodapy.components.thermal_storage.thermal_storage_config.TemperatureLimits[source]

Bases: BaseModel

Configuration of the temperature limits in the termal storage

Variables:
  • minimal_temperature – Minimal temperature in the thermal storage in °C

  • maximal_temperature – Maximal temperature in the thermal storage in °C

  • reference_temperature – Reference temperature in the storage in °C (default: 0°C)

Raises:

ValueError – if the minimal temperature is heighter than the maximal temperature

Show JSON schema
{
   "title": "TemperatureLimits",
   "description": "Configuration of the temperature limits in the termal storage\n\nAttributes:\n    minimal_temperature: Minimal temperature in the thermal storage in \u00b0C\n    maximal_temperature: Maximal temperature in the thermal storage in \u00b0C\n    reference_temperature: Reference temperature in the storage in \u00b0C (default: 0\u00b0C)\n\nRaises:\n    ValueError: if the minimal temperature is heighter than the maximal temperature",
   "type": "object",
   "properties": {
      "minimal_temperature": {
         "description": "Minimal temperature in the thermal storage in \u00b0C",
         "title": "Minimal Temperature",
         "type": "number"
      },
      "maximal_temperature": {
         "description": "Maximal temperature in the storage in \u00b0C",
         "title": "Maximal Temperature",
         "type": "number"
      },
      "reference_temperature": {
         "default": 0,
         "description": "Reference temperature in the storage in \u00b0C",
         "title": "Reference Temperature",
         "type": "number"
      }
   },
   "required": [
      "minimal_temperature",
      "maximal_temperature"
   ]
}

field minimal_temperature: float [Required]

Minimal temperature in the thermal storage in °C

field maximal_temperature: float [Required]

Maximal temperature in the storage in °C

field reference_temperature: float = 0

Reference temperature in the storage in °C

class encodapy.components.thermal_storage.thermal_storage_config.ThermalStorageCalculationMethods(*values)[source]

Bases: Enum

Enum for the calculation methods of the thermal storage service.

Members:

STATIC_LIMITS: Static limits given by the configuration CONNECTION_LIMITS: Uses the temperature sensors from the in- and outflow as limits HISTORICAL_LIMITS: Uses historical data to determine the limits

CONNECTION_LIMITS = 'connection_limits'
HISTORICAL_LIMITS = 'historical_limits'
STATIC_LIMITS = 'static_limits'
pydantic model encodapy.components.thermal_storage.thermal_storage_config.ThermalStorageCalibrationConfig[source]

Bases: BaseModel

Configuration for the calibration of the thermal storage service.

Show JSON schema
{
   "title": "ThermalStorageCalibrationConfig",
   "description": "Configuration for the calibration of the thermal storage service.",
   "type": "object",
   "properties": {
      "historical_data_margin": {
         "default": 5.0,
         "description": "Margin in percent to adjust historical data temperatures for state of charge calculation (0-100)",
         "maximum": 100.0,
         "minimum": 0.0,
         "title": "Historical Data Margin",
         "type": "number"
      },
      "historical_timerange_minimum": {
         "default": 1,
         "description": "Minimum timerange in hours for historical data to be considered ",
         "minimum": 0,
         "title": "Historical Timerange Minimum",
         "type": "integer"
      },
      "historical_timerange_retention": {
         "default": 48,
         "description": "Retention timerange in hours for historical data to be considered,\n        data older than this will be deleted,\n        higher values lead to more data being stored",
         "minimum": 0,
         "title": "Historical Timerange Retention",
         "type": "integer"
      },
      "db_path": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": "./thermal_storage_calibration_data",
         "description": "Path to store calibration data (optional)",
         "title": "Db Path"
      }
   }
}

field historical_data_margin: float = 5.0

Margin in percent to adjust historical data temperatures for state of charge calculation (0-100)

Constraints:
  • ge = 0

  • le = 100

field historical_timerange_minimum: int = 1

Minimum timerange in hours for historical data to be considered

Constraints:
  • ge = 0

field historical_timerange_retention: int = 48

Retention timerange in hours for historical data to be considered, data older than this will be deleted, higher values lead to more data being stored

Constraints:
  • ge = 0

field db_path: Optional[str] = './thermal_storage_calibration_data'

Path to store calibration data (optional)

pydantic model encodapy.components.thermal_storage.thermal_storage_config.ThermalStorageConfigData[source]

Bases: ConfigData

Model for the configuration data of the thermal storage service.

Parameters:
  • volume (DataPointNumber) – Volume of the thermal storage in m³

  • medium (DataPointMedium) – Medium of the thermal storage

  • sensor_config (DataPointSensorConfig) – Sensor configuration of the thermal storage

  • calculation_method (DataPointCalculationMethod) – Calculation method for the thermal storage

  • load_level_check – (DataPointThermalStorageLoadLevelCheck) : Configuration for the state of charge check

  • calibration – (DataPointThermalStorageCalibrationConfig) : Configuration for the calibration of the thermal storage

Show JSON schema
{
   "title": "ThermalStorageConfigData",
   "description": "Model for the configuration data of the thermal storage service.\n\nArguments:\n    volume (DataPointNumber ): Volume of the thermal storage in m\u00b3\n    medium (DataPointMedium) : Medium of the thermal storage\n    sensor_config (DataPointSensorConfig) :             Sensor configuration of the thermal storage\n    calculation_method (DataPointCalculationMethod) :             Calculation method for the thermal storage\n    load_level_check: (DataPointThermalStorageLoadLevelCheck) :             Configuration for the state of charge check\n    calibration: (DataPointThermalStorageCalibrationConfig) :             Configuration for the calibration of the thermal storage",
   "type": "object",
   "properties": {
      "volume": {
         "allOf": [
            {
               "$ref": "#/$defs/DataPointNumber"
            }
         ],
         "description": "Volume of the thermal storage in m\u00b3",
         "unit": "MTQ"
      },
      "medium": {
         "allOf": [
            {
               "$ref": "#/$defs/DataPointMedium"
            }
         ],
         "default": {
            "value": "water",
            "unit": null,
            "time": null
         },
         "description": "Medium of the thermal storage"
      },
      "sensor_config": {
         "allOf": [
            {
               "$ref": "#/$defs/DataPointSensorConfig"
            }
         ],
         "description": "Sensor configuration of the thermal storage"
      },
      "calculation_method": {
         "allOf": [
            {
               "$ref": "#/$defs/DataPointCalculationMethod"
            }
         ],
         "default": {
            "value": "static_limits"
         },
         "description": "Calculation method for the thermal storage"
      },
      "load_level_check": {
         "allOf": [
            {
               "$ref": "#/$defs/DataPointThermalStorageLoadLevelCheck"
            }
         ],
         "default": {
            "value": {
               "enabled": true,
               "historical_temperature_limit": 5,
               "minimal_level": 35.0
            }
         },
         "description": "Configuration for the state of charge check"
      },
      "calibration": {
         "allOf": [
            {
               "$ref": "#/$defs/DataPointThermalStorageCalibrationConfig"
            }
         ],
         "default": {
            "value": {
               "db_path": "./thermal_storage_calibration_data",
               "historical_data_margin": 5.0,
               "historical_timerange_minimum": 1,
               "historical_timerange_retention": 48
            }
         },
         "description": "Calibration configuration for the thermal storage"
      }
   },
   "$defs": {
      "DataPointCalculationMethod": {
         "description": "Model for datapoints of the controller component which define the calculation method.\n\nAttributes:\n    value: The value of the datapoint, which is a string representing the calculation method\n    unit: Optional unit of the datapoint, if applicable\n    time: Optional timestamp of the datapoint, if applicable",
         "properties": {
            "value": {
               "$ref": "#/$defs/ThermalStorageCalculationMethods"
            }
         },
         "required": [
            "value"
         ],
         "title": "DataPointCalculationMethod",
         "type": "object"
      },
      "DataPointMedium": {
         "description": "Model for datapoints of the controller component which define the medium.\n\nAttributes:\n    value (Medium): The value of the datapoint, which is a Medium representing the medium.\n    unit (Optional[DataUnits]): Optional unit of the datapoint, if applicable.\n    time (Optional[datetime]): Optional timestamp of the datapoint, if applicable.",
         "properties": {
            "value": {
               "$ref": "#/$defs/Medium"
            },
            "unit": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/DataUnits"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "time": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Time"
            }
         },
         "required": [
            "value"
         ],
         "title": "DataPointMedium",
         "type": "object"
      },
      "DataPointNumber": {
         "description": "Model for datapoints of the controller component.\n\nAttributes:\n    value (float | int): The value of the datapoint, which is a number (float, int).\n    unit (Optional[DataUnits]): Optional unit of the datapoint, if applicable.\n    time (Optional[datetime]): Optional timestamp of the datapoint, if applicable.",
         "properties": {
            "value": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ],
               "title": "Value"
            },
            "unit": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/DataUnits"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "time": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Time"
            }
         },
         "required": [
            "value"
         ],
         "title": "DataPointNumber",
         "type": "object"
      },
      "DataPointSensorConfig": {
         "description": "Model for datapoints of the controller component which define the sensor configuration.\n\nAttributes:\n    value: The value of the datapoint, which is a SensorConfig             representing the sensor configuration\n    unit: Optional unit of the datapoint, if applicable\n    time: Optional timestamp of the datapoint, if applicable",
         "properties": {
            "value": {
               "$ref": "#/$defs/ThermalStorageTemperatureSensors"
            }
         },
         "required": [
            "value"
         ],
         "title": "DataPointSensorConfig",
         "type": "object"
      },
      "DataPointThermalStorageCalibrationConfig": {
         "description": "Model for datapoints of the controller component         which define the calibration configuration.",
         "properties": {
            "value": {
               "allOf": [
                  {
                     "$ref": "#/$defs/ThermalStorageCalibrationConfig"
                  }
               ],
               "default": {
                  "historical_data_margin": 5.0,
                  "historical_timerange_minimum": 1,
                  "historical_timerange_retention": 48,
                  "db_path": "./thermal_storage_calibration_data"
               },
               "description": "Value of the datapoint, which is a ThermalStorageCalibrationConfig "
            }
         },
         "title": "DataPointThermalStorageCalibrationConfig",
         "type": "object"
      },
      "DataPointThermalStorageLoadLevelCheck": {
         "description": "Model for datapoints of the controller component         which define the state of charge check configuration.",
         "properties": {
            "value": {
               "allOf": [
                  {
                     "$ref": "#/$defs/ThermalStorageLoadLevelCheck"
                  }
               ],
               "default": {
                  "enabled": true,
                  "minimal_level": 35.0,
                  "historical_temperature_limit": 5
               },
               "description": "Value of the datapoint, which is a ThermalStorageLoadLevelCheck "
            }
         },
         "title": "DataPointThermalStorageLoadLevelCheck",
         "type": "object"
      },
      "DataUnits": {
         "description": "Possible units for the data\nUnits which are defined by Unit Code (https://unece.org/trade/cefact/UNLOCODE-Download\nor https://github.com/RWTH-EBC/FiLiP/blob/master/filip/data/unece-units/units_of_measure.csv)\nor here: https://unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_rev3_Annex3e.pdf\nTODO:\n    - Is there a better way to handle the units?\n    - Add more units?",
         "enum": [
            "SEC",
            "HUR",
            "MIN",
            "CEL",
            "KEL",
            "LTR",
            "MTQ",
            "MQH",
            "MQS",
            "E32",
            "L2",
            "WTT",
            "WHR",
            "KWH",
            "CMT",
            "MTR",
            "MTK",
            "MTS",
            "P1",
            "OHM",
            "VLT"
         ],
         "title": "DataUnits",
         "type": "string"
      },
      "Medium": {
         "const": "water",
         "description": "Enum class for the mediums\n\nTODO: Add more mediums",
         "title": "Medium"
      },
      "StorageSensorConfig": {
         "description": "Configuration for the storage sensor in the thermal storage\n\nAttributes:\n    name: Optional name of the sensor\n    height: Height of the sensor in percent (0=top, 100=bottom)\n    limits (:class:`encodapy.components.thermal_storage.TemperatureLimits`):             Temperature limits for the sensor",
         "properties": {
            "name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional name of the sensor",
               "title": "Name"
            },
            "height": {
               "description": "Height of the sensor in percent (0=top, 100=bottom)",
               "maximum": 100.0,
               "minimum": 0.0,
               "title": "Height",
               "type": "number"
            },
            "limits": {
               "$ref": "#/$defs/TemperatureLimits"
            },
            "temperature_check": {
               "default": false,
               "description": "Whether the sensor should be used for the state of charge check\n        by temperature limits",
               "title": "Temperature Check",
               "type": "boolean"
            },
            "protected_upper_limit": {
               "default": false,
               "description": "Whether the upper limit of the sensor should not be adjusted during calibration",
               "title": "Protected Upper Limit",
               "type": "boolean"
            },
            "protected_lower_limit": {
               "default": false,
               "description": "Whether the lower limit of the sensor should not be adjusted during calibration",
               "title": "Protected Lower Limit",
               "type": "boolean"
            }
         },
         "required": [
            "height",
            "limits"
         ],
         "title": "StorageSensorConfig",
         "type": "object"
      },
      "TemperatureLimits": {
         "description": "Configuration of the temperature limits in the termal storage\n\nAttributes:\n    minimal_temperature: Minimal temperature in the thermal storage in \u00b0C\n    maximal_temperature: Maximal temperature in the thermal storage in \u00b0C\n    reference_temperature: Reference temperature in the storage in \u00b0C (default: 0\u00b0C)\n\nRaises:\n    ValueError: if the minimal temperature is heighter than the maximal temperature",
         "properties": {
            "minimal_temperature": {
               "description": "Minimal temperature in the thermal storage in \u00b0C",
               "title": "Minimal Temperature",
               "type": "number"
            },
            "maximal_temperature": {
               "description": "Maximal temperature in the storage in \u00b0C",
               "title": "Maximal Temperature",
               "type": "number"
            },
            "reference_temperature": {
               "default": 0,
               "description": "Reference temperature in the storage in \u00b0C",
               "title": "Reference Temperature",
               "type": "number"
            }
         },
         "required": [
            "minimal_temperature",
            "maximal_temperature"
         ],
         "title": "TemperatureLimits",
         "type": "object"
      },
      "ThermalStorageCalculationMethods": {
         "description": "Enum for the calculation methods of the thermal storage service.\n\nMembers:\n    STATIC_LIMITS: Static limits given by the configuration\n    CONNECTION_LIMITS: Uses the temperature sensors from the in- and outflow as limits\n    HISTORICAL_LIMITS: Uses historical data to determine the limits",
         "enum": [
            "static_limits",
            "connection_limits",
            "historical_limits"
         ],
         "title": "ThermalStorageCalculationMethods",
         "type": "string"
      },
      "ThermalStorageCalibrationConfig": {
         "description": "Configuration for the calibration of the thermal storage service.",
         "properties": {
            "historical_data_margin": {
               "default": 5.0,
               "description": "Margin in percent to adjust historical data temperatures for state of charge calculation (0-100)",
               "maximum": 100.0,
               "minimum": 0.0,
               "title": "Historical Data Margin",
               "type": "number"
            },
            "historical_timerange_minimum": {
               "default": 1,
               "description": "Minimum timerange in hours for historical data to be considered ",
               "minimum": 0,
               "title": "Historical Timerange Minimum",
               "type": "integer"
            },
            "historical_timerange_retention": {
               "default": 48,
               "description": "Retention timerange in hours for historical data to be considered,\n        data older than this will be deleted,\n        higher values lead to more data being stored",
               "minimum": 0,
               "title": "Historical Timerange Retention",
               "type": "integer"
            },
            "db_path": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": "./thermal_storage_calibration_data",
               "description": "Path to store calibration data (optional)",
               "title": "Db Path"
            }
         },
         "title": "ThermalStorageCalibrationConfig",
         "type": "object"
      },
      "ThermalStorageLoadLevelCheck": {
         "description": "Model for the state of charge check information of the thermal storage service.\n\nThis check monitors the relevant sensors and adjusts the charge level\nif the temperature falls below the required level. It would be advisable\nto check the sensors at the outlet of the storage tank.",
         "properties": {
            "enabled": {
               "default": true,
               "description": "Enable or disable the state of charge check",
               "title": "Enabled",
               "type": "boolean"
            },
            "minimal_level": {
               "default": 35.0,
               "description": "Threshold percentage for the upper temperature sensor.\n        When the top sensor falls below this percentage of the temperature range,\n        the state of charge is adjusted. (0-100)",
               "exclusiveMinimum": 0.0,
               "maximum": 100.0,
               "title": "Minimal Level",
               "type": "number"
            },
            "historical_temperature_limit": {
               "default": 5,
               "description": "\n        Minutes for historical temperature data to be considered for the state of charge check.",
               "minimum": 0,
               "title": "Historical Temperature Limit",
               "type": "integer"
            }
         },
         "title": "ThermalStorageLoadLevelCheck",
         "type": "object"
      },
      "ThermalStorageTemperatureSensors": {
         "description": "Configuration for the temperature sensors in the thermal storage\n\nAttributes:\n    storage_sensors: List of temperature sensors in the thermal storage\n\nIt is required to set at least 3 sensors and no more than 10 sensors. The heights of the sensors\nmust be between 0 and 100 percent and in ascending order.\n\nIt is possible to add more information to sensors, thats the reason why this model is used.",
         "properties": {
            "storage_sensors": {
               "description": "List of temperature sensors (3\u201310 sensors)",
               "items": {
                  "$ref": "#/$defs/StorageSensorConfig"
               },
               "title": "Storage Sensors",
               "type": "array"
            }
         },
         "required": [
            "storage_sensors"
         ],
         "title": "ThermalStorageTemperatureSensors",
         "type": "object"
      }
   },
   "required": [
      "volume",
      "sensor_config"
   ]
}

field volume: DataPointNumber [Required]

Volume of the thermal storage in m³

field medium: DataPointMedium = DataPointMedium(value=<Medium.WATER: 'water'>, unit=None, time=None)

Medium of the thermal storage

field sensor_config: DataPointSensorConfig [Required]

Sensor configuration of the thermal storage

field calculation_method: DataPointCalculationMethod = DataPointCalculationMethod(value=<ThermalStorageCalculationMethods.STATIC_LIMITS: 'static_limits'>)

Calculation method for the thermal storage

field load_level_check: DataPointThermalStorageLoadLevelCheck = DataPointThermalStorageLoadLevelCheck(value=ThermalStorageLoadLevelCheck(enabled=True, minimal_level=35.0, historical_temperature_limit=5))

Configuration for the state of charge check

field calibration: DataPointThermalStorageCalibrationConfig = DataPointThermalStorageCalibrationConfig(value=ThermalStorageCalibrationConfig(historical_data_margin=5.0, historical_timerange_minimum=1, historical_timerange_retention=48, db_path='./thermal_storage_calibration_data'))

Calibration configuration for the thermal storage

class encodapy.components.thermal_storage.thermal_storage_config.ThermalStorageEnergyTypes(*values)[source]

Bases: Enum

Enum for the energy types of the thermal storage service.

Members:

Nominal (“nominal”): Nominal energy of the thermal storage between the temperature limits Minimal (“minimal”): Minimal energy of the thermal storage at the lower temperature limit Maximal (“maximal”): Maximal energy of the thermal storage at the upper temperature limit Current (“current”): Current energy of the thermal storage based on the current temperatures

CURRENT = 'current'
MAXIMAL = 'maximal'
MINIMAL = 'minimal'
NOMINAL = 'nominal'
pydantic model encodapy.components.thermal_storage.thermal_storage_config.ThermalStorageInputData[source]

Bases: InputData

Model for the input of the thermal storage service, containing the temperature sensors in the thermal storage.

The temperature sensors need to be set from 1 to 10, no sensors are allowed to be missing between the others.

Variables:
  • temperature_1 (DataPointNumber) – first temperature sensor

  • temperature_2 (DataPointNumber) – second temperature sensor

  • temperature_3 (DataPointNumber) – third temperature sensor

  • temperature_4 (Optional[DataPointNumber]) – fourth temperature sensor (optional)

  • temperature_5 (Optional[DataPointNumber]) – fifth temperature sensor (optional)

  • temperature_6 (Optional[DataPointNumber]) – sixth temperature sensor (optional)

  • temperature_7 (Optional[DataPointNumber]) – seventh temperature sensor (optional)

  • temperature_8 (Optional[DataPointNumber]) – eighth temperature sensor (optional)

  • temperature_9 (Optional[DataPointNumber]) – ninth temperature sensor (optional)

  • temperature_10 (Optional[DataPointNumber]) – tenth temperature sensor (optional)

  • temperature_in (Optional[DataPointNumber]) – consumer return temperature sensor (optional)

  • temperature_out (Optional[DataPointNumber]) – consumer flow temperature sensor (optional)

Show JSON schema
{
   "title": "ThermalStorageInputData",
   "description": "Model for the input of the thermal storage service, containing the temperature sensors\nin the thermal storage.\n\nThe temperature sensors need to be set from 1 to 10,         no sensors are allowed to be missing between the others.\n\nAttributes:\n    temperature_1 (DataPointNumber): first temperature sensor\n    temperature_2 (DataPointNumber): second temperature sensor\n    temperature_3 (DataPointNumber): third temperature sensor\n    temperature_4 (Optional[DataPointNumber]): fourth temperature sensor (optional)\n    temperature_5 (Optional[DataPointNumber]): fifth temperature sensor (optional)\n    temperature_6 (Optional[DataPointNumber]): sixth temperature sensor (optional)\n    temperature_7 (Optional[DataPointNumber]): seventh temperature sensor (optional)\n    temperature_8 (Optional[DataPointNumber]): eighth temperature sensor (optional)\n    temperature_9 (Optional[DataPointNumber]): ninth temperature sensor (optional)\n    temperature_10 (Optional[DataPointNumber]): tenth temperature sensor (optional)\n    temperature_in (Optional[DataPointNumber]): consumer return temperature sensor             (optional)\n    temperature_out (Optional[DataPointNumber]): consumer flow temperature sensor             (optional)",
   "type": "object",
   "properties": {
      "temperature_1": {
         "allOf": [
            {
               "$ref": "#/$defs/DataPointNumber"
            }
         ],
         "description": "Input for the temperature of sensor 1 in the thermal storage",
         "unit": "CEL"
      },
      "temperature_2": {
         "allOf": [
            {
               "$ref": "#/$defs/DataPointNumber"
            }
         ],
         "description": "Input for the temperature of sensor 2 in the thermal storage",
         "unit": "CEL"
      },
      "temperature_3": {
         "allOf": [
            {
               "$ref": "#/$defs/DataPointNumber"
            }
         ],
         "description": "Input for the temperature of sensor 3 in the thermal storage",
         "unit": "CEL"
      },
      "temperature_4": {
         "anyOf": [
            {
               "$ref": "#/$defs/DataPointNumber"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Input for the temperature of sensor 4 in the thermal storage",
         "unit": "CEL"
      },
      "temperature_5": {
         "anyOf": [
            {
               "$ref": "#/$defs/DataPointNumber"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Input for the temperature of sensor 5 in the thermal storage",
         "unit": "CEL"
      },
      "temperature_6": {
         "anyOf": [
            {
               "$ref": "#/$defs/DataPointNumber"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Input for the temperature of sensor 6 in the thermal storage",
         "unit": "CEL"
      },
      "temperature_7": {
         "anyOf": [
            {
               "$ref": "#/$defs/DataPointNumber"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Input for the temperature of sensor 7 in the thermal storage",
         "unit": "CEL"
      },
      "temperature_8": {
         "anyOf": [
            {
               "$ref": "#/$defs/DataPointNumber"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Input for the temperature of sensor 8 in the thermal storage",
         "unit": "CEL"
      },
      "temperature_9": {
         "anyOf": [
            {
               "$ref": "#/$defs/DataPointNumber"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Input for the temperature of sensor 9 in the thermal storage",
         "unit": "CEL"
      },
      "temperature_10": {
         "anyOf": [
            {
               "$ref": "#/$defs/DataPointNumber"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Input for the temperature of sensor 10 in the thermal storage",
         "unit": "CEL"
      },
      "load_temperature_in": {
         "anyOf": [
            {
               "$ref": "#/$defs/DataPointNumber"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Input for the return temperature into the thermal storage (consumer)",
         "unit": "CEL"
      },
      "load_temperature_out": {
         "anyOf": [
            {
               "$ref": "#/$defs/DataPointNumber"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Input for the flow temperature from the thermal storage (consumer)",
         "unit": "CEL"
      }
   },
   "$defs": {
      "DataPointNumber": {
         "description": "Model for datapoints of the controller component.\n\nAttributes:\n    value (float | int): The value of the datapoint, which is a number (float, int).\n    unit (Optional[DataUnits]): Optional unit of the datapoint, if applicable.\n    time (Optional[datetime]): Optional timestamp of the datapoint, if applicable.",
         "properties": {
            "value": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ],
               "title": "Value"
            },
            "unit": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/DataUnits"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "time": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Time"
            }
         },
         "required": [
            "value"
         ],
         "title": "DataPointNumber",
         "type": "object"
      },
      "DataUnits": {
         "description": "Possible units for the data\nUnits which are defined by Unit Code (https://unece.org/trade/cefact/UNLOCODE-Download\nor https://github.com/RWTH-EBC/FiLiP/blob/master/filip/data/unece-units/units_of_measure.csv)\nor here: https://unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_rev3_Annex3e.pdf\nTODO:\n    - Is there a better way to handle the units?\n    - Add more units?",
         "enum": [
            "SEC",
            "HUR",
            "MIN",
            "CEL",
            "KEL",
            "LTR",
            "MTQ",
            "MQH",
            "MQS",
            "E32",
            "L2",
            "WTT",
            "WHR",
            "KWH",
            "CMT",
            "MTR",
            "MTK",
            "MTS",
            "P1",
            "OHM",
            "VLT"
         ],
         "title": "DataUnits",
         "type": "string"
      }
   },
   "required": [
      "temperature_1",
      "temperature_2",
      "temperature_3"
   ]
}

field temperature_1: DataPointNumber [Required]

Input for the temperature of sensor 1 in the thermal storage

field temperature_2: DataPointNumber [Required]

Input for the temperature of sensor 2 in the thermal storage

field temperature_3: DataPointNumber [Required]

Input for the temperature of sensor 3 in the thermal storage

field temperature_4: Optional[DataPointNumber] = None

Input for the temperature of sensor 4 in the thermal storage

field temperature_5: Optional[DataPointNumber] = None

Input for the temperature of sensor 5 in the thermal storage

field temperature_6: Optional[DataPointNumber] = None

Input for the temperature of sensor 6 in the thermal storage

field temperature_7: Optional[DataPointNumber] = None

Input for the temperature of sensor 7 in the thermal storage

field temperature_8: Optional[DataPointNumber] = None

Input for the temperature of sensor 8 in the thermal storage

field temperature_9: Optional[DataPointNumber] = None

Input for the temperature of sensor 9 in the thermal storage

field temperature_10: Optional[DataPointNumber] = None

Input for the temperature of sensor 10 in the thermal storage

field load_temperature_in: Optional[DataPointNumber] = None

Input for the return temperature into the thermal storage (consumer)

field load_temperature_out: Optional[DataPointNumber] = None

Input for the flow temperature from the thermal storage (consumer)

check_load_connection_sensors() None[source]

Check if the load connection sensors are set

Raises:

ValueError – If any of the load connection sensors are not configured.

Return type:

None

get_number_storage_sensors() int[source]

Get the number of storage sensors configured in the thermal storage.

Returns:

Number of storage sensors configured.

Return type:

int

pydantic model encodapy.components.thermal_storage.thermal_storage_config.ThermalStorageLoadLevelCheck[source]

Bases: BaseModel

Model for the state of charge check information of the thermal storage service.

This check monitors the relevant sensors and adjusts the charge level if the temperature falls below the required level. It would be advisable to check the sensors at the outlet of the storage tank.

Show JSON schema
{
   "title": "ThermalStorageLoadLevelCheck",
   "description": "Model for the state of charge check information of the thermal storage service.\n\nThis check monitors the relevant sensors and adjusts the charge level\nif the temperature falls below the required level. It would be advisable\nto check the sensors at the outlet of the storage tank.",
   "type": "object",
   "properties": {
      "enabled": {
         "default": true,
         "description": "Enable or disable the state of charge check",
         "title": "Enabled",
         "type": "boolean"
      },
      "minimal_level": {
         "default": 35.0,
         "description": "Threshold percentage for the upper temperature sensor.\n        When the top sensor falls below this percentage of the temperature range,\n        the state of charge is adjusted. (0-100)",
         "exclusiveMinimum": 0.0,
         "maximum": 100.0,
         "title": "Minimal Level",
         "type": "number"
      },
      "historical_temperature_limit": {
         "default": 5,
         "description": "\n        Minutes for historical temperature data to be considered for the state of charge check.",
         "minimum": 0,
         "title": "Historical Temperature Limit",
         "type": "integer"
      }
   }
}

field enabled: bool = True

Enable or disable the state of charge check

field minimal_level: float = 35.0

Threshold percentage for the upper temperature sensor. When the top sensor falls below this percentage of the temperature range, the state of charge is adjusted. (0-100)

Constraints:
  • gt = 0

  • le = 100

field historical_temperature_limit: int = 5

Minutes for historical temperature data to be considered for the state of charge check.

Constraints:
  • ge = 0

pydantic model encodapy.components.thermal_storage.thermal_storage_config.ThermalStorageLoadLevelStorage[source]

Bases: BaseModel

Model to store state of charge check information for the thermal storage service.

Show JSON schema
{
   "title": "ThermalStorageLoadLevelStorage",
   "description": "Model to store state of charge check information for the thermal storage service.",
   "type": "object",
   "properties": {
      "last_check_time": {
         "anyOf": [
            {
               "format": "date-time",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Timestamp of the last state of charge check",
         "title": "Last Check Time"
      },
      "check_time_interval": {
         "default": "PT0.5S",
         "description": "Time interval in seconds between state of charge checks",
         "format": "duration",
         "title": "Check Time Interval",
         "type": "string"
      },
      "state_of_charge": {
         "anyOf": [
            {
               "maximum": 100.0,
               "minimum": 0.0,
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Current state of charge level in percent (0-100)",
         "title": "State Of Charge"
      },
      "nominal_storage_energy": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Nominal storage energy in Wh | set by the process",
         "title": "Nominal Storage Energy"
      }
   }
}

field last_check_time: Optional[datetime] = None

Timestamp of the last state of charge check

field check_time_interval: timedelta = datetime.timedelta(microseconds=500000)

Time interval in seconds between state of charge checks

field state_of_charge: Optional[float] = None

Current state of charge level in percent (0-100)

Constraints:
  • ge = 0

  • le = 100

field nominal_storage_energy: Optional[float] = None

Nominal storage energy in Wh | set by the process

property check_status

Check, if a new state of charge check is required based on the time interval.

Returns:

True if no new check is required, False if a new check is required

Return type:

bool

pydantic model encodapy.components.thermal_storage.thermal_storage_config.ThermalStorageOutputData[source]

Bases: OutputData

Model for the output of the thermal storage service, containing the temperature sensors in the thermal storage.

Each output data point is associated with a specific calculation method, which is defined in the json_schema_extra field as calculation.

Variables:
  • storage__level (Optional[DataPointNumber]) – Output for storage charge in percent (0-100) (optional)

  • storage__energy (Optional[DataPointNumber]) – Output for storage energy in Wh (optional)

  • storage__energy_nominal (Optional[DataPointNumber]) – Output for nominal storage energy in Wh (optional)

  • storage__loading_potential_nominal (Optional[DataPointNumber]) – Output for storage loading potential in Wh (optional)

Show JSON schema
{
   "title": "ThermalStorageOutputData",
   "description": "Model for the output of the thermal storage service, containing the temperature sensors\nin the thermal storage.\n\nEach output data point is associated with a specific calculation method,         which is defined in the `json_schema_extra` field as `calculation`.\n\nAttributes:\n    storage__level (Optional[DataPointNumber]): Output for storage charge in percent             (0-100) (optional)\n    storage__energy (Optional[DataPointNumber]): Output for storage energy in Wh (optional)\n    storage__energy_nominal (Optional[DataPointNumber]): Output for nominal storage energy             in Wh (optional)\n    storage__loading_potential_nominal (Optional[DataPointNumber]):             Output for storage loading potential in Wh (optional)",
   "type": "object",
   "properties": {
      "storage__level": {
         "anyOf": [
            {
               "$ref": "#/$defs/DataPointNumber"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Output for storage charge in percent (0-100)",
         "unit": "P1"
      },
      "storage__energy": {
         "anyOf": [
            {
               "$ref": "#/$defs/DataPointNumber"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Output for storage energy in Wh",
         "unit": "WHR"
      },
      "storage__energy_nominal": {
         "anyOf": [
            {
               "$ref": "#/$defs/DataPointNumber"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Output for nominal storage energy in Wh",
         "unit": "WHR"
      },
      "storage__loading_potential_nominal": {
         "anyOf": [
            {
               "$ref": "#/$defs/DataPointNumber"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Output for storage loading potential in Wh",
         "unit": "WHR"
      }
   },
   "$defs": {
      "DataPointNumber": {
         "description": "Model for datapoints of the controller component.\n\nAttributes:\n    value (float | int): The value of the datapoint, which is a number (float, int).\n    unit (Optional[DataUnits]): Optional unit of the datapoint, if applicable.\n    time (Optional[datetime]): Optional timestamp of the datapoint, if applicable.",
         "properties": {
            "value": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ],
               "title": "Value"
            },
            "unit": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/DataUnits"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "time": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Time"
            }
         },
         "required": [
            "value"
         ],
         "title": "DataPointNumber",
         "type": "object"
      },
      "DataUnits": {
         "description": "Possible units for the data\nUnits which are defined by Unit Code (https://unece.org/trade/cefact/UNLOCODE-Download\nor https://github.com/RWTH-EBC/FiLiP/blob/master/filip/data/unece-units/units_of_measure.csv)\nor here: https://unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_rev3_Annex3e.pdf\nTODO:\n    - Is there a better way to handle the units?\n    - Add more units?",
         "enum": [
            "SEC",
            "HUR",
            "MIN",
            "CEL",
            "KEL",
            "LTR",
            "MTQ",
            "MQH",
            "MQS",
            "E32",
            "L2",
            "WTT",
            "WHR",
            "KWH",
            "CMT",
            "MTR",
            "MTK",
            "MTS",
            "P1",
            "OHM",
            "VLT"
         ],
         "title": "DataUnits",
         "type": "string"
      }
   }
}

field storage__level: Optional[DataPointNumber] = None

Output for storage charge in percent (0-100)

field storage__energy: Optional[DataPointNumber] = None

Output for storage energy in Wh

field storage__energy_nominal: Optional[DataPointNumber] = None

Output for nominal storage energy in Wh

field storage__loading_potential_nominal: Optional[DataPointNumber] = None

Output for storage loading potential in Wh

pydantic model encodapy.components.thermal_storage.thermal_storage_config.ThermalStorageTemperatureSensors[source]

Bases: BaseModel

Configuration for the temperature sensors in the thermal storage

Variables:

storage_sensors – List of temperature sensors in the thermal storage

It is required to set at least 3 sensors and no more than 10 sensors. The heights of the sensors must be between 0 and 100 percent and in ascending order.

It is possible to add more information to sensors, thats the reason why this model is used.

Show JSON schema
{
   "title": "ThermalStorageTemperatureSensors",
   "description": "Configuration for the temperature sensors in the thermal storage\n\nAttributes:\n    storage_sensors: List of temperature sensors in the thermal storage\n\nIt is required to set at least 3 sensors and no more than 10 sensors. The heights of the sensors\nmust be between 0 and 100 percent and in ascending order.\n\nIt is possible to add more information to sensors, thats the reason why this model is used.",
   "type": "object",
   "properties": {
      "storage_sensors": {
         "description": "List of temperature sensors (3\u201310 sensors)",
         "items": {
            "$ref": "#/$defs/StorageSensorConfig"
         },
         "title": "Storage Sensors",
         "type": "array"
      }
   },
   "$defs": {
      "StorageSensorConfig": {
         "description": "Configuration for the storage sensor in the thermal storage\n\nAttributes:\n    name: Optional name of the sensor\n    height: Height of the sensor in percent (0=top, 100=bottom)\n    limits (:class:`encodapy.components.thermal_storage.TemperatureLimits`):             Temperature limits for the sensor",
         "properties": {
            "name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional name of the sensor",
               "title": "Name"
            },
            "height": {
               "description": "Height of the sensor in percent (0=top, 100=bottom)",
               "maximum": 100.0,
               "minimum": 0.0,
               "title": "Height",
               "type": "number"
            },
            "limits": {
               "$ref": "#/$defs/TemperatureLimits"
            },
            "temperature_check": {
               "default": false,
               "description": "Whether the sensor should be used for the state of charge check\n        by temperature limits",
               "title": "Temperature Check",
               "type": "boolean"
            },
            "protected_upper_limit": {
               "default": false,
               "description": "Whether the upper limit of the sensor should not be adjusted during calibration",
               "title": "Protected Upper Limit",
               "type": "boolean"
            },
            "protected_lower_limit": {
               "default": false,
               "description": "Whether the lower limit of the sensor should not be adjusted during calibration",
               "title": "Protected Lower Limit",
               "type": "boolean"
            }
         },
         "required": [
            "height",
            "limits"
         ],
         "title": "StorageSensorConfig",
         "type": "object"
      },
      "TemperatureLimits": {
         "description": "Configuration of the temperature limits in the termal storage\n\nAttributes:\n    minimal_temperature: Minimal temperature in the thermal storage in \u00b0C\n    maximal_temperature: Maximal temperature in the thermal storage in \u00b0C\n    reference_temperature: Reference temperature in the storage in \u00b0C (default: 0\u00b0C)\n\nRaises:\n    ValueError: if the minimal temperature is heighter than the maximal temperature",
         "properties": {
            "minimal_temperature": {
               "description": "Minimal temperature in the thermal storage in \u00b0C",
               "title": "Minimal Temperature",
               "type": "number"
            },
            "maximal_temperature": {
               "description": "Maximal temperature in the storage in \u00b0C",
               "title": "Maximal Temperature",
               "type": "number"
            },
            "reference_temperature": {
               "default": 0,
               "description": "Reference temperature in the storage in \u00b0C",
               "title": "Reference Temperature",
               "type": "number"
            }
         },
         "required": [
            "minimal_temperature",
            "maximal_temperature"
         ],
         "title": "TemperatureLimits",
         "type": "object"
      }
   },
   "required": [
      "storage_sensors"
   ]
}

field storage_sensors: list[StorageSensorConfig] [Required]

List of temperature sensors (3–10 sensors)

get_number_of_sensors() int[source]

Get the number of storage sensors configured in the thermal storage.

Returns:

Number of storage sensors configured.

Return type:

int