Buildings.Fluids.Sources

Package with source models for species

Information


This package contains source models for species.

Package Content

NameDescription
Buildings.Fluids.Sources.Examples Examples Collection of models that illustrate model use and test models
Buildings.Fluids.Sources.FixedBoundary_phX FixedBoundary_phX Boundary pressure, specific enthalpy and mass fraction source
Buildings.Fluids.Sources.FixedBoundary_pTX FixedBoundary_pTX Boundary pressure, temperature and mass fraction source
Buildings.Fluids.Sources.PrescribedBoundary_phX PrescribedBoundary_phX Prescribed pressure, specific enthalpy and mass fraction source
Buildings.Fluids.Sources.PrescribedBoundary_pTX PrescribedBoundary_pTX Prescribed pressure, temperature and mass fraction source
Buildings.Fluids.Sources.PrescribedExtraPropertyFlowRate PrescribedExtraPropertyFlowRate Source with mass flow that does not take part in medium mass balance (such as CO2)
Buildings.Fluids.Sources.PrescribedMassFlowRate_phX PrescribedMassFlowRate_phX Ideal pump that produces a prescribed mass flow with prescribed specific enthalpy and mass fraction
Buildings.Fluids.Sources.PrescribedMassFlowRate_pTX PrescribedMassFlowRate_pTX Ideal pump that produces a prescribed mass flow with prescribed temperature and mass fraction


Buildings.Fluids.Sources.FixedBoundary_phX Buildings.Fluids.Sources.FixedBoundary_phX

Boundary pressure, specific enthalpy and mass fraction source

Buildings.Fluids.Sources.FixedBoundary_phX

Information


This model is used to add the auxiliary species flow, 
such as for modeling carbon dioxide transport, to the base
model. Otherwise, the model is identical to

Modelica_Fluid.Sources.FixedBoundary_phX.

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium model within the source
AbsolutePressurep Boundary pressure [Pa]
SpecificEnthalpyh Boundary specific enthalpy [J/kg]
Only for multi-substance flow
MassFractionX[Medium.nX]Medium.X_defaultBoundary mass fractions m_i/m [kg/kg]
Advanced
TempflowDirectionTypes.SourceFlowDirection.Bi...Uni- or bidirectional flow component

Connectors

TypeNameDescription
FluidPort_bport 

Modelica definition

model FixedBoundary_phX 
  "Boundary pressure, specific enthalpy and mass fraction source" 
  extends Modelica_Fluid.Sources.FixedBoundary_phX;
equation 
 ///////////////////////////////////////////////////////////////////////////////////
 // Extra species flow. This may be removed when upgrading to the new Modelica.Fluid.  
 port.mC_flow = semiLinear(port.m_flow, port.C, 0);
 ///////////////////////////////////////////////////////////////////////////////////
end FixedBoundary_phX;

Buildings.Fluids.Sources.FixedBoundary_pTX Buildings.Fluids.Sources.FixedBoundary_pTX

Boundary pressure, temperature and mass fraction source

Buildings.Fluids.Sources.FixedBoundary_pTX

Information


This model is used to add the auxiliary species flow, 
such as for modeling carbon dioxide transport, to the base
model. Otherwise, the model is identical to

Modelica_Fluid.Sources.FixedBoundary_pTX.

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium model within the source
AbsolutePressurep Boundary pressure [Pa]
TemperatureT Boundary temperature [K]
Only for multi-substance flow
MassFractionX[Medium.nX]Medium.X_defaultBoundary mass fractions m_i/m [kg/kg]
Advanced
TempflowDirectionTypes.SourceFlowDirection.Bi...Uni- or bidirectional flow component

Connectors

TypeNameDescription
FluidPort_bport 

Modelica definition

model FixedBoundary_pTX 
  "Boundary pressure, temperature and mass fraction source" 
  extends Modelica_Fluid.Sources.FixedBoundary_pTX;
equation 
 ///////////////////////////////////////////////////////////////////////////////////
 // Extra species flow. This may be removed when upgrading to the new Modelica.Fluid.  
 port.mC_flow = semiLinear(port.m_flow, port.C, 0);
 ///////////////////////////////////////////////////////////////////////////////////
end FixedBoundary_pTX;

Buildings.Fluids.Sources.PrescribedBoundary_phX Buildings.Fluids.Sources.PrescribedBoundary_phX

Prescribed pressure, specific enthalpy and mass fraction source

