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

Fix Missed PsyCpAirFnWTb Calls #7755

Merged
merged 7 commits into from
Feb 13, 2020
Merged

Fix Missed PsyCpAirFnWTb Calls #7755

merged 7 commits into from
Feb 13, 2020

Conversation

mitchute
Copy link
Collaborator

PR fixes a few missed calls and documentation that were missed in #7479.

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

@mitchute mitchute added the DoNotPublish Includes changes that shouldn't be reported in the changelog label Feb 10, 2020
@mitchute mitchute added this to the EnergyPlus 9.3.0 milestone Feb 10, 2020
@mitchute mitchute requested a review from Nigusse February 10, 2020 21:14
@mitchute mitchute self-assigned this Feb 10, 2020
@mitchute
Copy link
Collaborator Author

@Nigusse @Myoldmopar The PsyCpAirFnWTdb and _fast functions still exist in Pychrometrics.hh. The _fast function can be deleted, IMO, since it is not used anywhere. However, the other is only used for comparison against PsyCpAirFnW in the unit tests. What do you think about moving that function to the unit test file so that there's no confusion about which function to use?

@mitchute
Copy link
Collaborator Author

As expected from #7479, there are a few small math diffs due to the method change. Once we resolve what to do with the old PsyCpAirFnWTdb function, this should be ready.

@mitchute
Copy link
Collaborator Author

Ready for review.

@@ -44,7 +44,7 @@ \subsection{PsyRhoAirFnPbTdbW (Pb,Tdb,W,calledfrom)}\label{psyrhoairfnpbtdbw-pbt

Returns the density of air in kilograms per cubic meter as a function of barometric pressure {[}Pb{]} (in Pascals), dry bulb temperature {[}Tdb{]} (in Celsius), and humidity ratio {[}W{]} (kilograms of water per kilogram of dry air).

\subsection{PsyCpAirFnWTdb (W,Tdb,calledfrom)}\label{psycpairfnwtdb-wtdbcalledfrom}
\subsection{PsyCpAirFnW (W,calledfrom)}\label{psycpairfnw-wcalledfrom}

Returns the specific heat of air in Joules per kilogram degree Celsius as a function of humidity ratio {[}W{]} (kilograms of water per kilogram of dry air) and dry bulb temperature {[}Tdb{]} (Celsius).
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs removing the text "dry bulb temperature {[}Tdb{]} (Celsius)"

@@ -3360,7 +3360,7 @@ TEST_F(EnergyPlusFixture, UnitarySystem_GetInput)
SimUnitarySystem(UnitarySystem(1).Name, FirstHVACIteration, UnitarySystem(1).ControlZoneNum, ZoneEquipList(1).EquipIndex(1), _, _, _, _, true);

ZoneTemp = Node(ControlZoneNum).Temp;
CpAir = PsyCpAirFnWTdb(Node(InletNode).HumRat, Node(InletNode).Temp);
CpAir = PsyCpAirFnW(Node(InletNode).HumRat, Node(InletNode).Temp);
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to remove "Node(InletNode).Temp" argument.

@@ -3396,7 +3396,7 @@ TEST_F(EnergyPlusFixture, UnitarySystem_GetInput)
SimUnitarySystem(UnitarySystem(1).Name, FirstHVACIteration, UnitarySystem(1).ControlZoneNum, ZoneEquipList(1).EquipIndex(1), _, _, _, _, true);

ZoneTemp = Node(ControlZoneNum).Temp;
CpAir = PsyCpAirFnWTdb(Node(InletNode).HumRat, Node(InletNode).Temp);
CpAir = PsyCpAirFnW(Node(InletNode).HumRat, Node(InletNode).Temp);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above.

@@ -4176,7 +4176,7 @@ TEST_F(EnergyPlusFixture, UnitarySystem_VarSpeedCoils)
SimUnitarySystem(UnitarySystem(1).Name, FirstHVACIteration, UnitarySystem(1).ControlZoneNum, ZoneEquipList(1).EquipIndex(1), _, _, _, _, true);

ZoneTemp = Node(ControlZoneNum).Temp;
CpAir = PsyCpAirFnWTdb(Node(InletNode).HumRat, Node(InletNode).Temp);
CpAir = PsyCpAirFnW(Node(InletNode).HumRat, Node(InletNode).Temp);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above.

@@ -4645,7 +4645,7 @@ TEST_F(EnergyPlusFixture, UnitarySystem_VarSpeedCoils_CyclingFan)
SimUnitarySystem(UnitarySystem(1).Name, FirstHVACIteration, UnitarySystem(1).ControlZoneNum, ZoneEquipList(1).EquipIndex(1), _, _, _, _, true);

ZoneTemp = Node(ControlZoneNum).Temp;
CpAir = PsyCpAirFnWTdb(Node(InletNode).HumRat, Node(InletNode).Temp);
CpAir = PsyCpAirFnW(Node(InletNode).HumRat, Node(InletNode).Temp);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above.

@@ -8754,7 +8754,7 @@ TEST_F(EnergyPlusFixture, UnitarySystem_ASHRAEModel_WaterCoils)
SimUnitarySystem(UnitarySystem(1).Name, FirstHVACIteration, UnitarySystem(1).ControlZoneNum, ZoneEquipList(1).EquipIndex(1), _, _, _, _, true);

ZoneTemp = Node(ControlZoneNum).Temp;
CpAir = PsyCpAirFnWTdb(Node(InletNode).HumRat, Node(InletNode).Temp);
CpAir = PsyCpAirFnW(Node(InletNode).HumRat, Node(InletNode).Temp);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above. There are a few places that need removing the temp argument from the PsyCpAirFnW() function.

@@ -4208,7 +4208,7 @@ TEST_F(EnergyPlusFixture, UnitarySystem_VarSpeedCoils)
SimUnitarySystem(UnitarySystem(1).Name, FirstHVACIteration, UnitarySystem(1).ControlZoneNum, ZoneEquipList(1).EquipIndex(1), _, _, _, _, true);

ZoneTemp = Node(ControlZoneNum).Temp;
CpAir = PsyCpAirFnWTdb(Node(InletNode).HumRat, Node(InletNode).Temp);
CpAir = PsyCpAirFnW(Node(InletNode).HumRat, Node(InletNode).Temp);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above.

@@ -4606,7 +4606,7 @@ TEST_F(EnergyPlusFixture, UnitarySystem_VarSpeedCoils_CyclingFan)
SimUnitarySystem(UnitarySystem(1).Name, FirstHVACIteration, UnitarySystem(1).ControlZoneNum, ZoneEquipList(1).EquipIndex(1), _, _, _, _, true);

ZoneTemp = Node(ControlZoneNum).Temp;
CpAir = PsyCpAirFnWTdb(Node(InletNode).HumRat, Node(InletNode).Temp);
CpAir = PsyCpAirFnW(Node(InletNode).HumRat, Node(InletNode).Temp);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above.

@rraustad
Copy link
Contributor

The unit test HVACUnitarySystem.unit.cc is no longer used and should be deleted from the repository. I forgot to do this during refactoring.

@mitchute
Copy link
Collaborator Author

Thanks @rraustad. I'll get it taken care of.

@mitchute
Copy link
Collaborator Author

@Nigusse Thanks for reviewing this. Feel free to merge it if CI looks good when it finishes.

@Nigusse
Copy link
Contributor

Nigusse commented Feb 13, 2020

@mitchute I looked at the results and I see a few small diffs that look OK, but there are four test files that failed which should not. These four files have ems program. I think these failed test files need to be resolved before merging.

@mitchute
Copy link
Collaborator Author

@Nigusse I see two files with EDD diffs, but those are purely text diffs due to changing the EMS method's signature. However, I don't see anything else. Which files are you referring to?

@Nigusse
Copy link
Contributor

Nigusse commented Feb 13, 2020

@mitchute I checked the latest runs, all is good excepts the warnings, which are text diffs as you pointed out rightly. My earlier comment must have been based on previous runs. This is good to merge!

@Nigusse
Copy link
Contributor

Nigusse commented Feb 13, 2020

@mitchute I will merge this branch shortly.

@Nigusse Nigusse merged commit 236e15d into develop Feb 13, 2020
@mitchute mitchute deleted the ems_CpAirFnWTdb_cleanup branch February 13, 2020 19:49
@mjwitte
Copy link
Contributor

mjwitte commented Feb 13, 2020

Hmm, just catching up here. Did we add a transition rule for the old function name to new name or is EMS just mapping the old one behind the scenes?

@Myoldmopar
Copy link
Member

I don't believe a transition rule was written, so I think the Erl processor must just be mapping to the new function behind the scenes. I'm not saying we shouldn't fix it, but I believe that's what it is doing.

@mitchute
Copy link
Collaborator Author

Missed that too... I'll get that ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DoNotPublish Includes changes that shouldn't be reported in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants