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

solar collector with parallel arrangement compute wrong pressure drop #3597

Closed
mwetter opened this issue Dec 11, 2023 · 1 comment
Closed
Assignees
Labels

Comments

@mwetter
Copy link
Member

mwetter commented Dec 11, 2023

@jelgerjansen reports:

Problem description

If multiple panels are placed in parallel, something is wrong in the flow rate-pressure equations. If we simulate for example Buildings.Fluid.SolarCollectors.Examples.FlatPlate, one time with 1 panel, a 2nd time having 2 panels in parallel. One would expect that in the given setting (fixed pressure difference over the collectors), the flow rate would be twice as high in the situation of 2 panels compared to 1 panel. The simulation results however give the same mass flow rate.

Problem cause

I think the nominal mass flow rate that is used in Buildings.Fluid.SolarCollectors.BaseClasses.PartialSolarCollector to calculate the flow resistance is not correctly defined if multiple panels are in parallel.

Right now the code reads as follows:

model PartialSolarCollector "Partial model for solar collectors"
 extends Buildings.Fluid.Interfaces.LumpedVolumeDeclarations;
  extends Buildings.Fluid.Interfaces.TwoPortFlowResistanceParameters(final dp_nominal = dp_nominal_final);
  extends Buildings.Fluid.Interfaces.PartialTwoPortInterface(
    final m_flow_nominal=perPar.mperA_flow_nominal*perPar.A);

where

  final parameter Modelica.Units.SI.PressureDifference dp_nominal_final(
      displayUnit="Pa") = if sysConfig == Buildings.Fluid.SolarCollectors.Types.SystemConfiguration.Series
     then nPanels_internal*perPar.dp_nominal else perPar.dp_nominal
    "Nominal pressure loss across the system of collectors";

For serial configurations, the increased pressure drop is correctly accounted for. For parallel flows however, the nominal mass flow rate is not corrected: the mass flow rate per panel equals m_flow_nominal, but the total nominal mass flow rate (that results in a pressure drop dp_nominal_final) is equal to m_flow_nominal*nPanels_internal.

Problem solution

I think the following code is more correct:

model PartialSolarCollector "Partial model for solar collectors"
  extends Buildings.Fluid.Interfaces.LumpedVolumeDeclarations;
  extends Buildings.Fluid.Interfaces.TwoPortFlowResistanceParameters(final dp_nominal = dp_nominal_final);
  extends Buildings.Fluid.Interfaces.PartialTwoPortInterface(
    final m_flow_nominal=m_flow_nominal_final);

where

  final parameter Modelica.Units.SI.PressureDifference dp_nominal_final(
      displayUnit="Pa") = if sysConfig == Buildings.Fluid.SolarCollectors.Types.SystemConfiguration.Series
     then nPanels_internal*perPar.dp_nominal else perPar.dp_nominal
    "Nominal pressure loss across the system of collectors";

  final parameter Modelica.Units.SI.MassFlowRate m_flow_nominal_final(
      displayUnit="kg/s") = if sysConfig == Buildings.Fluid.SolarCollectors.Types.SystemConfiguration.Parallel
     then nPanels_internal*perPar.mperA_flow_nominal*perPar.A else perPar.mperA_flow_nominal*perPar.A
    "Nominal mass flow rate through the system of collectors";

These changes result in the following simulation results of Buildings.Fluid.SolarCollectors.Examples.FlatPlate for 1 and 2 panels (in parallel), respectively:
image

The mass flow rate is now double as high, which is to be expected for a constant pressure raise over two parallel instead of one single collector.

@mwetter mwetter added the bug label Dec 11, 2023
@mwetter mwetter self-assigned this Dec 11, 2023
@mwetter
Copy link
Member Author

mwetter commented Dec 11, 2023

@jelgerjansen: This is indeed a bug. I will correct it on

  • maint_9.1.x (incl. revision notes)
  • maint_10.0.x (incl. revision notes)
  • master. On the master branch, the parameter computeFlowResistance should be removed as it is not used.

branch.

This will change the results of Examples.Tubular which uses sysConfig = Buildings.Fluid.SolarCollectors.Types.SystemConfiguration.Parallel

mwetter added a commit that referenced this issue Dec 11, 2023
This corrects a bug in the implementation of the solar collector pressure drop for parallel collectors. This is for #3597
mwetter added a commit that referenced this issue Dec 11, 2023
This corrects a bug in the implementation of the solar collector pressure drop for parallel collectors. This is for #3597
mwetter added a commit that referenced this issue Dec 11, 2023
This corrects a bug in the implementation of the solar collector pressure drop for parallel collectors. This is for #3597
mwetter added a commit that referenced this issue Dec 12, 2023
This corrects a bug in the implementation of the solar collector pressure drop for parallel collectors. This is for #3597
mwetter added a commit that referenced this issue Dec 12, 2023
… and make computeFlowResistance final (#3600)

* Corrected pressure drop calculation of solar collector

This corrects a bug in the implementation of the solar collector pressure drop for parallel collectors. This is for #3597

* Changed assignment of computeFlowResistance to final. This is for #3597
mwetter added a commit that referenced this issue Dec 14, 2023
This corrects a bug in the implementation of the solar collector pressure drop for parallel collectors. This is for #3597
@mwetter mwetter closed this as completed Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant