CO2 Emission Reduction : Results

[insert_php]
if((isset($_POST[‘solar_capacity’]))&&(isset($_POST[‘units’])))
{
if((!empty($_POST[‘solar_capacity’]))&&($_POST[‘units’]))
{

$servername = ‘localhost’;
$username = ‘solarman_cal’;
$password = ‘mv)f848R4h~&’;
$dbname = ‘solarman_tools’;
// Create connection

$conn = mysql_connect($servername, $username, $password) or die(“Unable to connect to MySQL”);
mysql_select_db($dbname, $conn );

$C = $_POST[“solar_capacity”];
$U = $_POST[“units”];
$ip = $_SERVER[‘REMOTE_ADDR’];
$date= date(‘Y-m-d’);

$sql = “INSERT INTO `carbon_reduction` (`solar_capacity`, `units`, `date`, `ip`) VALUES (‘$C’,’$U’,’$date’, ‘$ip’)”;
if (mysql_query($sql) === TRUE) {

} else {
echo “Error: ” .mysql_error() . “
“;
}
mysql_close($conn);

$answer=($C*$U*365*1)/1000; echo “

Inputs

Solar Plant Capacity:

$C kW

Approximate units per kW per day:

$U kWh

Results

CO2 emissions reduced: $answer Tons per year

Assumptions
  • Reduction of CO2 emission per 1 kWh of solar power = 1 kg of CO2
  • Please note that the above calculation considers only the reduction in CO2 emissions for the electricity generated from a solar power plant vs. a coal plant and does not take into account CO2 from other parts of the value chain.

Looking to own customized calculators?

Talk to ramya@solarmango.com

“;
}
else
{
echo “

To view results, please fill all the fields correctly

“;
}}
[/insert_php]