ibpsa / modelica-ibpsa

Modelica library for building and district energy systems developed within IBPSA Project 1
https://ibpsa.github.io/project1
140 stars 83 forks source link

Allow XSet as an input for PrescribedOutletState #763

Closed mwetter closed 7 years ago

mwetter commented 7 years ago

The model PrescribedOutletState only takes as an input TSet. We should also allow XSet in order to model a humidifier that takes XSet as an input. The section that computes dhSetAct should be moved to a model-internal function so that it can be used to compute the raise in enthalpy and the raise in mass fraction. (This was not done in https://github.com/ibpsa/modelica-ibpsa/issues/39 as there was no need yet.)

This change will required using PartialTwoPort as the base class.

Parameters use_{T,X}Set = true could be used to enable or disable a mode and its associated function calls. As by default a new input connector will be present, the change is not backward compatible.

Note that by adding a capacity limit, this will allow something similar to a setpoint manager in EnergyPlus for temperature and humidity (see http://bigladdersoftware.com/epx/docs/8-0/engineering-reference/page-100.html). For example if we set Q_flow_maxHeat=Modelica.Constants.inf (the default) and Q_flow_maxCool = 0, we could write h_out = smoothMax(h_in, hSet) if the model is steady-state.

mwetter commented 7 years ago