Name | Description |
---|---|
Examples | Collection of models that illustrate model use and test models |
FixedBoundary_phX | Boundary pressure, specific enthalpy and mass fraction source |
FixedBoundary_pTX | Boundary pressure, temperature and mass fraction source |
PrescribedBoundary_phX | Prescribed pressure, specific enthalpy and mass fraction source |
PrescribedBoundary_pTX | Prescribed pressure, temperature and mass fraction source |
PrescribedExtraPropertyFlowRate | Source with mass flow that does not take part in medium mass balance (such as CO2) |
PrescribedMassFlowRate_phX | Ideal pump that produces a prescribed mass flow with prescribed specific enthalpy and mass fraction |
PrescribedMassFlowRate_pTX | Ideal pump that produces a prescribed mass flow with prescribed temperature and mass fraction |
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium model within the source | |
AbsolutePressure | p | Boundary pressure [Pa] | |
SpecificEnthalpy | h | Boundary specific enthalpy [J/kg] | |
Only for multi-substance flow | |||
MassFraction | X[Medium.nX] | Medium.X_default | Boundary mass fractions m_i/m [kg/kg] |
Advanced | |||
Temp | flowDirection | Types.SourceFlowDirection.Bi... | Uni- or bidirectional flow component |
Type | Name | Description |
---|---|---|
FluidPort_b | port |
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;
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium model within the source | |
AbsolutePressure | p | Boundary pressure [Pa] | |
Temperature | T | Boundary temperature [K] | |
Only for multi-substance flow | |||
MassFraction | X[Medium.nX] | Medium.X_default | Boundary mass fractions m_i/m [kg/kg] |
Advanced | |||
Temp | flowDirection | Types.SourceFlowDirection.Bi... | Uni- or bidirectional flow component |
Type | Name | Description |
---|---|---|
FluidPort_b | port |
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;
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium model within the source | |
Pressure | p | Fixed value of pressure [Pa] | |
SpecificEnthalpy | h | Fixed value of specific enthalpy [J/kg] | |
MassFraction | X[Medium.nX] | Medium.X_default | Fixed value of composition [1] |
Advanced | |||
Temp | flowDirection | Types.SourceFlowDirection.Bi... | Uni- or bidirectional flow component |
Type | Name | Description |
---|---|---|
FluidPort_b | port | |
input RealInput | p_in | Prescribed boundary pressure |
input RealInput | h_in | Prescribed boundary specific enthalpy |
input RealInput | X_in[Medium.nX] | Prescribed boundary composition |
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;
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium model within the source | |
Pressure | p | Fixed value of pressure [Pa] | |
Temperature | T | Fixed value of temperature [K] | |
MassFraction | X[Medium.nX] | Medium.X_default | Fixed value of composition [1] |
Advanced | |||
Temp | flowDirection | Types.SourceFlowDirection.Bi... | Uni- or bidirectional flow component |
Type | Name | Description |
---|---|---|
FluidPort_b | port | |
input RealInput | p_in | Prescribed boundary pressure |
input RealInput | T_in | Prescribed boundary temperature |
input RealInput | X_in[Medium.nX] | Prescribed boundary composition |
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;
Type | Name | Default | Description |
---|---|---|---|
ExtraPropertyFlowRate | mC_flow[Medium.nC] | ones(Medium.nC) | Fixed mass flow rate for extra property going out of the fluid port |
Type | Name | Description |
---|---|---|
FluidPort_b | port | |
input RealInput | mC_flow_in[Medium.nC] | Prescribed mass flow rate for extra property |
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;
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium model within the source | |
MassFlowRate | m_flow | 0 | Fixed mass flow rate going out of the fluid port [kg/s] |
SpecificEnthalpy | h | Fixed value of the fluid specific enthalpy [J/kg] | |
MassFraction | X[Medium.nX] | Medium.X_default | Fixed value of the fluid composition [kg/kg] |
Advanced | |||
Temp | flowDirection | Types.SourceFlowDirection.Bi... | Uni- or bidirectional flow component |
Type | Name | Description |
---|---|---|
FluidPort_b | port | |
input RealInput | m_flow_in | Prescribed mass flow rate |
input RealInput | h_in | Prescribed fluid specific enthalpy |
input RealInput | X_in[Medium.nX] | Prescribed fluid composition |
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;
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium model within the source | |
MassFlowRate | m_flow | 0 | Fixed mass flow rate going out of the fluid port [kg/s] |
Temperature | T | Fixed value of the fluid temperature [K] | |
MassFraction | X[Medium.nX] | Medium.X_default | Fixed value of the fluid composition [kg/kg] |
Advanced | |||
Temp | flowDirection | Types.SourceFlowDirection.Bi... | Uni- or bidirectional flow component |
Type | Name | Description |
---|---|---|
FluidPort_b | port | |
input RealInput | m_flow_in | Prescribed mass flow rate |
input RealInput | T_in | Prescribed fluid temperature |
input RealInput | X_in[Medium.nX] | Prescribed fluid composition |
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;