diff --git a/docs/source/tutorials/12_Anaerobic_Digestion_Model_No_1.ipynb b/docs/source/tutorials/12_Anaerobic_Digestion_Model_No_1.ipynb index 548d7b99..4375a072 100644 --- a/docs/source/tutorials/12_Anaerobic_Digestion_Model_No_1.ipynb +++ b/docs/source/tutorials/12_Anaerobic_Digestion_Model_No_1.ipynb @@ -5,7 +5,7 @@ "id": "8d891055", "metadata": {}, "source": [ - "# Anaerobic Digestion Model No. 1 (ADM1)\n", + "# Anaerobic Digestion Model No. 1 (ADM1) \n", "\n", "- **Prepared by:**\n", " \n", diff --git a/docs/source/tutorials/Tutorial_11.ipynb b/docs/source/tutorials/Tutorial_11.ipynb deleted file mode 100644 index 723320dc..00000000 --- a/docs/source/tutorials/Tutorial_11.ipynb +++ /dev/null @@ -1,430 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "id": "9b7ba848", - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "This tutorial was made with qsdsan v1.2.5 and exposan v1.2.5\n" - ] - } - ], - "source": [ - "import qsdsan as qs, exposan\n", - "print(f'This tutorial was made with qsdsan v{qs.__version__} and exposan v{exposan.__version__}')" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "a31c8f69", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "System: bsm1_sys\n", - "ins...\n", - "[0] wastewater\n", - " phase: 'l', T: 293.15 K, P: 101325 Pa\n", - " flow (kmol/hr): S_I 23.1\n", - " S_S 53.4\n", - " X_I 39.4\n", - " X_S 155\n", - " X_BH 21.7\n", - " S_NH 1.34\n", - " S_ND 0.381\n", - " ... 4.26e+04\n", - "outs...\n", - "[0] effluent\n", - " phase: 'l', T: 293.15 K, P: 101325 Pa\n", - " flow: 0\n", - "[1] WAS\n", - " phase: 'l', T: 293.15 K, P: 101325 Pa\n", - " flow: 0\n" - ] - } - ], - "source": [ - "# Let's load the BSM1 system first\n", - "from exposan import bsm1\n", - "bsm1.load()\n", - "sys = bsm1.sys\n", - "sys.show()" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "5fe1776f", - "metadata": {}, - "outputs": [ - { - "data": { - "image/svg+xml": [ - "\n", - "\n", - "\n", - "\n", - "A1CSTR:c->A2CSTR:c\n", - "\n", - "\n", - "\n", - " ws1\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "A2CSTR:c->O1CSTR:c\n", - "\n", - "\n", - "\n", - " ws3\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "O1CSTR:c->O2CSTR:c\n", - "\n", - "\n", - "\n", - " ws5\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "O2CSTR:c->O3CSTR:c\n", - "\n", - "\n", - "\n", - " ws7\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "O3CSTR:c->A1CSTR:c\n", - "\n", - "\n", - "\n", - " RWW\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "O3CSTR:c->C1Flat bottom circular clarifier:c\n", - "\n", - "\n", - "\n", - " treated\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "C1Flat bottom circular clarifier:c->A1CSTR:c\n", - "\n", - "\n", - "\n", - " RAS\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "C1Flat bottom circular clarifier:c-> effluent:w\n", - "\n", - "\n", - " effluent\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "C1Flat bottom circular clarifier:c-> WAS:w\n", - "\n", - "\n", - " WAS\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " wastewater:e->A1CSTR:c\n", - "\n", - "\n", - " wastewater\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "A1CSTR\n", - "\n", - "\n", - "A1CSTR\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "A2CSTR\n", - "\n", - "\n", - "A2CSTR\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "O1CSTR\n", - "\n", - "\n", - "O1CSTR\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "O2CSTR\n", - "\n", - "\n", - "O2CSTR\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "O3CSTR\n", - "\n", - "\n", - "O3CSTR\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "C1Flat bottom circular clarifier\n", - "\n", - "\n", - "C1Flat bottom circular clarifier\n", - "\n", - "\n", - "\n", - "\n", - "\n", - " wastewater\n", - "\n", - "\n", - "\n", - "\n", - " effluent\n", - "\n", - "\n", - "\n", - "\n", - " WAS\n", - "\n", - "\n", - "\n", - "" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "# The BSM1 system is composed of 5 CSTRs in series,\n", - "# followed by a flat-bottom circular clarifier.\n", - "sys.diagram()\n", - "# sys.units" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "98d2662c", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# We can verify that by\n", - "sys.isdynamic" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "e2c64ce0", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{: True,\n", - " : True,\n", - " : True,\n", - " : True,\n", - " : True,\n", - " : True}" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# This is because the system contains at least one dynamic SanUnit\n", - "{u: u.isdynamic for u in sys.units}\n", - "\n", - "# If we disable dynamic simulation, then `simulate` would work as usual\n", - "# sys.isdynamic = False\n", - "# sys.simulate()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d8cc6e48", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "C:\\Users\\joy_c\\anaconda3\\envs\\tut\\lib\\site-packages\\qsdsan\\sanunits\\_suspended_growth_bioreactor.py:44: NumbaPerformanceWarning: \u001b[1m\u001b[1m'@' is faster on contiguous arrays, called on (array(float64, 1d, A), array(float64, 2d, A))\u001b[0m\u001b[0m\n", - " flow_in = Q_ins @ C_ins / V_arr\n", - "C:\\Users\\joy_c\\anaconda3\\envs\\tut\\lib\\site-packages\\numba\\core\\typing\\npydecl.py:913: NumbaPerformanceWarning: \u001b[1m'@' is faster on contiguous arrays, called on (array(float64, 1d, A), array(float64, 2d, A))\u001b[0m\n", - " warnings.warn(NumbaPerformanceWarning(msg))\n" - ] - } - ], - "source": [ - "# Let's try simulating the BSM1 system from day 0 to day 50\n", - "sys.simulate(t_span=(0, 50), method='BDF', state_reset_hook='reset_cache')\n", - "sys.show()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ba51c0b9", - "metadata": {}, - "outputs": [], - "source": [ - "# This shows the units/streams whose state variables are kept track of\n", - "# during dynamic simulations.\n", - "sys.scope.subjects" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "c4c0bdfd", - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "f1d690bf", - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "c05808bc", - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "37df12a9", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "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.13" - }, - "varInspector": { - "cols": { - "lenName": 16, - "lenType": 16, - "lenVar": 40 - }, - "kernels_config": { - "python": { - "delete_cmd_postfix": "", - "delete_cmd_prefix": "del ", - "library": "var_list.py", - "varRefreshCmd": "print(var_dic_list())" - }, - "r": { - "delete_cmd_postfix": ") ", - "delete_cmd_prefix": "rm(", - "library": "var_list.r", - "varRefreshCmd": "cat(var_dic_list()) " - } - }, - "types_to_exclude": [ - "module", - "function", - "builtin_function_or_method", - "instance", - "_Feature" - ], - "window_display": false - } - }, - "nbformat": 4, - "nbformat_minor": 5 -}