Example #1
0
# %% Enthalpy of formations
sp.Lipid.Hf = -2193.7 * 1000  # https://webbook.nist.gov/cgi/cbook.cgi?ID=C122327&Mask=2
#sp.free_lipid.Hfm = -764.80 * 1000
sp.Biodiesel.Hf = -727.64 * 1000
sp.Glycerol.Hf = -669.6 * 1000

# %% Missing properties

sp.Lipid.Tb = 879.9  # Boiling point of Triolein
sp.Lipid.dipole = 0.1
sp.Biodiesel.dipole = 0

# %% Other solids

# Acid and base are basically water
HCl = Substance('HCl', MW=36.46094, rho=10**8)
NaOH = Substance('NaOH', MW=39.997109, rho=10**8)
NaOH.Hfm = 0

# Catalyst is basically methanol
NaOCH3 = Substance('NaOCH3',
                   obj=sp.Methanol,
                   MW=54.023689,
                   rho=1 / sp.Methanol.Vm * 54.03)
NaOCH3.Hfm = sp.Methanol.Hfm

biodiesel_species = Species.tospecies(tuple(sp) + (HCl, NaOH, NaOCH3))

# Set working species (and in this order)
biodiesel_species.IDs = ('Lipid', 'Methanol', 'Glycerol', 'Biodiesel', 'Water',
                         'NaOH', 'HCl', 'NaOCH3')
             'Solids'):
    setattr(sp, name, Substance(name, rho=1540))

sp.Lipid = lipid
sp.Lipid.ID = 'Lipid'
sp.CaO = Substance('CaO', MW=56.0774, rho=1540)
sp.setprops(sp.IDs, 'Hf', 0)
sp.setprops(sp.IDs, 'T_ref', 298.15)

# %% Heat capacities

# References
# https://www.sciencedirect.com/science/article/pii/0032386182901252
# https://link.springer.com/article/10.1007%2Fs10853-013-7815-6

pretreatment_species = Species.tospecies(tuple(ethanol_species) + tuple(sp))
sp = pretreatment_species
sp.Ash.Cp = sp.Ash.Cpm = 0.09 * 4184 / 1000  # from Kumar
sp.CaO.Cp = 1023.88 / 1000  # from Kumar
sp.CaO.Cpm = 1023.88 / 1000 * 56.0774
sp.Cellulose.Cp = sp.Cellulose.Cpm = 1364 / 1000  # from paper
sp.Hemicellulose.Cp = sp.Hemicellulose.Cpm = 1364 / 1000  # same as cellulose
sp.Flocculant.Cp = sp.Flocculant.Cpm = 4184 / 1000  # from Kumar
sp.Lignin.Cp = sp.Lignin.Cpm = 1364 / 1000  # same as cellulose
sp.Solids.Cp = sp.Solids.Cpm = 1100 / 1000  # common value for solids

sp.setprops([
    'Ash', 'CaO', 'Cellulose', 'Flocculant', 'Hemicellulose', 'Lignin',
    'Solids'
], 'Hvapm', 0)
sp.IDs = ('Glucose', 'H3PO4', 'Flocculant', 'Ethanol', 'Lignin', 'Solids',
Example #3
0
for name in ('Ash', 'Cellulose', 'Flocculant', 'Hemicellulose', 'Lignin',
             'Solids'):
    setattr(dissolved, name, Substance(name, rho=1540))

dissolved.CaO = Substance('CaO', MW=56.0774, rho=1540)
dissolved.setprops(dissolved.IDs, 'Hf', 0)
dissolved.setprops(dissolved.IDs, 'T_ref', 298.15)

# %% Heat capacities

# References
# https://www.sciencedirect.com/science/article/pii/0032386182901252
# https://link.springer.com/article/10.1007%2Fs10853-013-7815-6

sugarcane_species = sp = Species.tospecies((CO2, Ethanol, Water, glucose,
                                            sucrose, phosphoric_acid, Octane,
                                            dry_yeast) + tuple(dissolved))
sp.Ash.Cp = sp.Ash.Cpm = 0.09 * 4184 / 1000  # from Kumar
sp.CaO.Cp = 1023.88 / 1000  # from Kumar
sp.CaO.Cpm = 1023.88 / 1000 * 56.0774
sp.Cellulose.Cp = sp.Cellulose.Cpm = 1364 / 1000  # from paper
sp.Hemicellulose.Cp = sp.Hemicellulose.Cpm = 1364 / 1000  # same as cellulose
sp.Flocculant.Cp = sp.Flocculant.Cpm = 4184 / 1000  # from Kumar
sp.Lignin.Cp = sp.Lignin.Cpm = 1364 / 1000  # from paper
sp.Solids.Cp = sp.Solids.Cpm = 1100 / 1000  # common value for solids

sp.setprops([
    'Ash', 'CaO', 'Cellulose', 'Flocculant', 'Hemicellulose', 'Lignin',
    'Solids'
], 'Hvapm', 0)
__all__ = ['ethanol_species']

#%% Set up species

Water = Chemical('Water')
CO2 = Gas('CO2')
Ethanol = Chemical('Ethanol')
_glucosoe = Chemical('Glucose')
glucose = StaticChemical('Glucose')
sucrose = StaticChemical('Sucrose')
dry_yeast = Substance('DryYeast', 'Yeast', MW=1)
phosphoric_acid = Substance('H3PO4', '7664-38-2', MW=97.994, rho=10**8)
Octane = Chemical('Octane')
ethanol_species = sp = Species.tospecies(
    (CO2, Ethanol, Water, glucose, sucrose, phosphoric_acid, Octane,
     dry_yeast))

#%% Cp Gluclose & sucrose

# # Asadi, 2005, Tables, Beet-Sugar Handbook, John Wiley & Sons, Inc (2005), pp.  779-801
# # http://onlinelibrary.wiley.com/store/10.1002/9780471790990.oth1/asset/oth1.pdf;jsessionid=1B4B5D3655477F46D578541BE0E4CED2.f03t01?v=1&t=jdewgnrl&s=477661e0dfe5c058191f8f1907d2f63bdaca3e59

# # Use heat capacity at T = 60, and saturated with sugar
# sucrose.Cp = glucose.Cp = ((2540/4184 - 0.20)*4184 /0.8) * 180.156/1000**2  # J/mol/K
# sucrose.Cpm = sucrose.Cp * sucrose.MW
# glucose.Cpm = glucose.Cp * glucose.MW
dry_yeast.Cp = dry_yeast.Cpm = 1.2

#%% Cp Phophoric_acid
Example #5
0
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 26 14:11:33 2019

@author: yoelr
"""
__all__ = [
    'pretreatment_species', 'biodiesel_species', 'ethanol_species',
    'lipidcane_species'
]

from biosteam import Species
from .pretreatment import pretreatment_species
from .biodiesel import biodiesel_species
from .ethanol import ethanol_species

lipidcane_species = Species.tospecies(
    [*pretreatment_species, *biodiesel_species, *ethanol_species])