Buildings.Fluids.Sources.PrescribedBoundary_phX

Information


This model is used to add the auxiliary species flow, 
such as for modeling carbon dioxide transport, to the base
model. Otherwise, the model is identical to

Modelica_Fluid.Sources.PrescribedBoundary_phX.

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium model within the source
Pressurep Fixed value of pressure [Pa]
SpecificEnthalpyh Fixed value of specific enthalpy [J/kg]
MassFractionX[Medium.nX]Medium.X_defaultFixed value of composition [1]
Advanced
TempflowDirectionTypes.SourceFlowDirection.Bi...Uni- or bidirectional flow component

Connectors

TypeNameDescription
FluidPort_bport 
input RealInputp_inPrescribed boundary pressure
input RealInputh_inPrescribed boundary specific enthalpy
input RealInputX_in[Medium.nX]Prescribed boundary composition

Modelica definition

model PrescribedBoundary_phX 
  "Prescribed pressure, specific enthalpy and mass fraction source" 
  extends Modelica_Fluid.Sources.PrescribedBoundary_phX;
equation 
 ///////////////////////////////////////////////////////////////////////////////////
 // Extra species flow. This may be removed when upgrading to the new Modelica.Fluid.  
 port.mC_flow = semiLinear(port.m_flow, port.C, 0);
 ///////////////////////////////////////////////////////////////////////////////////
end PrescribedBoundary_phX;

Buildings.Fluids.Sources.PrescribedBoundary_pTX Buildings.Fluids.Sources.PrescribedBoundary_pTX

Prescribed pressure, temperature and mass fraction source

Buildings.Fluids.Sources.PrescribedBoundary_pTX

Information


This model is used to add the auxiliary species flow, 
such as for modeling carbon dioxide transport, to the base
model. Otherwise, the model is identical to

Modelica_Fluid.Sources.PrescribedBoundary_pTX.

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium model within the source
Pressurep Fixed value of pressure [Pa]
TemperatureT Fixed value of temperature [K]
MassFractionX[Medium.nX]Medium.X_defaultFixed value of composition [1]
Advanced
TempflowDirectionTypes.SourceFlowDirection.Bi...Uni- or bidirectional flow component

Connectors

TypeNameDescription
FluidPort_bport 
input RealInputp_inPrescribed boundary pressure
input RealInputT_inPrescribed boundary temperature
input RealInputX_in[Medium.nX]Prescribed boundary composition

Modelica definition

model PrescribedBoundary_pTX 
  "Prescribed pressure, temperature and mass fraction source" 
  extends Modelica_Fluid.Sources.PrescribedBoundary_pTX;
equation 
 ///////////////////////////////////////////////////////////////////////////////////
 // Extra species flow. This may be removed when upgrading to the new Modelica.Fluid.  
 port.mC_flow = semiLinear(port.m_flow, port.C, 0);
 ///////////////////////////////////////////////////////////////////////////////////
end PrescribedBoundary_pTX;

Buildings.Fluids.Sources.PrescribedExtraPropertyFlowRate Buildings.Fluids.Sources.PrescribedExtraPropertyFlowRate

Source with mass flow that does not take part in medium mass balance (such as CO2)

Buildings.Fluids.Sources.PrescribedExtraPropertyFlowRate

Information


This model adds a mass flow rate to the port for an auxiliary
medium that does not take part in the mass balance of the medium
model. Instead, this mass transfer is tracked separately. A typical
use of this source is to add carbon dioxide to a room, since the 
carbon dioxide concentration is typically so small that it need not be added to the
room mass balance.

Parameters

TypeNameDefaultDescription
ExtraPropertyFlowRatemC_flow[Medium.nC]ones(Medium.nC)Fixed mass flow rate for extra property going out of the fluid port

Connectors

TypeNameDescription
FluidPort_bport 
input RealInputmC_flow_in[Medium.nC]Prescribed mass flow rate for extra property

Modelica definition

model PrescribedExtraPropertyFlowRate 
  "Source with mass flow that does not take part in medium mass balance (such as CO2)" 
  extends Buildings.BaseClasses.BaseIcon;
  replaceable package Medium = 
      Modelica.Media.Interfaces.PartialMedium "Medium model within the source";
  
  Modelica_Fluid.Interfaces.FluidPort_b port(redeclare package Medium = Medium,
      m_flow(min=-Modelica.Constants.inf, max=0));
  
  parameter Medium.ExtraPropertyFlowRate mC_flow[Medium.nC] = ones(Medium.nC) 
    "Fixed mass flow rate for extra property going out of the fluid port";
  Modelica.Blocks.Interfaces.RealInput mC_flow_in[Medium.nC](redeclare type 
      SignalType = 
       Medium.ExtraPropertyFlowRate) 
    "Prescribed mass flow rate for extra property";
