Skip to content

Commit

Permalink
Merged and consolidated models from Buidings library testing
Browse files Browse the repository at this point in the history
This merges https://github.com/lbl-srg/modelica-buildings/tree/IBPSASync_issue1412_humidifer_u_Cvode_d_T_state 154682c039d2ad083bf24be095d934f633f1f2c6, and makes some further changes. For #1412. [ci skip]
  • Loading branch information
mwetter committed Nov 20, 2020
1 parent 4f23589 commit 09724c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions IBPSA/Fluid/Interfaces/ConservationEquation.mo
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ model ConservationEquation "Lumped volume with mass and energy balance"
"Mass of fluid";

Modelica.SIunits.Mass[Medium.nXi] mXi(
each stateSelect=StateSelect.never,
start=fluidVolume*rho_start*X_start[1:Medium.nXi])
"Masses of independent components in the fluid";
Modelica.SIunits.Mass[Medium.nC] mC(
Expand Down
11 changes: 7 additions & 4 deletions IBPSA/Media/Air.mo
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,17 @@ public
final parameter Boolean standardOrderComponents=true
"If true, and reducedX = true, the last element of X will be computed from the other ones";

InputAbsolutePressure p "Absolute pressure of medium";
InputAbsolutePressure p(
stateSelect=StateSelect.avoid) "Absolute pressure of medium";
InputMassFraction[1] Xi(
start=X_default[1:1],
nominal={0.01},
each stateSelect=if preferredMediumStates then StateSelect.prefer else StateSelect.default)
"Structurally independent mass fractions";
InputSpecificEnthalpy h "Specific enthalpy of medium";
Modelica.SIunits.Density d "Density of medium";
Modelica.SIunits.Density d(
stateSelect=StateSelect.never)
"Density of medium";
Modelica.SIunits.Temperature T(
start=reference_T,
nominal=100)
Expand Down Expand Up @@ -102,8 +105,8 @@ public
Modelica.SIunits.TemperatureDifference dT = if reference_T_is_0degC then T_degC else T - reference_T
"Temperature difference used to compute enthalpy";
Modelica.SIunits.PressureDifference dp(
nominal=1000,
stateSelect=if preferredMediumStates then StateSelect.prefer else StateSelect.default) = p - reference_p
stateSelect=if preferredMediumStates then StateSelect.prefer else StateSelect.default,
nominal=1000) = p - reference_p
"Differential pressure";
equation
MM = 1/(X[1]/steam.MM+(X[2])/dryair.MM);
Expand Down

0 comments on commit 09724c1

Please sign in to comment.