from ._base_components import BaseComponents from ..tools.enthalpy import get_Dew_from_HumRatio class Mixed(BaseComponents): def __init__(self, name): super().__init__(name) @classmethod def model( cls, TinA,HinA,FA, TinM,HinM,FM, engine ): # FUNC = cls.get_func_by_engine(engine) # WHERE = FUNC['WHERE'] # FA = WHERE(FA > 0,FA,0) # FM = WHERE(FM > 0,FM,0) ToutA = (TinA * FA + TinM * FM) / (FA + FM) HoutA = (HinA * FA + HinM * FM) / (FA + FM) DoutA = get_Dew_from_HumRatio(HoutA,engine) return {'ToutA':ToutA,'HoutA':HoutA,'DoutA':DoutA,'FA':FA,'FM':FM} @classmethod def prior(cls) -> dict: param = {} return param