equation 
  if cardinality(mC_flow_in)==0 then
    mC_flow_in = mC_flow;
  end if;
  assert(sum(mC_flow_in) >= 0, "Reverse flow for species source is not implemented yet.");
  port.m_flow = -Modelica.Constants.eps;
  port.C = mC_flow_in/Modelica.Constants.eps;
  port.h = Medium.h_default;
end PrescribedExtraPropertyFlowRate;

Buildings.Fluids.Sources.PrescribedMassFlowRate_phX Buildings.Fluids.Sources.PrescribedMassFlowRate_phX

Ideal pump that produces a prescribed mass flow with prescribed specific enthalpy and mass fraction

Buildings.Fluids.Sources.PrescribedMassFlowRate_phX

Information


This model is used to add the auxiliary species flow, 
such as for modeling carbon dioxide transport, to the base
model. Otherwise, the model is identical to

Modelica_Fluid.Sources.PrescribedMassFlowRate_hX.

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium model within the source
MassFlowRatem_flow0Fixed mass flow rate going out of the fluid port [kg/s]
SpecificEnthalpyh Fixed value of the fluid specific enthalpy [J/kg]
MassFractionX[Medium.nX]Medium.X_defaultFixed value of the fluid composition [kg/kg]
Advanced
TempflowDirectionTypes.SourceFlowDirection.Bi...Uni- or bidirectional flow component

Connectors

TypeNameDescription
FluidPort_bport 
input RealInputm_flow_inPrescribed mass flow rate
input RealInputh_inPrescribed fluid specific enthalpy
input RealInputX_in[Medium.nX]Prescribed fluid composition

Modelica definition

model PrescribedMassFlowRate_phX 
  "Ideal pump that produces a prescribed mass flow with prescribed specific enthalpy and mass fraction" 
  extends Modelica_Fluid.Sources.PrescribedMassFlowRate_hX;
equation 
 ///////////////////////////////////////////////////////////////////////////////////
 // Extra species flow. This may be removed when upgrading to the new Modelica.Fluid.  
 port.mC_flow = semiLinear(port.m_flow, port.C, 0);
 ///////////////////////////////////////////////////////////////////////////////////
end PrescribedMassFlowRate_phX;

Buildings.Fluids.Sources.PrescribedMassFlowRate_pTX Buildings.Fluids.Sources.PrescribedMassFlowRate_pTX

Ideal pump that produces a prescribed mass flow with prescribed temperature and mass fraction

Buildings.Fluids.Sources.PrescribedMassFlowRate_pTX

Information


This model is used to add the auxiliary species flow, 
such as for modeling carbon dioxide transport, to the base
model. Otherwise, the model is identical to

Modelica_Fluid.Sources.PrescribedMassFlowRate_TX.

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium model within the source
MassFlowRatem_flow0Fixed mass flow rate going out of the fluid port [kg/s]
TemperatureT Fixed value of the fluid temperature [K]
MassFractionX[Medium.nX]Medium.X_defaultFixed value of the fluid composition [kg/kg]
Advanced
TempflowDirectionTypes.SourceFlowDirection.Bi...Uni- or bidirectional flow component

Connectors

TypeNameDescription
FluidPort_bport 
input RealInputm_flow_inPrescribed mass flow rate
input RealInputT_inPrescribed fluid temperature
input RealInputX_in[Medium.nX]Prescribed fluid composition

Modelica definition

model PrescribedMassFlowRate_pTX 
  "Ideal pump that produces a prescribed mass flow with prescribed temperature and mass fraction" 
  extends Modelica_Fluid.Sources.PrescribedMassFlowRate_TX;
equation 
 ///////////////////////////////////////////////////////////////////////////////////
 // Extra species flow. This may be removed when upgrading to the new Modelica.Fluid.  
 port.mC_flow = semiLinear(port.m_flow, port.C, 0);
 ///////////////////////////////////////////////////////////////////////////////////
end PrescribedMassFlowRate_pTX;

HTML-documentation generated by Dymola Tue Sep 30 14:24:34 2008.