Source code for twin4build.utils.unit_converters.to_degC_from_degK

# Local application imports
from twin4build.systems.saref4syst.system import System


[docs] class ToDegCFromDegK(System): """ System for converting temperature from Kelvin to Celsius. Mathematical Formulation: .. math:: T_{C} = T_{K} - 273.15 where: - :math:`T_{C}` is temperature in Celsius - :math:`T_{K}` is temperature in Kelvin """ def __init__(self): super().__init__() self.input = {"K": None} self.output = {"C": None}
[docs] def initialize(self, start_time=None, end_time=None, step_size=None, model=None): pass
[docs] def do_step(self, secondTime=None, dateTime=None, step_size=None): self.output["C"].set(self.input["K"] - 273.15)