#include #include #include using namespace std; class solarPanel { public: //https://www.amazon.com/WindyNation-Solar-Panel-Battery-Charging/dp/B00FE45FD4/ref=sr_1_1?ie=UTF8&qid=1496373790&sr=8-1-spons&keywords=Solar+Panel&psc=1 double costPerPanel = 111.99; // 111.99$ double outputOfEnergy = 100; // 100w double widthOfSolarPanel = 26.4; // inches double heightOfSolarPanel = 40; //inches double AreaOfSolarPanel; }; class solarField { public: double squareMile; double solarCountPerCapita; double size; //acers double cost; // in dollars vector numberOfPanels; double feetOfWire; double numberOfSolarPanelRegulators; // one for ever 3.61 of them //100w at 12v= 100/12 = 8.3 repeating and they are rated for only 30 amps - so 30/8.3 = 3.61 panels per regulator }; class unitedStates { public: float budget; float costForPanels; float costOfEnergyNow; float numberOfPanelsForCountry; float numberOfPeople = 321400000; // 321.4million //https://www.google.com/#q=number+of+people+in+the+us+ double energyDemand = 12988.26; // measure in kwh per capita //https://www.google.com/#q=united+states+of+america+electricity+consumption+per+capita&stick=H4sIAAAAAAAAAOPgUeLUz9U3sEw2LzfQcspOttLPyU9OLMnMz9MvLgHSxSWZyYk58UWp6UAhq9Sc1OSSoszkzJLK-OT8vOLS3AKQ0viC1KL45MSCzJJEAIAa6C1RAAAA }; void main() { solarPanel SP_A; solarField SF_A; //Calculate the area of land each one will take up https://www.google.com/#q=how+to+get+square+inches SP_A.AreaOfSolarPanel = SP_A.widthOfSolarPanel * SP_A.heightOfSolarPanel; // a Panel on average in the US delivers 30kwh https://www.google.com/#q=determine+kwh+output+of+solar+panel unitedStates USA; SF_A.solarCountPerCapita = USA.energyDemand / 30; cout << SF_A.solarCountPerCapita << " Solar Panels Per Capita for the year" << endl; //convert inches to feet in solar size SP_A.AreaOfSolarPanel = SP_A.AreaOfSolarPanel / 144; cout << SP_A.AreaOfSolarPanel << " Area of Solar Panel in square feet" << endl; // turn inches to feet : number of square inches in a foot is 144 SP_A.AreaOfSolarPanel = SP_A.AreaOfSolarPanel / 43560; cout << SP_A.AreaOfSolarPanel << " Area of solar panel in acers" << endl; // turn number of feet into acers - number of sq feet in an acer is 43560 SF_A.size = SF_A.solarCountPerCapita * SP_A.AreaOfSolarPanel; cout << SF_A.size << " size of solar field in acers per capita" << endl; // multiplied the area of a solar field in acers by the number of solar panels needed per capita SF_A.size = SF_A.size * USA.numberOfPeople; cout << SF_A.size << " of ACERS OF SOLAR FIELD IN US FOR YEAR" << endl; SF_A.size = SF_A.size / 640; // 640 is the number of acers in a square mile cout << SF_A.size << " square miles" << endl; // the number of square miles of solar panels it would take to power everyone in the USA SF_A.cost = SF_A.solarCountPerCapita * SP_A.costPerPanel; cout << SF_A.cost << " solar cost per capita" << endl; //need to conver it to thousands SF_A.cost = SF_A.cost / 1000; cout << SF_A.cost << " in thousands" << endl; SF_A.cost = SF_A.cost * USA.numberOfPeople; cout << SF_A.cost << " cost of all panels" << endl; SF_A.cost = (SF_A.cost * 1000) / 1000000000000; // convert in thousands to in trillions cout << SF_A.cost << " cost of all panels in trillions" << endl; // need to add wiring cost and cost of regulators SF_A.feetOfWire = SF_A.solarCountPerCapita * USA.numberOfPeople; SF_A.feetOfWire = SF_A.feetOfWire * 2 * 2; // 2 peices of wire per solar panel - the width 26.4 ( i gave them 24 inch) of the solar panel seemed like a good length cout << SF_A.feetOfWire << endl; SF_A.feetOfWire = SF_A.feetOfWire / 5280; cout << SF_A.feetOfWire << " miles" << endl; SF_A.feetOfWire = (SF_A.feetOfWire / 24) * 27.00; cout << SF_A.feetOfWire << " feet of wire in dollars" << endl; SF_A.cost = SF_A.cost + (SF_A.feetOfWire / 1000000000000); cout << SF_A.cost << " solar cost with wire and panels" << endl; // now we need to add in regulators SF_A.numberOfSolarPanelRegulators = (SF_A.solarCountPerCapita * USA.numberOfPeople) / 3.61; cout << SF_A.numberOfSolarPanelRegulators << "number of solar panel regulators" << endl; SF_A.cost = SF_A.cost + ((SF_A.numberOfSolarPanelRegulators * 51.99) / 1000000000000); cout << SF_A.cost << " total cost of wire, solar panel, solar Regulator in trillions" << endl; // lets spread that cost over lets say 30 years? the average mortgage on a house for most Americans SF_A.cost = (SF_A.cost * 1000000000000) / 30; SF_A.cost = (SF_A.cost / 1000000000); cout << SF_A.cost << " per year for 30 years by the brillions" << endl; // the average cost of a kwh of energy in the us is .12 USA.costOfEnergyNow = ((0.12 * USA.energyDemand) * USA.numberOfPeople); cout << USA.costOfEnergyNow << " Cost of energy in dollars for 1 year" << endl; USA.costOfEnergyNow = USA.costOfEnergyNow / 1000000000; cout << USA.costOfEnergyNow << " Cost of energy now in billions of dollars for 1 year" << endl; cout << SF_A.cost - USA.costOfEnergyNow << " This amount per year for 30 years" << endl; USA.costForPanels = SF_A.cost - USA.costOfEnergyNow; cout << "the use has 3.21 Trillion dollars per year OR " << (3.21 * 1000000000000) / 1000000000 << " Billion dollars a year" << endl; USA.budget = (3.21 * 1000000000000) / 1000000000; cout << endl << endl << endl << "THE IMPORTANT STUFF" << endl; cout << "Cost to put the entire country on solar would be just " << USA.costForPanels / USA.budget << "% of the national budget" << endl; cout << "and the number of space it would require is just " << SF_A.size << " Square Miles." << endl; cout << "Which sounds like a lot but the Mojave Desert is 47,877 square miles... mostly unusable land" << endl; cout << "Note: this is all speculation and all prices are consumer prices with out negotiation" << endl; cout << "this is if you were to lay the panels flat - directly facing up - and if you were to place them in a " << endl; cout << "\/\/\/\/ pattern you can save space and increase effciency." << endl; cout << "This also assumes that we are not getting our energy from anywhere else" << endl; cout << "Cost to the average american - with out adding in other taxes ( if we split the cost per person not per entity)" << endl; cout << (SF_A.cost * 1000000000) / USA.numberOfPeople << "Per Person " << endl; cout << "if you want to understand this amature model more feel free to get the source code at : " << endl; cout << "https://pastebin.com/7zmUvdMv" << endl; cout << "-Justin Hagerty" << endl; system("pause"); }