Skip to content

use_dynamicFlowRegime not effective #2086

@carlesRT

Description

@carlesRT

I added comments on #1683 / #1682 but I believe this might go under if do not open a new issue.

The activation of use_dynamicFlowRegime, i.e. seting the parameter to true will not work as the variables to determine the flow regime (changes in flow direction) are based on C1_flow and C2_flow which are by definition always positive.

  // Assign the flow regime for the given heat exchanger configuration and capacity flow rates
  if use_dynamicFlowRegime then
    if (configuration == Buildings.Fluid.Types.HeatExchangerConfiguration.ParallelFlow) then
      flowRegime = if (C1_flow*C2_flow >= 0) then Buildings.Fluid.Types.HeatExchangerFlowRegime.ParallelFlow else Buildings.Fluid.Types.HeatExchangerFlowRegime.CounterFlow;
    elseif (configuration == Buildings.Fluid.Types.HeatExchangerConfiguration.CounterFlow) then
      flowRegime = if (C1_flow*C2_flow >= 0) then Buildings.Fluid.Types.HeatExchangerFlowRegime.CounterFlow else Buildings.Fluid.Types.HeatExchangerFlowRegime.ParallelFlow;
    elseif (configuration == Buildings.Fluid.Types.HeatExchangerConfiguration.CrossFlowUnmixed) then
      flowRegime = Buildings.Fluid.Types.HeatExchangerFlowRegime.CrossFlowUnmixed;
    elseif (configuration == Buildings.Fluid.Types.HeatExchangerConfiguration.CrossFlowStream1MixedStream2Unmixed) then
      flowRegime = if (C1_flow < C2_flow) then Buildings.Fluid.Types.HeatExchangerFlowRegime.CrossFlowCMinMixedCMaxUnmixed
         else Buildings.Fluid.Types.HeatExchangerFlowRegime.CrossFlowCMinUnmixedCMaxMixed;
    else
      // have ( configuration == Buildings.Fluid.Types.HeatExchangerConfiguration.CrossFlowStream1UnmixedStream2Mixed)
      flowRegime = if (C1_flow < C2_flow) then Buildings.Fluid.Types.HeatExchangerFlowRegime.CrossFlowCMinUnmixedCMaxMixed
         else Buildings.Fluid.Types.HeatExchangerFlowRegime.CrossFlowCMinMixedCMaxUnmixed;
    end if;
  else
    flowRegime = flowRegime_nominal;
Modelica.Units.SI.ThermalConductance C1_flow(
    min=0,
    nominal=m1_flow_nominal*cp1_default)=abs(m1_flow)*(if 
      allowFlowReversal1 then fra_a1*Medium1.specificHeatCapacityCp(
      state_a1_inflow) + fra_b1*Medium1.specificHeatCapacityCp(state_b1_inflow)
       else Medium1.specificHeatCapacityCp(state_a1_inflow))
    "Heat capacity flow rate medium 1";
  Modelica.Units.SI.ThermalConductance C2_flow(
    min=0,
    nominal=m2_flow_nominal*cp2_default)=abs(m2_flow)*(if 
      allowFlowReversal2 then fra_a2*Medium2.specificHeatCapacityCp(
      state_a2_inflow) + fra_b2*Medium2.specificHeatCapacityCp(state_b2_inflow)
       else Medium2.specificHeatCapacityCp(state_a2_inflow))
    "Heat capacity flow rate medium 2";

So the potential change of PartialEffectivenessNTU is open for discussion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions