Buildings.Utilities.Psychrometrics.BaseClasses
Package with base classes for Buildings.Utilities.Psychrometrics
Information
This package contains base classes that are used to construct the models in Buildings.Utilities.Psychrometrics.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Package Content
Name | Description |
---|---|
HumidityRatioVaporPressure | Humidity ratio for given water vapor pressure |
Buildings.Utilities.Psychrometrics.BaseClasses.HumidityRatioVaporPressure
Humidity ratio for given water vapor pressure
Information
Partial Block to compute the relation between humidity ratio and water vapor partial pressure.
If use_p_in
is false (default option), the p
parameter
is used as atmospheric pressure,
and the p_in
input connector is disabled;
if use_p_in
is true, then the p
parameter is ignored,
and the value provided by the input connector is used instead.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Boolean | use_p_in | true | Get the pressure from the input connector |
Pressure | p | 101325 | Fixed value of pressure [Pa] |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | p_in | Atmospheric Pressure [Pa] |
Modelica definition
partial block HumidityRatioVaporPressure
"Humidity ratio for given water vapor pressure"
extends Modelica.Blocks.Icons.Block;
parameter Boolean use_p_in = true "Get the pressure from the input connector";
parameter Modelica.Units.SI.Pressure p=101325 "Fixed value of pressure";
Modelica.Blocks.Interfaces.RealInput p_in(final quantity="Pressure",
final unit="Pa",
displayUnit="Pa",
min = 0) if use_p_in
"Atmospheric Pressure";
protected
Modelica.Blocks.Interfaces.RealInput p_in_internal
"Needed to connect to conditional connector";
equation
connect(p_in, p_in_internal);
if not use_p_in then
p_in_internal = p;
end if;
end HumidityRatioVaporPressure;