-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(HeatPumpPlantLoopEIRHeating): add new plant side heat pumps
- Loading branch information
1 parent
f037b95
commit d92670b
Showing
10 changed files
with
294 additions
and
2 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
52 changes: 52 additions & 0 deletions
52
src/Ironbug.Grasshopper/Component/Ironbug/Ironbug_HeatPumpPlantLoopEIRCooling.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using System; | ||
using Grasshopper.Kernel; | ||
using Ironbug.HVAC; | ||
|
||
namespace Ironbug.Grasshopper.Component | ||
{ | ||
public class Ironbug_HeatPumpPlantLoopEIRCooling : Ironbug_HVACWithParamComponent | ||
{ | ||
public Ironbug_HeatPumpPlantLoopEIRCooling() | ||
: base("IB_HeatPumpPlantLoopEIRCooling", "ClnHP", | ||
"Description", | ||
"Ironbug", "02:LoopComponents", | ||
typeof(HVAC.IB_HeatPumpPlantLoopEIRCooling_FieldSet)) | ||
{ | ||
} | ||
|
||
public override GH_Exposure Exposure => GH_Exposure.quarternary | GH_Exposure.obscure; | ||
|
||
protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager) | ||
{ | ||
pManager.AddGenericParameter("CompanionHeatingHeatPump", "CompanionHtnHP", "CompanionHeatingHeatPump", GH_ParamAccess.item); | ||
pManager[0].Optional = true; | ||
} | ||
|
||
protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager) | ||
{ | ||
pManager.AddGenericParameter("HeatPumpPlantLoopEIRCooling", "ClnHP", "Connect to chilled water loop's supply side.", GH_ParamAccess.item); | ||
pManager[pManager.AddGenericParameter("HeatPumpPlantLoopEIRCooling_ToCondenser", "ToCondenser", "Connect to condenser loop's demand side.", GH_ParamAccess.item)].DataMapping = GH_DataMapping.Graft; | ||
} | ||
|
||
|
||
protected override void SolveInstance(IGH_DataAccess DA) | ||
{ | ||
IB_HeatPumpPlantLoopEIRHeating hp = null; | ||
var obj = new HVAC.IB_HeatPumpPlantLoopEIRCooling(); | ||
if (DA.GetData(0, ref hp) && hp != null) | ||
{ | ||
obj.SetCompanionHeatingHeatPump(hp); | ||
} | ||
|
||
this.SetObjParamsTo(obj); | ||
var objs = this.SetObjDupParamsTo(obj); | ||
DA.SetDataList(0, objs); | ||
DA.SetDataList(1, objs); | ||
|
||
} | ||
|
||
protected override System.Drawing.Bitmap Icon => Properties.Resources.HeatPumpW2W_Cooling; | ||
|
||
public override Guid ComponentGuid => new Guid("C75B7FF9-CD54-49A5-BBB7-228C64605DE4"); | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
src/Ironbug.Grasshopper/Component/Ironbug/Ironbug_HeatPumpPlantLoopEIRCooling_AirCooled.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
using System; | ||
using Grasshopper.Kernel; | ||
using Ironbug.HVAC; | ||
|
||
namespace Ironbug.Grasshopper.Component | ||
{ | ||
public class Ironbug_HeatPumpPlantLoopEIRCooling_Air : Ironbug_HVACWithParamComponent | ||
{ | ||
public Ironbug_HeatPumpPlantLoopEIRCooling_Air() | ||
: base("IB_HeatPumpPlantLoopEIRCooling_AirCooled", "ClnHP_AirCooled", | ||
"Description", | ||
"Ironbug", "02:LoopComponents", | ||
typeof(HVAC.IB_HeatPumpPlantLoopEIRCooling_FieldSet)) | ||
{ | ||
} | ||
|
||
public override GH_Exposure Exposure => GH_Exposure.quarternary | GH_Exposure.obscure; | ||
|
||
protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager) | ||
{ | ||
pManager.AddGenericParameter("CompanionHeatingHeatPump", "CompanionHtnHP", "CompanionHeatingHeatPump", GH_ParamAccess.item); | ||
pManager[0].Optional = true; | ||
} | ||
|
||
protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager) | ||
{ | ||
pManager.AddGenericParameter("HeatPumpPlantLoopEIRCooling", "ClnHP", "Connect to hot water loop's supply side.", GH_ParamAccess.item); | ||
} | ||
|
||
|
||
protected override void SolveInstance(IGH_DataAccess DA) | ||
{ | ||
IB_HeatPumpPlantLoopEIRHeating hp = null; | ||
var obj = new HVAC.IB_HeatPumpPlantLoopEIRCooling(); | ||
if (DA.GetData(0, ref hp) && hp != null) | ||
{ | ||
obj.SetCompanionHeatingHeatPump(hp); | ||
} | ||
|
||
this.SetObjParamsTo(obj); | ||
var objs = this.SetObjDupParamsTo(obj); | ||
DA.SetDataList(0, objs); | ||
|
||
} | ||
|
||
protected override System.Drawing.Bitmap Icon => Properties.Resources.HeatPumpW2W_Cooling; | ||
|
||
public override Guid ComponentGuid => new Guid("6A3C8716-5602-4D69-B515-F148B097A6FA"); | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
src/Ironbug.Grasshopper/Component/Ironbug/Ironbug_HeatPumpPlantLoopEIRHeating.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using System; | ||
using Grasshopper.Kernel; | ||
using Ironbug.HVAC; | ||
|
||
namespace Ironbug.Grasshopper.Component | ||
{ | ||
public class Ironbug_HeatPumpPlantLoopEIRHeating : Ironbug_HVACWithParamComponent | ||
{ | ||
public Ironbug_HeatPumpPlantLoopEIRHeating() | ||
: base("IB_HeatPumpPlantLoopEIRHeating", "HtnHP", | ||
"Description", | ||
"Ironbug", "02:LoopComponents", | ||
typeof(HVAC.IB_HeatPumpPlantLoopEIRHeating_FieldSet)) | ||
{ | ||
} | ||
|
||
public override GH_Exposure Exposure => GH_Exposure.quarternary | GH_Exposure.obscure; | ||
|
||
protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager) | ||
{ | ||
pManager.AddGenericParameter("CompanionCoolingHeatPump", "CompanionClnHP", "CompanionCoolingHeatPump", GH_ParamAccess.item); | ||
pManager[0].Optional = true; | ||
} | ||
|
||
protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager) | ||
{ | ||
pManager.AddGenericParameter("HeatPumpPlantLoopEIRHeating", "HtnHP", "Connect to hot water loop's supply side.", GH_ParamAccess.item); | ||
pManager[pManager.AddGenericParameter("HeatPumpPlantLoopEIRHeating_ToCondenser", "ToCondenser", "Connect to condenser loop's demand side.", GH_ParamAccess.item)].DataMapping = GH_DataMapping.Graft; | ||
} | ||
|
||
|
||
protected override void SolveInstance(IGH_DataAccess DA) | ||
{ | ||
IB_HeatPumpPlantLoopEIRCooling hp = null; | ||
var obj = new HVAC.IB_HeatPumpPlantLoopEIRHeating(); | ||
if (DA.GetData(0, ref hp) && hp != null) | ||
{ | ||
obj.SetCompanionCoolingHeatPump(hp); | ||
} | ||
|
||
this.SetObjParamsTo(obj); | ||
var objs = this.SetObjDupParamsTo(obj); | ||
DA.SetDataList(0, objs); | ||
DA.SetDataList(1, objs); | ||
|
||
} | ||
|
||
protected override System.Drawing.Bitmap Icon => Properties.Resources.HeatPumpW2W_Heating; | ||
|
||
public override Guid ComponentGuid => new Guid("19D26BF9-93BE-4939-9D6F-049A6B5222E7"); | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
src/Ironbug.Grasshopper/Component/Ironbug/Ironbug_HeatPumpPlantLoopEIRHeating_AirCooled.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
using System; | ||
using Grasshopper.Kernel; | ||
using Ironbug.HVAC; | ||
|
||
namespace Ironbug.Grasshopper.Component | ||
{ | ||
public class Ironbug_HeatPumpPlantLoopEIRHeating_Air : Ironbug_HVACWithParamComponent | ||
{ | ||
public Ironbug_HeatPumpPlantLoopEIRHeating_Air() | ||
: base("IB_HeatPumpPlantLoopEIRHeating_AirCooled", "HtnHP_AirCooled", | ||
"Description", | ||
"Ironbug", "02:LoopComponents", | ||
typeof(HVAC.IB_HeatPumpPlantLoopEIRHeating_FieldSet)) | ||
{ | ||
} | ||
|
||
public override GH_Exposure Exposure => GH_Exposure.quarternary; | ||
|
||
protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager) | ||
{ | ||
pManager.AddGenericParameter("CompanionCoolingHeatPump", "CompanionClnHP", "CompanionCoolingHeatPump", GH_ParamAccess.item); | ||
pManager[0].Optional = true; | ||
} | ||
|
||
protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager) | ||
{ | ||
pManager.AddGenericParameter("HeatPumpPlantLoopEIRHeating_AirCooled", "HtnHP", "Connect to chilled water loop's supply side.", GH_ParamAccess.item); | ||
} | ||
|
||
|
||
protected override void SolveInstance(IGH_DataAccess DA) | ||
{ | ||
IB_HeatPumpPlantLoopEIRCooling hp = null; | ||
var obj = new HVAC.IB_HeatPumpPlantLoopEIRHeating(); | ||
if (DA.GetData(0, ref hp) && hp != null) | ||
{ | ||
obj.SetCompanionCoolingHeatPump(hp); | ||
} | ||
|
||
this.SetObjParamsTo(obj); | ||
var objs = this.SetObjDupParamsTo(obj); | ||
DA.SetDataList(0, objs); | ||
|
||
} | ||
|
||
protected override System.Drawing.Bitmap Icon => Properties.Resources.HeatPumpW2W_Heating; | ||
|
||
public override Guid ComponentGuid => new Guid("35363E35-0D83-4439-A9D2-F7B00543DE8C"); | ||
} | ||
} |
This file contains 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
This file contains 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
44 changes: 44 additions & 0 deletions
44
src/Ironbug.HVAC/LoopObjs/IB_HeatPumpPlantLoopEIRCooling.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using System; | ||
using Ironbug.HVAC.BaseClass; | ||
using OpenStudio; | ||
|
||
namespace Ironbug.HVAC | ||
{ | ||
|
||
public class IB_HeatPumpPlantLoopEIRCooling : IB_HVACObject, IIB_PlantLoopObjects, IIB_DualLoopObj | ||
{ | ||
protected override Func<IB_ModelObject> IB_InitSelf => () => new IB_HeatPumpPlantLoopEIRCooling(); | ||
|
||
private static HeatPumpPlantLoopEIRCooling NewDefaultOpsObj(Model model) => new HeatPumpPlantLoopEIRCooling(model); | ||
|
||
private IB_HeatPumpPlantLoopEIRHeating _heatingHP => this.GetChild<IB_HeatPumpPlantLoopEIRHeating>(0); | ||
|
||
public IB_HeatPumpPlantLoopEIRCooling() : base(NewDefaultOpsObj(new Model())) | ||
{ | ||
} | ||
|
||
public void SetCompanionHeatingHeatPump(IB_HeatPumpPlantLoopEIRHeating heatingHP) | ||
{ | ||
this.SetChild(heatingHP); | ||
} | ||
|
||
public override HVACComponent ToOS(Model model) | ||
{ | ||
var obj = base.OnNewOpsObj(NewDefaultOpsObj, model); | ||
if (_heatingHP != null) | ||
{ | ||
var hp = _heatingHP?.ToOS(model) as HeatPumpPlantLoopEIRHeating; | ||
obj.setCompanionHeatingHeatPump(hp); | ||
} | ||
return obj; | ||
} | ||
} | ||
|
||
public sealed class IB_HeatPumpPlantLoopEIRCooling_FieldSet | ||
: IB_FieldSet<IB_HeatPumpPlantLoopEIRCooling_FieldSet, HeatPumpPlantLoopEIRCooling> | ||
{ | ||
|
||
private IB_HeatPumpPlantLoopEIRCooling_FieldSet() { } | ||
|
||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
src/Ironbug.HVAC/LoopObjs/IB_HeatPumpPlantLoopEIRHeating.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using System; | ||
using Ironbug.HVAC.BaseClass; | ||
using OpenStudio; | ||
|
||
namespace Ironbug.HVAC | ||
{ | ||
public class IB_HeatPumpPlantLoopEIRHeating : IB_HVACObject, IIB_PlantLoopObjects, IIB_DualLoopObj | ||
{ | ||
protected override Func<IB_ModelObject> IB_InitSelf => () => new IB_HeatPumpPlantLoopEIRHeating(); | ||
|
||
private static HeatPumpPlantLoopEIRHeating NewDefaultOpsObj(Model model) => new HeatPumpPlantLoopEIRHeating(model); | ||
|
||
private IB_HeatPumpPlantLoopEIRCooling _coolingHP => this.GetChild<IB_HeatPumpPlantLoopEIRCooling>(0); | ||
|
||
public IB_HeatPumpPlantLoopEIRHeating() : base(NewDefaultOpsObj(new Model())) | ||
{ | ||
} | ||
|
||
public void SetCompanionCoolingHeatPump(IB_HeatPumpPlantLoopEIRCooling heatingHP) | ||
{ | ||
this.SetChild(heatingHP); | ||
} | ||
|
||
public override HVACComponent ToOS(Model model) | ||
{ | ||
var obj = base.OnNewOpsObj(NewDefaultOpsObj, model); | ||
if (_coolingHP != null) | ||
{ | ||
var hp = _coolingHP?.ToOS(model) as HeatPumpPlantLoopEIRCooling; | ||
obj.setCompanionCoolingHeatPump(hp); | ||
} | ||
|
||
return obj; | ||
} | ||
} | ||
|
||
public sealed class IB_HeatPumpPlantLoopEIRHeating_FieldSet | ||
: IB_FieldSet<IB_HeatPumpPlantLoopEIRHeating_FieldSet, HeatPumpPlantLoopEIRHeating> | ||
{ | ||
|
||
private IB_HeatPumpPlantLoopEIRHeating_FieldSet() { } | ||
|
||
} | ||
} |