Exemplo n.º 1
0
Plot_Efficiency_Bargraph, Generate_EfficienciesDict_Keys_Sorted_by_Efficiency, \
Export_Efficiency_Bargraph

from rewiredcarbon.utils import ensure_dir




scenarioTableFileName = 'input/fig-co2fixation.csv'
outputFilename = 'output/fig-co2fixation/fig-co2fixation.csv'
ensure_dir(outputFilename)


scenarioDict = ImportScenarioTable(scenarioTableFileName)

efficienciesDict = CalculateScenarioEfficiencies(scenarioDict)


# keysArray = \
# Generate_EfficienciesDict_Keys_Sorted_by_Efficiency(efficienciesDict, 'effTotalElectricalToFuel')


keysArray = list(efficienciesDict.keys())

Plot_Efficiency_Bargraph(efficienciesDict, 'effTotalElectricalToFuel', \
'effTotalElectricalToFuel_lowerError', 'effTotalElectricalToFuel_upperError', keysToPlot=keysArray)



Export_Efficiency_Bargraph(outputFilename, efficienciesDict, scenarioDict, \
'effTotalElectricalToFuel', 'effTotalElectricalToFuel_lowerError', \
Exemplo n.º 2
0
# fig-EETscaleup-A.py
# Calculates efficiency of EET based rewired carbon fixation
#
# Farshid Salimijazi and Buz Barstow
# Last updated by Buz Barstow on 2019-10-28
# ------------------------------------------------------------------------------------------------ #


from rewiredcarbon.scenario import ImportScenarioTable, CalculateScenarioEfficiencies, \
Plot_Efficiency_Scattergraphs, Export_Efficiency_Scattergraphs

from rewiredcarbon.utils import ensure_dir

scenarioTableFileName = 'input/fig-EETscaleup-A.csv'

outputFileDirname = 'output/fig-EETscaleup/fig-EETscaleup-A/'
ensure_dir(outputFileDirname)

outputFilePrefix = 'VariableResistivity'

scenarioDict = ImportScenarioTable(scenarioTableFileName)

efficienciesDict = CalculateScenarioEfficiencies(scenarioDict,
                                                 mode='scattergraph')

Plot_Efficiency_Scattergraphs(efficienciesDict, 'effTotalElectricalToFuel')



Export_Efficiency_Scattergraphs(outputFileDirname, outputFilePrefix, efficienciesDict, \
'effTotalElectricalToFuel', keysToPlot=None)
Exemplo n.º 3
0
from rewiredcarbon.scenario import ImportScenarioTable, CalculateScenarioEfficiencies, \
Plot_Efficiency_Scattergraphs, Export_Efficiency_Scattergraphs

# Solar constant in W m^-2
solarConstant = 1000

outputFileDirname = 'output/fig-h2agitation/fig-h2agitation-D/'

scenarioTableFileName = 'input/fig-h2agitation-D.csv'

outputFilename_cellDensityAtTargetEfficiencyRatio \
= outputFileDirname + '/' + 'fig-h2agitation-D-cell_density.csv'

scenarioDict = ImportScenarioTable(scenarioTableFileName)

efficienciesDict = CalculateScenarioEfficiencies(scenarioDict,
                                                 mode='scattergraph')

# Calculate out the peak efficiency
peakElectricalToFuelEfficiency = max(
    efficienciesDict['Reference']['effAvailElectricalToFuel'])

# Remove the reference scenario from consideration
efficienciesDictKeysForCalc = list(efficienciesDict.keys())
efficienciesDictKeysForCalc.remove('Reference')

targetEfficiencyRatios = [0.5, 0.75, 0.95]
collectedOutputDict = {}

# Calculate the system footprint data for different target efficiency ratios
for targetEfficiencyRatio in targetEfficiencyRatios: