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

V23.2.0-IOFreeze: IDD and transition fixes #10215

Merged
merged 10 commits into from
Sep 20, 2023
Merged

Conversation

jmarrec
Copy link
Contributor

@jmarrec jmarrec commented Sep 11, 2023

Pull request overview

Just upstreaming some stuff I found while updating the openstudio SDK to use v23.2.0-IOFreeze. Technically an IDDChange, but definitely not a breaking one.

Pull Request Author

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
  • If any diffs are expected, author must demonstrate they are justified using plots and descriptions
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions
  • If any defect files are updated to a more recent version, upload new versions here or on DevSupport
  • If IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange label
  • If structural output changes, add to output rules file and add OutputChange label
  • If adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependencies

Reviewer

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • If branch is behind develop, merge develop and build locally to check for side effects of the merge
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally
  • Check any new function arguments for performance impacts
  • Verify IDF naming conventions and styles, memos and notes and defaults
  • If new idf included, locally check the err file and other outputs

@jmarrec jmarrec added IDDChange Code changes impact the IDD file (cannot be merged after IO freeze) Developer Issue Related to cmake, packaging, installers, or developer tooling (CI, etc) labels Sep 11, 2023
Comment on lines +51567 to +51568
\type object-list
\object-list UnivariateFunctions
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add object-list UnivariateFunctions for all Crankcase Heater Capacity curves

@@ -57265,6 +57283,7 @@ Coil:Cooling:WaterToAirHeatPump:EquationFit,
\note quadratic curve = a + b*PLR + c*PLR**2
\note cubic curve = a + b*PLR + c*PLR**2 + d*PLR**3
\note PLR = part load ratio (cooling load/steady state capacity)
\required-field
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add \requird-field for all new Part Load Fraction Correlation Curves. They are required. See #10043 (review)

Copy link
Member

Choose a reason for hiding this comment

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

Thanks @jmarrec, good catch.

@@ -58175,7 +58194,7 @@ Coil:Heating:WaterToAirHeatPump:EquationFit,
\memo Direct expansion (DX) heating coil for water-to-air heat pump (includes electric
\memo compressor), single-speed, equation-fit model. Equation-fit model uses normalized
\memo curves to describe the heat pump performance.
\min-fields 12
\min-fields 15
Copy link
Contributor Author

Choose a reason for hiding this comment

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

N7 + A8 with last one required => \min-fields 15

cf #10043 (review)

Copy link
Member

Choose a reason for hiding this comment

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

Also, thanks. I really look forward to tying the code and input schema together a little tighter as time marches on so that we don't have these accidental mismatches between the schema file and what the code is expecting.

Comment on lines +59 to +65
## Object Change: Coil:Heating:DX:VariableSpeed

Field 1 to 13 remain the same.

Field 14 is a new field named "Crankcase Heater Capacity Function of Temperature Curve Name" (labeled A6). It’s an optional field.

Field 15 and onwards are the same.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Missing from the file.

Copy link
Member

Choose a reason for hiding this comment

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

Blah, good catch. Trying to blend together all the transition rules was an unusually intertwined mess, and this obviously just got missed in the process. Thanks

CoilLatentStuff(NumCoilLatentStuff)%CoolingCoilType = MakeUPPERCase(IDFRecords(Num)%Alphas(14))
IF (CoilLatentStuff(NumCoilLatentStuff)%CoolingCoilType == 'COIL:COOLING:DX:VARIABLESPEED') CoilLatentStuff(NumCoilLatentStuff)%ActuallyCreateCurve = .true.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do not create the PLF curve if it's not going to be used. The only types (4 in total) are

  • Coil:<Cooling/Heating>:WaterToAirHeatPump:EquationFit
  • Coil:<Cooling/Heating>:WaterToAirHeatPump:ParameterEstimation

Copy link
Contributor

Choose a reason for hiding this comment

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

@mjwitte this coil type should have a PLF curve?

Coil:Cooling:DX:VariableSpeed,
  A4,  \field Energy Part Load Fraction Curve Name
    \required-field
    \type object-list
    \object-list UnivariateFunctions
    \note quadratic curve = a + b*PLR + c*PLR**2
    \note cubic curve = a + b*PLR + c*PLR**2 + d*PLR**3
    \note PLR = part load ratio (cooling load/steady state capacity)

CoilLatentStuff(NumCoilLatentStuff)%CoolingCoilType = MakeUPPERCase(IDFRecords(Num)%Alphas(11))
IF (CoilLatentStuff(NumCoilLatentStuff)%CoolingCoilType == 'COIL:COOLING:WATERTOAIRHEATPUMP:PARAMETERESTIMATION') CoilLatentStuff(NumCoilLatentStuff)%ActuallyCreateCurve = .true.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ZoneHVAC:WaterToAirHeatPump only accepts Coil:<Cooling/Heating>:WaterToAirHeatPump:EquationFit (and VariableSpeed, but this one doesn't warrant a PLF curve).

@jmarrec jmarrec added the Defect Includes code to repair a defect in EnergyPlus label Sep 11, 2023
Comment on lines 24568 to 24569
N4, \field Earth Tube Dimensionless Boundary Below
\note When set to 1.0, the below boundary is one earth tube radius below the earth tube.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@RKStrand Could you suggest the correct \note here please (I know what I wrote is wrong)
cf #10138 (review)

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested correction: When set to 1.0, the depth of the solution space is equal to the maximum vertical dimension above the earth tube. This maximum dimension above the earth tube is the depth of the earth tube minus three times the diameter of the earth tube itself. This sets the depth of the solution space below the earth tube node.

Copy link
Contributor

Choose a reason for hiding this comment

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

But in N3, the note says the maximum dimension above the earth tube is the maximum vertical dimension minus 1 earth tube radius? Should this note say "...minus two times the radius...". This stood out because it is so different from the note above. These 2 notes should look very similar?

\note When set to 1.0, the upper boundary is one earth tube radius below ground.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, @rraustad, I was trying to write a quick response before having to head off to classes. I probably should have waited. Here is another attempt to clarify both of these notes:

For N3: When set to 1.0, the total thickness of the solution space above the earth tube node is equal to the maximum vertical dimension above the earth tube. This maximum dimension above the earth tube is the depth of the earth tube minus three times the radius of the earth tube itself. This sets the depth of the solution space above the earth tube node only. The earth tube node thickness is four times the earth tube radius so when this parameter is set to 1.0, the top node of the solution space is one earth tube radius below the ground surface. When this parameter is less than 1.0, the solution space thickness above the earth tube is simply this parameter times the maximum thickness defined by the earth tube depth and the earth tube radius.

For N4: When set to 1.0, the total thickness of the solution space below the earth tube node is equal to the maximum vertical dimension above the earth tube. This maximum dimension above the earth tube is the depth of the earth tube minus three times the radius of the earth tube itself. This sets the depth of the solution space below the earth tube node only. The earth tube node thickness is four times the earth tube radius so when this parameter is set to 1.0, the bottom node of the solution space is twice the earth tube depth minus the earth tube radius below the ground surface. When this parameter is less than 1.0, the solution space thickness below the earth tube is simply this parameter times the maximum thickness defined by the earth tube depth and the earth tube radius.

Hopefully this makes sense now? Sorry for all the confusion!

Copy link
Member

Choose a reason for hiding this comment

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

@jmarrec this still needs final polishing, right?

Copy link
Contributor Author

@jmarrec jmarrec Sep 14, 2023

Choose a reason for hiding this comment

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

Yes, but I'm not sure what to put there. The IDD shouldn't replace the IO Ref guide and this seems like a ton of text.
Maybe just keep the first line?

Edit: I committed the one-line version and added suggestions for the full one below, apply them both or don't.

Copy link
Contributor

Choose a reason for hiding this comment

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

@jmarrec Yeah, I went a little too descriptive on my last suggestion. I think it could always be just the first line (sentence) as you suggested or it could be the first three lines (sentences). I don't have a strong preference either way, but agree that the note here get so long because that is why we have the IO Ref documentation.

jmarrec added a commit to NREL/OpenStudio that referenced this pull request Sep 12, 2023
Copy link
Member

@Myoldmopar Myoldmopar left a comment

Choose a reason for hiding this comment

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

This is a good set of changes, and it's why we have the IO freeze in the first place. Thanks @jmarrec for finding them and dealing with the issues. I have a few comments before I mark it approved:

  1. @jmarrec does the IDD still need a final tweak from the commentary between @RKStrand and @rraustad ?
  2. @mjwitte could you scrutinize the IDD/transition changes to make sure this is still good to go? I am open to trying to transition our entire set of test files, running E+ on them, and comparing the outputs, but if it's not justified, I'll avoid it and spend my time elsewhere.
  3. @jmarrec there was a Slack question about coils, does that relate to this work?

Comment on lines 24568 to 24569
N4, \field Earth Tube Dimensionless Boundary Below
\note When set to 1.0, the below boundary is one earth tube radius below the earth tube.
Copy link
Member

Choose a reason for hiding this comment

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

@jmarrec this still needs final polishing, right?

@@ -36467,7 +36467,7 @@ ZoneHVAC:WaterToAirHeatPump,
\note Enter the type of performance specification object used to describe the multispeed coil or fan.
A22; \field Design Specification Multispeed Object Name
\type object-list
\object-list UnitarySystemPerformaceNames
\object-list UnitarySystemPerformanceNames
Copy link
Member

Choose a reason for hiding this comment

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

Yes, good catch

👀 typos need to watch out for @jmarrec 👀

@@ -57265,6 +57283,7 @@ Coil:Cooling:WaterToAirHeatPump:EquationFit,
\note quadratic curve = a + b*PLR + c*PLR**2
\note cubic curve = a + b*PLR + c*PLR**2 + d*PLR**3
\note PLR = part load ratio (cooling load/steady state capacity)
\required-field
Copy link
Member

Choose a reason for hiding this comment

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

Thanks @jmarrec, good catch.

@@ -58175,7 +58194,7 @@ Coil:Heating:WaterToAirHeatPump:EquationFit,
\memo Direct expansion (DX) heating coil for water-to-air heat pump (includes electric
\memo compressor), single-speed, equation-fit model. Equation-fit model uses normalized
\memo curves to describe the heat pump performance.
\min-fields 12
\min-fields 15
Copy link
Member

Choose a reason for hiding this comment

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

Also, thanks. I really look forward to tying the code and input schema together a little tighter as time marches on so that we don't have these accidental mismatches between the schema file and what the code is expecting.

Comment on lines +59 to +65
## Object Change: Coil:Heating:DX:VariableSpeed

Field 1 to 13 remain the same.

Field 14 is a new field named "Crankcase Heater Capacity Function of Temperature Curve Name" (labeled A6). It’s an optional field.

Field 15 and onwards are the same.
Copy link
Member

Choose a reason for hiding this comment

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

Blah, good catch. Trying to blend together all the transition rules was an unusually intertwined mess, and this obviously just got missed in the process. Thanks

@Myoldmopar Myoldmopar added this to the EnergyPlus 23.2 milestone Sep 13, 2023
@Myoldmopar Myoldmopar self-assigned this Sep 13, 2023
@mjwitte
Copy link
Contributor

mjwitte commented Sep 13, 2023

@mjwitte could you scrutinize the IDD/transition changes to make sure this is still good to go? I am open to trying to transition our entire set of test files, running E+ on them, and comparing the outputs, but if it's not justified, I'll avoid it and spend my time elsewhere.

@Myoldmopar The changes look correct. I can try to test some transitions tomorrow.

@@ -24559,14 +24559,14 @@ ZoneEarthtube:Parameters,
\maximum 10
\default 3
N3, \field Earth Tube Dimensionless Boundary Above
\note When set to 1.0, the upper boundary is one earth tube radius below ground.
\note When set to 1.0, the total thickness of the solution space above the earth tube node is equal to the maximum vertical dimension above the earth tube.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
\note When set to 1.0, the total thickness of the solution space above the earth tube node is equal to the maximum vertical dimension above the earth tube.
\note When set to 1.0, the total thickness of the solution space above the earth tube node is equal to the maximum vertical dimension above the earth tube.
\note This maximum dimension above the earth tube is the depth of the earth tube minus three times the radius of the earth tube itself.
\note This sets the depth of the solution space above the earth tube node only.
\note The earth tube node thickness is four times the earth tube radius so when this parameter is set to 1.0,
\note the top node of the solution space is one earth tube radius below the ground surface.
\note When this parameter is less than 1.0, the solution space thickness above the earth tube is simply
\note this parameter times the maximum thickness defined by the earth tube depth and the earth tube radius.

\note When set to 1.0, the upper boundary is one earth tube radius below ground.
\default 1.0
N4, \field Earth Tube Dimensionless Boundary Below
\note When set to 1.0, the total thickness of the solution space below the earth tube node is equal to the maximum vertical dimension above the earth tube.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
\note When set to 1.0, the total thickness of the solution space below the earth tube node is equal to the maximum vertical dimension above the earth tube.
\note When set to 1.0, the total thickness of the solution space below the earth tube node is equal to the maximum vertical dimension above the earth tube.
\note This maximum dimension above the earth tube is the depth of the earth tube minus three times the radius of the earth tube itself.
\note This sets the depth of the solution space below the earth tube node only.
\note The earth tube node thickness is four times the earth tube radius so when this parameter is set to 1.0,
\note the bottom node of the solution space is twice the earth tube depth minus the earth tube radius below the ground surface.
\note When this parameter is less than 1.0, the solution space thickness below the earth tube is simply
\note this parameter times the maximum thickness defined by the earth tube depth and the earth tube radius.

@jmarrec
Copy link
Contributor Author

jmarrec commented Sep 14, 2023

3. @jmarrec there was a Slack question about coils, does that relate to this work?

Kindof. I did remove the superfluous curve in transition. Didn't tweak the IDD defaults though (This PR is just stuff I do on the fly while I implement the changes on the OS SDK side)

For reference the question I had on IDD defaults was:

I’m seeing different defaults for some of the Maximum Cycling Rate / Latent Time Capacity for one category of coils. I wonder why that is?

image (9)

@rraustad
Copy link
Contributor

rraustad commented Sep 14, 2023

@jmarrec there is no switch to turn off latent degradation (which is kinda silly) except for the model inputs themselves when 1 or more are 0. When latent degradation is used I think those non-zero defaults are fairly accurate. When the latent degradation model was added, 1 or more of these new inputs needed to have a default of 0 so as not to change the answer. How to resolve this across the coil models is another question.

Real64 CalcEffectiveSHR(EnergyPlusData &state, ... )

//  No moisture evaporation (latent degradation) occurs for runtime fraction of 1.0
//  All latent degradation model parameters cause divide by 0.0 if not greater than 0.0
//  Latent degradation model parameters initialize to 0.0 meaning no evaporation model used.
if (RTF >= 1.0 || Twet_Rated <= 0.0 || Gamma_Rated <= 0.0 || Nmax <= 0.0 || Tcl <= 0.0) {
    SHReff = SHRss;
    return SHReff;
}

@Myoldmopar
Copy link
Member

I ran regressions locally and am not seeing any big table diffs at all. I suppose they were purely due to being behind develop. I fixed the tiny conflict and am ready to push my changes, wait a brief moment and merge this in. If anyone disagrees, speak up quick! Thanks @jmarrec.

@Myoldmopar
Copy link
Member

I was hoping to catch this before Decent, but I missed, so I guess I'll just let Mac give a set of results and merge it if clean.

IF (CoilLatentStuff(NumCoilLatentStuff)%CoolingCoilType == 'COIL:COOLING:WATERTOAIRHEATPUMP:PARAMETERESTIMATION') CoilLatentStuff(NumCoilLatentStuff)%ActuallyCreateCurve = .true.
IF (CoilLatentStuff(NumCoilLatentStuff)%CoolingCoilType == 'COIL:COOLING:WATERTOAIRHEATPUMP:EQUATIONFIT') CoilLatentStuff(NumCoilLatentStuff)%ActuallyCreateCurve = .true.
IF (CoilLatentStuff(NumCoilLatentStuff)%CoolingCoilType == 'COIL:COOLING:WATERTOAIRHEATPUMP:VARIABLESPEEDEQUATIONFIT') CoilLatentStuff(NumCoilLatentStuff)%ActuallyCreateCurve = .true.
Copy link
Contributor

Choose a reason for hiding this comment

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

@mjwitte this coil type should have a PLF curve?

Coil:Cooling:WaterToAirHeatPump:VariableSpeedEquationFit,
   A6,  \field Energy Part Load Fraction Curve Name
    \required-field
    \type object-list
    \object-list UnivariateFunctions
    \note quadratic curve = a + b*PLR + c*PLR**2
    \note cubic curve = a + b*PLR + c*PLR**2 + d*PLR**3
    \note PLR = part load ratio (cooling load/steady state capacity)

Copy link
Contributor

Choose a reason for hiding this comment

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

It already had one in v23.1, so it doesn't need a new one here. If I'm following this correctly.

@Myoldmopar
Copy link
Member

This is coming out all clean on CI. I would be clicking merge pull request right now, but I will hold for a second after @rraustad 's comment. We are basically out of time, so unless that's a quick fix or an absolute red flag, we may just have to defer it.

@mjwitte
Copy link
Contributor

mjwitte commented Sep 20, 2023

@Myoldmopar This is good to go in as-is. I suppose for good measure, another round of running all test files through transition would be useful before packaging the release.

@Myoldmopar
Copy link
Member

OK cool, let's merge then. Thanks all!

@Myoldmopar Myoldmopar merged commit 01f8719 into develop Sep 20, 2023
10 checks passed
@Myoldmopar Myoldmopar deleted the v23.2.0-IOFreeze-IDD_fixes branch September 20, 2023 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Includes code to repair a defect in EnergyPlus Developer Issue Related to cmake, packaging, installers, or developer tooling (CI, etc) IDDChange Code changes impact the IDD file (cannot be merged after IO freeze)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants