modelBoundary_ph
Extends from Buildings.Fluid.Sources.BaseClasses.PartialSource_Xi_C (Partial component source with parameter definitions for Xi and C).
Information
Defines prescribed values for boundary conditions:
- Prescribed boundary pressure.
- Prescribed boundary specific enthalpy.
- Boundary composition (only for multi-substance or trace-substance flow).
Typical use and important parameters
If use_p_in is false (default option),
the p parameter is used as boundary 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.
The same applies to the specific enthalpy h, composition Xi or X and trace substances C.
Options
Instead of using Xi_in (the independent composition fractions),
the advanced tab provides an option for setting all
composition fractions using X_in.
use_X_in and use_Xi_in cannot be used
at the same time.
Parameter verifyInputs can be set to true
to enable a check that verifies the validity of the used specific enthalpy
and pressures.
This removes the corresponding overhead from the model, which is
a substantial part of the overhead of this model.
See #882
for more information.
Note, that boundary specific enthalpy, mass fractions and trace substances have only an effect if the mass flow is from the boundary into the port. If mass is flowing from the port into the boundary, the boundary definitions, with exception of boundary pressure, do not have an effect.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nPorts (from PartialSource) | 0 | Number of ports |
| Advanced | |||
| Boolean | verifyInputs (from PartialSource) | false | Set to true to stop the simulation with an error if the medium temperature is outside its allowable range |
| Boolean | use_X_in (from PartialSource_Xi_C) | false | Get the composition (all fractions) from the input connector |
| Conditional inputs | |||
| Boolean | use_Xi_in (from PartialSource_Xi_C) | false | Get the composition (independent fractions) from the input connector |
| Boolean | use_C_in (from PartialSource_Xi_C) | false | Get the trace substances from the input connector |
| Boolean | use_p_in | false | Get the pressure from the input connector |
| Boolean | use_h_in | false | Get the specific enthalpy from the input connector |
| Fixed inputs | |||
| Medium.MassFraction[Medium.nX] | X (from PartialSource_Xi_C) | Medium.X_default | Fixed value of composition |
| Medium.ExtraProperty[Medium.nC] | C (from PartialSource_Xi_C) | fill(0, Medium.nC) | Fixed values of trace substances |
| Medium.AbsolutePressure | p | Medium.p_default | Fixed value of pressure |
| Medium.SpecificEnthalpy | h | Medium.h_default | Fixed value of specific enthalpy |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Fluid.Interfaces.FluidPorts_b[nPorts] | ports (from PartialSource) | Fluid ports | |
| Modelica.Blocks.Interfaces.RealInput[Medium.nX] | X_in (from PartialSource_Xi_C) | Prescribed boundary composition | |
| Modelica.Blocks.Interfaces.RealInput[Medium.nXi] | Xi_in (from PartialSource_Xi_C) | Prescribed boundary composition | |
| Modelica.Blocks.Interfaces.RealInput[Medium.nC] | C_in (from PartialSource_Xi_C) | Prescribed boundary trace substances | |
| Modelica.Blocks.Interfaces.RealInput | p_in | Prescribed boundary pressure | |
| Modelica.Blocks.Interfaces.RealInput | h_in | Prescribed boundary specific enthalpy |
Revisions
-
March 11, 2024, by Michael Wetter:
Corrected use ofHideResult.
This is for #1850. -
Juni 7, 2019, by Michael Wetter:
Added constant boolean expressions to avoid a potential string comparison in an equation section.
See #1148. -
Juni 4, 2019, by Filip Jorissen:
Added check for the value ofpandp_in.
See #1148. -
January 25, 2019, by Michael Wetter:
Refactored use of base classes.
See #1072. -
February 2nd, 2018 by Filip Jorissen
Mademediumconditional and refactored inputs. See #882. -
April 18, 2017, by Filip Jorissen:
ChangedcheckBoundaryimplementation such that it is run as an initial equation when it depends on parameters only. See #728. -
January 26, 2016, by Michael Wetter:
Addedunitandquantityattributes. -
May 29, 2014, by Michael Wetter:
Removed undesirable annotationEvaluate=true. -
September 29, 2009, by Michael Wetter:
First implementation. Implementation is based onModelica.Fluid.