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

Wrong calculation of nominal mass flow rate in PartialSolarCollector #1960

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

mwetter
Copy link
Contributor

@mwetter mwetter commented Jan 29, 2025

This closes issue #1956

jelgerjansen and others added 2 commits January 29, 2025 14:37
Use nPanelsInternal in PartialSolarcollector to avoid a nominal flow rate and/or pressure drop of zero
@mwetter mwetter self-assigned this Jan 29, 2025
@mwetter
Copy link
Contributor Author

mwetter commented Jan 29, 2025

@jelgerjansen : There is still something wrong with the parameter calculation. Can you please run

simulateModel(
  IBPSA.Fluid.SolarCollectors.Examples.FlatPlate(solCol(nColType=IBPSA.Fluid.SolarCollectors.Types.NumberSelection.Area, totalArea=10, nPanelsPar=4))",
  stopTime=86400,
  tolerance=1e-06,
  resultFile="FlatPlate");

which triggers the assertion for which I added more output. This was already wrong before your change, but should be fixed too.

@jelgerjansen
Copy link
Contributor

@mwetter the current implementation requires the user to input both the total number of collector panels (either via nPanels or totalArea) and the number of collector panels in series and parallel (nPanelsSer and nPanelsPar). This is an "overspecified problem".

As a solution, I kept nPanelsSer as a user-defined parameter in case of an array and calculated the other parameter nPanelsPar_internal = nPanels_internal/nPanelsSer_internal. This also avoids the need for an assert to check whether nPanels=nPanelsSer*nPanelsPar.

However, this implementation is not yet ideal, as totalArea is not necessarily an exact multiple of the area of a single collector. The user might have an array of collectors which is 5 times the area of a single collector, and model this as 2 parallel branches of 2.5 collectors in series. This is not possible in the current implementation as nPanelsSer is defined as an integer. Therefore, I suggest defining nPanelsSer as a Real parameter.

@mwetter
Copy link
Contributor Author

mwetter commented Jan 31, 2025

@jelgerjansen : I agree that the problem is over-specified, that we should remove one parameter.

I however suggest to remove nPanelsSer, and keep instead nPanelsPar, and make nPanelsPar an Integer. This way, we have always an integer value for the number of parallel circuits, which seems more logical from a construction point of view. We can then keep nPanelsSer_internal as a Real, and if it ends up to not be equal to an integer within say 1%, issue a assertion with a level warning.

With this approach, if a user specifies to use totalArea, we have an integer number for nPanelsPar, and perhaps a fraction for nPanelSer, in which case we warn the user and proceed with the simulation.

Does this sound good?

… area is not an exact multitude of a single collector's area.
@jelgerjansen
Copy link
Contributor

@mwetter I agree and implemented the proposed changes. Feel free to update the models if something is still missing or if you want to rephrase the warning message.

@jelgerjansen
Copy link
Contributor

@mwetter I assigned @FWuellhorst to do a review (as he also faced this issue recently). Can we merge this PR after his review? Or do you still want to do a final review yourself?

Copy link
Contributor

@FWuellhorst FWuellhorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Contributor Author

@mwetter mwetter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes now look good. I updated the conversion script, tested it, and also removed nPanelsSer from the user guide.

@mwetter
Copy link
Contributor Author

mwetter commented Feb 10, 2025

This is ready to merge if @FWuellhorst and @jelgerjansen agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants