Skip to content

Commit

Permalink
Bug fix.
Browse files Browse the repository at this point in the history
Tests pass, but probably shouldn't yet!
  • Loading branch information
DamonHD committed Sep 26, 2023
1 parent 9e4b00f commit 698766e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
21 changes: 17 additions & 4 deletions javasrc/org/hd/d/TRVmodel/hg/HGTRVHPMModelParameterised.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ public static double computeBungalowHPElectricityDemandW(final ModelParameters p
* @return (radAsbMW) mean water temperature in each A room when B setback (C)
*/
public static double sbAMW(final double HHLsb, final double radWnsb, final double IWAabHLW)


// FIXME


{
// radWAsb: (Heat Loss 2.0) radiator output in each A room when B setback (W).
// (RADIATOR_POWER_IN_A_ROOMS_WHEN_B_SETBACK_W)
Expand Down Expand Up @@ -249,7 +254,7 @@ private static double iwHeatLossPerA(final ModelParameters params, final double
// (INTERNAL_DOOR_HEAT_LOSS_W)
final double IDAabHLW =
IDAabHL *
(HGTRVHPMModel.NORMAL_ROOM_TEMPERATURE_C - HGTRVHPMModel.SETBACK_ROOM_TEMPERATURE_C);
(tempA - HGTRVHPMModel.SETBACK_ROOM_TEMPERATURE_C);
// IDWAabHLW: (Heat Loss 1.7) internal wall and door heat loss per A room (W).
// (INTERNAL_WALL_AND_DOOR_HEAT_LOSS_PER_A_ROOM_W)
// In the original ABAB arrangement there are two walls from each A room into B rooms.
Expand Down Expand Up @@ -311,16 +316,24 @@ private static double ifHeatLossPerA2Storey(final ModelParameters params, final
* This is in fact the MW temperature for all room radiators when there are no setbacks.
*
* @param radWnsb pre-setback radiator output based on variable external air temperature (W)
* @param tempA temperature of A room
* @return (radAnsbMW) radiator mean water temperature in each A room when B is NOT set back (C)
*/
public static double nsbAMW(final double radWnsb)


// FIXME


{
// Extension to heat loss 2 to allow for varying external temperatures.
// Compute, for when B rooms are not set back:
// * the needed power for each A radiator
// * thus the implied temperature
// * thus the CoP
// * thus the electricity demand
// * thus the implied radiator mean water temperature
//
// This then allows computing:
// * the CoP
// * the heat-pump electricity demand
//
// Replaces the simple calc;
// final double radAMW =
Expand Down
4 changes: 4 additions & 0 deletions test/javasrc/localtest/TestHGTRVHPModelSoftATemperature.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ public static void testWithFixParametersDetached()
assertTrue(originalDetachedDemand.withSetback().heatDemand() > softDetachedDemand.withSetback().heatDemand());
assertTrue(originalDetachedDemand.withSetback().heatPumpElectricity() > softDetachedDemand.withSetback().heatPumpElectricity());


// FIXME nsbAMW() sbAMW() need fix


// The A-room equilibrium temperature with B set back
// will be lower than the 'normal' temperature and higher than the setback temperature.
assertTrue(equilibriumTemperature[0] > HGTRVHPMModel.SETBACK_ROOM_TEMPERATURE_C);
Expand Down

0 comments on commit 698766e

Please sign in to comment.