Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lithium Bromide-Water Heat Pump Media and Components #14

Open
wants to merge 39 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c550146
Merge pull request #1 from idaholab/devel
klfrick2 Mar 16, 2021
30007b3
Merge pull request #3 from idaholab/devel
alfoa Apr 15, 2021
3ecbad5
Merge remote-tracking branch 'upstream/master' into devel
puncan Jun 3, 2021
f77de77
Added LiBr_H2O media, absoption heat pump components, and NASA Glenn …
puncan Jun 16, 2021
3b97da8
An updated commit with separate files for each model, function, and p…
puncan Jun 16, 2021
596e5cb
Changed NASA coefficients from variably sized to constant size. Therm…
puncan Jun 17, 2021
08312d8
Corrected CaO and Ca(OH)2 media package property function errors.
puncan Jun 22, 2021
6453fa8
Moved interpolation functions from Media/Common to Math/Interpolation
puncan Jun 23, 2021
0a2800d
Small changes due to moving functions around and renaming of packages…
puncan Jun 23, 2021
44d898f
Ideal steam file structure corrected
puncan Jun 23, 2021
911e0c4
Added CaO hydration and Ca(OH)2 dehydration kinetics and equilibrium …
puncan Jun 25, 2021
12f9c2b
Merge branch 'idaholab:devel' into devel
puncan Jun 28, 2021
86f4e31
Delete Interpolation.bak-mo
puncan Jun 28, 2021
589ad69
Delete Common.bak-mo
puncan Jun 28, 2021
3c1d3cf
Delete CalciumOxide_Water__CalciumHydroxide.bak-mo
puncan Jun 28, 2021
e8f4cc1
Delete PropTable_2.bak-mo
puncan Jun 28, 2021
8698790
Space difference
mikkdm Jun 28, 2021
d6a2b8d
Delete TableSolverVars_2.bak-mo
puncan Jun 28, 2021
91260ec
Space difference
mikkdm Jun 28, 2021
29707ea
Wrong extension
mikkdm Jun 28, 2021
b49ae5b
Delete Types.bak-mo
mikkdm Jun 28, 2021
8e42366
Delete TableSolverVars_3.bak-mo
puncan Jun 28, 2021
9ec3d31
Delete bilinearInterp.bak-mo
puncan Jun 28, 2021
e74c2b9
Delete find_indexi.bak-mo
puncan Jun 28, 2021
baff954
Empty
mikkdm Jun 28, 2021
5532ab5
Delete single_species_data.bak-mo
puncan Jun 28, 2021
e95d325
Space changes only
mikkdm Jun 28, 2021
446e347
Delete trilinearInterp.bak-mo
puncan Jun 28, 2021
af3664c
Delete IdealSteam.bak-mo
puncan Jun 28, 2021
ebd4fca
Space change
mikkdm Jun 28, 2021
c760fd1
Delete PartialSolidMedium.bak-mo
puncan Jun 28, 2021
2ec1b74
Delete package.order
mikkdm Jun 28, 2021
888412e
Delete PartialTwoPhaseMixtureMedium.bak-mo
puncan Jun 28, 2021
7b84c64
Delete ThermoclineModels.mo
mikkdm Jun 28, 2021
78ddaab
Delete NASAGlenn.bak-mo
puncan Jun 28, 2021
c0d89f8
Delete TwoPhaseMixtures.bak-mo
puncan Jun 28, 2021
7109cc6
Removed commented LiBr-H2O utility functions and added bak-mo files t…
puncan Jun 28, 2021
6c95574
Relocated NASAGlenn since it is used by solid and liquid media. Small…
puncan Jun 30, 2021
6155176
Some edits to CaO adn Ca(OH)2 media to get chemica bed model working
puncan Jul 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Models/NHES/Fluid/ClosureModels/HeatTransfer/package.order
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ Examples
alpha_Chen_TwoPhase
alpha_DittusBoelter
kandlikar_lowP
Nu_DittusBoelter_Heat_Cool
Nu_DittusBoelter_Heat_Cool
127 changes: 127 additions & 0 deletions Models/NHES/Fluid/HeatExchangers/Generic_HXs/Generic_HXR_NoMass.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
within NHES.Fluid.HeatExchangers.Generic_HXs;
model Generic_HXR_NoMass

replaceable package Medium_h =
Media.TwoPhaseMixtures.LithiumBromideWater.LithiumBromideWater_pTX constrainedby
Modelica.Media.Interfaces.PartialMedium
annotation (choicesAllMatching);
replaceable package Medium_c =
Media.TwoPhaseMixtures.LithiumBromideWater.LithiumBromideWater_pTX constrainedby
Modelica.Media.Interfaces.PartialMedium
annotation (choicesAllMatching);

parameter Real epsilon(min=0, max=1)=0.9 "Heat exchanger effectiveness";
Modelica.Units.SI.EntropyFlowRate UA(start=1603e3, displayUnit="kW/K")
"Overall HTC x HT area";

//SI.EntropyFlowRate C_h "Mean hot side heat rate";
//SI.EntropyFlowRate C_c "Mean cold side heat rate";
Medium_h.Temperature T_hi(start=545.7) = Modelica.Fluid.Utilities.regStep(
port_hi.m_flow,
Medium_h.temperature(hi_state),
Medium_h.temperature(Medium_h.setState_phX(
port_hi.p,
port_hi.h_outflow,
port_hi.Xi_outflow)));

Medium_h.Temperature T_ho(start=322.9) = Modelica.Fluid.Utilities.regStep(
port_ho.m_flow,
Medium_h.temperature(ho_state),
Medium_h.temperature(Medium_h.setState_phX(
port_ho.p,
port_ho.h_outflow,
port_ho.Xi_outflow)));

Medium_c.Temperature T_ci(start=298.2) = Modelica.Fluid.Utilities.regStep(
port_ci.m_flow,
Medium_c.temperature(ci_state),
Medium_c.temperature(Medium_c.setState_phX(
port_ci.p,
port_ci.h_outflow,
port_ci.Xi_outflow)));

Medium_c.Temperature T_co(start=485.7) = Modelica.Fluid.Utilities.regStep(
port_co.m_flow,
Medium_c.temperature(co_state),
Medium_c.temperature(Medium_c.setState_phX(
port_co.p,
port_co.h_outflow,
port_co.Xi_outflow)));

//Medium_h.SpecificEnthalpy h_ho(start=170.7e3) = inStream(port_ho.h_outflow);
//Medium_c.SpecificEnthalpy h_co(start=458.3e3) = inStream(port_co.h_outflow);

SI.Power Q_HT(start=63799e3) "Heat transfer";
SI.TemperatureDifference LMTD=Utilities.Functions.LMTD(
T_hi,
T_ho,
T_ci,
T_co,
true) "Log-mean temperature difference";

outer Modelica.Fluid.System system;

Modelica.Fluid.Interfaces.FluidPort_a port_ci(redeclare package Medium =
Medium_c)
annotation (Placement(transformation(extent={{-70,-110},{-50,-90}})));
Modelica.Fluid.Interfaces.FluidPort_b port_co(redeclare package Medium =
Medium_c,
h_outflow(start=458.3e3))
annotation (Placement(transformation(extent={{-70,90},{-50,110}})));
Modelica.Fluid.Interfaces.FluidPort_a port_hi(redeclare package Medium =
Medium_h)
annotation (Placement(transformation(extent={{50,90},{70,110}})));
Modelica.Fluid.Interfaces.FluidPort_b port_ho(redeclare package Medium =
Medium_h,
h_outflow(start=170.7e3))
annotation (Placement(transformation(extent={{50,-110},{70,-90}})));

Medium_h.ThermodynamicState hi_state;
Medium_h.ThermodynamicState ho_state;
Medium_c.ThermodynamicState ci_state;
Medium_c.ThermodynamicState co_state;

equation
port_hi.m_flow + port_ho.m_flow = 0;
port_ci.m_flow + port_co.m_flow = 0;

port_hi.Xi_outflow = inStream(port_ho.Xi_outflow);
port_ho.Xi_outflow = inStream(port_hi.Xi_outflow);

port_ci.Xi_outflow = inStream(port_co.Xi_outflow);
port_co.Xi_outflow = inStream(port_ci.Xi_outflow);

port_hi.p = port_ho.p;
port_ci.p = port_co.p;

port_hi.h_outflow = inStream(port_ho.h_outflow);
Q_HT = port_ho.m_flow*(port_ho.h_outflow - inStream(port_hi.h_outflow));

port_ci.h_outflow = inStream(port_co.h_outflow);
Q_HT = port_co.m_flow*(inStream(port_ci.h_outflow) - port_co.h_outflow);

//C_h = port_hi.m_flow*Medium_h.specificHeatCapacityCp(hi_state);
//C_c = port_ci.m_flow*Medium_c.specificHeatCapacityCp(ci_state);

Q_HT = UA*LMTD;

epsilon = Utilities.Functions.epsilon(T_hi, T_co, T_ho, T_ci);

// Medium states for inflowing fluid
hi_state = Medium_h.setState_phX(
port_hi.p,
inStream(port_hi.h_outflow),
inStream(port_hi.Xi_outflow));
ho_state = Medium_h.setState_phX(
port_ho.p,
inStream(port_ho.h_outflow),
inStream(port_ho.Xi_outflow));
ci_state = Medium_c.setState_phX(
port_ci.p,
inStream(port_ci.h_outflow),
inStream(port_ci.Xi_outflow));
co_state = Medium_c.setState_phX(
port_co.p,
inStream(port_co.h_outflow),
inStream(port_co.Xi_outflow));
end Generic_HXR_NoMass;
125 changes: 125 additions & 0 deletions Models/NHES/Fluid/HeatExchangers/Generic_HXs/package.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,129 @@ package Generic_HXs "Generic heat exchangers"



model recuperator_simple

replaceable package Medium_h =
Media.TwoPhaseMixtures.LithiumBromideWater.LithiumBromideWater_pTX constrainedby
Modelica.Media.Interfaces.PartialMedium annotation (choicesAllMatching);
replaceable package Medium_c =
Media.TwoPhaseMixtures.LithiumBromideWater.LithiumBromideWater_pTX constrainedby
Modelica.Media.Interfaces.PartialMedium annotation (choicesAllMatching);

parameter Real epsilon(min=0, max=1)=0.9 "Heat exchanger effectiveness";
Modelica.Units.SI.EntropyFlowRate UA(start=1603e3, displayUnit="kW/K")
"Overall HTC x HT area";

//SI.EntropyFlowRate C_h "Mean hot side heat rate";
//SI.EntropyFlowRate C_c "Mean cold side heat rate";
Medium_h.Temperature T_hi(start=545.7) = Modelica.Fluid.Utilities.regStep(
port_hi.m_flow,
Medium_h.temperature(hi_state),
Medium_h.temperature(Medium_h.setState_phX(
port_hi.p,
port_hi.h_outflow,
port_hi.Xi_outflow)));

Medium_h.Temperature T_ho(start=322.9) = Modelica.Fluid.Utilities.regStep(
port_ho.m_flow,
Medium_h.temperature(ho_state),
Medium_h.temperature(Medium_h.setState_phX(
port_ho.p,
port_ho.h_outflow,
port_ho.Xi_outflow)));

Medium_c.Temperature T_ci(start=298.2) = Modelica.Fluid.Utilities.regStep(
port_ci.m_flow,
Medium_c.temperature(ci_state),
Medium_c.temperature(Medium_c.setState_phX(
port_ci.p,
port_ci.h_outflow,
port_ci.Xi_outflow)));

Medium_c.Temperature T_co(start=485.7) = Modelica.Fluid.Utilities.regStep(
port_co.m_flow,
Medium_c.temperature(co_state),
Medium_c.temperature(Medium_c.setState_phX(
port_co.p,
port_co.h_outflow,
port_co.Xi_outflow)));

//Medium_h.SpecificEnthalpy h_ho(start=170.7e3) = inStream(port_ho.h_outflow);
//Medium_c.SpecificEnthalpy h_co(start=458.3e3) = inStream(port_co.h_outflow);

SI.Power Q_HT(start=63799e3) "Heat transfer";
SI.TemperatureDifference LMTD=Utilities.Functions.LMTD(
T_hi,
T_ho,
T_ci,
T_co,
true) "Log-mean temperature difference";

outer Modelica.Fluid.System system;

Modelica.Fluid.Interfaces.FluidPort_a port_ci(redeclare package Medium =
Medium_c)
annotation (Placement(transformation(extent={{-70,-110},{-50,-90}})));
Modelica.Fluid.Interfaces.FluidPort_b port_co(redeclare package Medium =
Medium_c,
h_outflow(start=458.3e3))
annotation (Placement(transformation(extent={{-70,90},{-50,110}})));
Modelica.Fluid.Interfaces.FluidPort_a port_hi(redeclare package Medium =
Medium_h)
annotation (Placement(transformation(extent={{50,90},{70,110}})));
Modelica.Fluid.Interfaces.FluidPort_b port_ho(redeclare package Medium =
Medium_h,
h_outflow(start=170.7e3))
annotation (Placement(transformation(extent={{50,-110},{70,-90}})));

Medium_h.ThermodynamicState hi_state;
Medium_h.ThermodynamicState ho_state;
Medium_c.ThermodynamicState ci_state;
Medium_c.ThermodynamicState co_state;

equation
port_hi.m_flow + port_ho.m_flow = 0;
port_ci.m_flow + port_co.m_flow = 0;

port_hi.Xi_outflow = inStream(port_ho.Xi_outflow);
port_ho.Xi_outflow = inStream(port_hi.Xi_outflow);

port_ci.Xi_outflow = inStream(port_co.Xi_outflow);
port_co.Xi_outflow = inStream(port_ci.Xi_outflow);

port_hi.p = port_ho.p;
port_ci.p = port_co.p;

port_hi.h_outflow = inStream(port_ho.h_outflow);
Q_HT = port_ho.m_flow*(port_ho.h_outflow - inStream(port_hi.h_outflow));

port_ci.h_outflow = inStream(port_co.h_outflow);
Q_HT = port_co.m_flow*(inStream(port_ci.h_outflow) - port_co.h_outflow);

//C_h = port_hi.m_flow*Medium_h.specificHeatCapacityCp(hi_state);
//C_c = port_ci.m_flow*Medium_c.specificHeatCapacityCp(ci_state);

Q_HT = UA*LMTD;

epsilon = Utilities.Functions.epsilon(T_hi, T_co, T_ho, T_ci);

// Medium states for inflowing fluid
hi_state = Medium_h.setState_phX(
port_hi.p,
inStream(port_hi.h_outflow),
inStream(port_hi.Xi_outflow));
ho_state = Medium_h.setState_phX(
port_ho.p,
inStream(port_ho.h_outflow),
inStream(port_ho.Xi_outflow));
ci_state = Medium_c.setState_phX(
port_ci.p,
inStream(port_ci.h_outflow),
inStream(port_ci.Xi_outflow));
co_state = Medium_c.setState_phX(
port_co.p,
inStream(port_co.h_outflow),
inStream(port_co.Xi_outflow));
end recuperator_simple;

end Generic_HXs;
2 changes: 2 additions & 0 deletions Models/NHES/Fluid/HeatExchangers/Generic_HXs/package.order
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Examples
Generic_HX
Generic_STHX
Generic_HXR_NoMass
recuperator_simple
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ algorithm
else (DT_1 - DT_2)/log(max(0.000001,DT_1/DT_2)));

annotation (Documentation(info="<html>
<p>The Peclet numver is defined to be the ratio of the rate of&nbsp;advection&nbsp;of a physical quantity by the flow to the rate of&nbsp;diffusion&nbsp;of the same quantity driven by an appropriate gradient.</p>
<p>The Peclet number is defined to be the ratio of the rate of&nbsp;advection&nbsp;of a physical quantity by the flow to the rate of&nbsp;diffusion&nbsp;of the same quantity driven by an appropriate gradient.</p>
<p> In the context of species or&nbsp;mass transfer, the P&eacute;clet number is the product of the&nbsp;Reynolds number&nbsp;and the&nbsp;Schmidt number. </p>
<ul>
<li>Pe = Re*Sc</li>
Expand Down
17 changes: 17 additions & 0 deletions Models/NHES/Fluid/HeatExchangers/Utilities/Functions/package.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,21 @@ within NHES.Fluid.HeatExchangers.Utilities;
package Functions


function epsilon
extends Modelica.Icons.Function;
input Modelica.Units.SI.Temperature High_1;
input Modelica.Units.SI.Temperature Low_1;
input Modelica.Units.SI.Temperature High_2;
input Modelica.Units.SI.Temperature Low_2;
output Real eps;
protected
Modelica.Units.SI.Temperature DELTAT_den=High_1 - Low_2;
algorithm
if
(DELTAT_den<=0) then
eps :=0.8;
else
eps := if (High_1 - High_2)/DELTAT_den > 1 then 0.8 else (High_1 - High_2)/DELTAT_den;
end if;
end epsilon;
end Functions;
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
LMTD
UA
epsilon
Loading