diff --git a/doc/HVAC_GHTemplates/03_Other/Air Source Heat Pump (ASHP).gh b/doc/HVAC_GHTemplates/03_Other/Air Source Heat Pump (ASHP).gh new file mode 100644 index 00000000..6c9c869e Binary files /dev/null and b/doc/HVAC_GHTemplates/03_Other/Air Source Heat Pump (ASHP).gh differ diff --git a/doc/HVAC_GHTemplates/03_Other/GSHP.gh b/doc/HVAC_GHTemplates/03_Other/GSHP.gh new file mode 100644 index 00000000..9ad81e7f Binary files /dev/null and b/doc/HVAC_GHTemplates/03_Other/GSHP.gh differ diff --git a/src/Ironbug.Grasshopper/Component/Ironbug/Ironbug_HeatPumpPlantLoopEIRCooling.cs b/src/Ironbug.Grasshopper/Component/Ironbug/Ironbug_HeatPumpPlantLoopEIRCooling.cs new file mode 100644 index 00000000..005c2ffc --- /dev/null +++ b/src/Ironbug.Grasshopper/Component/Ironbug/Ironbug_HeatPumpPlantLoopEIRCooling.cs @@ -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"); + } +} \ No newline at end of file diff --git a/src/Ironbug.Grasshopper/Component/Ironbug/Ironbug_HeatPumpPlantLoopEIRCooling_AirCooled.cs b/src/Ironbug.Grasshopper/Component/Ironbug/Ironbug_HeatPumpPlantLoopEIRCooling_AirCooled.cs new file mode 100644 index 00000000..ccc3f606 --- /dev/null +++ b/src/Ironbug.Grasshopper/Component/Ironbug/Ironbug_HeatPumpPlantLoopEIRCooling_AirCooled.cs @@ -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"); + } +} \ No newline at end of file diff --git a/src/Ironbug.Grasshopper/Component/Ironbug/Ironbug_HeatPumpPlantLoopEIRHeating.cs b/src/Ironbug.Grasshopper/Component/Ironbug/Ironbug_HeatPumpPlantLoopEIRHeating.cs new file mode 100644 index 00000000..5416c3af --- /dev/null +++ b/src/Ironbug.Grasshopper/Component/Ironbug/Ironbug_HeatPumpPlantLoopEIRHeating.cs @@ -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"); + } +} \ No newline at end of file diff --git a/src/Ironbug.Grasshopper/Component/Ironbug/Ironbug_HeatPumpPlantLoopEIRHeating_AirCooled.cs b/src/Ironbug.Grasshopper/Component/Ironbug/Ironbug_HeatPumpPlantLoopEIRHeating_AirCooled.cs new file mode 100644 index 00000000..cc68c060 --- /dev/null +++ b/src/Ironbug.Grasshopper/Component/Ironbug/Ironbug_HeatPumpPlantLoopEIRHeating_AirCooled.cs @@ -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"); + } +} \ No newline at end of file diff --git a/src/Ironbug.Grasshopper/Component/Ironbug/ZoneEquipments/AirTerminals/Ironbug_AirTerminalSingleDuctParallelPIUReheat.cs b/src/Ironbug.Grasshopper/Component/Ironbug/ZoneEquipments/AirTerminals/Ironbug_AirTerminalSingleDuctParallelPIUReheat.cs index 5957b918..6a4c3fa7 100644 --- a/src/Ironbug.Grasshopper/Component/Ironbug/ZoneEquipments/AirTerminals/Ironbug_AirTerminalSingleDuctParallelPIUReheat.cs +++ b/src/Ironbug.Grasshopper/Component/Ironbug/ZoneEquipments/AirTerminals/Ironbug_AirTerminalSingleDuctParallelPIUReheat.cs @@ -19,7 +19,7 @@ protected override void RegisterInputParams(GH_Component.GH_InputParamManager pM { pManager.AddGenericParameter("HeatingCoil", "coil_", "Heating coil to provide reheat source. can be CoilHeatingWater, CoilHeatingElectirc, or CoilHeatingGas.", GH_ParamAccess.item); pManager[0].Optional = true; - pManager.AddGenericParameter("Fan", "fan_", "Can be FanConstantVolume or FanVariableVolume.", GH_ParamAccess.item); + pManager.AddGenericParameter("Fan", "fan_", "FanConstantVolume.", GH_ParamAccess.item); pManager[1].Optional = true; } diff --git a/src/Ironbug.Grasshopper/Component/Ironbug/ZoneEquipments/AirTerminals/Ironbug_AirTerminalSingleDuctSeriesPIUReheat.cs b/src/Ironbug.Grasshopper/Component/Ironbug/ZoneEquipments/AirTerminals/Ironbug_AirTerminalSingleDuctSeriesPIUReheat.cs index e4ada82c..7b60d40f 100644 --- a/src/Ironbug.Grasshopper/Component/Ironbug/ZoneEquipments/AirTerminals/Ironbug_AirTerminalSingleDuctSeriesPIUReheat.cs +++ b/src/Ironbug.Grasshopper/Component/Ironbug/ZoneEquipments/AirTerminals/Ironbug_AirTerminalSingleDuctSeriesPIUReheat.cs @@ -23,7 +23,7 @@ protected override void RegisterInputParams(GH_Component.GH_InputParamManager pM { pManager.AddGenericParameter("HeatingCoil", "coil_", "Heating coil to provide reheat source. can be CoilHeatingWater, CoilHeatingElectirc, or CoilHeatingGas.", GH_ParamAccess.item); pManager[0].Optional = true; - pManager.AddGenericParameter("Fan", "fan_", "Can be FanConstantVolume or FanVariableVolume.", GH_ParamAccess.item); + pManager.AddGenericParameter("Fan", "fan_", "FanConstantVolume.", GH_ParamAccess.item); pManager[1].Optional = true; } diff --git a/src/Ironbug.HVAC/LoopObjs/IB_HeatPumpPlantLoopEIRCooling.cs b/src/Ironbug.HVAC/LoopObjs/IB_HeatPumpPlantLoopEIRCooling.cs new file mode 100644 index 00000000..5d998efa --- /dev/null +++ b/src/Ironbug.HVAC/LoopObjs/IB_HeatPumpPlantLoopEIRCooling.cs @@ -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_InitSelf => () => new IB_HeatPumpPlantLoopEIRCooling(); + + private static HeatPumpPlantLoopEIRCooling NewDefaultOpsObj(Model model) => new HeatPumpPlantLoopEIRCooling(model); + + private IB_HeatPumpPlantLoopEIRHeating _heatingHP => this.GetChild(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 + { + + private IB_HeatPumpPlantLoopEIRCooling_FieldSet() { } + + } +} diff --git a/src/Ironbug.HVAC/LoopObjs/IB_HeatPumpPlantLoopEIRHeating.cs b/src/Ironbug.HVAC/LoopObjs/IB_HeatPumpPlantLoopEIRHeating.cs new file mode 100644 index 00000000..0fae0eeb --- /dev/null +++ b/src/Ironbug.HVAC/LoopObjs/IB_HeatPumpPlantLoopEIRHeating.cs @@ -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_InitSelf => () => new IB_HeatPumpPlantLoopEIRHeating(); + + private static HeatPumpPlantLoopEIRHeating NewDefaultOpsObj(Model model) => new HeatPumpPlantLoopEIRHeating(model); + + private IB_HeatPumpPlantLoopEIRCooling _coolingHP => this.GetChild(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 + { + + private IB_HeatPumpPlantLoopEIRHeating_FieldSet() { } + + } +}