Skip to content

Commit

Permalink
Patch to avoid division by zero if nEle=1 (#3048)
Browse files Browse the repository at this point in the history
This only affects the special case of nEle=1. Results are not affected by this change
  • Loading branch information
mwetter authored May 27, 2022
1 parent 224de0d commit 55dea13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Buildings/Fluid/HeatExchangers/DryCoilCounterFlow.mo
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ model DryCoilCounterFlow
"Set to false to make air-side hA independent of temperature"
annotation (Dialog(tab="Heat transfer"));

parameter Modelica.Units.SI.ThermalConductance GDif=1E-2*UA_nominal/(nEle - 1)
"Thermal conductance to approximate diffusion (which improves model at near-zero flow rates"
parameter Modelica.Units.SI.ThermalConductance GDif=1E-2*UA_nominal/max(1, (nEle - 1))
"Thermal conductance to approximate diffusion (which improves model at near-zero flow rates)"
annotation (Dialog(tab="Experimental"));
Modelica.Units.SI.HeatFlowRate Q1_flow=sum(ele[i].Q1_flow for i in 1:nEle)
"Heat transferred from solid into medium 1";
Expand Down

0 comments on commit 55dea13

Please sign in to comment.