Helpful error messages when cell temperature heat transfer method is missing data#1086
Merged
Conversation
than use ambient temperature
Collaborator
Author
|
@cpaulgilman review for error message. |
cpaulgilman
approved these changes
Nov 3, 2023
cpaulgilman
left a comment
Collaborator
There was a problem hiding this comment.
Looks good. Here are weather files I used for testing with heat transfer cell temp model:
weather-files-for-heat-transfer-cell-temp-tests.zip
sjanzou
requested changes
Nov 5, 2023
sjanzou
left a comment
Collaborator
There was a problem hiding this comment.
Please change isnan to std::isnan throughout changes per NatLabRockies/SAM#1223
|
|
||
| // convert to kelvin | ||
| double TA = input.Tdry+273.15; | ||
| if (isnan(input.Patm)) { |
Collaborator
There was a problem hiding this comment.
Please use std::isnan instead of isnan, see NatLabRockies/SAM#1223
| Fcs = 1. - Fcg; // !view factor between top of tilted plate and everything else (sky) | ||
| Fbs = Fcg; // !view factor bewteen top and ground = bottom and sky | ||
| Fbg = Fcs; // !view factor bewteen bottom and ground = top and sky | ||
| if (isnan(input.Tdew)) { |
| tcell = Subarrays[nn]->customCellTempArray[inrec]; | ||
| else { | ||
| (*Subarrays[nn]->Module->cellTempModel)(in[nn], *Subarrays[nn]->Module->moduleModel, module_voltage, tcell); | ||
| if (isnan(tcell)) throw exec_error("pvsamv1", Subarrays[nn]->Module->cellTempModel->error()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
-Throw error in pvsamv1 when ambient pressure and dew point (or wet bulb) is missing from the weather file
-Make tcell nan when this happens to make sure calculation does not continue as normal
-Fixes NatLabRockies/SAM#1428