diff --git a/Helios/Source/Battery.cs b/Helios/Source/Battery.cs new file mode 100644 index 0000000000000000000000000000000000000000..833d49eedf40431f4f85a277ed00b6c06b03066c --- /dev/null +++ b/Helios/Source/Battery.cs @@ -0,0 +1,42 @@ +using System; +namespace Helios.Source +{ + public class Battery + { + public int Capacity { get; set; } + public int Voltage { get; set; } + public double Charge { get; private set; } + public double DepthOfDischarge { get; private set; } + + public Battery() { } + + public Battery(int capacity, int voltage) + { + this.Capacity = capacity; + this.Voltage = voltage; + } + + public double GetCharge(double powerBalence) + { + double charge; + + charge = powerBalence / this.Voltage; + + this.Charge = charge; + + return charge; + } + + public double GetDepthOfDischarge() + { + double depthOfDischarge; + + depthOfDischarge = (1 - (this.Charge / this.Capacity)) * 100; + + this.DepthOfDischarge = depthOfDischarge; + + return depthOfDischarge; + } + } +} + diff --git a/Helios/Source/BatteryChargeModule.cs b/Helios/Source/BatteryChargeModule.cs new file mode 100644 index 0000000000000000000000000000000000000000..198882ab78b233fbc463d958de041a0522eaedd6 --- /dev/null +++ b/Helios/Source/BatteryChargeModule.cs @@ -0,0 +1,41 @@ +using System; +namespace Helios.Source +{ + public class BatteryChargeModule + { + + public double Efficiency { get; set; } + public double TotalOutput { get; set; } + public double PowerBalence { get; set; } + + public BatteryChargeModule() { } + + public BatteryChargeModule(double efficiency) + { + this.Efficiency = efficiency; + } + + public double GetTotalOutput(double solarPanelEfficiency, double solarEnergy, double roofArea, double sunAngle) + { + double totalOutput; + + totalOutput = solarPanelEfficiency * solarEnergy * roofArea * this.Efficiency * Math.Sin(sunAngle); + + this.TotalOutput = totalOutput; + + return totalOutput; + } + + public double GetPowerBalence(double powerConsumption) + { + double powerBalence; + + powerBalence = this.Efficiency * powerConsumption; + + this.PowerBalence = powerBalence; + + return powerBalence; + } + } +} + diff --git a/Helios/Source/PowerDistributionModule.cs b/Helios/Source/PowerDistributionModule.cs new file mode 100644 index 0000000000000000000000000000000000000000..5a24a77e5d5b49f66939002ed8e5c2a82c3ba60a --- /dev/null +++ b/Helios/Source/PowerDistributionModule.cs @@ -0,0 +1,28 @@ +using System; +namespace Helios.Source +{ + public class PowerDistributionModule + { + public double Efficiency { get; set; } + public double BaseLoad { get; set; } + + public PowerDistributionModule() { } + + public PowerDistributionModule(double efficiency) + { + this.Efficiency = efficiency; + } + + public double GetBaseLoad(double powerConsumption) + { + double baseLoad; + + baseLoad = powerConsumption + ((1 - Efficiency) * powerConsumption); + + this.BaseLoad = baseLoad; + + return baseLoad; + } + } +} +