Ejemplo n.º 1
0
metrics = (Metric('Internal rate of return', sc.sugarcane_tea.solve_IRR, '%'),
           Metric('Ethanol production cost', get_prodcost, 'USD/yr'),
           Metric('Fixed capital investment', get_FCI, 'USD'),
           Metric('Ethanol production', get_prod, 'kg/hr'),
           Metric('Steam', get_steam, 'MT/yr'),
           Metric('Consumed electricity', get_consumed_electricity, 'MWhr/yr'),
           Metric('Excess electricity', get_excess_electricity, 'MWhr/yr'))

sugarcane_model = Model(sc.sugarcane_sys, metrics, skip=False)
sugarcane_model.load_default_parameters(sc.system.Sugar_cane)
param = sugarcane_model.parameter

# Fermentation efficiency
fermentation = sc.system.P24
@param(element=fermentation, distribution=triang(fermentation.efficiency),
       kind='coupled')
def set_fermentation_efficiency(efficiency):
    fermentation.efficiency= efficiency
    
# Boiler efficiency
BT = sc.system.BT
@param(element=BT, distribution=triang(BT.boiler_efficiency))
def set_boiler_efficiency(boiler_efficiency):
    BT.boiler_efficiency = boiler_efficiency

# Turbogenerator efficiency
@param(element=BT, distribution=triang(BT.turbogenerator_efficiency))
def set_turbogenerator_efficiency(turbo_generator_efficiency):
    BT.turbo_generator_efficiency = turbo_generator_efficiency
    
Ejemplo n.º 2
0
    Metric('Biomass goes to combustion', get_combusted_mass, 'kg/hr'),
    Metric('Share of total biomass goes to combustion',
           get_combusted_biomass_ratio, '100&')
]

sugarcane_model = Model(sugarcane_sys, metrics)
sugarcane_model.load_default_parameters(sugar_cane, operating_days=False)
param = sugarcane_model.parameter

# Fermentation efficiency
fermentation = R301
baseline = fermentation.efficiency


@param(element=fermentation,
       distribution=triang(baseline),
       baseline=baseline,
       kind='coupled')
def set_fermentation_efficiency(efficiency):
    fermentation.efficiency = efficiency


# Boiler efficiency
baseline = BT.boiler_efficiency


@param(element=BT, distribution=triang(baseline), baseline=baseline)
def set_boiler_efficiency(boiler_efficiency):
    BT.boiler_efficiency = boiler_efficiency

Ejemplo n.º 3
0
def set_saccharification_conversion(saccharification_conversion):
    saccharification_reaction.X = saccharification_conversion


# Add ethanol conversion as a parameter
ethanol_reaction = R301.cofermentation[0]
X = tools.bounded_triang(ethanol_reaction.X, addition=0.05)


@param(element=R301, kind='coupled', distribution=X)
def set_ethanol_conversion(ethanol_conversion):
    ethanol_reaction.X = ethanol_conversion


# Add saccharification time as a parameter
X = tools.triang(R301.tau_saccharification)


@param(element=R301, kind='isolated', distribution=X)
def set_saccharification_time(saccharification_time):
    R301.tau_saccharification = saccharification_time


# Add fermentation time as a parameter
X = tools.triang(R301.tau_cofermentation)


@param(element=R301, kind='isolated', distribution=X)
def set_fermentation_time(fermentation_time):
    R301.tau_cofermentation = fermentation_time
Ejemplo n.º 4
0
constant_lipid_content = False


def load_specifications():
    # Plant size
    lc.lipidcane.F_mass = plant_size_ / (lc.lipidcane_tea.operating_days * 24 /
                                         907.185)


model = Model(lc.lipidcane_sys, metrics, load_specifications)
param = model.parameter
lipid_content = 100. * lc.utils.get_lipid_fraction()


@param(units='dry wt. %',
       distribution=triang(lipid_content),
       baseline=lipid_content)
def set_lipic_content(lipid_content):
    if constant_lipid_content: return
    lc.utils.set_lipid_fraction(lipid_content / 100.)


@param(units='ton/yr', distribution=triang(plant_size_), baseline=plant_size_)
def set_plant_size(plant_size):
    global plant_size_
    plant_size_ = plant_size


@param(units='days/yr',
       distribution=triang(tea.operating_days),
       baseline=tea.operating_days)
Ejemplo n.º 5
0
                  'USD'), Metric('Ethanol production', get_prod,
                                 'kg/hr'), Metric('Steam', get_steam, 'MT/yr'),
           Metric('Consumed electricity', get_electricity_consumption,
                  'MWhr/yr'),
           Metric('Excess electricity', get_excess_electricity, 'MWhr/yr'))

sugarcane_model = Model(sc.sugarcane_sys, metrics, skip=False)
sugarcane_model.load_default_parameters(sc.sugarcane)
param = sugarcane_model.parameter

# Fermentation efficiency
fermentation = sc.R301


@param(element=fermentation,
       distribution=triang(fermentation.efficiency),
       baseline=fermentation.efficiency,
       kind='coupled')
def set_fermentation_efficiency(efficiency):
    fermentation.efficiency = efficiency


# Boiler efficiency
BT = sc.BT


@param(element=BT,
       distribution=triang(BT.boiler_efficiency),
       baseline=BT.boiler_efficiency)
def set_boiler_efficiency(boiler_efficiency):
    BT.boiler_efficiency = boiler_efficiency
Ejemplo n.º 6
0
           Metric('Fixed capital investment', get_FCI, 'USD'),
           Metric('Biodiesel production', get_biodiesel_prod, 'kg/hr'),
           Metric('Ethanol production', get_etoh_prod, 'kg/hr'),
           Metric('Steam', get_steam, 'MT/yr'),
           Metric('Consumed electricity', get_consumed_electricity, 'MWhr/yr'),
           Metric('Excess electricity', get_excess_electricity, 'MWhr/yr'))

lipidcane_model = Model(lc_sys, metrics)
lipidcane_model.load_default_parameters(lipid_cane)
param = lipidcane_model.parameter

# Lipid extraction rate
Mill = lc.system.U201
baseline = Mill.isplit['Lipid']
@param(element=Mill,
       distribution=triang(baseline),
       baseline=baseline,
       kind='coupled')
def set_lipid_extraction_rate(lipid_extraction_rate):
    Mill.isplit['Lipid'] = lipid_extraction_rate
    
# Transesterification efficiency (both tanks)
R401 = lc.system.R401
baseline = R401.efficiency
@param(element=R401, distribution=triang(baseline), kind='coupled',
       baseline=baseline)
def set_transesterification_401_efficiency(efficiency):
    R401.efficiency = efficiency

R402 = lc.system.R402
baseline = R402.efficiency
Ejemplo n.º 7
0
           Metric('Biodiesel production', get_biodiesel_prod, 'kg/hr'),
           Metric('Ethanol production', get_etoh_prod, 'kg/hr'),
           Metric('Steam', get_steam, 'MT/yr'),
           Metric('Consumed electricity', get_consumed_electricity, 'MWhr/yr'),
           Metric('Excess electricity', get_excess_electricity, 'MWhr/yr'))

lipidcane_model = Model(lc_sys, metrics)
lipidcane_model.load_default_parameters(lipid_cane)
param = lipidcane_model.parameter

# Lipid extraction rate
Mill = lc.system.pretreatment.U201
Mill_split = Mill.split
Lipid_index = Mill.outs[0].index('Lipid')
@param(element=Mill,
       distribution=triang(Mill_split[Lipid_index]),
       kind='coupled')
def set_lipid_extraction_rate(lipid_extraction_rate):
    Mill_split[Lipid_index] = lipid_extraction_rate
    
# Transesterification efficiency (both tanks)
R401 = lc.system.biodiesel.R401
@param(element=R401, distribution=triang(R401.efficiency), kind='coupled')
def set_transesterification_401_efficiency(efficiency):
    R401.efficiency = efficiency

R402 = lc.system.biodiesel.R402
@param(element=R402, distribution=triang(R402.efficiency), kind='coupled')
def set_transesterification_402_efficiency(efficiency):
    R402.efficiency = efficiency