From c400adf78be510609cb124665e4602e069a3cfdd Mon Sep 17 00:00:00 2001 From: Archiesachin Date: Wed, 5 Jun 2024 19:45:57 +0530 Subject: [PATCH 1/8] Solar Power Saving Calculator added --- .../Solar-Power-Saving-Calculator/Readme.md | 15 +++++ .../Solar-Power-Saving-Calculator/index.html | 66 +++++++++++++++++++ .../Solar-Power-Saving-Calculator/script.js | 59 +++++++++++++++++ .../Solar-Power-Saving-Calculator/style.css | 54 +++++++++++++++ 4 files changed, 194 insertions(+) create mode 100644 Calculators/Solar-Power-Saving-Calculator/Readme.md create mode 100644 Calculators/Solar-Power-Saving-Calculator/index.html create mode 100644 Calculators/Solar-Power-Saving-Calculator/script.js create mode 100644 Calculators/Solar-Power-Saving-Calculator/style.css diff --git a/Calculators/Solar-Power-Saving-Calculator/Readme.md b/Calculators/Solar-Power-Saving-Calculator/Readme.md new file mode 100644 index 000000000..5f82a0bdc --- /dev/null +++ b/Calculators/Solar-Power-Saving-Calculator/Readme.md @@ -0,0 +1,15 @@ +#

Solar Power Saving Calculator

+ +## Description :- + +A Solar Power Savings Calculator helps users estimate the potential savings from installing solar panels on their property. This tool considers various factors such as local solar insolation (sunlight exposure), electricity consumption, current electricity rates, and the cost of solar installation to provide an estimate of both short-term and long-term financial benefits. + +## Tech Stacks :- + +- HTML +- CSS +- JavaScript + +## Screenshots :- + + diff --git a/Calculators/Solar-Power-Saving-Calculator/index.html b/Calculators/Solar-Power-Saving-Calculator/index.html new file mode 100644 index 000000000..b1f696f96 --- /dev/null +++ b/Calculators/Solar-Power-Saving-Calculator/index.html @@ -0,0 +1,66 @@ + + + + + + Solar Power Savings Calculator + + + +

Solar Power Savings Calculator

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+ +
+

Results

+

+

+

+

+

