{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Stoichiometric reactions" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Thermosteam provides array based objects that can model stoichiometric reactions given a conversion." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Single reaction" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Create a Reaction object based on the transesterification reaction:\n", "\n", "|Reaction|Reactant|% Converted|\n", "|---|---|---|\n", "|Lipid + 3 Methanol -> 3 Biodiesel + Glycerol|Lipid|90|\n" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "tags": [ "nbval-ignore-output" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Reaction (by mol):\n", "stoichiometry reactant X[%]\n", "3 Methanol + TriOlein -> 3 Biodiesel + Glycerol TriOlein 90.00\n" ] } ], "source": [ "import thermosteam as tmo\n", "from biorefineries import cane\n", "from warnings import filterwarnings; filterwarnings('ignore') \n", "chemicals = cane.create_oilcane_chemicals()\n", "tmo.settings.set_thermo(chemicals)\n", "transesterification = tmo.Reaction(\n", " 'TAG + Methanol -> Biodiesel + Glycerol', # Reaction\n", " correct_atomic_balance=True, # Corrects stoichiometric coefficients by atomic balance\n", " reactant='TAG', # Limiting reactant\n", " X=0.9, # Conversion\n", ")\n", "transesterification.show()" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "tags": [ "nbval-ignore-output" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "CompiledChemicals([Water, Ethanol, Glucose, Sucrose, H3PO4, P4O10, CO2, Octane, O2, N2, CH4, Ash, Cellulose, Hemicellulose, Flocculant, Lignin, Solids, Yeast, CaO, Biodiesel, Methanol, Glycerol, HCl, NaOH, NaOCH3, Phosphatidylinositol, OleicAcid, MonoOlein, DiOlein, TriOlein, Acetone])\n" ] } ], "source": [ "transesterification.chemicals" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "tags": [ "nbval-ignore-output" ] }, "outputs": [ { "data": { "text/plain": [ "sparse([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n", " 0., 0., 0., 0., 0., 0., 3., -3., 1., 0., 0., 0., 0.,\n", " 0., 0., 0., -1., 0.])" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "transesterification.stoichiometry" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "tags": [ "nbval-ignore-output" ] }, "outputs": [ { "data": { "text/plain": [ "'TriOlein'" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "transesterification.reactant" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.9" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "transesterification.X" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "tags": [ "nbval-skip" ] }, "outputs": [ { "data": { "text/plain": [ "-324288.0" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Heat of reaction J / mol-reactant (accounts for conversion)\n", "# Latent heats are not included here because the reaction is agnostic to phases\n", "transesterification.dH " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "When a Reaction object is called with a stream, it updates the material data to reflect the reaction:" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "BEFORE REACTION\n", "Stream: s1\n", "phase: 'l', T: 298.15 K, P: 101325 Pa\n", "flow (kmol/hr): Methanol 600\n", " TriOlein 100\n", "AFTER REACTION\n", "Stream: s1\n", "phase: 'l', T: 298.15 K, P: 101325 Pa\n", "flow (kmol/hr): Biodiesel 270\n", " Methanol 330\n", " Glycerol 90\n", " TriOlein 10\n" ] } ], "source": [ "feed = tmo.Stream(TAG=100, Methanol=600)\n", "print('BEFORE REACTION')\n", "feed.show(N=100)\n", "\n", "# React feed molar flow rate\n", "transesterification(feed)\n", "\n", "print('AFTER REACTION')\n", "feed.show(N=100)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's change the basis of the reaction:" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Reaction (by wt):\n", "stoichiometry reactant X[%]\n", "0.109 Methanol + TriOlein -> Biodiesel + 0.104 Glycerol TriOlein 90.00\n" ] } ], "source": [ "transesterification.basis = 'wt'\n", "transesterification.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Notice that the stoichiometry also adjusted. If we react a stream, we should see the same result, regardless of basis:" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "BEFORE REACTION\n", "Stream: s2\n", "phase: 'l', T: 298.15 K, P: 101325 Pa\n", "flow (kmol/hr): Methanol 600\n", " TriOlein 100\n", "AFTER REACTION\n", "Stream: s2\n", "phase: 'l', T: 298.15 K, P: 101325 Pa\n", "flow (kmol/hr): Biodiesel 270\n", " Methanol 330\n", " Glycerol 90\n", " TriOlein 10\n" ] } ], "source": [ "feed = tmo.Stream(TAG=100, Methanol=600)\n", "print('BEFORE REACTION')\n", "feed.show(N=100)\n", "\n", "# React feed molar flow rate\n", "transesterification(feed)\n", "\n", "print('AFTER REACTION')\n", "feed.show(N=100)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The net product yield accounting for both conversion and stoichiometry can be computed:" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2.7" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "round(transesterification.product_yield('Biodiesel', basis='mol'), 3)" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.904" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "round(transesterification.product_yield('Biodiesel', basis='wt'), 3)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The heat of reaction is now in units of J/kg-reactant:" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "tags": [ "nbval-skip" ] }, "outputs": [ { "data": { "text/plain": [ "-366.2483149751772" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "transesterification.dH # Accounts for conversion too" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Note that these reactions are carried out isothermally, but it is also possible to do so adiabatically:" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "BEFORE REACTION\n", "Stream: s3\n", "phase: 'l', T: 298.15 K, P: 101325 Pa\n", "flow (kmol/hr): Water 5.55\n", " Glucose 0.0555\n", "AFTER REACTION\n", "Stream: s3\n", "phase: 'l', T: 308.47 K, P: 101325 Pa\n", "flow (kmol/hr): Water 5.55\n", " Ethanol 0.0999\n", " Glucose 0.00555\n", " CO2 0.0999\n" ] } ], "source": [ "feed = tmo.Stream(Glucose=10, H2O=100, units='kg/hr')\n", "print('BEFORE REACTION')\n", "feed.show(N=100)\n", "\n", "# React feed adiabatically (temperature should increase)\n", "fermentation = tmo.Reaction('Glucose + O2 -> Ethanol + CO2',\n", " reactant='Glucose', X=0.9,\n", " correct_atomic_balance=True)\n", "fermentation.adiabatic_reaction(feed)\n", "\n", "print('AFTER REACTION')\n", "feed.show(N=100)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Phases changes can be included in the reaction: " ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Reaction (by mol):\n", "stoichiometry reactant X[%]\n", "Glucose,l -> 2 CO2,g + 2 Ethanol,l Glucose,l 90.00\n" ] } ], "source": [ "fermentation = tmo.Reaction('Glucose,l -> Ethanol,l + CO2,g',\n", " reactant='Glucose', X=0.9,\n", " correct_atomic_balance=True)\n", "fermentation.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Note that the heat of reaction accounts for latent heats, the extent of reaction, and the basis:" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Heat of reaction at 80% conversion: -7.19e+04 J/mol-reactant, -399 J/g-reactant\n", "Heat of reaction at 90% conversion: -8.09e+04 J/mol-reactant, -449 J/g-reactant\n" ] } ], "source": [ "fermentation.X = 0.80\n", "print(f\"Heat of reaction at 80% conversion: {fermentation.dH:.3g} J/mol-reactant, {fermentation.copy(basis='wt').dH:.3g} J/g-reactant\")\n", "fermentation.X = 0.90\n", "print(f\"Heat of reaction at 90% conversion: {fermentation.dH:.3g} J/mol-reactant, {fermentation.copy(basis='wt').dH:.3g} J/g-reactant\")" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "BEFORE ADIABATIC REACTION\n", "MultiStream: s4\n", "phases: ('g', 'l'), T: 298.15 K, P: 101325 Pa\n", "flow (kmol/hr): (l) Water 5.55\n", " Glucose 0.0555\n", "AFTER ADIABATIC REACTION\n", "MultiStream: s4\n", "phases: ('g', 'l'), T: 308.47 K, P: 101325 Pa\n", "flow (kmol/hr): (g) CO2 0.0999\n", " (l) Water 5.55\n", " Ethanol 0.0999\n", " Glucose 0.00555\n" ] } ], "source": [ "feed = tmo.Stream(Glucose=10, H2O=100, units='kg/hr')\n", "feed.phases = 'gl'\n", "print('BEFORE ADIABATIC REACTION')\n", "feed.show(N=100)\n", "\n", "# React feed adiabatically (temperature should increase)\n", "fermentation.adiabatic_reaction(feed)\n", "\n", "print('AFTER ADIABATIC REACTION')\n", "feed.show(N=100)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Lastly, when working with positive ions, simply pass a dictionary of stoichiometric coefficients instead of the equation:" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Reaction (by mol):\n", "stoichiometry reactant X[%]\n", "NaCl -> Na+ + Cl- NaCl 100.00\n" ] } ], "source": [ "# First let's define a new set of chemicals\n", "chemicals = NaCl, SodiumIon, ChlorideIon = tmo.Chemicals(['NaCl', 'Na+', 'Cl-'])\n", "\n", "# We set the state to completely ignore other possible phases\n", "NaCl.at_state('s')\n", "SodiumIon.at_state('l')\n", "ChlorideIon.at_state('l')\n", "\n", "# Molar volume doesn't matter in this scenario, but its\n", "# required to compile the chemicals. We can assume \n", "# a very low volume since its in solution.\n", "NaCl.V.add_model(1e-6)\n", "SodiumIon.V.add_model(1e-6)\n", "ChlorideIon.V.add_model(1e-6)\n", "\n", "# We can pass a Chemicals object to not have to override \n", "# the lipidcane chemicals we set earlier.\n", "dissociation = tmo.Reaction({'NaCl':-1, 'Na+':1, 'Cl-': 1},\n", " reactant='NaCl', X=1.,\n", " chemicals=chemicals)\n", "dissociation.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Parallel reactions" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Model the pretreatment hydrolysis reactions and assumed conversions from Humbird et. al. as shown in the follwing table [[1]](#References):\n", "\n", "|Reaction|Reactant|% Converted|\n", "|---|---|---|\n", "|(Glucan)n + n H2O→ n Glucose|Glucan|9.9|\n", "|(Glucan)n + n H2O → n Glucose Oligomer|Glucan|0.3|\n", "|(Glucan)n → n HMF + 2n H2O|Glucan|0.3|\n", "|Sucrose → HMF + Glucose + 2 H2O|Sucrose|100.0|\n", "|(Xylan)n + n H2O→ n Xylose|Xylan|90.0|\n", "|(Xylan)n + m H2O → m Xylose Oligomer|Xylan|2.4|\n", "|(Xylan)n → n Furfural + 2n H2O|Xylan|5.0|\n", "|Acetate → Acetic Acid|Acetate|100.0|\n", "|(Lignin)n → n Soluble Lignin|Lignin|5.0|\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Create a ParallelReaction from Reaction objects:" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "ParallelReaction (by mol):\n", "index stoichiometry reactant X[%]\n", "[0] Water + Glucan -> Glucose Glucan 9.90\n", "[1] Water + Glucan -> GlucoseOligomer Glucan 0.30\n", "[2] Glucan -> 2 Water + HMF Glucan 0.30\n", "[3] Sucrose -> 2 Water + HMF + Glucose Sucrose 0.30\n", "[4] Water + Xylan -> Xylose Xylan 90.00\n", "[5] Water + Xylan -> XyloseOligomer Xylan 0.24\n", "[6] Xylan -> 2 Water + Furfural Xylan 0.50\n", "[7] Acetate -> AceticAcid Acetate 100.00\n", "[8] Lignin -> SolubleLignin Lignin 0.50\n" ] } ], "source": [ "from biorefineries import cellulosic\n", "\n", "# Set chemicals as defined in [1-4]\n", "chemicals = cellulosic.create_cellulosic_ethanol_chemicals()\n", "tmo.settings.set_thermo(chemicals)\n", "\n", "# Create reactions\n", "pretreatment_parallel_rxn = tmo.ParallelReaction([\n", " # Reaction definition Reactant Conversion\n", " tmo.Reaction('Glucan + H2O -> Glucose', 'Glucan', 0.0990),\n", " tmo.Reaction('Glucan + H2O -> GlucoseOligomer', 'Glucan', 0.0030),\n", " tmo.Reaction('Glucan -> HMF + 2 H2O', 'Glucan', 0.0030),\n", " tmo.Reaction('Sucrose -> HMF + Glucose + 2H2O', 'Sucrose', 0.0030),\n", " tmo.Reaction('Xylan + H2O -> Xylose', 'Xylan', 0.9000),\n", " tmo.Reaction('Xylan + H2O -> XyloseOligomer', 'Xylan', 0.0024),\n", " tmo.Reaction('Xylan -> Furfural + 2 H2O', 'Xylan', 0.0050),\n", " tmo.Reaction('Acetate -> AceticAcid', 'Acetate', 1.0000),\n", " tmo.Reaction('Lignin -> SolubleLignin', 'Lignin', 0.0050)])\n", "\n", "pretreatment_parallel_rxn.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Model the reaction:" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "BEFORE REACTION\n", "Stream: s5\n", "phase: 'l', T: 298.15 K, P: 101325 Pa\n", "flow (kmol/hr): Water 2.07e+05\n", " Ethanol 18\n", " Furfural 172\n", " H2SO4 1.84e+03\n", " Sucrose 1.87\n", " Extract 67.8\n", " Acetate 25.1\n", " Ash 4.11e+03\n", " Lignin 1.31e+04\n", " Protein 108\n", " Glucan 180\n", " Xylan 123\n", " Arabinan 9.02\n", " Mannan 3.08\n", "AFTER REACTION\n", "Stream: s5\n", "phase: 'l', T: 298.15 K, P: 101325 Pa\n", "flow (kmol/hr): Water 2.07e+05\n", " Ethanol 18\n", " AceticAcid 25.1\n", " Furfural 173\n", " H2SO4 1.84e+03\n", " HMF 0.546\n", " Glucose 17.8\n", " Xylose 111\n", " Sucrose 1.86\n", " Extract 67.8\n", " Ash 4.11e+03\n", " Lignin 1.3e+04\n", " SolubleLignin 65.5\n", " GlucoseOligomer 0.54\n", " XyloseOligomer 0.295\n", " Protein 108\n", " Glucan 161\n", " Xylan 11.4\n", " Arabinan 9.02\n", " Mannan 3.08\n" ] } ], "source": [ "feed = tmo.Stream(H2O=2.07e+05,\n", " Ethanol=18,\n", " H2SO4=1.84e+03,\n", " Sucrose=1.87,\n", " Extract=67.8,\n", " Acetate=25.1,\n", " Ash=4.11e+03,\n", " Lignin=1.31e+04,\n", " Protein=108,\n", " Glucan=180,\n", " Xylan=123,\n", " Arabinan=9.02,\n", " Mannan=3.08,\n", " Furfural=172)\n", "print('BEFORE REACTION')\n", "feed.show(N=100)\n", "\n", "# React feed molar flow rate\n", "pretreatment_parallel_rxn(feed)\n", "\n", "print('AFTER REACTION')\n", "feed.show(N=100)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Reactions in series" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "SeriesReaction objects work the same way, but in series:" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "SeriesReaction (by mol):\n", "index stoichiometry reactant X[%]\n", "[0] Water + Glucan -> Glucose Glucan 9.90\n", "[1] Water + Glucan -> GlucoseOligomer Glucan 0.30\n", "[2] Glucan -> 2 Water + HMF Glucan 0.30\n", "[3] Sucrose -> 2 Water + HMF + Glucose Sucrose 0.30\n", "[4] Water + Xylan -> Xylose Xylan 90.00\n", "[5] Water + Xylan -> XyloseOligomer Xylan 0.24\n", "[6] Xylan -> 2 Water + Furfural Xylan 0.50\n", "[7] Acetate -> AceticAcid Acetate 100.00\n", "[8] Lignin -> SolubleLignin Lignin 0.50\n" ] } ], "source": [ "pretreatment_series_rxn = tmo.SeriesReaction(pretreatment_parallel_rxn)\n", "pretreatment_series_rxn.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Net conversion in parallel:" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'Glucan': 0.10500000000000001,\n", " 'Sucrose': 0.003,\n", " 'Xylan': 0.9074,\n", " 'Acetate': 1.0,\n", " 'Lignin': 0.005}" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "pretreatment_parallel_rxn.X_net()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Net conversion in series:" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'Glucan': 0.104397891,\n", " 'Sucrose': 0.003,\n", " 'Xylan': 0.9007388000000001,\n", " 'Acetate': 1.0,\n", " 'Lignin': 0.005}" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Notice how the conversion is\n", "# slightly lower for some reactants\n", "pretreatment_series_rxn.X_net()" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "BEFORE REACTION\n", "Stream: s6\n", "phase: 'l', T: 298.15 K, P: 101325 Pa\n", "flow (kmol/hr): Water 2.07e+05\n", " Ethanol 18\n", " Furfural 172\n", " H2SO4 1.84e+03\n", " Sucrose 1.87\n", " Extract 67.8\n", " Acetate 25.1\n", " Ash 4.11e+03\n", " Lignin 1.31e+04\n", " Protein 108\n", " Glucan 180\n", " Xylan 123\n", " Arabinan 9.02\n", " Mannan 3.08\n", "AFTER REACTION\n", "Stream: s6\n", "phase: 'l', T: 298.15 K, P: 101325 Pa\n", "flow (kmol/hr): Water 2.07e+05\n", " Ethanol 18\n", " AceticAcid 25.1\n", " Furfural 172\n", " H2SO4 1.84e+03\n", " HMF 0.491\n", " Glucose 17.8\n", " Xylose 111\n", " Sucrose 1.86\n", " Extract 67.8\n", " Ash 4.11e+03\n", " Lignin 1.3e+04\n", " SolubleLignin 65.5\n", " GlucoseOligomer 0.487\n", " XyloseOligomer 0.0295\n", " Protein 108\n", " Glucan 161\n", " Xylan 12.2\n", " Arabinan 9.02\n", " Mannan 3.08\n" ] } ], "source": [ "feed = tmo.Stream(H2O=2.07e+05,\n", " Ethanol=18,\n", " H2SO4=1.84e+03,\n", " Sucrose=1.87,\n", " Extract=67.8,\n", " Acetate=25.1,\n", " Ash=4.11e+03,\n", " Lignin=1.31e+04,\n", " Protein=108,\n", " Glucan=180,\n", " Xylan=123,\n", " Arabinan=9.02,\n", " Mannan=3.08,\n", " Furfural=172)\n", "print('BEFORE REACTION')\n", "feed.show(N=100)\n", "\n", "# React feed molar flow rate\n", "pretreatment_series_rxn(feed)\n", "\n", "print('AFTER REACTION')\n", "feed.show(N=100)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Indexing reactions" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Both SeriesReaction, and ParallelReaction objects are indexable:" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "ParallelReaction (by mol):\n", "index stoichiometry reactant X[%]\n", "[0] Water + Glucan -> Glucose Glucan 9.90\n", "[1] Water + Glucan -> GlucoseOligomer Glucan 0.30\n" ] } ], "source": [ "# Index a slice\n", "pretreatment_parallel_rxn[0:2].show()" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "ReactionItem (by mol):\n", "stoichiometry reactant X[%]\n", "Water + Glucan -> Glucose Glucan 9.90\n" ] } ], "source": [ "# Index an item\n", "pretreatment_parallel_rxn[0].show()" ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [], "source": [ "# Change conversion through the item\n", "pretreatment_parallel_rxn[0].X = 0.10" ] }, { "cell_type": "code", "execution_count": 27, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "ParallelReaction (by mol):\n", "index stoichiometry reactant X[%]\n", "[0] Water + Glucan -> Glucose Glucan 10.00\n", "[1] Water + Glucan -> GlucoseOligomer Glucan 0.30\n", "[2] Glucan -> 2 Water + HMF Glucan 0.30\n", "[3] Sucrose -> 2 Water + HMF + Glucose Sucrose 0.30\n", "[4] Water + Xylan -> Xylose Xylan 90.00\n", "[5] Water + Xylan -> XyloseOligomer Xylan 0.24\n", "[6] Xylan -> 2 Water + Furfural Xylan 0.50\n", "[7] Acetate -> AceticAcid Acetate 100.00\n", "[8] Lignin -> SolubleLignin Lignin 0.50\n" ] } ], "source": [ "pretreatment_parallel_rxn.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Notice how changing conversion of a ReactionItem object changes the conversion in the ParallelReaction object." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### References\n", "\n", "\n", "\n", "1. Humbird, D., Davis, R., Tao, L., Kinchin, C., Hsu, D., Aden, A., Dudgeon, D. (2011). Process Design and Economics for Biochemical Conversion of Lignocellulosic Biomass to Ethanol: Dilute-Acid Pretreatment and Enzymatic Hydrolysis of Corn Stover (No. NREL/TP-5100-47764, 1013269). https://doi.org/10.2172/1013269\n", "\n", "2. Hatakeyama, T., Nakamura, K., & Hatakeyama, H. (1982). Studies on heat capacity of cellulose and lignin by differential scanning calorimetry. Polymer, 23(12), 1801–1804. https://doi.org/10.1016/0032-3861(82)90125-2\n", "\n", "3. Thybring, E. E. (2014). Explaining the heat capacity of wood constituents by molecular vibrations. Journal of Materials Science, 49(3), 1317–1327. https://doi.org/10.1007/s10853-013-7815-6\n", "\n", "4. Murphy W. K., and K. R. Masters. (1978). Gross heat of combustion of northern red oak (Quercus rubra) chemical components. Wood Sci. 10:139-141." ] } ], "metadata": { "celltoolbar": "Tags", "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.16" } }, "nbformat": 4, "nbformat_minor": 2 }