From f6679b98f9b775cdb6aeb130a814889606224027 Mon Sep 17 00:00:00 2001 From: Huang <7q0@ornl.gov> Date: Thu, 28 Mar 2024 13:56:33 -0400 Subject: [PATCH 01/16] first implementation --- .../Desiccant/BaseClasses/PartialDesiccant.mo | 322 ++++++++++++++++++ .../Desiccant/BaseClasses/Performance.mo | 231 +++++++++++++ .../BaseClasses/Validation/Performance.mo | 110 ++++++ .../BaseClasses/Validation/package.mo | 20 ++ .../BaseClasses/Validation/package.order | 1 + .../Desiccant/BaseClasses/package.mo | 11 + .../Desiccant/BaseClasses/package.order | 4 + .../Desiccant/BaseClasses/performanceCurve.mo | 67 ++++ .../Dehumidifiers/Desiccant/Data/Default.mo | 51 +++ .../Dehumidifiers/Desiccant/Data/Generic.mo | 35 ++ .../Dehumidifiers/Desiccant/Data/package.mo | 8 + .../Desiccant/Data/package.order | 2 + .../Desiccant/ElectricCoilVariableSpeedFan.mo | 110 ++++++ .../Examples/ElectricCoilVariableSpeedFan.mo | 138 ++++++++ .../Desiccant/Examples/package.mo | 4 + .../Desiccant/Examples/package.order | 1 + .../Fluid/Dehumidifiers/Desiccant/package.mo | 10 + .../Dehumidifiers/Desiccant/package.order | 4 + Buildings/Fluid/Dehumidifiers/package.mo | 10 + Buildings/Fluid/Dehumidifiers/package.order | 1 + 20 files changed, 1140 insertions(+) create mode 100644 Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/PartialDesiccant.mo create mode 100644 Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/Performance.mo create mode 100644 Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/Validation/Performance.mo create mode 100644 Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/Validation/package.mo create mode 100644 Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/Validation/package.order create mode 100644 Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/package.mo create mode 100644 Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/package.order create mode 100644 Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/performanceCurve.mo create mode 100644 Buildings/Fluid/Dehumidifiers/Desiccant/Data/Default.mo create mode 100644 Buildings/Fluid/Dehumidifiers/Desiccant/Data/Generic.mo create mode 100644 Buildings/Fluid/Dehumidifiers/Desiccant/Data/package.mo create mode 100644 Buildings/Fluid/Dehumidifiers/Desiccant/Data/package.order create mode 100644 Buildings/Fluid/Dehumidifiers/Desiccant/ElectricCoilVariableSpeedFan.mo create mode 100644 Buildings/Fluid/Dehumidifiers/Desiccant/Examples/ElectricCoilVariableSpeedFan.mo create mode 100644 Buildings/Fluid/Dehumidifiers/Desiccant/Examples/package.mo create mode 100644 Buildings/Fluid/Dehumidifiers/Desiccant/Examples/package.order create mode 100644 Buildings/Fluid/Dehumidifiers/Desiccant/package.mo create mode 100644 Buildings/Fluid/Dehumidifiers/Desiccant/package.order create mode 100644 Buildings/Fluid/Dehumidifiers/package.mo create mode 100644 Buildings/Fluid/Dehumidifiers/package.order diff --git a/Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/PartialDesiccant.mo b/Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/PartialDesiccant.mo new file mode 100644 index 00000000000..5f47e307a92 --- /dev/null +++ b/Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/PartialDesiccant.mo @@ -0,0 +1,322 @@ +within Buildings.Fluid.Dehumidifiers.Desiccant.BaseClasses; +partial model PartialDesiccant + "Partial model for desiccant dehumidifiers" + replaceable package Medium1 = + Modelica.Media.Interfaces.PartialCondensingGases + "Process air"; + replaceable package Medium2 = + Modelica.Media.Interfaces.PartialCondensingGases + "Regeneration air"; + parameter Modelica.Units.SI.MassFlowRate m1_flow_nominal + "Nominal process air mass flow rate" + annotation (Dialog(group="Nominal condition")); + parameter Modelica.Units.SI.MassFlowRate m2_flow_nominal + "Nominal regeneration air mass flow rate" + annotation (Dialog(group="Nominal condition")); + parameter Modelica.Units.SI.PressureDifference dp1_nominal( + displayUnit="Pa") + "Nominal process air pressure drop" + annotation (Dialog(group="Nominal condition")); + parameter Modelica.Units.SI.PressureDifference dp2_nominal( + displayUnit="Pa") + "Nominal regeneration air pressure drop" + annotation (Dialog(group="Nominal condition")); + parameter Modelica.Units.SI.Time tau=30 + "Time constant of the regeneration air at nominal flow "; + parameter Real PMot_nominal( + final unit="W") + "Nominal power consumption of the motor" + annotation (Dialog(group="Nominal condition")); + parameter Real vPro_nominal + "Nominal velocity of the process air" + annotation (Dialog(group="Nominal condition")); + final parameter Modelica.Units.SI.VolumeFlowRate VPro_flow_nominal = m1_flow_nominal/rho_Pro_default + "Nominal volumetric flow rate of the process air" + annotation (Dialog(group="Nominal condition")); + parameter Real vReg_nominal + "Nominal velocity of the regeneration air" + annotation (Dialog(group="Nominal condition")); + final parameter Modelica.Units.SI.VolumeFlowRate VReg_flow_nominal = m2_flow_nominal/rho_Reg_default + "Nominal volumetric flow rate of the regeneration air" + annotation (Dialog(group="Nominal condition")); + parameter Modelica.Units.SI.HeatFlowRate QReg_flow_nominal + "Nominal regeneration heating capacity" + annotation (Dialog(group="Nominal condition")); + parameter Buildings.Fluid.Dehumidifiers.Desiccant.Data.Generic perDat + "Performance data" + annotation (Placement(transformation(extent={{60,-78},{80,-58}}))); + Modelica.Blocks.Interfaces.RealInput uBypDamPos( + final unit="1", + final min=0, + final max=1) + "Bypass damper position" + annotation (Placement(transformation(extent={{-280,-20},{-240,20}}), + iconTransformation(extent={{-140,-20},{-100,20}}))); + Modelica.Blocks.Interfaces.BooleanInput uRot + "True when the wheel is operating" annotation (Placement(transformation( + extent={{-278,-140},{-238,-100}}), + iconTransformation(extent={{-140,-80}, + {-100,-40}}))); + Modelica.Blocks.Interfaces.RealOutput P( + final unit="W") + "Electric power consumption" + annotation (Placement(transformation(extent={{100,-10},{120,10}}), + iconTransformation(extent={{100,-10},{120,10}}))); + Modelica.Fluid.Interfaces.FluidPort_a port_a1( + redeclare final package Medium = Medium1) + "Fluid connector a1 of the supply air (positive design flow direction is from port_a1 to port_b1)" + annotation (Placement(transformation(extent={{-250,-112},{-230,-92}}), + iconTransformation(extent={{-110,-90},{-90,-70}}))); + Modelica.Fluid.Interfaces.FluidPort_b port_b2( + redeclare final package Medium = Medium2) + "Fluid connector b2 of the exhaust air (positive design flow direction is from port_a2 to port_b2)" + annotation (Placement(transformation(extent={{-230,70},{-250,90}}), + iconTransformation(extent={{-110,70},{-90,90}}))); + Modelica.Fluid.Interfaces.FluidPort_b port_b1( + redeclare final package Medium = Medium1) + "Fluid connector b1 of the supply air (positive design flow direction is from port_a1 to port_b1)" + annotation (Placement(transformation(extent={{110,-112},{90,-92}}), + iconTransformation(extent={{110,-90},{90,-70}}))); + Modelica.Fluid.Interfaces.FluidPort_a port_a2( + redeclare final package Medium = Medium2) + "Fluid connector a2 of the exhaust air (positive design flow direction is from port_a2 to port_b2)" + annotation (Placement(transformation(extent={{90,70},{110,90}}), + iconTransformation(extent={{90,70},{110,90}}))); +protected + Buildings.Fluid.Actuators.Dampers.Exponential bypDamPro( + redeclare package Medium = Medium1, + final m_flow_nominal=m1_flow_nominal, + final dpDamper_nominal=dp1_nominal) "Process air bypass damper" + annotation (Placement(transformation(extent={{-170,-130},{-150,-110}}))); + Buildings.Fluid.Actuators.Dampers.Exponential damPro( + redeclare package Medium = Medium1, + final m_flow_nominal=m1_flow_nominal, + final dpDamper_nominal=dp1_nominal) "Process air damper" + annotation (Placement(transformation( + extent={{-10,-10},{10,10}},rotation=0,origin={-134,-102}))); + Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter PEleMot( + final k= PMot_nominal) + "Calculate the motor power consumption" + annotation (Placement(transformation(extent={{-18,-40},{0,-22}}))); + Modelica.Blocks.Math.BooleanToReal booleanToReal + "Convert boolean input to real output" + annotation (Placement(transformation(extent={{-200,0},{-180,20}}))); + Buildings.Fluid.Interfaces.PrescribedOutlet outCon( + redeclare package Medium = Medium1, + final m_flow_nominal=m1_flow_nominal, + energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) + "Model to set outlet conditions" + annotation (Placement(transformation(extent={{-6,-112},{14,-92}}))); + Modelica.Blocks.Sources.Constant uni( + final k=1) + "Unity signal" + annotation (Placement(transformation(extent={{-220,-30},{-200,-10}}))); + Buildings.Controls.OBC.CDL.Reals.Subtract sub + "Difference of the two inputs" + annotation (Placement(transformation(extent={{-166,-36},{-146,-16}}))); + Buildings.Fluid.Dehumidifiers.Desiccant.BaseClasses.Performance dehPer( + final vPro_nominal=vPro_nominal, + final VPro_flow_nominal=vPro_nominal, + final vReg_nominal=vReg_nominal, + final VReg_flow_nominal=VReg_flow_nominal, + final QReg_flow_nominal=QReg_flow_nominal, + final per=perDat) + "Calculate the performance of the dehumidifier" + annotation (Placement(transformation(extent={{-58,-94},{-38,-74}}))); + Modelica.Blocks.Sources.RealExpression VPro_flow( + final y(final unit="m3/s")= damPro.port_a.m_flow/Medium1.density( + state=Medium1.setState_phX( + p=port_a1.p, + h=port_a1.h_outflow, + X=port_a1.Xi_outflow))) + "Process air volume flow rate" + annotation (Placement(transformation(extent={{-110,-106},{-90,-86}}))); + Modelica.Blocks.Sources.RealExpression TProEnt( + final y(final unit="K")= + Medium1.temperature(Medium1.setState_phX( + p=port_a1.p, + h=inStream(port_a1.h_outflow), + X=inStream(port_a1.Xi_outflow)))) + "Temperature of the process air entering the dehumidifier" + annotation (Placement(transformation(extent={{-110,-38},{-90,-18}}))); + Modelica.Blocks.Sources.RealExpression TRegEnt( + final y(final unit="K")= + Medium2.temperature(Medium2.setState_phX( + p=port_a2.p, + h=inStream(port_a2.h_outflow), + X=inStream(port_a2.Xi_outflow)))) + "Temperature of the regeneration air entering the dehumidifier" + annotation (Placement(transformation(extent={{-110,-54},{-90,-34}}))); + Modelica.Blocks.Sources.RealExpression X_w_ProEnt( + final y(final unit="1") = port_a1.Xi_outflow[i1_w]) + "Humidity ratio of the process air entering the dehumidifier" + annotation (Placement(transformation(extent={{-110,-72},{-90,-52}}))); + Buildings.Fluid.MixingVolumes.MixingVolumeMoistAir + vol(redeclare final package Medium = Medium2, + massDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, + final m_flow_nominal=m2_flow_nominal, + energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, + V=m2_flow_nominal*tau/rho_Reg_default, + nPorts=1) + "Volume for the regeneration air stream" + annotation (Placement(transformation(extent={{-105,66},{-85,46}}))); + Modelica.Blocks.Math.Gain gai1( + final k=-1) + "Find the opposite number of the input" + annotation (Placement(transformation(extent={{0,0},{-20,20}}))); + Modelica.Blocks.Math.Gain gai2( + final k=-1) + "Find the opposite number of the input" + annotation (Placement(transformation(extent={{0,30},{-20,50}}))); + Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow prescribedHeatFlow + annotation (Placement(transformation(extent={{-62,50},{-82,30}}))); + Modelica.Blocks.Sources.RealExpression mPro_flow( + final y(final unit="kg/s")= damPro.port_a.m_flow) "Process air mass flow rate" + annotation (Placement(transformation(extent={{-110,-124},{-90,-104}}))); + + parameter Integer i1_w(min=1, fixed=false) "Index for water substance"; + parameter Medium2.ThermodynamicState sta_Reg_default=Medium2.setState_pTX( + T=Medium2.T_default, + p=Medium2.p_default, + X=Medium2.X_default) + "Default state of the regeneration air"; + parameter Modelica.Units.SI.Density rho_Reg_default=Medium2.density(sta_Reg_default) + "Default density of the regeneration air"; + parameter Medium2.ThermodynamicState sta_Pro_default=Medium2.setState_pTX( + T=Medium2.T_default, + p=Medium2.p_default, + X=Medium2.X_default) + "Default state of the process air"; + parameter Modelica.Units.SI.Density rho_Pro_default=Medium2.density(sta_Pro_default) + "Default density of the process air"; + +initial algorithm + i1_w:= -1; + for i in 1:Medium1.nXi loop + if Modelica.Utilities.Strings.isEqual(string1=Medium1.substanceNames[i], + string2="Water", + caseSensitive=false) then + i1_w := i; + end if; + end for; + +equation + connect(booleanToReal.u, uRot) annotation (Line(points={{-202,10},{-226,10},{ + -226,-86},{-220,-86},{-220,-120},{-258,-120}}, + color={255,0,255})); + connect(PEleMot.u, booleanToReal.y) annotation (Line(points={{-19.8,-31},{-22, + -31},{-22,-32},{-54,-32},{-54,10},{-179,10}}, color={0,0,127})); + connect(bypDamPro.port_a, port_a1) annotation (Line(points={{-170,-120},{-184, + -120},{-184,-102},{-240,-102}}, + color={0,127,255})); + connect(bypDamPro.port_b, port_b1) annotation (Line(points={{-150,-120},{80,-120}, + {80,-102},{100,-102}}, + color={0,127,255})); + connect(dehPer.TProLea, outCon.TSet) annotation (Line(points={{-37,-76},{-12,-76}, + {-12,-94},{-7,-94}}, color={0,0,127})); + connect(dehPer.X_w_ProLea, outCon.X_wSet) annotation (Line(points={{-37,-80},{ + -14,-80},{-14,-98},{-7,-98}}, color={0,0,127})); + connect(uni.y, sub.u1) annotation (Line(points={{-199,-20},{-168,-20}}, + color={0,0,127})); + connect(sub.u2, uBypDamPos) annotation (Line(points={{-168,-32},{-192,-32},{-192, + -52},{-230,-52},{-230,0},{-260,0}}, + color={0,0,127})); + connect(sub.y, damPro.y) + annotation (Line(points={{-144,-26},{-134,-26},{-134,-90}}, + color={0,0,127})); + connect(bypDamPro.y, uBypDamPos) annotation (Line(points={{-160,-108},{-160,-52}, + {-230,-52},{-230,0},{-260,0}}, color={0,0,127})); + connect(dehPer.onDeh, uRot) annotation (Line(points={{-59,-75.8},{-59,-76},{ + -220,-76},{-220,-120},{-258,-120}}, color={255,0,255})); + connect(VPro_flow.y, dehPer.VPro_flow) annotation (Line(points={{-89,-96},{-78, + -96},{-78,-92.2},{-59,-92.2}}, color={0,0,127})); + connect(damPro.port_a, port_a1) + annotation (Line(points={{-144,-102},{-240,-102}}, color={0,127,255})); + connect(damPro.port_b,outCon. port_a) + annotation (Line(points={{-124,-102},{-6,-102}}, color={0,127,255})); + connect(outCon.port_b, port_b1) + annotation (Line(points={{14,-102},{100,-102}}, color={0,127,255})); + connect(TProEnt.y, dehPer.TProEnt) annotation (Line(points={{-89,-28},{-70,-28}, + {-70,-79.8},{-59,-79.8}}, color={0,0,127})); + connect(TRegEnt.y, dehPer.TRegEnt) annotation (Line(points={{-89,-44},{-84,-44}, + {-84,-84},{-59,-84}}, color={0,0,127})); + connect(X_w_ProEnt.y, dehPer.X_w_ProEnt) annotation (Line(points={{-89,-62},{-86, + -62},{-86,-88},{-59,-88}}, color={0,0,127})); + connect(outCon.mWat_flow, gai1.u) annotation (Line(points={{15,-98},{18,-98},{ + 18,-92},{20,-92},{20,10},{2,10}}, + color={0,0,127})); + connect(gai1.y, vol.mWat_flow) annotation (Line(points={{-21,10},{-40,10},{ + -40,20},{-130,20},{-130,48},{-107,48}}, + color={0,0,127})); + connect(prescribedHeatFlow.Q_flow, gai2.y) + annotation (Line(points={{-62,40},{-21,40}}, color={0,0,127})); + connect(prescribedHeatFlow.port, vol.heatPort) annotation (Line(points={{-82,40}, + {-120,40},{-120,56},{-105,56}}, color={191,0,0})); + connect(gai2.u,outCon. Q_flow) annotation (Line(points={{2,40},{40,40},{40,-94}, + {15,-94}}, color={0,0,127})); + connect(vol.ports[1], port_b2) annotation (Line(points={{-95,66},{-144,66},{ + -144,80},{-240,80}}, + color={0,127,255})); + connect(mPro_flow.y, dehPer.mPro_flow) annotation (Line(points={{-89,-114},{-48, + -114},{-48,-95}}, color={0,0,127})); + annotation (Dialog(group="Nominal condition"), + Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, + {100,100}}), graphics={ + Rectangle( + extent={{-86,92},{6,-90}}, + lineColor={28,108,200}, + fillPattern=FillPattern.CrossDiag, + fillColor={255,255,255}), + Rectangle( + extent={{-94,86},{-86,76}}, + lineColor={238,46,47}, + pattern=LinePattern.None, + fillColor={238,46,47}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-92,-74},{-86,-84}}, + lineColor={238,46,47}, + pattern=LinePattern.None, + fillColor={28,108,200}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{6,-74},{98,-84}}, + lineColor={238,46,47}, + pattern=LinePattern.None, + fillColor={106,162,200}, + fillPattern=FillPattern.Solid), + Text( + extent={{-149,-104},{151,-144}}, + textColor={0,0,255}, + textString="%name")}), Diagram( + coordinateSystem(preserveAspectRatio=false, extent={{-240,-140},{100,100}})), + Documentation(info=" +
+Partial model of a desiccant dehumidifier. +Specifically, this model considers the following configuration. +
++ +
++This model should be extended with a heating coil and/or a fan in the regeneration air stream. +
+This model takes two inputs: a boolean signal for dehumidification and a real signal for the bypass damper position. ++This model calculates the outlet condition of the process air of a desiccant dehumidifier based on +the inlet condition of the process air. +Specifically, this calculation is configured as follows. +
+onDeh=true
,
+ TProLea
, and
+ the humidity ratio of the process air leaving the dehumidifier, X_w_ProLea
,
+ are calculated with the same method as that for calculating vReg
.
+ However, different sets of coefficients are used respectively.
+ X_w_ProLea
is less than 0,
+ the calculation is terminated and an error is generated.
+ CpReg
, and
+ the humidity ratio of the process air leaving the dehumidifier, X_w_ProLea
,
+ are calculated with the same method as that for calculating vReg
.
+ However, a different set of coefficients is used.
+ After that, the regeneration heating output ratio, yQReg
, is calculated by
+ + yQReg = CpReg*(X_w_ProEnt-X_w_ProLea)*mPro_flow*(TRegEnt_nominal - TRegEnt) / (TRegEnt_nominal - TProEnt)/ + QReg_flow_nominal +
+ whereX_w_ProEnt
, mPro_flow
, and TProEnt
are the humiditiy ratio,
+ the flow rate, and the temperature of the process air entering the dehumidifier;
+ TRegEnt_nominal
and TRegEnt
are the nominal temperature and the actual temperature
+ of the regeneration air entering the dehumidifier.QReg_flow_nominal
is the nominal regeneration
+ heating capacity.
+ yQReg
is larger than 0,
+ the calculation is terminated and an error is generated.
+ QReg_flow
and vReg
are set to be 0.
+ +Validation test for the block + +Buildings.Fluid.Dehumidifiers.Desiccant.BaseClasses.Performance. +
++The input signals are configured as follows: +
+false
to true
at 50 seconds.
++The expected outputs are: +
+TProLea
and X_w_ProEnt change dramatically when the dehumidification begins at 50 seconds.
++This package contains validation models for the classes in + +Buildings.Fluid.Dehumidifiers.Desiccant.BaseClasses. +
++Note that most validation models contain simple input data +which may not be realistic, but for which the correct +output can be obtained through an analytic solution. +The examples plot various outputs, which have been verified against these +solutions. These model outputs are stored as reference data and +used for continuous validation whenever models in the library change. +
+")); +end Validation; diff --git a/Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/Validation/package.order b/Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/Validation/package.order new file mode 100644 index 00000000000..76ca7b0a63a --- /dev/null +++ b/Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/Validation/package.order @@ -0,0 +1 @@ +Performance diff --git a/Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/package.mo b/Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/package.mo new file mode 100644 index 00000000000..364288ed567 --- /dev/null +++ b/Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/package.mo @@ -0,0 +1,11 @@ +within Buildings.Fluid.Dehumidifiers.Desiccant; +package BaseClasses "Package with base classes for desiccant dehumidifier model" +extends Modelica.Icons.BasesPackage; + +annotation (Documentation(info=" ++This package contains base classes that are used to construct the models in +Buildings.Fluid.Dehumidifiers.Desiccant. +
+")); +end BaseClasses; diff --git a/Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/package.order b/Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/package.order new file mode 100644 index 00000000000..730ca6984f4 --- /dev/null +++ b/Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/package.order @@ -0,0 +1,4 @@ +PartialDesiccant +Performance +performanceCurve +Validation \ No newline at end of file diff --git a/Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/performanceCurve.mo b/Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/performanceCurve.mo new file mode 100644 index 00000000000..b020ab267b3 --- /dev/null +++ b/Buildings/Fluid/Dehumidifiers/Desiccant/BaseClasses/performanceCurve.mo @@ -0,0 +1,67 @@ +within Buildings.Fluid.Dehumidifiers.Desiccant.BaseClasses; +function performanceCurve + "Performance curve of a generic desiccant dehumidifiers" + input Modelica.Units.SI.Temperature TProEnt + "Temperature of the process air entering the dehumidifier"; + input Modelica.Units.SI.MassFraction X_w_ProEnt + "Humidity ratio of the process air entering the dehumidifier"; + input Modelica.Units.SI.Velocity vPro + "Velocity of the process air"; + input Real a[16] + "Performance coefficients"; + output Real y + "Return value"; +protected + Modelica.Units.NonSI.Temperature_degC TProEnt_degC + "Temperature of the process air entering the dehumidifier"; + +algorithm + TProEnt_degC := Modelica.Units.Conversions.to_degC(TProEnt); + y:= a[1] + a[2]*TProEnt_degC + a[3]* X_w_ProEnt + a[4]*vPro + + a[5]*TProEnt_degC*X_w_ProEnt + + a[6]*TProEnt_degC*vPro + + a[7]*X_w_ProEnt*vPro + a[8]*TProEnt_degC*TProEnt_degC + + a[9]*X_w_ProEnt*X_w_ProEnt+ a[10]*vPro*vPro + + a[11]*TProEnt_degC*TProEnt_degC*X_w_ProEnt*X_w_ProEnt + + a[12]*TProEnt_degC*TProEnt_degC*vPro*vPro + + a[13]*X_w_ProEnt*X_w_ProEnt*vPro*vPro + + a[14]*Modelica.Math.log(TProEnt_degC) + + a[15]*Modelica.Math.log(X_w_ProEnt) + + a[16]*Modelica.Math.log(vPro); + + annotation (Documentation(info=" +This function computes a performance curve of desiccant dehumidifiers, with the following form ++ y = a1 + a2 TProEnt + a3 X_w_ProEnt + a4 vPro + + a5 TProEnt X_w_ProEnt + a6 TProEnt vPro + + a7 X_w_ProEnt vPro + a8 TProEnt TProEnt + + a9 X_w_ProEnt X_w_ProEnt + a10 vPro vPro + + a11 TProEnt TProEnt X_w_ProEnt X_w_ProEnt + + a12 TProEnt TProEnt vPro vPro + + a13 X_w_ProEnt X_w_ProEnt vPro vPro + + a14log(TProEnt) + + a15log(X_w_ProEnt) + + a16log(vPro) +
+
+where TProEnt is the temperature of the process air entering the dehumidifier (°C);
+
+X_w_ProEnt is the humidity ratio of the process air entering the dehumidifier (kg/kg);
+
+vPro is the velocity of the process air (m/s);
+
+a1,...a16 are coefficients.
+
This record is used as a template for performance data +for the desiccant dehumidifier models in + +Buildings.Fluid.Dehumidifiers.Desiccant. +
+", revisions=" ++This model considers a desiccant dehumidifier system with aN electric coil and a variable speed fan, +as shown below. +
+ +
++The detailed configuration of the dehumidifier is provided in + +Buildings.Fluid.Dehumidifiers.Desiccant.BaseClasses.PartialDesiccant. +
++Note that the operation of the coil and the fan is assumed to be ideal, meaning they can +provide the required regeneration heating power and the regeneration flow rate, which +are calculated by + +Buildings.Fluid.Dehumidifiers.Desiccant.BaseClasses.Performance, +when their capacities permit. +
+ +", revisions=" ++Validation test for the block + +Buildings.Fluid.Dehumidifiers.Desiccant.BaseClasses.Examples.ElectricCoilVariableSpeedFan. +
++The input signals are configured as follows: +
+false
to true
and from
+true
to false
at 300 seconds
+and 900 seconds, respectively.
++The expected outputs are: +
++Package with desiccant dehumidifiers. +
+")); +end Desiccant; diff --git a/Buildings/Fluid/Dehumidifiers/Desiccant/package.order b/Buildings/Fluid/Dehumidifiers/Desiccant/package.order new file mode 100644 index 00000000000..29295bf56a3 --- /dev/null +++ b/Buildings/Fluid/Dehumidifiers/Desiccant/package.order @@ -0,0 +1,4 @@ +ElectricCoilVariableSpeedFan +Data +Examples +BaseClasses diff --git a/Buildings/Fluid/Dehumidifiers/package.mo b/Buildings/Fluid/Dehumidifiers/package.mo new file mode 100644 index 00000000000..06cfdbf06d8 --- /dev/null +++ b/Buildings/Fluid/Dehumidifiers/package.mo @@ -0,0 +1,10 @@ +within Buildings.Fluid; +package Dehumidifiers "Package with dehumidifiers" +extends Modelica.Icons.VariantsPackage; + +annotation (Documentation(info=" ++Package with dehumidifiers. +
+")); +end Dehumidifiers; diff --git a/Buildings/Fluid/Dehumidifiers/package.order b/Buildings/Fluid/Dehumidifiers/package.order new file mode 100644 index 00000000000..7d9dccefffd --- /dev/null +++ b/Buildings/Fluid/Dehumidifiers/package.order @@ -0,0 +1 @@ +Desiccant \ No newline at end of file From d122dd5c6be80974c0b74a9604e7e08021f8dcc7 Mon Sep 17 00:00:00 2001 From: Huang <7q0@ornl.gov> Date: Thu, 28 Mar 2024 13:57:06 -0400 Subject: [PATCH 02/16] update the fluid package directory --- Buildings/Fluid/package.order | 1 + Buildings/package.mo | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/Buildings/Fluid/package.order b/Buildings/Fluid/package.order index 6520d3b02e8..216b0897cc4 100644 --- a/Buildings/Fluid/package.order +++ b/Buildings/Fluid/package.order @@ -4,6 +4,7 @@ Boilers CHPs Chillers DXSystems +Dehumidifiers Delays FMI FixedResistances diff --git a/Buildings/package.mo b/Buildings/package.mo index 756bdd59fb2..63214b5fc08 100644 --- a/Buildings/package.mo +++ b/Buildings/package.mo @@ -229,6 +229,12 @@ The following new libraries have been added: issue 3063. +
From ab2a7a691c3c82e900f57977abd361cdd1d6d7ca Mon Sep 17 00:00:00 2001
From: Huang <7q0@ornl.gov>
Date: Thu, 28 Mar 2024 13:57:50 -0400
Subject: [PATCH 03/16] add figures, ref results, and scripts
---
.../BaseClasses/dehumidifer_schematic.png | Bin 0 -> 21591 bytes
.../BaseClasses/system_schematic.png | Bin 0 -> 20348 bytes
...ant_BaseClasses_Validation_Performance.txt | 13 +
..._Examples_ElectricCoilVariableSpeedFan.txt | 21 +
.../Resources/Scripts/BuildingsPy/conf.yml | 496 ------------------
.../BaseClasses/Validation/Performance.mos | 4 +
.../Examples/ElectricCoilVariableSpeedFan.mos | 6 +
...ant.BaseClasses.Validation.Performance.mos | 8 +
....Examples.ElectricCoilVariableSpeedFan.mos | 9 +
9 files changed, 61 insertions(+), 496 deletions(-)
create mode 100644 Buildings/Resources/Images/Fluid/Dehumidifiers/Desiccant/BaseClasses/dehumidifer_schematic.png
create mode 100644 Buildings/Resources/Images/Fluid/Dehumidifiers/Desiccant/BaseClasses/system_schematic.png
create mode 100644 Buildings/Resources/ReferenceResults/Dymola/Buildings_Fluid_Dehumidifiers_Desiccant_BaseClasses_Validation_Performance.txt
create mode 100644 Buildings/Resources/ReferenceResults/Dymola/Buildings_Fluid_Dehumidifiers_Desiccant_Examples_ElectricCoilVariableSpeedFan.txt
delete mode 100644 Buildings/Resources/Scripts/BuildingsPy/conf.yml
create mode 100644 Buildings/Resources/Scripts/Dymola/Fluid/Dehumidifiers/Desiccant/BaseClasses/Validation/Performance.mos
create mode 100644 Buildings/Resources/Scripts/Dymola/Fluid/Dehumidifiers/Desiccant/Examples/ElectricCoilVariableSpeedFan.mos
create mode 100644 Buildings/Resources/Scripts/OpenModelica/compareVars/Buildings.Fluid.Dehumidifiers.Desiccant.BaseClasses.Validation.Performance.mos
create mode 100644 Buildings/Resources/Scripts/OpenModelica/compareVars/Buildings.Fluid.Dehumidifiers.Desiccant.Examples.ElectricCoilVariableSpeedFan.mos
diff --git a/Buildings/Resources/Images/Fluid/Dehumidifiers/Desiccant/BaseClasses/dehumidifer_schematic.png b/Buildings/Resources/Images/Fluid/Dehumidifiers/Desiccant/BaseClasses/dehumidifer_schematic.png
new file mode 100644
index 0000000000000000000000000000000000000000..2190d105d5c9bfc32b9a3c00743a4ff213cbc7a6
GIT binary patch
literal 21591
zcmc$`byQU0*FTC1DlOe1(kUe^N;lF&BOLu?;uD9h*L{`v?8DqVzFL(J2MXb;4N+u$
zPfGB3c72I+%!QAH=oN3&DIOD>_E1VD)Vx-hLQN?7&h%g
MOg6`s7yu3hV;v%ksll<@32VX_!_l=y|Fn(7+
z@jr;d4DWKE%9gp?MNq5~{(e^X2}fL=OlBT=C9P@^?4Sdxcua_zQXct31iko
0Z5<)_ElRJmf!2*m+zH;5nyB;-*{0^88Lb6bm9kcI
zJu|j{bjA*WQ_jG#S=fx^YxK_qc!Nw!pVCT$BLWC^^Ua{R3VT4H=J$J|KjPeh-o*#f
zHL8xej)fD^dzE?7=%KM{uDDKHFVnK)zBGZT@x9_my43aERq>UQTMofMk?TS%xSDSv
zPJO4IOo_oYD?flW9CINPBV#=yFl|-^{YZW5$T
-This model should be extended with a heating coil and/or a fan in the regeneration air stream. +This model should be extended with a heating coil and/or a regeneration air fan.
This model takes two inputs: a boolean signal for dehumidification and a real signal for the bypass damper position.TProLea
and X_w_ProEnt change dramatically when the dehumidification begins at 50 seconds.
+TProLea and X_w_ProEnt change dramatically when the dehumidification begins at 50 seconds.