+
+ + + + diff --git a/Calculators/Solar-Power-Saving-Calculator/script.js b/Calculators/Solar-Power-Saving-Calculator/script.js new file mode 100644 index 000000000..5cb140090 --- /dev/null +++ b/Calculators/Solar-Power-Saving-Calculator/script.js @@ -0,0 +1,59 @@ +const stateData = { + maharashtra: { avgSunHours: 5.5, electricityRate: 8, co2Reduction: 0.85, installationCost: 100000, incentives: 20000 }, + karnataka: { avgSunHours: 5.8, electricityRate: 7.5, co2Reduction: 0.82, installationCost: 95000, incentives: 15000 }, + rajasthan: { avgSunHours: 6.0, electricityRate: 7, co2Reduction: 0.88, installationCost: 90000, incentives: 18000 }, + tamilnadu: { avgSunHours: 5.6, electricityRate: 8.2, co2Reduction: 0.83, installationCost: 110000, incentives: 22000 }, + gujarat: { avgSunHours: 5.9, electricityRate: 7.8, co2Reduction: 0.86, installationCost: 105000, incentives: 21000 }, + // Add more states as needed +}; + +function updateStateData() { + const state = document.getElementById('state').value; + if (stateData[state]) { + document.getElementById('installationCost').value = stateData[state].installationCost; + document.getElementById('incentives').value = stateData[state].incentives; + } else { + document.getElementById('installationCost').value = ''; + document.getElementById('incentives').value = ''; + } +} + +function calculateSavings() { + const state = document.getElementById('state').value; + const roofArea = parseFloat(document.getElementById('roofArea').value); + const roofOrientation = document.getElementById('roofOrientation').value; + const electricityConsumption = parseFloat(document.getElementById('electricityConsumption').value); + const systemSize = parseFloat(document.getElementById('systemSize').value); + const installationCost = parseFloat(document.getElementById('installationCost').value); + const incentives = parseFloat(document.getElementById('incentives').value); + const financingOptions = document.getElementById('financingOptions').value; + + const avgSunHoursPerDay = stateData[state].avgSunHours; + const electricityRate = stateData[state].electricityRate; + const co2ReductionPerKWh = stateData[state].co2Reduction; + + const systemEfficiency = 0.75; // Efficiency of the solar system + + // Annual energy production calculation + const annualEnergyProduction = systemSize * avgSunHoursPerDay * 365 * systemEfficiency; + + // Annual savings calculation + const annualSavings = annualEnergyProduction * electricityRate; + + // Payback period calculation + const netInstallationCost = installationCost - incentives; + const paybackPeriod = netInstallationCost / annualSavings; + + // Lifetime savings calculation + const lifetimeSavings = annualSavings * 25; // Assuming a 25-year lifespan + + // Environmental impact calculation + const annualCo2Reduction = annualEnergyProduction * co2ReductionPerKWh; + + // Display results + document.getElementById('annualEnergyProduction').innerText = `Annual Energy Production: ${annualEnergyProduction.toFixed(2)} kWh`; + document.getElementById('annualSavings').innerText = `Annual Savings: ₹${annualSavings.toFixed(2)}`; + document.getElementById('paybackPeriod').innerText = `Payback Period: ${paybackPeriod.toFixed(2)} years`; + document.getElementById('lifetimeSavings').innerText = `Total Lifetime Savings: ₹${lifetimeSavings.toFixed(2)}`; + document.getElementById('environmentalImpact').innerText = `Environmental Impact: ${annualCo2Reduction.toFixed(2)} kg CO2 avoided annually`; +} diff --git a/Calculators/Solar-Power-Saving-Calculator/style.css b/Calculators/Solar-Power-Saving-Calculator/style.css new file mode 100644 index 000000000..f9abd6727 --- /dev/null +++ b/Calculators/Solar-Power-Saving-Calculator/style.css @@ -0,0 +1,54 @@ +body { + font-family: Arial, sans-serif; + margin: 20px; + background: slateblue; +} + +h1 { + text-align: center; +} + +form { + max-width: 600px; + margin: 0 auto; + padding: 20px; + border: 1px solid #ccc; + border-radius: 10px; + background-color: #f9f9f9; +} + +.form-group { + margin-bottom: 15px; +} + +label { + display: block; + margin-bottom: 5px; +} + +input[type="text"], input[type="number"], select { + width: 100%; + padding: 8px; + box-sizing: border-box; +} + +button { + padding: 10px 20px; + background-color: slateblue; + color: white; + border: none; + cursor: pointer; +} + +.results { + max-width: 600px; + margin: 20px auto; + padding: 20px; + border: 1px solid #ccc; + border-radius: 10px; + background-color: #f9f9f9; +} + +.results p { + margin: 5px 0; +} From 24a0303b58ebd0236b43135f700df9e28bae72f3 Mon Sep 17 00:00:00 2001 From: Archie Shah <103347688+Archiesachin@users.noreply.github.com> Date: Wed, 5 Jun 2024 19:58:41 +0530 Subject: [PATCH 2/8] Update Readme.md --- Calculators/Solar-Power-Saving-Calculator/Readme.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Calculators/Solar-Power-Saving-Calculator/Readme.md b/Calculators/Solar-Power-Saving-Calculator/Readme.md index 5f82a0bdc..26cc4ed47 100644 --- a/Calculators/Solar-Power-Saving-Calculator/Readme.md +++ b/Calculators/Solar-Power-Saving-Calculator/Readme.md @@ -12,4 +12,9 @@ A Solar Power Savings Calculator helps users estimate the potential savings from ## Screenshots :- +![Screenshot (1053)](https://github.com/Archiesachin/CalcDiverse/assets/103347688/6ac0e73e-7917-40a0-b1d9-41f0e1026ad1) + + +![Screenshot (1054)](https://github.com/Archiesachin/CalcDiverse/assets/103347688/b730b402-71c7-44e4-9a7f-2eb3c21659d1) + From 303698ecac449d18c8c5547bfe9533dde9922d98 Mon Sep 17 00:00:00 2001 From: Archie Shah <103347688+Archiesachin@users.noreply.github.com> Date: Thu, 6 Jun 2024 10:44:10 +0530 Subject: [PATCH 3/8] Added Solar Power Saving Calculator in index.html --- index.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/index.html b/index.html index 959b5d5ed..e89d2d24a 100644 --- a/index.html +++ b/index.html @@ -2430,6 +2430,20 @@

Calculator that determines whether a given number is a Smith number or not.< +
+
+

Solar Power Saving Calculator

+

This calculator allows you to calculate the amount that you can save on electricity by installing solar panels for electricity.

+ +
+

Speed Calculator

From 167e62e15e942dda6856cd6fc60228d688f5e1ac Mon Sep 17 00:00:00 2001 From: Rakesh Roshan Date: Mon, 10 Jun 2024 23:14:22 +0530 Subject: [PATCH 4/8] Update index.html --- Calculators/Solar-Power-Saving-Calculator/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Calculators/Solar-Power-Saving-Calculator/index.html b/Calculators/Solar-Power-Saving-Calculator/index.html index b1f696f96..ee421554b 100644 --- a/Calculators/Solar-Power-Saving-Calculator/index.html +++ b/Calculators/Solar-Power-Saving-Calculator/index.html @@ -3,11 +3,11 @@ - Solar Power Savings Calculator + Solar Power Saving Calculator -

Solar Power Savings Calculator

+

Solar Power Saving Calculator

From b1f98f3c09cc4fd1e8bd532ca4413efae0299dbf Mon Sep 17 00:00:00 2001 From: Rakesh Roshan Date: Mon, 10 Jun 2024 23:14:48 +0530 Subject: [PATCH 5/8] Update script.js --- .../Solar-Power-Saving-Calculator/script.js | 132 +++++++++++------- 1 file changed, 81 insertions(+), 51 deletions(-) diff --git a/Calculators/Solar-Power-Saving-Calculator/script.js b/Calculators/Solar-Power-Saving-Calculator/script.js index 5cb140090..035b27dfd 100644 --- a/Calculators/Solar-Power-Saving-Calculator/script.js +++ b/Calculators/Solar-Power-Saving-Calculator/script.js @@ -1,59 +1,89 @@ const stateData = { - maharashtra: { avgSunHours: 5.5, electricityRate: 8, co2Reduction: 0.85, installationCost: 100000, incentives: 20000 }, - karnataka: { avgSunHours: 5.8, electricityRate: 7.5, co2Reduction: 0.82, installationCost: 95000, incentives: 15000 }, - rajasthan: { avgSunHours: 6.0, electricityRate: 7, co2Reduction: 0.88, installationCost: 90000, incentives: 18000 }, - tamilnadu: { avgSunHours: 5.6, electricityRate: 8.2, co2Reduction: 0.83, installationCost: 110000, incentives: 22000 }, - gujarat: { avgSunHours: 5.9, electricityRate: 7.8, co2Reduction: 0.86, installationCost: 105000, incentives: 21000 }, - // Add more states as needed + maharashtra: { + avgSunHours: 5.5, + electricityRate: 8, + co2Reduction: 0.85, + installationCost: 100000, + incentives: 20000 + }, + karnataka: { + avgSunHours: 5.8, + electricityRate: 7.5, + co2Reduction: 0.82, + installationCost: 95000, + incentives: 15000 + }, + rajasthan: { + avgSunHours: 6.0, + electricityRate: 7, + co2Reduction: 0.88, + installationCost: 90000, + incentives: 18000 + }, + tamilnadu: { + avgSunHours: 5.6, + electricityRate: 8.2, + co2Reduction: 0.83, + installationCost: 110000, + incentives: 22000 + }, + gujarat: { + avgSunHours: 5.9, + electricityRate: 7.8, + co2Reduction: 0.86, + installationCost: 105000, + incentives: 21000 + }, + // Add more states as needed }; function updateStateData() { - const state = document.getElementById('state').value; - if (stateData[state]) { - document.getElementById('installationCost').value = stateData[state].installationCost; - document.getElementById('incentives').value = stateData[state].incentives; - } else { - document.getElementById('installationCost').value = ''; - document.getElementById('incentives').value = ''; - } + const state = document.getElementById('state').value; + if (stateData[state]) { + document.getElementById('installationCost').value = stateData[state].installationCost; + document.getElementById('incentives').value = stateData[state].incentives; + } else { + document.getElementById('installationCost').value = ''; + document.getElementById('incentives').value = ''; + } } function calculateSavings() { - const state = document.getElementById('state').value; - const roofArea = parseFloat(document.getElementById('roofArea').value); - const roofOrientation = document.getElementById('roofOrientation').value; - const electricityConsumption = parseFloat(document.getElementById('electricityConsumption').value); - const systemSize = parseFloat(document.getElementById('systemSize').value); - const installationCost = parseFloat(document.getElementById('installationCost').value); - const incentives = parseFloat(document.getElementById('incentives').value); - const financingOptions = document.getElementById('financingOptions').value; - - const avgSunHoursPerDay = stateData[state].avgSunHours; - const electricityRate = stateData[state].electricityRate; - const co2ReductionPerKWh = stateData[state].co2Reduction; - - const systemEfficiency = 0.75; // Efficiency of the solar system - - // Annual energy production calculation - const annualEnergyProduction = systemSize * avgSunHoursPerDay * 365 * systemEfficiency; - - // Annual savings calculation - const annualSavings = annualEnergyProduction * electricityRate; - - // Payback period calculation - const netInstallationCost = installationCost - incentives; - const paybackPeriod = netInstallationCost / annualSavings; - - // Lifetime savings calculation - const lifetimeSavings = annualSavings * 25; // Assuming a 25-year lifespan - - // Environmental impact calculation - const annualCo2Reduction = annualEnergyProduction * co2ReductionPerKWh; - - // Display results - document.getElementById('annualEnergyProduction').innerText = `Annual Energy Production: ${annualEnergyProduction.toFixed(2)} kWh`; - document.getElementById('annualSavings').innerText = `Annual Savings: ₹${annualSavings.toFixed(2)}`; - document.getElementById('paybackPeriod').innerText = `Payback Period: ${paybackPeriod.toFixed(2)} years`; - document.getElementById('lifetimeSavings').innerText = `Total Lifetime Savings: ₹${lifetimeSavings.toFixed(2)}`; - document.getElementById('environmentalImpact').innerText = `Environmental Impact: ${annualCo2Reduction.toFixed(2)} kg CO2 avoided annually`; + const state = document.getElementById('state').value; + const roofArea = parseFloat(document.getElementById('roofArea').value); + const roofOrientation = document.getElementById('roofOrientation').value; + const electricityConsumption = parseFloat(document.getElementById('electricityConsumption').value); + const systemSize = parseFloat(document.getElementById('systemSize').value); + const installationCost = parseFloat(document.getElementById('installationCost').value); + const incentives = parseFloat(document.getElementById('incentives').value); + const financingOptions = document.getElementById('financingOptions').value; + + const avgSunHoursPerDay = stateData[state].avgSunHours; + const electricityRate = stateData[state].electricityRate; + const co2ReductionPerKWh = stateData[state].co2Reduction; + + const systemEfficiency = 0.75; // Efficiency of the solar system + + // Annual energy production calculation + const annualEnergyProduction = systemSize * avgSunHoursPerDay * 365 * systemEfficiency; + + // Annual savings calculation + const annualSavings = annualEnergyProduction * electricityRate; + + // Payback period calculation + const netInstallationCost = installationCost - incentives; + const paybackPeriod = netInstallationCost / annualSavings; + + // Lifetime savings calculation + const lifetimeSavings = annualSavings * 25; // Assuming a 25-year lifespan + + // Environmental impact calculation + const annualCo2Reduction = annualEnergyProduction * co2ReductionPerKWh; + + // Display results + document.getElementById('annualEnergyProduction').innerText = `Annual Energy Production: ${annualEnergyProduction.toFixed(2)} kWh`; + document.getElementById('annualSavings').innerText = `Annual Savings: ₹${annualSavings.toFixed(2)}`; + document.getElementById('paybackPeriod').innerText = `Payback Period: ${paybackPeriod.toFixed(2)} years`; + document.getElementById('lifetimeSavings').innerText = `Total Lifetime Savings: ₹${lifetimeSavings.toFixed(2)}`; + document.getElementById('environmentalImpact').innerText = `Environmental Impact: ${annualCo2Reduction.toFixed(2)} kg CO2 avoided annually`; } From ecbb1fcc576c495599d9e7d8f8cbbef3a6460e2e Mon Sep 17 00:00:00 2001 From: Rakesh Roshan Date: Mon, 10 Jun 2024 23:15:06 +0530 Subject: [PATCH 6/8] Update style.css --- .../Solar-Power-Saving-Calculator/style.css | 60 ++++++++++--------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/Calculators/Solar-Power-Saving-Calculator/style.css b/Calculators/Solar-Power-Saving-Calculator/style.css index f9abd6727..612ff52a7 100644 --- a/Calculators/Solar-Power-Saving-Calculator/style.css +++ b/Calculators/Solar-Power-Saving-Calculator/style.css @@ -1,54 +1,56 @@ body { - font-family: Arial, sans-serif; - margin: 20px; - background: slateblue; + font-family: Arial, sans-serif; + margin: 20px; + background: slateblue; } h1 { - text-align: center; + text-align: center; } form { - max-width: 600px; - margin: 0 auto; - padding: 20px; - border: 1px solid #ccc; - border-radius: 10px; - background-color: #f9f9f9; + max-width: 600px; + margin: 0 auto; + padding: 20px; + border: 1px solid #ccc; + border-radius: 10px; + background-color: #f9f9f9; } .form-group { - margin-bottom: 15px; + margin-bottom: 15px; } label { - display: block; - margin-bottom: 5px; + display: block; + margin-bottom: 5px; } -input[type="text"], input[type="number"], select { - width: 100%; - padding: 8px; - box-sizing: border-box; +input[type="text"], +input[type="number"], +select { + width: 100%; + padding: 8px; + box-sizing: border-box; } button { - padding: 10px 20px; - background-color: slateblue; - color: white; - border: none; - cursor: pointer; + padding: 10px 20px; + background-color: slateblue; + color: white; + border: none; + cursor: pointer; } .results { - max-width: 600px; - margin: 20px auto; - padding: 20px; - border: 1px solid #ccc; - border-radius: 10px; - background-color: #f9f9f9; + max-width: 600px; + margin: 20px auto; + padding: 20px; + border: 1px solid #ccc; + border-radius: 10px; + background-color: #f9f9f9; } .results p { - margin: 5px 0; + margin: 5px 0; } From eb13a8c33535049578ba5e27a71fba4f661e83bd Mon Sep 17 00:00:00 2001 From: Rakesh Roshan Date: Mon, 10 Jun 2024 23:16:46 +0530 Subject: [PATCH 7/8] Update index.html --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index e89d2d24a..6211c768b 100644 --- a/index.html +++ b/index.html @@ -2433,7 +2433,7 @@

Calculator that determines whether a given number is a Smith number or not.<

Solar Power Saving Calculator

-

This calculator allows you to calculate the amount that you can save on electricity by installing solar panels for electricity.

+

Calculates the amount one can save on electricity by installing solar panels.