Default: 1000000 (gallons or liters, depending on Units Selection).

"; $qtip_help_numscenarios = "Select the number of scenarios (or comparisons) you want to include in the analysis. Up to 5 can be analyzed at one time. If you would like to analyze more scenarios, run the tool multiple times.

Default: 2.

"; $qtip_help_unitsystem = "Choose whether you want to enter data in U.S. or metric units.

Default: Metric.

"; $qtip_help_type = "Choose either water or wastewater from the drop-down menu.

Default: Water.

"; $qtip_help_period = "Enter the analysis period over which you want to evaluate the system. The default value is 25 years, a typical planning horizon for utilities. Another logical option for an analysis period might be the expected service life for the longest lasting component of the system. All infrastructure materials will be allocated across the analysis period. Choosing a longer analysis period will reduce the overall effect of infrastructure relative to operational effects. If you will be using the tool more than once and comparing the results, make sure the analysis period is the same for each run. Default: 25 years."; $qtip_help_annualproduction = "Enter a short, descriptive name and the total annual output volume of water or wastewater for each scenario. Units will be in gallons or liters, depending on the unit selection made above."; $qtip_help_simplepipe = "Enter the total length of pipe used for each scenario and process phase in the indicated units. See the FAQ page for infomation about piping assumptions and costs. Use the detailed pipe data entry for more accurate analysis."; $qtip_help_detailpipe_pipe = "Edit the service life for each material in years, if needed. Enter the total length of pipe used for each material (concrete, metal, or plastic), diameter (12 inch/30.5 cm, 30 inch/76.25 cm, or 48 inch/122 cm), scenario and process phase in the indicated units. Classify the pipe to be analyzed with the closest description. To enter more specific data about your pipe materials, use the WEST or WWEST tools. See the FAQs for a summary of assumed pipe costs."; $qtip_help_detailpipe_fvm = "Edit the service life for each product in years, if needed. Enter the total material cost for each category in thousands of dollars. Do not include labor or other installation costs. For most accurate results, discount the cost to 2002 dollars. "; $qtip_help_concrete = "Enter the total volume of reinforced concrete used in each part of the system in the indicated units. This category is the best way to analyze concrete pads, large concrete basins or other open structures. Detailed data entry allows the user to analyze buildings, if desired. The calculations assume the concrete is composed of 98% ready-mix concrete and 2% reinforcing steel by volume."; $qtip_help_buildings = "Edit the service life for each product in years, if needed. Enter the total material cost of system buildings and/or precast concrete structures in 2002$. Exclude labor costs. To avoid double-counting, make sure the costs entered do not include reinforced concrete entered already."; $qtip_help_equipment = "Edit the service life for each product in years, if needed. Enter the initial material cost for each category in 2002$. Do not include installation or other labor costs. Do not include replacement costs. To enter information on process equipment not included in this list, use the WEST or WWEST tool. "; $qtip_help_electricity = "Select an electricity mix from the drop-down menu. For custom mixes, the user will enter the percentage of the electricity generated from each of nine energy sources: coal, oil, natural gas, nuclear, hydropower (assumes large dam), biomass (average value), wind, solar (assumes photovoltaics), and geothermal. For other selections, the contribution of each of these energy sources will be shown. To edit the emission factors associated with electricity generation, use WEST or WWEST."; $qtip_help_energy = "Enter annual energy use for electricity (for the selected mix) in MWh, natural gas in MMBTU, and gasoline and diesel in either gallons or liters, depending on Units Selection. Natural gas is assumed to be combusted onsite for energy generation. Gasoline is assumed to be used in a transport vehicle. Diesel is assumed to be used in construction equipment. Other alternative fuels can be analyzed in the WEST or WWEST tools."; $qtip_help_chemicals = "Enter annual chemical consumption in either mass (kg or pounds) or 2002$, as indicated in the table. All unlisted chemicals can be grouped into the Other Chemicals category at the bottom of the table. If a chemical is not specifically listed in the table, it means a specific emission factor was not available so a general factor from EIO-LCA will be used. All chemical consumption is assumed to occur in the treatment phase."; $qtip_help_results_detailed = "Select to show or hide detailed results. If Show is selected, the table will include the sub-totaled results for specific pipe sizes and materials, fuels, chemicals, and/or process equipment. The default is to hide these details."; $qtip_help_results_notation = "Select to display the results using standard or scientific notation. Scientific notation is recommended if you analyzing a small system or a sub-system as many results in the standard notation may show up as zero. It may also be useful if the results are large and there is no clear space between columns. However, if you select scientific notation and then copy the table into a spreadsheet, only two significant digits will be retained."; ?>
Showing Calcs"; echo "\n

"; echo "\nShowing calculations on form submission."; echo "\n

"; echo "\n

"; echo "\nDisable"; echo "\n

"; } include("leftpane.php"); ?>

WEST Web  


Modeling Parameters

Select system type:  "; ?>
Units selection:  "; ?>
Enter number of scenarios:  "; ?>
Functional Unit:   (".$render_units_volume1[$render_units].")
"; //echo "\nAnalysis Period:   (years)
"; ?>

Annual Water or Wastewater Production

Enter scenario production volume (in ".$render_units_volume1[$render_units]."):

"; ?>
Scenario # Scenario Name Annual Scenario Production
1
2
3
4
5
"; echo "\n
"; echo "\n  Output: Production
"; for ($s=1; $s<=$render_numscenarios;$s++) { echo "\nScenario ".$s.": ".${'output_v_prod' . $s}." ".$render_units_volume1[$render_units]."
"; } echo "\n
"; echo "\n\n"; } // OUTPUTS - Annual Water or Wastewater Production ?>

Infrastructure

Pipe Length and Material

Would you like to enter detailed data about pipe materials?  
Enter total length (in ".$render_units_distance[$render_units]."):

"; ?> "; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t"; ?>
 Scenario #1
(".$render_units_distance[$render_units].")
Scenario #2
(".$render_units_distance[$render_units].")
Scenario #3
(".$render_units_distance[$render_units].")
Scenario #4
(".$render_units_distance[$render_units].")
Scenario #5
(".$render_units_distance[$render_units].")
"; echo "\n
"; echo "\n  Output: Infrastructure, Pipe Length and Material (Simple)
"; echo "\nf(x) Entry × FACTOR × Functional Unit (".$render_fu." ".$render_units_volume1[$render_units].") ÷ ScenarioProduction ÷ Service Life (".$v_inf_pipe_service_life." years)
"; echo "\n\t"; echo "\n\t\t"; echo "\n\t\t\t"; for($ei=0;$ei".$ei_cat_indexes[$ei].""; } echo "\n\t\t"; $ei=0; echo "\n\t\t"; echo "\n\t\t\t"; for($ei=0;$ei".$ei_cat_unit[$ei_cat_indexes[$ei]].""; } echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t"; $ei_inf_pipe_keys = array_keys($ei_multiarray); for($ei=0;$ei"; echo "\n\t\t\t"; for($ei2=0;$ei2".number_format($ei_multiarray[$eiset][$ei_cat_indexes[$ei2]],2,'.','').""; } echo "\n\t\t"; } // results for($s=1;$s<=$render_numscenarios;$s++) { $temp_out_array_name="out_inf_pipe_water_s".$s; $temp_out_array=${$temp_out_array_name}; echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t"; for($ei=0;$ei"; echo "\n\t\t\t"; for($ei2=0;$ei2".number_format($temp_out_array[$eiset][$ei_cat_indexes[$ei2]],2,'.','').""; } echo "\n\t\t"; } } // end loop through scenarios echo "\n\t
 
 
".ucfirst($render_type)." Factors (per foot)
".ucfirst($eiset)."
Results for Scenario ".$s." (per year)
".ucfirst($eiset)."
"; echo "\n
"; echo "\n\n"; } } // OUTPUT - Infrastructure: Simple Pipe Length and Material ?>
"; $arrow_treatment = "\"Treatment\""; $arrow_posttreatment = "\"Post-treatment\""; ?> "; ?> Legend: Pre-treatment denotes , Treatment denotes , Post-treatment denotes . "; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t"; ?> "; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t"; ?>
Material Diameter Life
Scenario 1 Scenario 2 Scenario 3 Scenario 4 Scenario 5
"; echo "\n\t\t\tPipe"; echo "\n\t\t(in/cm)(years)(".$render_units_distance[$render_units].")(".$render_units_distance[$render_units].")(".$render_units_distance[$render_units].")(".$render_units_distance[$render_units].")(".$render_units_distance[$render_units].")
Concrete 12/31
30/76
48/122
Metal 12/31
30/76
48/122
Plastic 12/31
30/76
48/122
Fittings, Valves, and Meters(years)(2002$)(2002$)(2002$)(2002$)(2002$)
Concrete Pipe Fittings
Metal Pipe Fittings
Plastic Pipe Fittings
Flowmeters
Valves
"concS","Concrete M"=>"concM","Concrete L"=>"concL"); $temp_out_component_life = $_POST["v_inf_pipedet_conc_life"]; foreach($temp_out_concrete_component_names as $component => $inputname) { // output vectors for Concrete Pre-treatment ${$temp_out_array}[$component]["pre-treatment"] = $ei_inf_pipedet[$component]; // delcares array as ei factors $temp_scalar_multiplier=$_POST["v_inf_pipedet_".$inputname."1_s".$s]*$convert_m_to_ft*$render_fu/$temp_out_component_life/$temp_out_scenario_production; array_walk(${$temp_out_array}[$component]["pre-treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar // output vectors for Concrete Treatment ${$temp_out_array}[$component]["treatment"] = $ei_inf_pipedet[$component]; // delcares array as ei factors $temp_scalar_multiplier=$_POST["v_inf_pipedet_".$inputname."2_s".$s]*$convert_m_to_ft*$render_fu/$temp_out_component_life/$temp_out_scenario_production; array_walk(${$temp_out_array}[$component]["treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar // output vectors for Concrete Post-treatment ${$temp_out_array}[$component]["post-treatment"] = $ei_inf_pipedet[$component]; // delcares array as ei factors $temp_scalar_multiplier=$_POST["v_inf_pipedet_".$inputname."3_s".$s]*$convert_m_to_ft*$render_fu/$temp_out_component_life/$temp_out_scenario_production; array_walk(${$temp_out_array}[$component]["post-treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar } // output vectors for CONCRETE - END // output vectors for METALS - START $temp_out_metals_component_names = array("Metal S"=>"metaS","Metal M"=>"metaM","Metal L"=>"metaL"); $temp_out_component_life = $_POST["v_inf_pipedet_meta_life"]; foreach($temp_out_metals_component_names as $component => $inputname) { // output vectors for Metal Pre-treatment ${$temp_out_array}[$component]["pre-treatment"] = $ei_inf_pipedet[$component]; // delcares array as ei factors $temp_scalar_multiplier=$_POST["v_inf_pipedet_".$inputname."1_s".$s]*$convert_m_to_ft*$render_fu/$temp_out_component_life/$temp_out_scenario_production; array_walk(${$temp_out_array}[$component]["pre-treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar // output vectors for Metal Treatment ${$temp_out_array}[$component]["treatment"] = $ei_inf_pipedet[$component]; // delcares array as ei factors $temp_scalar_multiplier=$_POST["v_inf_pipedet_".$inputname."2_s".$s]*$convert_m_to_ft*$render_fu/$temp_out_component_life/$temp_out_scenario_production; array_walk(${$temp_out_array}[$component]["treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar // output vectors for Metal Post-treatment ${$temp_out_array}[$component]["post-treatment"] = $ei_inf_pipedet[$component]; // delcares array as ei factors $temp_scalar_multiplier=$_POST["v_inf_pipedet_".$inputname."3_s".$s]*$convert_m_to_ft*$render_fu/$temp_out_component_life/$temp_out_scenario_production; array_walk(${$temp_out_array}[$component]["post-treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar } // output vectors for METALS - END // output vectors for PLASTICS - START $temp_out_metals_component_names = array("Plastic S"=>"plasS","Plastic M"=>"plasM","Plastic L"=>"plasL"); $temp_out_component_life = $_POST["v_inf_pipedet_plas_life"]; foreach($temp_out_metals_component_names as $component => $inputname) { // output vectors for Plastic Pre-treatment ${$temp_out_array}[$component]["pre-treatment"] = $ei_inf_pipedet[$component]; // delcares array as ei factors $temp_scalar_multiplier=$_POST["v_inf_pipedet_".$inputname."1_s".$s]*$convert_m_to_ft*$render_fu/$temp_out_component_life/$temp_out_scenario_production; array_walk(${$temp_out_array}[$component]["pre-treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar // output vectors for Plastic Treatment ${$temp_out_array}[$component]["treatment"] = $ei_inf_pipedet[$component]; // delcares array as ei factors $temp_scalar_multiplier=$_POST["v_inf_pipedet_".$inputname."2_s".$s]*$convert_m_to_ft*$render_fu/$temp_out_component_life/$temp_out_scenario_production; array_walk(${$temp_out_array}[$component]["treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar // output vectors for Plastic Post-treatment ${$temp_out_array}[$component]["post-treatment"] = $ei_inf_pipedet[$component]; // delcares array as ei factors $temp_scalar_multiplier=$_POST["v_inf_pipedet_".$inputname."3_s".$s]*$convert_m_to_ft*$render_fu/$temp_out_component_life/$temp_out_scenario_production; array_walk(${$temp_out_array}[$component]["post-treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar } // output vectors for PLASTICS - END // output vectors for FITTINGS, VALVES, AND METERS - START $temp_out_metals_component_names = array("Concrete Pipe Fittings"=>"cpfi","Metal Pipe Fittings"=>"mpfi","Plastic Pipe Fittings"=>"ppfi","Flowmeters"=>"flme","Valves"=>"valv"); foreach($temp_out_metals_component_names as $component => $inputname) { $temp_out_component_life = $_POST["v_inf_pipedet_".$inputname."_life"]; // output vectors for Fittings, Valves, and Meters Pre-treatment ${$temp_out_array}[$component]["pre-treatment"] = $ei_inf_pipedet[$component]; // delcares array as ei factors $temp_scalar_multiplier=$_POST["v_inf_pipedet_".$inputname."1_s".$s]*$render_fu/$temp_out_component_life/$temp_out_scenario_production; array_walk(${$temp_out_array}[$component]["pre-treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar // output vectors for Fittings, Valves, and Meters Treatment ${$temp_out_array}[$component]["treatment"] = $ei_inf_pipedet[$component]; // delcares array as ei factors $temp_scalar_multiplier=$_POST["v_inf_pipedet_".$inputname."2_s".$s]*$render_fu/$temp_out_component_life/$temp_out_scenario_production; array_walk(${$temp_out_array}[$component]["treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar // output vectors for Fittings, Valves, and Meters Post-treatment ${$temp_out_array}[$component]["post-treatment"] = $ei_inf_pipedet[$component]; // delcares array as ei factors $temp_scalar_multiplier=$_POST["v_inf_pipedet_".$inputname."3_s".$s]*$render_fu/$temp_out_component_life/$temp_out_scenario_production; array_walk(${$temp_out_array}[$component]["post-treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar } // output vectors for FITTINGS, VALVES, AND METERS - END } if($render_showcalcs && isset($_POST['runlca'])) { echo "\n"; echo "\n
"; echo "\n  Output: Infrastructure, Pipe Length and Material (Detailed) (factors per foot)
"; echo "\nf(x) Entry × FACTOR × Functional Unit ÷ ScenarioProduction ÷ Service Life for pipe material
"; echo "\n\t"; echo "\n\t\t"; echo "\n\t\t\t"; for($ei=0;$ei".$ei_cat_indexes[$ei].""; } echo "\n\t\t"; $ei=0; echo "\n\t\t"; echo "\n\t\t\t"; for($ei=0;$ei".$ei_cat_unit[$ei_cat_indexes[$ei]].""; } echo "\n\t\t"; $ei_inf_pipedet_keys = array_keys($ei_inf_pipedet); for($ei=0;$ei"; echo "\n\t\t\t"; for($ei2=0;$ei2".$ei_inf_pipedet[$eiset][$ei_cat_indexes[$ei2]].""; } echo "\n\t\t"; } // results for($s=1;$s<=$render_numscenarios;$s++) { $temp_out_array_name="out_inf_pipedet_s".$s; $temp_out_array=${$temp_out_array_name}; echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t"; for($ei=0;$ei"; echo "\n\t\t\t"; for($ei2=0;$ei2".number_format($temp_out_array[ucfirst($eiset)]["pre-treatment"][$ei_cat_indexes[$ei2]],2,'.','').""; } echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t\t"; for($ei2=0;$ei2".number_format($temp_out_array[ucfirst($eiset)]["treatment"][$ei_cat_indexes[$ei2]],2,'.','').""; } echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t\t"; for($ei2=0;$ei2".number_format($temp_out_array[ucfirst($eiset)]["post-treatment"][$ei_cat_indexes[$ei2]],2,'.','').""; } echo "\n\t\t"; } } // end loop through scenarios echo "\n\t
FACTORS
 
".ucfirst($eiset)."
Results for Scenario ".$s." (per year)
".ucfirst($eiset).": Pre
".ucfirst($eiset).": Tr
".ucfirst($eiset).": Post
"; echo "\n
"; echo "\n\n"; } } // INDICATORS - Infrastructure: Detailed Pipe Length and Material ?>

Reinforced Concrete Materials

Would you like to enter detailed data about buildings and pre-cast structures?  
Enter total volume of reinforced concrete (in cubic ".$render_units_volume2[$render_units]."):

"; ?> "; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t"; ?>
 Life
(years)
Scenario #1
(cubic ".$render_units_volume2[$render_units].")
Scenario #2
(cubic ".$render_units_volume2[$render_units].")
Scenario #3
(cubic ".$render_units_volume2[$render_units].")
Scenario #4
(cubic ".$render_units_volume2[$render_units].")
Scenario #5
(cubic ".$render_units_volume2[$render_units].")
Pre-treatment  
Treatment  
Post-treatment  
"; echo "\n
"; echo "\n  Output: Infrastructure, Reinforced Concrete Materials (factors per cy)
"; echo "\nf(x) Entry × FACTOR × Functional Unit (".$render_fu." ".$render_units_volume1[$render_units].") ÷ ScenarioProduction ÷ Lifetime (".$v_inf_concrete_life." yrs)
"; echo "\n\t"; echo "\n\t\t"; echo "\n\t\t\t"; for($ei=0;$ei".$ei_cat_indexes[$ei].""; } echo "\n\t\t"; $ei=0; echo "\n\t\t"; echo "\n\t\t\t"; for($ei=0;$ei".$ei_cat_unit[$ei_cat_indexes[$ei]].""; } echo "\n\t\t"; $ei_inf_concrete_keys = array_keys($ei_inf_concrete); for($ei=0;$ei"; echo "\n\t\t\t"; for($ei2=0;$ei2".number_format($ei_inf_concrete[$eiset][$ei_cat_indexes[$ei2]],2,'.','').""; } echo "\n\t\t"; } // display of reinforced concrete materials simple results - start for($s=1;$s<=$render_numscenarios;$s++) { $temp_out_array_name="out_inf_concrete_s".$s; $temp_out_array=${$temp_out_array_name}["simple"]; echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t"; for($ei=0;$ei"; echo "\n\t\t\t"; for($ei2=0;$ei2".number_format($temp_out_array[$eiset][$ei_cat_indexes[$ei2]],2,'.','').""; } echo "\n\t\t"; } } // display of reinforced concrete materials simple results - end echo "\n\t
FACTORS
 
".ucfirst($eiset)."
Results for Scenario ".$s." (per year)
".ucfirst($eiset)."
"; echo "\n
"; echo "\n\n"; } } // INDICATORS - Infrastructure: Simple Reinforced Concrete Materials ?>
"; $arrow_treatment = "\"Treatment\""; $arrow_posttreatment = "\"Post-treatment\""; echo "\n

Enter the dollars spent on buildings and structures (in 2002$) not previously included in the above table:

"; ?> Only include the purchase price; do not include labor or delivery costs.
Legend: Pre-treatment denotes , Treatment denotes , Post-treatment denotes .
Component Life
(years) Scenario 1 (2002$) Scenario 2 (2002$) Scenario 3 (2002$) Scenario 4 (2002$) Scenario 5 (2002$)
Buildings
Pre-cast Concrete
"B","Pre-cast Concrete"=>"P"); for($s=1;$s<=$render_numscenarios;$s++) { foreach($temp_out_buildings_component_names as $component => $inputletter) { $temp_out_array = "out_inf_concrete_s".$s; $temp_component_life = $_POST["v_inf_concdet_life_".$inputletter."1"]; $temp_out_scenario_production = ${"output_v_prod{$s}"}; // output vectors for buildings and pre-cast structures pre-treatment ${$temp_out_array}[$component]["pre-treatment"] = $ei_inf_concdet[$component]; // delcares array as ei factors $temp_scalar_multiplier=$_POST["v_inf_concdet_s".$s."_".$inputletter."1"]*$render_fu/$temp_component_life/$temp_out_scenario_production; array_walk(${$temp_out_array}[$component]["pre-treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar // output vectors for buildings and pre-cast structures treatment ${$temp_out_array}[$component]["treatment"] = $ei_inf_concdet[$component]; // delcares array as ei factors $temp_scalar_multiplier=$_POST["v_inf_concdet_s".$s."_".$inputletter."2"]*$render_fu/$temp_component_life/$temp_out_scenario_production; array_walk(${$temp_out_array}[$component]["treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar // output vectors for buildings and pre-cast structures post-treatment ${$temp_out_array}[$component]["post-treatment"] = $ei_inf_concdet[$component]; // delcares array as ei factors $temp_scalar_multiplier=$_POST["v_inf_concdet_s".$s."_".$inputletter."3"]*$render_fu/$temp_component_life/$temp_out_scenario_production; array_walk(${$temp_out_array}[$component]["post-treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar } } if($render_showcalcs) { echo "\n"; echo "\n
"; echo "\n  Output: Infrastructure, Reinforced Concrete Materials (Detailed) (factors per $)
"; echo "\nf(x) Entry × FACTOR × Functional Unit (".$render_fu." ".$render_units_volume1[$render_units].") ÷ ScenarioProduction ÷ Lifetime
"; echo "\n\t"; echo "\n\t\t"; echo "\n\t\t\t"; for($ei=0;$ei".$ei_cat_indexes[$ei].""; } echo "\n\t\t"; $ei=0; echo "\n\t\t"; echo "\n\t\t\t"; for($ei=0;$ei".$ei_cat_unit[$ei_cat_indexes[$ei]].""; } echo "\n\t\t"; $ei_inf_concrete_keys = array_keys($ei_inf_concdet); for($ei=0;$ei"; echo "\n\t\t\t"; for($ei2=0;$ei2".number_format($ei_inf_concdet[$eiset][$ei_cat_indexes[$ei2]],2,'.','').""; } echo "\n\t\t"; } // display of reinforced concrete materials detailed results - start for($s=1;$s<=$render_numscenarios;$s++) { $temp_out_array_name="out_inf_concrete_s".$s; $temp_out_array=${$temp_out_array_name}; echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t"; $temp_out_buildings_component_names = array("Buildings","Pre-cast Concrete"); foreach($temp_out_buildings_component_names as $component) { echo "\n\t\t"; echo "\n\t\t\t"; foreach($ei_cat as $ei => $eidesc) {echo "\n\t\t\t";} echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t\t"; foreach($ei_cat as $ei => $eidesc) {echo "\n\t\t\t";} echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t\t"; foreach($ei_cat as $ei => $eidesc) {echo "\n\t\t\t";} echo "\n\t\t"; } } // display of reinforced concrete materials detailed results - end echo "\n\t
FACTORS
 
".ucfirst($eiset)."
Results for Scenario ".$s." (per year)
".$component.": Pre".number_format($temp_out_array[$component]["pre-treatment"][$ei],2,'.','')."
".$component.": Tr".number_format($temp_out_array[$component]["treatment"][$ei],2,'.','')."
".$component.": Post".number_format($temp_out_array[$component]["post-treatment"][$ei],2,'.','')."
"; echo "\n
"; echo "\n\n"; } } // INDICATORS - Infrastructure: Detailed Reinforced Concrete Materials ?>

Process Equipment

Would you like to enter detailed data about process equipment?  "; ?>
Enter the dollars spent (in 2002$) on process equipment. Only include the purchase price; do not include labor or delivery costs.
Legend: Pre-treatment denotes , Treatment denotes , Post-treatment denotes .
Component Life
(years) Scenario 1 (2002$) Scenario 2 (2002$) Scenario 3 (2002$) Scenario 4 (2002$) Scenario 5 (2002$)
Filtration          
Filter Media (Sand or Gravel)
Filter Media (Anthracite or Other Coal Product)
Membranes
General          
Pumps
Fans / Blowers
Motors and Generators
Turbines
Metal Tanks
UV Lamps / Lights
Other Industrial Equipment
Electrical
Controls
$componentdesc) { $temp_out_array = "out_inf_equipment_s".$s; // output vectors for equipment pre-treatment ${$temp_out_array}[$component]["pre-treatment"] = $ei_multiarray[$component]; // delcares array as ei factors $temp_scalar_multiplier=$_POST["v_inf_eqdet_s".$s."_".$component."1"]*$render_fu/$_POST["v_inf_eqdet_life_".$component."1"]/${"output_v_prod{$s}"}; array_walk(${$temp_out_array}[$component]["pre-treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar // output vectors for equipment treatment ${$temp_out_array}[$component]["treatment"] = $ei_multiarray[$component]; // delcares array as ei factors $temp_scalar_multiplier=$_POST["v_inf_eqdet_s".$s."_".$component."2"]*$render_fu/$_POST["v_inf_eqdet_life_".$component."1"]/${"output_v_prod{$s}"}; array_walk(${$temp_out_array}[$component]["treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar // output vectors for equipment post-treatment ${$temp_out_array}[$component]["post-treatment"] = $ei_multiarray[$component]; // delcares array as ei factors $temp_scalar_multiplier=$_POST["v_inf_eqdet_s".$s."_".$component."3"]*$render_fu/$_POST["v_inf_eqdet_life_".$component."1"]/${"output_v_prod{$s}"}; array_walk(${$temp_out_array}[$component]["post-treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar } } if($render_showcalcs) { echo "\n"; echo "\n
"; echo "\n  Output: Infrastructure, Process Equipment (factors per $)
"; echo "\nf(x) Entry × FACTOR × Functional Unit ÷ ScenarioProduction ÷ Lifetime
"; echo "\n\t"; echo "\n\t\t"; echo "\n\t\t\t"; for($ei=0;$ei".$ei_cat_indexes[$ei].""; } echo "\n\t\t"; $ei=0; echo "\n\t\t"; echo "\n\t\t\t"; for($ei=0;$ei".$ei_cat_unit[$ei_cat_indexes[$ei]].""; } echo "\n\t\t"; $ei_inf_equipment_keys = array_keys($ei_multiarray); for($ei=0;$ei"; echo "\n\t\t\t"; for($ei2=0;$ei2".number_format($ei_multiarray[$eiset][$ei_cat_indexes[$ei2]],2,'.','').""; } echo "\n\t\t"; } // display of reinforced concrete materials detailed results - start for($s=1;$s<=$render_numscenarios;$s++) { $temp_out_array_name="out_inf_equipment_s".$s; $temp_out_array=${$temp_out_array_name}; echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t"; foreach($temp_out_equipment_component_names as $component => $componentdesc) { echo "\n\t\t"; echo "\n\t\t\t"; for($ei=0;$ei".number_format($temp_out_array[$component]["pre-treatment"][$ei_cat_indexes[$ei]],2,'.','').""; } echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t\t"; for($ei=0;$ei".number_format($temp_out_array[$component]["treatment"][$ei_cat_indexes[$ei]],2,'.','').""; } echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t\t"; for($ei=0;$ei".number_format($temp_out_array[$component]["post-treatment"][$ei_cat_indexes[$ei]],2,'.','').""; } echo "\n\t\t"; } } // display of reinforced concrete materials detailed results - end echo "\n\t
FACTORS
 
".strtoupper($eiset)."
Results for Scenario ".$s." (per year)
".strtoupper($component).": Pre
".strtoupper($component).": Tr
".strtoupper($component).": Post
"; echo "\n
"; echo "\n\n"; } } // INDICATORS - Infrastructure: Process Equipment ?>

Operation

Electricity Mix

Electricity Mix Location:  "; ?> Enter percentages for each scenario's electricity primary fuel/energy source:

"; ?>
  Reference
 
Coal %
Oil %
Natural Gas %
Nuclear %
Other Unknown %
Other Fossil %
Hydro %
Biomass %
Wind %
Solar %
Geothermal %
Total %
 
Scenario #1 Scenario #2 Scenario #3 Scenario #4 Scenario #5
% % % % %
% % % % %
% % % % %
% % % % %
% % % % %
% % % % %
% % % % %
% % % % %
% % % % %
- - - - -
0,"oilc"=>0,"naga"=>0,"nuke"=>0,"othf"=>0,"ofsl"=>0,"hydr"=>0,"biom"=>0,"wind"=>0,"sola"=>0,"geot"=>0,"othr"=>0); foreach($render_electricity_fuels as $fuel => $fueldesc) { if($fuel!="othr") {$out_op_electricity_mix[$s][$fuel] = ($_POST["v_op_electricity_".$fuel."_s".$s]+0);} else { if(array_sum($out_op_electricity_mix[$s])<100) {$temp_mix_other=100-array_sum($out_op_electricity_mix[$s]);} else {$temp_mix_other=0;} $out_op_electricity_mix[$s][$fuel] = $temp_mix_other; // puts difference to get to 100 as "other" } } } else // region electricity mix selected (not custom) {$out_op_electricity_mix[$s] = $regions_mix[$render_region];} } if($render_showcalcs) { echo "\nScenario ".$s." Mix: "; print_r($out_op_electricity_mix[$s]); echo "
"; echo "\n"; echo "\n
"; echo "\n  Output: Electricity Generation Factors
"; echo "\nScenario mix: ".$regions[$render_region]."
"; if(($render_region==0) && isset($_POST['m_region_ref'])) {echo "\nReference location mix: ".$regions[$render_region_ref]."
";} echo "\n\t"; echo "\n\t\t"; echo "\n\t\t\t"; for($ei=0;$ei".$ei_cat_indexes[$ei].""; } echo "\n\t\t"; $ei=0; echo "\n\t\t"; echo "\n\t\t\t"; for($ei=0;$ei".$ei_cat_unit[$ei_cat_indexes[$ei]].""; } echo "\n\t\t"; $ei_inf_electricity_keys = array_keys($ei_op_electricity); for($ei=0;$ei"; echo "\n\t\t\t"; for($ei2=0;$ei2".number_format($ei_op_electricity[$eiset][$ei_cat_indexes[$ei2]],0,'.','').""; } echo "\n\t\t"; } echo "\n\t
FACTORS
(per MWh)
".$render_electricity_fuels[$eiset]."
"; echo "\n
"; echo "\n\n"; } } // OUTPUTS - Operation: Electricity Mix ?>

Energy Use

Enter quantities of energy consumed for each scenario:

"; ?>
Annual Consumption of:
Scenario 1 Scenario 2 Scenario 3 Scenario 4 Scenario 5
Electricity (MWh)
Natural Gas (MMBTU)
Gasoline ()
Diesel ()
$fueldesc) { $temp_electricity_mix_fuel_fraction = $out_op_electricity_mix[$s][$fuel]/100; // converts electricity mix value to fraction of total // output vectors for equipment pre-treatment ${$temp_out_array}[$fuel]["pre-treatment"] = $ei_multiarray[$fuel]; // delcares array as ei factors $temp_scalar_multiplier=$_POST['v_inf_energy_s'.$s.'_elec1']*$temp_electricity_mix_fuel_fraction*$render_fu/${"output_v_prod{$s}"}; array_walk(${$temp_out_array}[$fuel]["pre-treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar // output vectors for equipment treatment ${$temp_out_array}[$fuel]["treatment"] = $ei_multiarray[$fuel]; // delcares array as ei factors $temp_scalar_multiplier=$_POST['v_inf_energy_s'.$s.'_elec2']*$temp_electricity_mix_fuel_fraction*$render_fu/${"output_v_prod{$s}"}; array_walk(${$temp_out_array}[$fuel]["treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar // output vectors for equipment post-treatment ${$temp_out_array}[$fuel]["post-treatment"] = $ei_multiarray[$fuel]; // delcares array as ei factors $temp_scalar_multiplier=$_POST['v_inf_energy_s'.$s.'_elec3']*$temp_electricity_mix_fuel_fraction*$render_fu/${"output_v_prod{$s}"}; array_walk(${$temp_out_array}[$fuel]["post-treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar } // calculations for natural gas, gasoline, and diesel energy use $ei_multiarray = $ei_op_energyuse; foreach($render_op_energyuse as $fuel => $fuelname) { if(($render_units=='si') && ($fuel=="pfga" || $fuel=="pfdi")) {$convert_l_to_gal=3.78541178;} else {$convert_l_to_gal=1;} // always converts to gallons since indicators are per gallon //echo "
".$convert_l_to_gal; // output vectors for equipment pre-treatment ${$temp_out_array}[$fuel]["pre-treatment"] = $ei_multiarray[$fuel]; // delcares array as ei factors $temp_scalar_multiplier=$_POST['v_inf_energy_s'.$s.'_'.$fuel.'1']*$render_fu/$convert_l_to_gal/${"output_v_prod{$s}"}; array_walk(${$temp_out_array}[$fuel]["pre-treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar // output vectors for equipment treatment ${$temp_out_array}[$fuel]["treatment"] = $ei_multiarray[$fuel]; // delcares array as ei factors $temp_scalar_multiplier=$_POST['v_inf_energy_s'.$s.'_'.$fuel.'2']*$render_fu/$convert_l_to_gal/${"output_v_prod{$s}"}; array_walk(${$temp_out_array}[$fuel]["treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar // output vectors for equipment post-treatment ${$temp_out_array}[$fuel]["post-treatment"] = $ei_multiarray[$fuel]; // delcares array as ei factors $temp_scalar_multiplier=$_POST['v_inf_energy_s'.$s.'_'.$fuel.'3']*$render_fu/$convert_l_to_gal/${"output_v_prod{$s}"}; array_walk(${$temp_out_array}[$fuel]["post-treatment"], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar } } // end loop through scenarios if($render_showcalcs) { echo "\n"; echo "\n
"; echo "\n  Output: Energy Use
"; echo "\nf-electricity(x) Entry × FuelMix% × FuelMixFACTOR × Functional Unit ÷ ScenarioProduction
"; echo "\nf-primaryfuels(x) Entry × FACTOR × Functional Unit ÷ ScenarioProduction
"; echo "\n\t"; echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t\t"; for($ei=0;$ei".$ei_cat_indexes[$ei].""; } echo "\n\t\t"; $ei=0; echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t\t"; for($ei=0;$ei".$ei_cat_unit[$ei_cat_indexes[$ei]].""; } echo "\n\t\t"; // display of natural gas, gasoline, and diesel factors - start echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t"; foreach($render_op_energyuse as $fuel => $fuelname) { echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t\t"; foreach($ei_cat as $ei => $eidesc) { echo "\n\t\t\t"; } echo "\n\t\t"; } // display of natural gas, gasoline, and diesel factors - end // display of energy use results - start for($s=1;$s<=$render_numscenarios;$s++) { $temp_out_array_name="out_op_energyuse_s".$s; $temp_out_array=${$temp_out_array_name}; // display of energy use (electricity) results - start echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t"; foreach($render_electricity_fuels as $fuel => $fueldesc) { if($out_op_electricity_mix[$s][$fuel]>0) // only shows row if some mix fraction exists { foreach($ei_phases as $phase => $arrowtext) { echo "\n\t\t"; if($phase=="pre-treatment") {$temp_fuel=$fueldesc.": ";} elseif($phase=="treatment") {$temp_fuel="(".$fuel.")";} else {$temp_fuel=" ";} echo "\n\t\t\t"; if($phase=="pre-treatment") {$temp_mixpercent=$out_op_electricity_mix[$s][$fuel];} else {$temp_mixpercent=" ";} echo "\n\t\t\t"; foreach($ei_cat as $ei => $eidesc) { echo "\n\t\t\t"; } echo "\n\t\t"; } // end loop through phases } } // end loop through components // display of energy use (electricity) results - end // display of energy use (natural gas, gasoline, and diesel) results - start echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t"; foreach($render_op_energyuse as $fuel => $fuelname) { foreach($ei_phases as $phase => $arrowtext) { echo "\n\t\t"; if($phase=="pre-treatment") {$temp_fuel=$fuelname.": ";} elseif($phase=="treatment") {$temp_fuel="(".$fuel.")";} else {$temp_fuel=" ";} echo "\n\t\t\t"; echo "\n\t\t\t"; foreach($ei_cat as $ei => $eidesc) { echo "\n\t\t\t"; } echo "\n\t\t"; } // end loop through phases } // end loop through components // display of energy use (natural gas, gasoline, and diesel) results - end } // display of energy use results - end echo "\n\t
Component% Mix
  
Natural Gas, Gasoline, and Diesel Consumption Factors (Natural Gas per MMBTU, Gasoline and Diesel per Gallon)
".$fuelname." ".number_format($ei_op_energyuse[$fuel][$ei],0,'.','')."
Electricity Consumption Results for Scenario ".$s."
".$temp_fuel." ".${"arrow_{$arrowtext}"}."".$temp_mixpercent."".number_format($temp_out_array[$fuel][$phase][$ei],0,'.','')."
Natural Gas, Gasoline, and Diesel Consumption Results for Scenario ".$s."
".$temp_fuel." ".${"arrow_{$arrowtext}"}." ".number_format($temp_out_array[$fuel][$phase][$ei],0,'.','')."
"; echo "\n
"; echo "\n\n"; } } // OUTPUTS - Operation: Energy Use ?>

Treatment Chemical Consumption

Enter quantities of chemicals used in each scenario:

"; ?>
  Units Scenario #1 Scenario #2 Scenario #3 Scenario #4 Scenario #5
pH Adjustment            
Hydrochloric Acid /yr
Sulphuric Acid /yr
Lime /yr
Calcium Carbonate /yr
Calcium Hydroxide /yr
Carbon dioxide /yr
Phosphoric Acid (100%) /yr
Phosphoric Acid (75%) /yr
Potassium Hydroxide /yr
Soda Ash /yr
Coagulants & Flocculants            
Aluminum Sulfate /yr
Aluminum Hydroxide /yr
Caustic Soda /yr
Ferric Chloride /yr
Polymers /yr
Ferrous Sulphate /yr
Disinfectants            
Chlorine /yr
Calcium Hypochlorite /yr
Ozone /yr
Aqueous Ammonia /yr
Anhydrous Ammonia (NH3) /yr
Sodium Hypochlorite /yr
Others            
Fluorosilicic Acid /yr
Hydrogen Fluoride /yr
Sodium Chloride /yr
Zeolite /yr
Methanol /yr
Sodium Bisulfite /yr
Other Chemicals $/yr
$chemdesc) { if(($render_units=='us') && ($chem!="otch")) {$convert_lbs_to_kgs=2.20462262;} else {$convert_lbs_to_kgs=1;} // always converts to kilograms since indicators are per kilogram // output vectors for equipment treatment ${$temp_out_array}[$chem] = $ei_op_chem[$chem]; // delcares array as ei factors $temp_scalar_multiplier=$_POST['v_op_chem_'.$chem.'_s'.$s]*$render_fu/$convert_lbs_to_kgs/${"output_v_prod{$s}"}; array_walk(${$temp_out_array}[$chem], "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar } } if($render_showcalcs && isset($_POST['runlca'])) { echo "\n"; echo "\n
"; echo "\n  Output: Operation, Treatment Chemical Consumption
"; echo "\nf(x) Entry × FACTOR × Functional Unit (".$render_fu." ".$render_units_volume1[$render_units].") ÷ ScenarioProduction
"; echo "\n\t"; echo "\n\t\t"; echo "\n\t\t\t"; foreach($ei_cat as $ei => $eidesc) {echo "\n\t\t\t";} echo "\n\t\t"; $ei=0; echo "\n\t\t"; echo "\n\t\t\t"; foreach($ei_cat as $ei => $eidesc) {echo "\n\t\t\t";} echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t"; foreach($render_op_chem as $chem => $chemdesc) { echo "\n\t\t"; echo "\n\t\t\t"; foreach($ei_cat as $ei => $eidesc) {echo "\n\t\t\t";} echo "\n\t\t"; } // display of chemical results - start for($s=1;$s<=$render_numscenarios;$s++) { $temp_out_array_name="out_op_chemicals_s".$s; $temp_out_array=${$temp_out_array_name}; echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t"; foreach($render_op_chem as $chem => $chemdesc) { echo "\n\t\t"; echo "\n\t\t\t"; foreach($ei_cat as $ei => $eidesc) { echo "\n\t\t\t"; } echo "\n\t\t"; } // end loop through chemicals } // display of chemical results - end echo "\n\t
 ".$ei."
 ".$ei_cat_unit[$ei]."
FACTORS (per kg)
".$chemdesc." (".$chem.")".number_format($ei_op_chem[$chem][$ei],2,'.','')."
Chemical Use Results for Scenario ".$s."
".$chemdesc." (".$chem.")".number_format($temp_out_array[$chem][$ei],2,'.','')."
"; echo "\n
"; echo "\n\n"; } // OUTPUT - Operation: Treatment Chemical Consumption ?>

Process Emissions

"; foreach ($v_waste_processes as $p => $process) { if ($p+0==$def+0) {$sel="selected";} else {$sel=null;} echo "\n\t\t\t"; } echo "\n\t\t\t"; echo "\n\t\t"; } ?>
  Scenario #1 Scenario #2 Scenario #3 Scenario #4 Scenario #5
Number of People Served
Influent BOD Concentration (mg/L)
Effluent BOD Concentration in Sludge (mg/kg)
Annual Dry Sludge Disposed ()
System Process
Percentage of Methane Captured (%)

$processdesc) { if($p>0) {$sep=", ";} else {$sep="";} echo $sep.$methaneprocess."=".$processdesc; $p++; } echo "."; ?> 1,"EN"=>0,"Car"=>0,"NCar"=>0,"ReIn"=>0,"OzDe"=>0,"ReOr"=>0,"AqEc"=>0,"TeEc"=>0,"TeAN"=>0,"AqAc"=>0,"AqEu"=>0); // declares array as one for GHGs $temp_scalar_multiplier_CH4 = $ei_op_methane[$methaneprocess]["GHG"]*(1-$_POST['v_op_proceem_pch4_s'.$s]/100)*($_POST['v_op_proceem_ibod_s'.$s]*$convert_l_to_gal*${"output_v_prod{$s}"}-$_POST['v_op_proceem_ebod_s'.$s]*($_POST['v_op_proceem_drys_s'.$s]/$convert_lbs_to_kgs))/1000; $temp_scalar_multiplier = (23*$temp_scalar_multiplier_CH4+296*4*$_POST['v_op_proceem_nump_s'.$s])*$render_fu/${"output_v_prod{$s}"}; //$temp_scalar_multiplier = 1; array_walk(${$temp_out_array}, "array_scalar_multiply", $temp_scalar_multiplier); // multiplies array by scalar echo "

SCENARIO ".$s." - ch4 mult: ".number_format($temp_scalar_multiplier_CH4,0,'.',',')." - GHG: ".number_format(${$temp_out_array}["GHG"],0,'.',',')."

"; } if($render_showcalcs && isset($_POST['runlca'])) { echo "\n"; echo "\n
"; echo "\n  Output: Operation, Process Emissions
"; echo "\nf-CH4(x) Selected Process CH4 FACTOR × (1- Methane Capture%) × (Inf BOD conc × Scenario Production - Eff BOD × Sludge disposed [kg]) ÷ 1000
"; //echo "\ncheck: infbodconc=".$_POST['v_op_proceem_ibod_s1'].", scenprod=".${"output_v_prod1"}.", effBOD=".$_POST['v_op_proceem_ebod_s1'].", sludgedisposed=".$_POST['v_op_proceem_drys_s1'].", capture%=".$_POST['v_op_proceem_pch4_s1'].".
"; echo "\nf-GHGs(x) (23 × Methane Result + 296 × 4 × Population) × Functional Unit (".$render_fu." ".$render_units_volume1[$render_units].") ÷ ScenarioProduction
"; echo "\n\t"; echo "\n\t\t"; echo "\n\t\t\t"; foreach($ei_cat as $ei => $eidesc) {echo "\n\t\t\t";} echo "\n\t\t"; $ei=0; echo "\n\t\t"; echo "\n\t\t\t"; foreach($ei_cat as $ei => $eidesc) {echo "\n\t\t\t";} echo "\n\t\t"; // Printing FACTORS for Sludge Disposal Processes echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t"; foreach($render_op_methane as $methaneprocess => $processdesc) { echo "\n\t\t"; if(strlen($processdesc)>15) {$temp_methanedesc="".substr($processdesc,0,15)."...";} else {$temp_methanedesc=$processdesc;} echo "\n\t\t\t"; foreach($ei_cat as $ei => $eidesc) {echo "\n\t\t\t";} echo "\n\t\t"; } // display of process emissions results - start $render_op_methane_keys = array_keys($render_op_methane); for($s=1;$s<=$render_numscenarios;$s++) { $methaneprocess = $render_op_methane_keys[$_POST['v_op_proceem_sypr_s'.$s]]; $temp_out_array_name="out_op_methane_s".$s; $temp_out_array=${$temp_out_array_name}; echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t"; echo "\n\t\t"; if(strlen($render_op_methane[$methaneprocess])>15) {$temp_desc="".substr($render_op_methane[$methaneprocess],0,15)."...";} else {$temp_desc=$render_op_methane[$methaneprocess];} echo "\n\t\t\t"; foreach($ei_cat as $ei => $eidesc) {echo "\n\t\t\t";} echo "\n\t\t"; } // display of process emissions results - end echo "\n\t
 ".$ei."
 ".$ei_cat_unit[$ei]."
Methane Emissions FACTORS (kg CH4 per kg BOD5)
".$temp_methanedesc." (".$methaneprocess.")".number_format($ei_op_methane[$methaneprocess][$ei],2,'.','')."
Methane Emissions Results for Scenario ".$s."
".$temp_desc." (".$methaneprocess.")".number_format($temp_out_array[$ei],2,'.','')."
"; echo "\n
"; echo "\n\n"; } // OUTPUT - Operation: Process Emissions ?>

Waste Management

Sludge Disposal

"; foreach ($v_disposal_sludge as $p => $process) { if ($p+0==$def+0) {$sel="selected";} else {$sel=null;} echo "\n\t\t\t"; } echo "\n\t\t\t"; echo "\n\t\t"; } function render_disposal_ash($def,$scenario,$style) { global $v_disposal_ash; echo "\n\t\t\t"; echo "\n\t\t"; } ?>
Scenario Sludge Disposal Process Ash Disposal Process 
#1
#2
#3
#4
#5
"; echo "\n
"; echo "\n  Output: End-of-Life, Sludge Disposal
"; echo "\nf(x) Entry (in kg, entered in Process Emissions above) × FACTOR × Functional Unit (".$render_fu." ".$render_units_volume1[$render_units].") ÷ ScenarioProduction
"; echo "\n\t"; echo "\n\t\t"; echo "\n\t\t\t"; foreach($ei_cat as $ei => $eidesc) {echo "\n\t\t\t";} echo "\n\t\t"; $ei=0; echo "\n\t\t"; echo "\n\t\t\t"; foreach($ei_cat as $ei => $eidesc) {echo "\n\t\t\t";} echo "\n\t\t"; // Printing FACTORS for Sludge Disposal Processes echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t"; foreach($render_en_sludge as $sludge => $sludgedesc) { echo "\n\t\t"; if(strlen($sludgedesc)>20) {$temp_sludgedesc="".substr($sludgedesc,0,20)."...";} else {$temp_sludgedesc=$sludgedesc;} echo "\n\t\t\t"; foreach($ei_cat as $ei => $eidesc) {echo "\n\t\t\t";} echo "\n\t\t"; } // Printing FACTORS for Ash Disposal Processes echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t"; foreach($render_en_ash as $ash => $ashdesc) { echo "\n\t\t"; if(strlen($ashdesc)>20) {$temp_ashdesc="".substr($ashdesc,0,20)."...";} else {$temp_ashdesc=$ashdesc;} echo "\n\t\t\t"; foreach($ei_cat as $ei => $eidesc) {echo "\n\t\t\t";} echo "\n\t\t"; } // display of sludge disposal results - start for($s=1;$s<=$render_numscenarios;$s++) { $temp_out_array_name="out_en_sludge_s".$s; $temp_out_array=${$temp_out_array_name}; echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t"; foreach($disposalprocessesselected[$s] as $disposalprocess) { echo "\n\t\t"; if(strlen($render_en_sludge_all[$disposalprocess])>20) {$temp_desc="".substr($render_en_sludge_all[$disposalprocess],0,20)."...";} else {$temp_desc=$render_en_sludge_all[$disposalprocess];} echo "\n\t\t\t"; foreach($ei_cat as $ei => $eidesc) {echo "\n\t\t\t";} echo "\n\t\t"; } // end loop through sludge disposal processes } // display of sludge disposal results - end echo "\n\t
 ".$ei."
 ".$ei_cat_unit[$ei]."
Primary Sludge Disposal Process FACTORS (per kg)
".$temp_sludgedesc." (".$sludge.")".number_format($ei_en_sludge[$sludge][$ei],0,'.','')."
Secondary FACTORS for Incineration to Ash (per kg)
".$temp_ashdesc." (".$ash.")".number_format($ei_en_sludge[$ash][$ei],0,'.','')."
Sludge Disposal Results for Scenario ".$s."
".$temp_desc." (".$disposalprocess.")".number_format($temp_out_array[$disposalprocess][$ei],0,'.','')."
"; echo "\n
"; echo "\n\n"; } // OUTPUT - End-of-Life: Sludge Disposal ?>

Run Analysis

Results are provided per functional unit specified in the Modeling Parameters section. Results include: greenhouse gases (in CO2 equivalents), energy, carcinogens (chloroethylene [C2H3Cl] equivalents), non-carcinogens (C2H3Cl equivalents), respiratory inorganics (PM2.5 equivalents), ozone depletion (CFC-11 equivalents), respiratory organics (ethylene [C2H4] equivalents), aquatic ecotoxicity (triethylene glycol [TEG] water), terrestrial ecotoxicity (TEG soil), aquatic acidification (SO2 equivalents), and aquatic eutrophication (PO43- in a P-limited environment). For more info on the impact categories listed here, see the Glossary.

Display detailed calculations:"; ?> Analysis output notation: "; ?>

Analysis Output per Functional Unit (FU)

"; if($render_showcalcs) { echo "\n"; echo "\n
"; echo "\nModeling Parameters Specified
"; echo "\n\t"; echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t\t"; echo "\n\t\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t\t"; if($_POST["m_inf_pipe_detail"]=='y') {$tmpdesc_pipe="are";} else {$tmpdesc_pipe="are not";} echo "\n\t\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t\t"; if($_POST["m_inf_concrete_detail"]=='y') {$tmpdesc_concrete="are";} else {$tmpdesc_concrete="are not";} echo "\n\t\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t\t"; if($_POST["m_inf_equipment_detail"]=='y') {$tmpdesc_equipment="are";} else {$tmpdesc_equipment="are not";} echo "\n\t\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t\t"; echo "\n\t\t\t"; if(isset($_POST['runlca1'])) {$tmpdesc_ei="GHGs and energy";} else {$tmpdesc_ei="all environmental indicators";} echo "\n\t\t\t"; echo "\n\t\t"; echo "\n\t
System Type:".ucfirst($render_type)."Functional Unit: ".$render_fu." ".$render_units_volume1[$render_units]."
Unit System:".strtoupper($render_units)."Detailed piping data ".$tmpdesc_pipe." evaluated.
Number of Scenarios:".$render_numscenarios."Detailed concrete data ".$tmpdesc_concrete." evaluated.
Electricity Mix Location:".$regions[$render_region]."Detailed equipment data ".$tmpdesc_equipment." evaluated.
  Results will show ".$tmpdesc_ei.".
"; echo "\n
"; echo "\n"; } if($_POST['runlca_showdetail']=='y') {$runlca_showdetail=true;} else {$runlca_showdetail=false;} if(isset($_POST['runlca1'])) { $runlca_type="short"; $tdw_ghgen=30; $tdw_lcip=5; } else { $runlca_type="full"; $tdw_ghgen=5; $tdw_lcip=5; } for ($s=1;$s<=$_POST["m_numscenarios"]+0;$s++) { echo "\n

"; echo "\n

"; // header rows echo "\n\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; if($runlca_type=="full") { echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; } echo "\n\t"; echo "\n\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; if($runlca_type=="full") { echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; } echo "\n\t"; // header rows // infrastructure - piping - pipe $print_inf_pipe = ${"out_inf_pipe_water_s{$s}"}; if($_POST['m_inf_pipe_detail']=='y') // calculation of totals { $array_names_to_sum = array("Concrete S","Concrete M","Concrete L","Metal S","Metal M","Metal L","Plastic S","Plastic M","Plastic L"); $array_phases_to_sum = array("pre-treatment","treatment","post-treatment"); foreach($array_phases_to_sum as $phase) // loops through phases { foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { $print_inf_pipe[$phase][$ei] = 0; foreach($array_names_to_sum as $component) // loops through components to sum in pipe total { $print_inf_pipe[$phase][$ei] = $print_inf_pipe[$phase][$ei] + ${"out_inf_pipedet_s{$s}"}[$component][$phase][$ei]; } } } } echo "\n\t"; // notation details if($_POST['runlca_notation']=='standard') {$runlca_notation='standard';} else {$runlca_notation='scientific';} $scientific_sf = 1; // initialization of totals $print_total_i["pre-treatment"] = array("GHG"=>0,"EN"=>0,"Car"=>0,"NCar"=>0,"ReIn"=>0,"OzDe"=>0,"ReOr"=>0,"AqEc"=>0,"TeEc"=>0,"TeAN"=>0,"AqAc"=>0,"AqEu"=>0); $print_total_i["treatment"] = $print_total_i["pre-treatment"]; $print_total_i["post-treatment"] = $print_total_i["pre-treatment"]; $print_total_o = $print_total_i; $print_total_e = $print_total_i; $print_total = $print_total_i["pre-treatment"]; // rowspan calculations if showdetails are selected - start $rowspan_inf=6; // INFRASTRUCTURE column $rowspan_inf_piping=3; // INFRASTRUCTURE (piping) column $head_inf_rowspan_buildings=3; // buildings and concrete rows $head_inf_rowspan_equipment=9; // equipment rows if($_POST["m_inf_pipe_detail"]=='y') {$rowspan_inf=$rowspan_inf+6; $rowspan_inf_piping=$rowspan_inf_piping+6;} if($_POST["m_inf_concrete_detail"]=='y') {$rowspan_inf=$rowspan_inf+6; $head_inf_rowspan_buildings=$head_inf_rowspan_buildings+6;} if($_POST["m_inf_equipment_detail"]=='y') {$rowspan_inf=$rowspan_inf+9;} $rowspan_op = (3)*3+4; // OPERATION column $rowspan_op_energyuse = 3*3; // OPERATION (energy use) column $rowspan_op_chemicals = 4; // OPERATION (chemicals) column, note that chemicals don't have phases so not multiplied by 3 if($_POST["m_type"]=='waste') {$rowspan_op+=1;} // adds row for direct process methane emissions if($runlca_showdetail) { // INFRASTRUCTURE $new_rows_piping = 14; if($_POST["m_inf_pipe_detail"]=='y') {$rowspan_inf += $new_rows_piping*3;} // adds 14 piping detailed rowsets if($_POST["m_inf_pipe_detail"]=='y') {$rowspan_inf_piping += $new_rows_piping*3;} // adds 14 piping detailed rowsets if($_POST["m_inf_equipment_detail"]=='y') {$head_inf_rowspan_equipment = $head_inf_rowspan_equipment + (3+8)*3;} // adds 11 equipment detailed rowsets if($_POST["m_inf_equipment_detail"]=='y') {$rowspan_inf += (3+8)*3;} // adds 11 equipment detailed rowsets // OPERATION $new_rows_gasdiesel = 2; // adding of rowsets for gasoline and diesel fuel breakdowns $new_rows_chemicals = 3+5+4+2; // adding of rowsets for individual chemicals $rowspan_op += $new_rows_gasdiesel*3+$new_rows_chemicals; $rowspan_op_energyuse += $new_rows_gasdiesel*3; $rowspan_op_chemicals += $new_rows_chemicals; } // rowspan calculations if showdetails are selected - end echo "\n\t\t"; echo "\n\t\t"; if ($runlca_showdetail && ($_POST["m_inf_pipe_detail"]=='y')) {$temp_fontweight='bold';} else {$temp_fontweight='normal';} echo "\n\t\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) { $temp_printval = $print_inf_pipe["pre-treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_i["pre-treatment"][$ei]+=$temp_printval; } } echo "\n\t"; echo "\n\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) { $temp_printval = $print_inf_pipe["treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_i["treatment"][$ei]+=$temp_printval; } } echo "\n\t"; echo "\n\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) { $temp_printval = $print_inf_pipe["post-treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_i["post-treatment"][$ei]+=$temp_printval; } } echo "\n\t"; if($runlca_showdetail && $_POST["m_inf_pipe_detail"]=='y') // display of piping detail results { $temp_print_concrete_component_names = array("Concrete S","Concrete M","Concrete L","Metal S","Metal M","Metal L","Plastic S","Plastic M","Plastic L"); $temp_print_concrete_component_phases = array("pre-treatment"=>"pretreatment","treatment"=>"treatment","post-treatment"=>"posttreatment"); foreach ($temp_print_concrete_component_names as $component) { foreach ($temp_print_concrete_component_phases as $phase => $arrowtext) { $temp_print_array = ${"out_inf_pipedet_s{$s}"}[$component][$phase]; $temp_border_style = "border-top: none;"; echo "\n\t"; if($phase=="pre-treatment") { $temp_border_style = "border-top: 1px dashed #CCCCCC;"; echo "\n\t\t"; } echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t";} { $temp_printval = $temp_print_array[$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); } } echo "\n\t"; } } } // infrastructure - piping - pipe if($_POST["m_inf_pipe_detail"]=='y') { // infrastructure - piping - fittings $print_inf_pipe = ${"out_inf_pipe_water_s{$s}"}; $array_names_to_sum = array("Concrete Pipe Fittings","Metal Pipe Fittings","Plastic Pipe Fittings"); $array_phases_to_sum = array("pre-treatment","treatment","post-treatment"); foreach($array_phases_to_sum as $phase) // loops through phases { foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { $print_inf_pipe[$phase][$ei] = 0; foreach($array_names_to_sum as $component) // loops through components to sum in pipe total { $print_inf_pipe[$phase][$ei] = $print_inf_pipe[$phase][$ei] + ${"out_inf_pipedet_s{$s}"}[$component][$phase][$ei]; } } } echo "\n\t"; if ($runlca_showdetail && ($_POST["m_inf_pipe_detail"]=='y')) {$temp_fontweight='bold';} else {$temp_fontweight='normal';} echo "\n\t\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_i["pre-treatment"][$ei]+=$print_inf_pipe["pre-treatment"][$ei];} { $temp_printval = $print_inf_pipe["pre-treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_i["pre-treatment"][$ei]+=$temp_printval; } } echo "\n\t"; echo "\n\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_i["treatment"][$ei]+=$print_inf_pipe["treatment"][$ei];} { $temp_printval = $print_inf_pipe["treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_i["treatment"][$ei]+=$temp_printval; } } echo "\n\t"; echo "\n\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_i["post-treatment"][$ei]+=$print_inf_pipe["post-treatment"][$ei];} { $temp_printval = $print_inf_pipe["post-treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_i["post-treatment"][$ei]+=$temp_printval; } } echo "\n\t"; if($runlca_showdetail) // display of fittings detail results { $temp_print_concrete_component_names = array("Concrete Pipe Fittings","Metal Pipe Fittings","Plastic Pipe Fittings"); $temp_print_concrete_component_phases = array("pre-treatment"=>"pretreatment","treatment"=>"treatment","post-treatment"=>"posttreatment"); foreach ($temp_print_concrete_component_names as $component) { foreach ($temp_print_concrete_component_phases as $phase => $arrowtext) { $temp_print_array = ${"out_inf_pipedet_s{$s}"}[$component][$phase]; $temp_border_style = "border-top: none;"; echo "\n\t"; if($phase=="pre-treatment") { $temp_border_style = "border-top: 1px dashed #CCCCCC;"; echo "\n\t\t"; } echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { //if($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) // {echo "\n\t\t";} //elseif($runlca_type=="full") // {echo "\n\t\t";} if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) { $temp_printval = $temp_print_array[$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); } } echo "\n\t"; } } } // infrastructure - piping - fittings // infrastructure - piping - valves and meters $print_inf_pipe = ${"out_inf_pipe_water_s{$s}"}; $array_names_to_sum = array("Flowmeters","Valves"); $array_phases_to_sum = array("pre-treatment","treatment","post-treatment"); foreach($array_phases_to_sum as $phase) // loops through phases { foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { $print_inf_pipe[$phase][$ei] = 0; foreach($array_names_to_sum as $component) // loops through components to sum in pipe total { $print_inf_pipe[$phase][$ei] = $print_inf_pipe[$phase][$ei] + ${"out_inf_pipedet_s{$s}"}[$component][$phase][$ei]; } } } echo "\n\t"; if ($runlca_showdetail && ($_POST["m_inf_pipe_detail"]=='y')) {$temp_fontweight='bold';} else {$temp_fontweight='normal';} echo "\n\t\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_i["pre-treatment"][$ei]+=$print_inf_pipe["pre-treatment"][$ei];} { $temp_printval = $print_inf_pipe["pre-treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_i["pre-treatment"][$ei]+=$temp_printval; } } echo "\n\t"; echo "\n\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_i["treatment"][$ei]+=$print_inf_pipe["treatment"][$ei];} { $temp_printval = $print_inf_pipe["treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_i["treatment"][$ei]+=$temp_printval; } } echo "\n\t"; echo "\n\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_i["post-treatment"][$ei]+=$print_inf_pipe["post-treatment"][$ei];} { $temp_printval = $print_inf_pipe["post-treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_i["post-treatment"][$ei]+=$temp_printval; } } echo "\n\t"; if($runlca_showdetail) // display of valves and meters detail results { $temp_print_concrete_component_names = array("Flowmeters","Valves"); $temp_print_concrete_component_phases = array("pre-treatment"=>"pretreatment","treatment"=>"treatment","post-treatment"=>"posttreatment"); foreach ($temp_print_concrete_component_names as $component) { foreach ($temp_print_concrete_component_phases as $phase => $arrowtext) { $temp_print_array = ${"out_inf_pipedet_s{$s}"}[$component][$phase]; $temp_border_style = "border-top: none;"; echo "\n\t"; if($phase=="pre-treatment") { $temp_border_style = "border-top: 1px dashed #CCCCCC;"; echo "\n\t\t"; } echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t";} { $temp_printval = $temp_print_array[$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); } } echo "\n\t"; } } } // infrastructure - piping - valves and meters } // infrastructure - buildings and structures - concrete and buildings total row $print_inf_buildings = ${"out_inf_buildings_s{$s}"}; $array_names_to_sum = array("simple","Buildings","Pre-cast Concrete"); $array_phases_to_sum = array("pre-treatment","treatment","post-treatment"); foreach($array_phases_to_sum as $phase) // loops through phases { foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { $print_inf_buildings[$phase][$ei] = 0; foreach($array_names_to_sum as $component) // loops through components to sum in pipe total { $print_inf_buildings[$phase][$ei] = $print_inf_buildings[$phase][$ei] + ${"out_inf_concrete_s{$s}"}[$component][$phase][$ei]; } } } echo "\n\t"; echo "\n\t\t"; if ($runlca_showdetail && ($_POST["m_inf_pipe_detail"]=='y')) {$temp_fontweight='bold';} else {$temp_fontweight='normal';} echo "\n\t\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_i["pre-treatment"][$ei]+=$print_inf_buildings["pre-treatment"][$ei];} { $temp_printval = $print_inf_buildings["pre-treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_i["pre-treatment"][$ei]+=$temp_printval; } } echo "\n\t"; echo "\n\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_i["treatment"][$ei]+=$print_inf_buildings["treatment"][$ei];} { $temp_printval = $print_inf_buildings["treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_i["treatment"][$ei]+=$temp_printval; } } echo "\n\t"; echo "\n\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_i["post-treatment"][$ei]+=$print_inf_buildings["post-treatment"][$ei];} { $temp_printval = $print_inf_buildings["post-treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_i["post-treatment"][$ei]+=$temp_printval; } } echo "\n\t"; // infrastructure - buildings and structures - concrete and buildings total row if($_POST['m_inf_concrete_detail']=='y') { // infrastructure - buildings and structures - reinforced and precast concrete $array_names_to_sum = array("simple","Pre-cast Concrete"); $array_phases_to_sum = array("pre-treatment","treatment","post-treatment"); foreach($array_phases_to_sum as $phase) // loops through phases { foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { $print_inf_buildings[$phase][$ei] = 0; foreach($array_names_to_sum as $component) // loops through components to sum in pipe total { $print_inf_buildings[$phase][$ei] = $print_inf_buildings[$phase][$ei] + ${"out_inf_concrete_s{$s}"}[$component][$phase][$ei]; } } } echo "\n\t"; echo "\n\t\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t";} { $temp_printval = $print_inf_buildings["pre-treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); } } echo "\n\t"; echo "\n\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t";} { $temp_printval = $print_inf_buildings["treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); } } echo "\n\t"; echo "\n\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t";} { $temp_printval = $print_inf_buildings["post-treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); } } echo "\n\t"; // infrastructure - buildings and structures - reinforced and precast concrete // infrastructure - buildings and structures - buildings $array_names_to_sum = array("Buildings"); $array_phases_to_sum = array("pre-treatment","treatment","post-treatment"); foreach($array_phases_to_sum as $phase) // loops through phases { foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { $print_inf_buildings[$phase][$ei] = 0; foreach($array_names_to_sum as $component) // loops through components to sum in pipe total { $print_inf_buildings[$phase][$ei] = $print_inf_buildings[$phase][$ei] + ${"out_inf_concrete_s{$s}"}[$component][$phase][$ei]; } } } echo "\n\t"; echo "\n\t\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t";} { $temp_printval = $print_inf_buildings["pre-treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); } } echo "\n\t"; echo "\n\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t";} { $temp_printval = $print_inf_buildings["treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); } } echo "\n\t"; echo "\n\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t";} { $temp_printval = $print_inf_buildings["post-treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); } } echo "\n\t"; // infrastructure - buildings and structures - buildings } // infrastructure - equipment if($_POST['m_inf_equipment_detail']=='y') { $print_inf_equipment = ${"out_inf_equipment_s{$s}"}; // infrastructure - equipment - pumps $array_names_to_sum = array("pump"); $array_phases_to_sum = array("pre-treatment","treatment","post-treatment"); foreach($array_phases_to_sum as $phase) // loops through phases { foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { $print_inf_equipment[$phase][$ei] = 0; foreach($array_names_to_sum as $component) // loops through components to sum in pipe total { $print_inf_equipment[$phase][$ei] = $print_inf_equipment[$phase][$ei] + $print_inf_equipment[$component][$phase][$ei]; } } } echo "\n\t"; echo "\n\t\t"; if ($runlca_showdetail && ($_POST["m_inf_pipe_detail"]=='y')) {$temp_fontweight='bold';} else {$temp_fontweight='normal';} echo "\n\t\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_i["pre-treatment"][$ei]+=$print_inf_equipment["pre-treatment"][$ei];} { $temp_printval = $print_inf_equipment["pre-treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_i["pre-treatment"][$ei]+=$temp_printval; } } echo "\n\t"; echo "\n\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_i["treatment"][$ei]+=$print_inf_equipment["treatment"][$ei];} { $temp_printval = $print_inf_equipment["pre-treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_i["pre-treatment"][$ei]+=$temp_printval; } } echo "\n\t"; echo "\n\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_i["post-treatment"][$ei]+=$print_inf_equipment["post-treatment"][$ei];} { $temp_printval = $print_inf_equipment["post-treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_i["post-treatment"][$ei]+=$temp_printval; } } echo "\n\t"; // infrastructure - equipment - pumps // infrastructure - equipment - filtration $array_names_to_sum = array("fmsg","fmoc","memb"); $array_phases_to_sum = array("pre-treatment","treatment","post-treatment"); foreach($array_phases_to_sum as $phase) // loops through phases { foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { $print_inf_equipment[$phase][$ei] = 0; foreach($array_names_to_sum as $component) // loops through components to sum in pipe total { $print_inf_equipment[$phase][$ei] = $print_inf_equipment[$phase][$ei] + $print_inf_equipment[$component][$phase][$ei]; } } } echo "\n\t"; if ($runlca_showdetail && ($_POST["m_inf_pipe_detail"]=='y')) {$temp_fontweight='bold';} else {$temp_fontweight='normal';} echo "\n\t\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_i["pre-treatment"][$ei]+=$print_inf_equipment["pre-treatment"][$ei];} { $temp_printval = $print_inf_equipment["pre-treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_i["pre-treatment"][$ei]+=$temp_printval; } } echo "\n\t"; echo "\n\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_i["treatment"][$ei]+=$print_inf_equipment["treatment"][$ei];} { $temp_printval = $print_inf_equipment["treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_i["treatment"][$ei]+=$temp_printval; } } echo "\n\t"; echo "\n\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_i["post-treatment"][$ei]+=$print_inf_equipment["post-treatment"][$ei];} { $temp_printval = $print_inf_equipment["post-treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_i["post-treatment"][$ei]+=$temp_printval; } } echo "\n\t"; // infrastructure - equipment - filtration if($runlca_showdetail) { // infrastructure - equipment - filtration: detail $array_names_to_show = array("fmsg","fmoc","memb"); $array_phases_to_show = array("pre-treatment"=>"pretreatment","treatment"=>"treatment","post-treatment"=>"posttreatment"); foreach($array_names_to_show as $component) // loops through phases { foreach($array_phases_to_show as $phase => $arrowtext) // loops through phases { echo "\n\t"; if($phase=="pre-treatment") { $temp_bordertop="1px dashed #CCCCCC"; echo "\n\t\t"; } else {$temp_bordertop="none";} echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t";} { $temp_printval = $print_inf_equipment[$component][$phase][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); } } echo "\n\t"; } } // infrastructure - equipment - filtration: detail } // infrastructure - equipment - general $array_names_to_sum = array("fanb","moge","turb","mett","uvll","oieq","elec","cont"); $array_phases_to_sum = array("pre-treatment","treatment","post-treatment"); foreach($array_phases_to_sum as $phase) // loops through phases { foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { $print_inf_equipment[$phase][$ei] = 0; foreach($array_names_to_sum as $component) // loops through components to sum in pipe total { $print_inf_equipment[$phase][$ei] = $print_inf_equipment[$phase][$ei] + $print_inf_equipment[$component][$phase][$ei]; } } } echo "\n\t"; if ($runlca_showdetail && ($_POST["m_inf_pipe_detail"]=='y')) {$temp_fontweight='bold';} else {$temp_fontweight='normal';} echo "\n\t\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_i["pre-treatment"][$ei]+=$print_inf_equipment["pre-treatment"][$ei];} { $temp_printval = $print_inf_equipment["pre-treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_i["pre-treatment"][$ei]+=$temp_printval; } } echo "\n\t"; echo "\n\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_i["treatment"][$ei]+=$print_inf_equipment["treatment"][$ei];} { $temp_printval = $print_inf_equipment["treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_i["treatment"][$ei]+=$temp_printval; } } echo "\n\t"; echo "\n\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_i["post-treatment"][$ei]+=$print_inf_equipment["post-treatment"][$ei];} { $temp_printval = $print_inf_equipment["post-treatment"][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_i["post-treatment"][$ei]+=$temp_printval; } } echo "\n\t"; // infrastructure - equipment - general if($runlca_showdetail) { // infrastructure - equipment - general: detail $array_names_to_show = array("fanb","moge","turb","mett","uvll","oieq","elec","cont"); $array_phases_to_show = array("pre-treatment"=>"pretreatment","treatment"=>"treatment","post-treatment"=>"posttreatment"); foreach($array_names_to_show as $component) // loops through phases { foreach($array_phases_to_show as $phase => $arrowtext) // loops through phases { echo "\n\t"; if($phase=="pre-treatment") { $temp_bordertop="1px dashed #CCCCCC"; echo "\n\t\t"; } else {$temp_bordertop="none";} echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t";} { $temp_printval = $print_inf_equipment[$component][$phase][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); } } echo "\n\t"; } // infrastructure - equipment - general: detail } // end loop through phases } // end loop through components } // operation - energy use: electricity - start $print_op_electricity = ${"out_op_energyuse_s{$s}"}["coal"]; // initializes array as coal arrays, will get zeroed out foreach($ei_phases as $phase => $arrowtext) // loops through phases { foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { $print_op_electricity[$phase][$ei] = 0; foreach($render_electricity_fuels as $fuel => $fueldesc) // loops through components to sum in pipe total { $print_op_electricity[$phase][$ei] += ${"out_op_energyuse_s{$s}"}[$fuel][$phase][$ei]; } } } foreach($ei_phases as $phase => $arrowtext) // loops through phases { echo "\n\t"; if($phase=="pre-treatment") { $temp_bordertop="1px solid #2153aa;"; echo "\n\t\t"; echo "\n\t\t"; if ($runlca_showdetail) {$temp_fontweight='bold';} else {$temp_fontweight='normal';} echo "\n\t\t"; } else { $temp_bordertop="none;"; } echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_o[$phase][$ei]+=$print_op_electricity[$phase][$ei];} { $temp_printval = $print_op_electricity[$phase][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_o[$phase][$ei]+=$temp_printval; } } echo "\n\t"; } // end loop through phases // operation - energy use: electricity - end // operation - energy use: natural gas - start $print_op_energyuse_ng = ${"out_op_energyuse_s{$s}"}["pfng"]; // initializes array as pfng arrays, will get zeroed out foreach($ei_phases as $phase => $arrowtext) // loops through phases { echo "\n\t"; if($phase=="pre-treatment") { $temp_bordertop="1px solid #CCCCCC;"; if ($runlca_showdetail) {$temp_fontweight='bold';} else {$temp_fontweight='normal';} echo "\n\t\t"; } else { $temp_bordertop="none;"; } echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_o[$phase][$ei]+=$print_op_energyuse_ng[$phase][$ei];} { $temp_printval = $print_op_energyuse_ng[$phase][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_o[$phase][$ei]+=$temp_printval; } } echo "\n\t"; } // end loop through phases // operation - energy use: natural gas - end // operation - energy use: gasoline and diesel - start $print_op_gasdiesel = ${"out_op_energyuse_s{$s}"}["pfga"]; // initializes array as pfga arrays, will get zeroed out $fuels_to_sum = array("pfga","pfdi"); foreach($ei_phases as $phase => $arrowtext) // loops through phases { foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { $print_op_gasdiesel[$phase][$ei] = 0; foreach($fuels_to_sum as $fuel) // loops through components to sum in pipe total { $print_op_gasdiesel[$phase][$ei] += ${"out_op_energyuse_s{$s}"}[$fuel][$phase][$ei]; } } } foreach($ei_phases as $phase => $arrowtext) // loops through phases { echo "\n\t"; if($phase=="pre-treatment") { $temp_bordertop="1px solid #CCCCCC;"; if ($runlca_showdetail) {$temp_fontweight='bold';} else {$temp_fontweight='normal';} echo "\n\t\t"; } else { $temp_bordertop="none;"; } echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_o[$phase][$ei]+=$print_op_gasdiesel[$phase][$ei];} { $temp_printval = $print_op_gasdiesel[$phase][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_o[$phase][$ei]+=$temp_printval; } } echo "\n\t"; } // end loop through phases // operation - energy use: gasoline and diesel - end if($runlca_showdetail) { // operation - energy use: gasoline and diesel components - start $components_to_detail = array("pfga","pfdi"); foreach($components_to_detail as $fuel) { foreach($ei_phases as $phase => $arrowtext) // loops through phases { echo "\n\t"; if($phase=="pre-treatment") { $temp_bordertop="1px solid #CCCCCC;"; echo "\n\t\t"; } else { $temp_bordertop="none;"; } echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t";} { $temp_printval = ${"out_op_energyuse_s{$s}"}[$fuel][$phase][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); } } echo "\n\t"; } // end loop through phases } // end loop through components to detail // operation - energy use: gasoline and diesel components - end } // OPERATION - CHEMICALS: PH ADJUSTMENT - start $print_op_chemicals["pre-treatment"] = array("GHG"=>0,"EN"=>0,"Car"=>0,"NCar"=>0,"ReIn"=>0,"OzDe"=>0,"ReOr"=>0,"AqEc"=>0,"TeEc"=>0,"TeAN"=>0,"AqAc"=>0,"AqEu"=>0); $print_op_chemicals["treatment"]=$print_op_chemicals["pre-treatment"]; $print_op_chemicals["post-treatment"]=$print_op_chemicals["pre-treatment"]; // initializes array as zeroes $chemicals_to_include = array("hyac","suac","lime","caco","caoh","co2*","hpo1","hpo2","naoh","soas"); foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { $print_op_chemicals[$ei] = 0; foreach($chemicals_to_include as $chem) // loops through components to sum chemical category {$print_op_chemicals[$ei] += ${"out_op_chemicals_s{$s}"}[$chem][$ei];} } echo "\n\t"; echo "\n\t\t"; if ($runlca_showdetail) {$temp_fontweight='bold';} else {$temp_fontweight='normal';} echo "\n\t\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_o["treatment"][$ei]+=$print_op_chemicals[$ei];} { $temp_printval = $print_op_chemicals[$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_o["treatment"][$ei]+=$temp_printval; } } echo "\n\t"; if($runlca_showdetail) { // begin showing detail for ph adjustment foreach($chemicals_to_include as $chem) // loops through components to sum chemical category { echo "\n\t"; if(strlen($render_op_chem[$chem])>10) {$temp_chemdesc="".substr($render_op_chem[$chem],0,10)."...";} else {$temp_chemdesc=$render_op_chem[$chem];} echo "\n\t\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t";} { $temp_printval = ${"out_op_chemicals_s{$s}"}[$chem][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); } } echo "\n\t"; } } // end showing detail for ph adjustment // OPERATION - CHEMICALS: PH ADJUSTMENT - end // OPERATION - CHEMICALS: FLOCCULANT / COAGULANT - start $print_op_chemicals["pre-treatment"] = array("GHG"=>0,"EN"=>0,"Car"=>0,"NCar"=>0,"ReIn"=>0,"OzDe"=>0,"ReOr"=>0,"AqEc"=>0,"TeEc"=>0,"TeAN"=>0,"AqAc"=>0,"AqEu"=>0); $print_op_chemicals["treatment"]=$print_op_chemicals["pre-treatment"]; $print_op_chemicals["post-treatment"]=$print_op_chemicals["pre-treatment"]; // initializes array as zeroes $chemicals_to_include = array("alsu","alhy","caso","fech","poly","feso"); foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { $print_op_chemicals[$ei] = 0; foreach($chemicals_to_include as $chem) // loops through components to sum chemical category {$print_op_chemicals[$ei] += ${"out_op_chemicals_s{$s}"}[$chem][$ei];} } echo "\n\t"; if ($runlca_showdetail) {$temp_fontweight='bold';} else {$temp_fontweight='normal';} echo "\n\t\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_o["treatment"][$ei]+=$print_op_chemicals[$ei];} { $temp_printval = $print_op_chemicals[$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_o["treatment"][$ei]+=$temp_printval; } } echo "\n\t"; if($runlca_showdetail) { // begin showing detail for ph adjustment foreach($chemicals_to_include as $chem) // loops through components to sum chemical category { echo "\n\t"; if(strlen($render_op_chem[$chem])>10) {$temp_chemdesc="".substr($render_op_chem[$chem],0,10)."...";} else {$temp_chemdesc=$render_op_chem[$chem];} echo "\n\t\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t";} { $temp_printval = ${"out_op_chemicals_s{$s}"}[$chem][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); } } echo "\n\t"; } } // end showing detail for ph adjustment // OPERATION - CHEMICALS: FLOCCULANT / COAGULANT - end // OPERATION - CHEMICALS: DISINFECTANTS - start $print_op_chemicals["pre-treatment"] = array("GHG"=>0,"EN"=>0,"Car"=>0,"NCar"=>0,"ReIn"=>0,"OzDe"=>0,"ReOr"=>0,"AqEc"=>0,"TeEc"=>0,"TeAN"=>0,"AqAc"=>0,"AqEu"=>0); $print_op_chemicals["treatment"]=$print_op_chemicals["pre-treatment"]; $print_op_chemicals["post-treatment"]=$print_op_chemicals["pre-treatment"]; // initializes array as zeroes $chemicals_to_include = array("chlo","cahy","ozon","aqam","nh3*","sohy"); foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { $print_op_chemicals[$ei] = 0; foreach($chemicals_to_include as $chem) // loops through components to sum chemical category {$print_op_chemicals[$ei] += ${"out_op_chemicals_s{$s}"}[$chem][$ei];} } echo "\n\t"; if ($runlca_showdetail) {$temp_fontweight='bold';} else {$temp_fontweight='normal';} echo "\n\t\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_o["treatment"][$ei]+=$print_op_chemicals[$ei];} { $temp_printval = $print_op_chemicals[$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_o["treatment"][$ei]+=$temp_printval; } } echo "\n\t"; if($runlca_showdetail) { // begin showing detail for ph adjustment foreach($chemicals_to_include as $chem) // loops through components to sum chemical category { echo "\n\t"; if(strlen($render_op_chem[$chem])>10) {$temp_chemdesc="".substr($render_op_chem[$chem],0,10)."...";} else {$temp_chemdesc=$render_op_chem[$chem];} echo "\n\t\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t";} { $temp_printval = ${"out_op_chemicals_s{$s}"}[$chem][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); } } echo "\n\t"; } } // end showing detail for ph adjustment // OPERATION - CHEMICALS: DISINFECTANTS - end // OPERATION - CHEMICALS: OTHER - start $print_op_chemicals["pre-treatment"] = array("GHG"=>0,"EN"=>0,"Car"=>0,"NCar"=>0,"ReIn"=>0,"OzDe"=>0,"ReOr"=>0,"AqEc"=>0,"TeEc"=>0,"TeAN"=>0,"AqAc"=>0,"AqEu"=>0); $print_op_chemicals["treatment"]=$print_op_chemicals["pre-treatment"]; $print_op_chemicals["post-treatment"]=$print_op_chemicals["pre-treatment"]; // initializes array as zeroes $chemicals_to_include = array("flac","hyfl","nacl","zeol","meth","nahs","otch"); foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { $print_op_chemicals[$ei] = 0; foreach($chemicals_to_include as $chem) // loops through components to sum chemical category {$print_op_chemicals[$ei] += ${"out_op_chemicals_s{$s}"}[$chem][$ei];} } echo "\n\t"; if ($runlca_showdetail) {$temp_fontweight='bold';} else {$temp_fontweight='normal';} echo "\n\t\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_o["treatment"][$ei]+=$print_op_chemicals[$ei];} { $temp_printval = $print_op_chemicals[$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_o["treatment"][$ei]+=$temp_printval; } } echo "\n\t"; if($runlca_showdetail) { // begin showing detail for ph adjustment foreach($chemicals_to_include as $chem) // loops through components to sum chemical category { echo "\n\t"; if(strlen($render_op_chem[$chem])>10) {$temp_chemdesc="".substr($render_op_chem[$chem],0,10)."...";} else {$temp_chemdesc=$render_op_chem[$chem];} echo "\n\t\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t";} { $temp_printval = ${"out_op_chemicals_s{$s}"}[$chem][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); } } echo "\n\t"; } } // end showing detail for ph adjustment // OPERATION - CHEMICALS: OTHER - end // OPERATION - METHANE PROCESS EMISSIONS - start if($render_type=='waste') { // end show if "waste" is selected $print_op_methane = ${"out_op_methane_s".$s}; // initializes array echo "\n\t"; echo "\n\t\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_o["treatment"][$ei]+=$print_op_methane[$ei];} { $temp_printval = $print_op_methane[$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_o["treatment"][$ei]+=$temp_printval; } } echo "\n\t"; } // OPERATION - METHANE PROCESS EMISSIONS - end // END-OF-LIFE / WASTE MANAGEMENT - start if($render_type=='waste') { // end show if "waste" is selected $print_en_sludge = ${"out_en_sludge_s".$s}; // initializes array $print_en_sludge_keys = array_keys($print_en_sludge); $rowspan_eol = count($print_en_sludge_keys); // WASTE MANAGEMENT - SLUDGE DISPOSAL - start echo "\n\t"; if($rowspan_eol==2) {$eolimg="C";} else {$eolimg="B";} echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_e["post-treatment"][$ei]+=$print_en_sludge[$print_en_sludge_keys[0]][$ei];} { $temp_printval = $print_en_sludge[$print_en_sludge_keys[0]][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_e["post-treatment"][$ei]+=$temp_printval; } } echo "\n\t"; if($rowspan_eol==2) // will show ash disposal row { echo "\n\t"; echo "\n\t\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t"; $print_total_e["post-treatment"][$ei]+=$print_en_sludge[$print_en_sludge_keys[1]][$ei];} { $temp_printval = $print_en_sludge[$print_en_sludge_keys[1]][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total_e["post-treatment"][$ei]+=$temp_printval; } } echo "\n\t"; } // WASTE MANAGEMENT - SLUDGE DISPOSAL - end } // end show if "waste" is selected // END-OF-LIFE / WASTE MANAGEMENT - end if($render_type=="waste") {$rowspan_totals=(2*3)+2;} else {$rowspan_totals=2*3+2;} $fontcolor_totals = "2153aa"; // INFRASTRUCTURE - TOTAL - start $array_phases_to_show = array("pre-treatment"=>"pretreatment","treatment"=>"treatment","post-treatment"=>"posttreatment"); $temp_bordertop="1px solid #2153aa"; foreach($array_phases_to_show as $phase => $arrowtext) // loops through phases { echo "\n\t"; if($phase=="pre-treatment") { echo "\n\t\t"; echo "\n\t\t"; } else {$temp_bordertop="none";} echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{ //echo "\n\t\t"; //$print_total[$ei] += $print_total_i[$phase][$ei]; //} { $temp_printval = $print_total_i[$phase][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total[$ei] += $print_total_i[$phase][$ei]; } } echo "\n\t"; } // end loop through phases // INFRASTRUCTURE - TOTAL - end // OPERATION - TOTAL - start $array_phases_to_show = array("pre-treatment"=>"pretreatment","treatment"=>"treatment","post-treatment"=>"posttreatment"); $temp_bordertop="1px dashed #CCCCCC"; foreach($array_phases_to_show as $phase => $arrowtext) // loops through phases { echo "\n\t"; if($phase=="pre-treatment") { echo "\n\t\t"; } else {$temp_bordertop="none";} echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{ //echo "\n\t\t"; //$print_total[$ei] += $print_total_o[$phase][$ei]; //} { $temp_printval = $print_total_o[$phase][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total[$ei] += $print_total_o[$phase][$ei]; } } echo "\n\t"; } // end loop through phases // OPERATION - TOTAL - end // END-OF-LIFE - TOTAL - start $array_phases_to_show = array("post-treatment"=>"posttreatment"); $temp_bordertop="1px dashed #CCCCCC"; foreach($array_phases_to_show as $phase => $arrowtext) // loops through phases { echo "\n\t"; echo "\n\t\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{ //echo "\n\t\t"; //$print_total[$ei] += $print_total_e[$phase][$ei]; //} { $temp_printval = $print_total_e[$phase][$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); $print_total[$ei] += $print_total_e[$phase][$ei]; } } echo "\n\t"; } // end loop through phases // END-OF-LIFE - TOTAL - end // GRAND - TOTAL - start $temp_bordertop="3px double #CCCCCC"; echo "\n\t"; echo "\n\t\t"; echo "\n\t\t"; foreach($ei_cat as $ei => $eidesc) // loops through environmental indicators { if(($runlca_type=="short" && ($ei=="GHG" || $ei=="EN")) || ($runlca_type=="full")) //{echo "\n\t\t";} { $temp_printval = $print_total[$ei]; if($runlca_notation=='standard' && $temp_printval>0) {$temp_notation='%d';} elseif($runlca_notation=='scientific' && $temp_printval>0) {$temp_notation='%.'.$scientific_sf.'E';} else {$temp_notation='-';} $temp_print_text = ''; printf($temp_print_text,$temp_printval); } } echo "\n\t"; // GRAND - TOTAL - end echo "\n
"; echo "
Scenario ".$s." Results"; if (($_POST['v_scenario'.$s.'name']!="") && ($_POST['v_scenario'.$s.'name']!="Scenario ".$s)) {echo "
  ".$_POST['v_scenario'.$s.'name']."";} echo "
"; echo "
GHGENCarNCarReInOzDeReOrAqEcTeEcTeANAqAcAqEu
    g CO2e/FUMJ/FUg C2H3Cl eq/FUg C2H3Cl eq/FUmg PM2.5 eq/FUmg CFC11 eq/FUmg C2H4 eq/FUkg TEG water/FUkg TEG soil/FUmg SO2 eq/FUmg SO2 eq/FUmg PO4 P-lim/FU
PipingPipe". $arrow_pretreatment."'.$temp_notation.'
".$arrow_treatment."'.$temp_notation.'
".$arrow_posttreatment."'.$temp_notation.'
  ".$component."".${"arrow_{$arrowtext}"}."".number_format($temp_print_array[$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
Fittings".$arrow_pretreatment."".number_format($print_inf_pipe["pre-treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
".$arrow_treatment."".number_format($print_inf_pipe["treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
".$arrow_posttreatment."".number_format($print_inf_pipe["post-treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
  ".$component."".${"arrow_{$arrowtext}"}."".number_format($temp_print_array[$ei],$standard_notation_decimals,'.','')."".number_format($temp_print_array[$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
Valves & Meters".$arrow_pretreatment."".number_format($print_inf_pipe["pre-treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
".$arrow_treatment."".number_format($print_inf_pipe["treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
".$arrow_posttreatment."".number_format($print_inf_pipe["post-treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
  ".$component."".${"arrow_{$arrowtext}"}."".number_format($temp_print_array[$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
Concrete and BuildingsConcrete and Buildings". $arrow_pretreatment."".number_format($print_inf_buildings["pre-treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
".$arrow_treatment."".number_format($print_inf_buildings["treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
".$arrow_posttreatment."".number_format($print_inf_buildings["post-treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
  Reinforced & Precast Concrete".$arrow_pretreatment."".number_format($print_inf_buildings["pre-treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
".$arrow_treatment."".number_format($print_inf_buildings["treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
".$arrow_posttreatment."".number_format($print_inf_buildings["post-treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
  Buildings".$arrow_pretreatment."".number_format($print_inf_buildings["pre-treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
".$arrow_treatment."".number_format($print_inf_buildings["treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
".$arrow_posttreatment."".number_format($print_inf_buildings["post-treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
EquipmentPumps". $arrow_pretreatment."".number_format($print_inf_equipment["pre-treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
".$arrow_treatment."".number_format($print_inf_equipment["treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
".$arrow_posttreatment."".number_format($print_inf_equipment["post-treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
Filtration".$arrow_pretreatment."".number_format($print_inf_equipment["pre-treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
".$arrow_treatment."".number_format($print_inf_equipment["treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
".$arrow_posttreatment."".number_format($print_inf_equipment["post-treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
  ".$render_inf_eqdet_names[$component]."".${"arrow_{$arrowtext}"}."".number_format($print_inf_equipment[$component][$phase][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
General".$arrow_pretreatment."".number_format($print_inf_equipment["pre-treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
".$arrow_treatment."".number_format($print_inf_equipment["treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
".$arrow_posttreatment."".number_format($print_inf_equipment["post-treatment"][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
  ".$render_inf_eqdet_names[$component]."".${"arrow_{$arrowtext}"}."".number_format($print_inf_equipment[$component][$phase][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
Energy UseElectricity".${"arrow_{$arrowtext}"}."".number_format($print_op_electricity[$phase][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
Natural Gas".${"arrow_{$arrowtext}"}."".number_format($print_op_energyuse_ng[$phase][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
Equipment Fuels".${"arrow_{$arrowtext}"}."".number_format($print_op_gasdiesel[$phase][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
  ".$render_op_energyuse[$fuel]."".${"arrow_{$arrowtext}"}."".number_format(${"out_op_energyuse_s{$s}"}[$fuel][$phase][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
ChemicalspH Adjustment".${"arrow_treatment"}."".number_format($print_op_chemicals[$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
  ".$temp_chemdesc."".${"arrow_treatment"}."".number_format(${"out_op_chemicals_s{$s}"}[$chem][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
Flocculants / Coagulants".${"arrow_treatment"}."".number_format($print_op_chemicals[$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
  ".$temp_chemdesc."".${"arrow_treatment"}."".number_format(${"out_op_chemicals_s{$s}"}[$chem][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
Disinfectants".${"arrow_treatment"}."".number_format($print_op_chemicals[$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
  ".$temp_chemdesc."".${"arrow_treatment"}."".number_format(${"out_op_chemicals_s{$s}"}[$chem][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
Other".${"arrow_treatment"}."".number_format($print_op_chemicals[$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
  ".$temp_chemdesc."".${"arrow_treatment"}."".number_format(${"out_op_chemicals_s{$s}"}[$chem][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
Direct Wastewater Process".${"arrow_treatment"}."".number_format($print_op_methane[$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
Waste ManagementSludge Disposal".${"arrow_posttreatment"}."".number_format($print_en_sludge[$print_en_sludge_keys[0]][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
Ash Disposal".${"arrow_posttreatment"}."".number_format($print_en_sludge[$print_en_sludge_keys[1]][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
Infrastructure".${"arrow_{$arrowtext}"}."".number_format($print_total_i[$phase][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
Operation".${"arrow_{$arrowtext}"}."".number_format($print_total_o[$phase][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
End-of-Life".${"arrow_{$arrowtext}"}."".number_format($print_total_e[$phase][$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
Scenario ".$s." Grand Total ".number_format($print_total[$ei],$standard_notation_decimals,'.','')."'.$temp_notation.'
"; echo "\n

"; } } else { echo "
 
"; } ?>