Package with base classes for Buildings.Utilities.IO.BCVTB
This package contains base classes that are used to construct the models in Buildings.Utilities.IO.BCVTB.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Name | Description |
---|---|
FluidInterface | Partial class for fluid interface that can be coupled to BCVTB |
closeClientSocket | Closes the socket for the inter process communication |
establishClientSocket | Establishes the client socket connection |
exchangeReals | Exchanges values of type Real with the socket |
Partial class for fluid interface that can be coupled to BCVTB
This is a partial model that is used to construct models for interfacing fluid flow systems with the BCVTB interface.
Extends from Buildings.BaseClasses.BaseIcon (Base icon).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | Modelica.Media.Interfaces.Pa... | Medium model within the source | |
Boolean | use_m_flow_in | false | Get the mass flow rate from the input connector |
MassFlowRate | m_flow | 0 | Fixed mass flow rate going out of the fluid port [kg/s] |
Nominal condition | |||
MassFlowRate | m_flow_nominal | Nominal mass flow rate, used for regularization near zero flow [kg/s] | |
Advanced | |||
MassFlowRate | m_flow_small | 1E-4*m_flow_nominal | For bi-directional flow, temperature is regularized in the region |m_flow| < m_flow_small (m_flow_small > 0 required) [kg/s] |
Type | Name | Description |
---|---|---|
replaceable package Medium | Medium model within the source | |
input RealInput | m_flow_in | Prescribed mass flow rate |
input RealInput | T_in | Prescribed boundary temperature |
FluidPorts_b | ports[nPorts] | |
output RealOutput | HSen_flow | Sensible enthalpy flow rate, positive if flow into the component [W] |
Closes the socket for the inter process communication
Type | Name | Default | Description |
---|---|---|---|
Integer | socketFD | Socket file descripter, or a negative value if an error occurred |
Type | Name | Description |
---|---|---|
Integer | retVal | Return value of the function that closes the socket connection |
Establishes the client socket connection
For the xml file name, on Windows use two backslashes to separate directories, i.e., use
xmlFileName="C:\\examples\\dymola-room\\socket.cfg"
Type | Name | Default | Description |
---|---|---|---|
String | xmlFileName | "socket.cfg" | Name of xml file that contains the socket information |
Type | Name | Description |
---|---|---|
Integer | socketFD | Socket file descripter, or a negative value if an error occurred |
Exchanges values of type Real with the socket
Real
with the socket.
This function must only be called once in each
communication interval.
Type | Name | Default | Description |
---|---|---|---|
Integer | socketFD | Socket file descripter | |
Integer | flaWri | Communication flag to write to the socket stream | |
Time | simTimWri | Current simulation time in seconds to write [s] | |
Real | dblValWri[nDblWri] | Double values to write | |
Integer | nDblWri | Number of double values to write | |
Integer | nDblRea | Number of double values to read |
Type | Name | Description |
---|---|---|
Integer | flaRea | Communication flag read from the socket stream |
Time | simTimRea | Current simulation time in seconds read from socket [s] |
Real | dblValRea[nDblRea] | Double values read from socket |
Integer | retVal | The exit value, which is negative if an error occurred |