-
Notifications
You must be signed in to change notification settings - Fork 0
/
Compost_input_for_Sensitivity_Analysis.py
101 lines (69 loc) · 5.18 KB
/
Compost_input_for_Sensitivity_Analysis.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 17 16:37:44 2019
@author: msardar2
"""
import pandas as pd
import numpy as np
from MC import *
class Compost_input(MC):
def __init__(self):
### Land application inputs
self.Land_app = {
'distLand':{"Name":"Distance to application site","amount":20,"unit":'km',"Reference":None},
'erLand':{"Name":"Empty return from land application (0=no; 1=yes)","amount":1,"unit":'0/1',"Reference":None},
'land_payload':{"Name":"Actual payload of truck used to haul soil amendment","amount":7.3,"unit":'Mg',"Reference":None},
'PeatSubFac':{"Name":"Volumetric peat replacement factor","amount":0.9,"unit":None,"Reference":'17'},
'densPeat':{"Name":"Density of peat","amount":200,"unit":'kg/m3',"Reference":'17'},
'moistPeat':{"Name":"moistPeat","amount":0.56,"unit":None},
'CContPeat':{"Name":"CContPeat","amount":0.504,"unit":None},
'CstorePeat':{"Name":"CstorePeat","amount":0.10,"unit":None},
'perN2Oevap':{"Name":"Percent of applied N evaporated as N2O","amount":1.8,"unit":'%'},
'perNH3evap':{"Name":"Percent of Ammonia that evaporates","amount":15,"unit":'%',"Reference":'16'},
'perNasNH3fc':{"Name":"Percent N that is Ammonia","amount":25,"unit":'%',"Reference":'16'},
}
### Facility Operation
self.operation = {
'choice_BU':{'Name':'Digestate Beneficial Use (1) or No Beneficial Use (0)','amount':0,'unit':'0/1','Referenc':None},
'peatOff':{'Name':'Digestate Beneficial Use offsets Peat (1 - Yes; 0 - No)','amount':1,'unit':'0/1','Referenc':None},
'fertOff':{'Name':'Digestate Beneficial Use offsets Fertilizer (1 - Yes; 0 - No)','amount':1,'unit':'0/1','Referenc':None},
'allocation_ADC':{'Name':'Allocation factor of LF material use to ADC','amount':0.5,'unit':'frac'}}
### Material Properties
self.Material_Properties ={
'mcFC':{'Name':'Finished compost moisture content','amount':0.45 ,'unit':'mass water/total mass','Referenc':None},
'densFC':{'Name':'Density of final compost','amount':700 ,'unit':'kg/m3','Referenc':2}
}
### Soil Sequestration
self.Soil_seq ={
'perCStor':{"Name":"Percent of carbon in finished compost remaining after 100 years","amount":10,"unit":'%'},
'humFormFac':{"Name":"100 year carbon storage from humus formation","amount":0,"unit":'kg-C/kg-C in compost',"Reference":'4'}
}
### Initial flow
self.initflow ={'mass':{"Name":"mass","amount":1000},
'C_cont':{"Name":"C_cont","amount":0.30},
'N_cont':{"Name":"N_cont","amount":0.015},
'P_cont':{"Name":"P_cont","amount":0.005},
'K_cont':{"Name":"K_cont","amount":0.01}
}
### Landfill
self.Landfill ={'CH4_Collected':{"Name":"CH4_Collected","amount":60},
'Frac_oxidized':{"Name":"Frac_oxidized","amount":0.17},
'Frac_flared':{"Name":"Frac_flared","amount":0.31},
'percCStor_LF':{"Name":"Percent of carbon in compost remaining after 100 years","amount":90,"unit":'%'},
'Elec_eff':{"Name":"Elec_eff in LF","amount":0.30,"unit":None},
'CH4_LHV':{"Name":"CH4_LHV","amount":50,"unit":'MJ/kg'},
'frac_CH4':{"Name":"frac_CH4 in biogas produced in LF","amount":0.5,"unit":None},
'DC_subs_fac':{'Name':'DC_subs_fac','amount':0.9,'unit':'frac'},
'Soil_dens':{'Name':'Soil_dens','amount':1600,'unit':'kg/m3'},
'DC_thickness':{'Name':'DC_thickness','amount':15,'unit':'cm'},
'ADC_thickness':{'Name':'ADC_thickness','amount':22.5,'unit':'cm'},
'Frac_NH4':{'Name':'Frac_NH4','amount':0.00563,'unit':'fraction'},
'LCRS_eff':{'Name':'LCRS_eff','amount':0.991,'unit':'fraction'},
'NH4_rmv_eff':{'Name':'NH4_rmv_eff','amount':0.95,'unit':'fraction'},
'Grid_mix':{'Name':'Grid_mix','amount':1,'unit':'fraction'} }
### Monte_carlo
def setup_MC(self,seed=None):
self.Compost_Input_list = {'Land_app':self.Land_app,'operation':self.operation,'Material_Properties':self.Material_Properties,
'Soil_seq':self.Soil_seq,'initflow':self.initflow,'Lanfill':self.Landfill}
super().__init__(self.Compost_Input_list)
super().setup_MC(seed)