modelPartialTwoNPortsInterface

Partial model with two vectors of ports and declaration of quantities for bore field models

Extends from Buildings.Fluid.Geothermal.ZonedBorefields.Interfaces.PartialTwoNPorts (Partial component with vectors of ports).

Information

This component defines the interface for models with multiple pairs of inlet and outlet ports, here implemented as two vectors of ports. It is similar to Modelica.Fluid.Interfaces.PartialTwoPortTransport, but it does not include the species balance

  port_b[i].Xi_outflow = inStream(port_a[i].Xi_outflow);

Thus, it can be used as a base class for a heat and mass transfer component

The partial model extends Buildings.Fluid.Geothermal.ZonedBorefields.Interfaces.PartialTwoNPorts and adds quantities that are used by many models such as m_flow_nominal, m_flow and dp.

Parameters

TypeNameDefaultDescription
IntegernPorts (from PartialTwoNPorts)Number of fluid ports on each side
Assumptions
BooleanallowFlowReversal (from PartialTwoNPorts)true= false to simplify equations, assuming, but not enforcing, no flow reversal
Nominal condition
Modelica.Units.SI.MassFlowRate[nPorts]m_flow_nominalNominal mass flow rate
Advanced
Modelica.Units.SI.MassFlowRate[nPorts]m_flow_small1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow
Advanced › Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed

Connectors

TypeNameDefaultDescription
Modelica.Fluid.Interfaces.FluidPort_a[nPorts]port_a (from PartialTwoNPorts)Fluid connector a (positive design flow direction is from port_a to port_b)
Modelica.Fluid.Interfaces.FluidPort_b[nPorts]port_b (from PartialTwoNPorts)Fluid connector b (positive design flow direction is from port_a to port_b)

Components

TypeNameDefaultDescription
Modelica.Units.SI.MassFlowRate[nPorts]m_flowport_a[:].m_flowMass flow rate from port_a to port_b (m_flow > 0 is design flow direction)
Modelica.Units.SI.PressureDifference[nPorts]dpport_a[:].p - port_b[:].pPressure difference between port_a and port_b
Medium.ThermodynamicState[nPorts]sta_aif allowFlowReversal then Medium.setState_phX(port_a.p, noEvent(actualStream(port_a.h_outflow)), noEvent(actualStream(port_a.Xi_outflow))) else Medium.setState_phX(port_a.p, noEvent(inStream(port_a.h_outflow)), noEvent(inStream(port_a.Xi_outflow)))Medium properties in port_a
Medium.ThermodynamicState[nPorts]sta_bif allowFlowReversal then Medium.setState_phX(port_b.p, noEvent(actualStream(port_b.h_outflow)), noEvent(actualStream(port_b.Xi_outflow))) else Medium.setState_phX(port_b.p, noEvent(port_b.h_outflow), noEvent(port_b.Xi_outflow))Medium properties in port_b

Revisions

  • May 9, 2024, by Michael Wetter:
    Corrected handling of array for state calculations.
  • February, 2024, by Massimo Cimmino:
    First implementation.