{"id":25457854,"url":"https://github.com/sinagilassi/pyremot","last_synced_at":"2025-07-14T01:16:36.513Z","repository":{"id":45444708,"uuid":"372955811","full_name":"sinagilassi/PyREMOT","owner":"sinagilassi","description":"Python Reactor Modeling Tools ","archived":false,"fork":false,"pushed_at":"2024-03-30T05:43:44.000Z","size":1049,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-18T02:19:10.063Z","etag":null,"topics":["chemical-engineering","packed-bed-reactor","parameter-estimation","process-simulation","reaction-enginnering"],"latest_commit_sha":null,"homepage":"https://pyremot.herokuapp.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sinagilassi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-01T20:38:54.000Z","updated_at":"2024-08-27T14:58:13.000Z","dependencies_parsed_at":"2022-09-19T10:50:35.881Z","dependency_job_id":null,"html_url":"https://github.com/sinagilassi/PyREMOT","commit_stats":null,"previous_names":["sinagilassi/pyremot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sinagilassi/PyREMOT","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinagilassi%2FPyREMOT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinagilassi%2FPyREMOT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinagilassi%2FPyREMOT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinagilassi%2FPyREMOT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinagilassi","download_url":"https://codeload.github.com/sinagilassi/PyREMOT/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinagilassi%2FPyREMOT/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265228987,"owners_count":23731092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chemical-engineering","packed-bed-reactor","parameter-estimation","process-simulation","reaction-enginnering"],"created_at":"2025-02-18T02:19:19.435Z","updated_at":"2025-07-14T01:16:36.478Z","avatar_url":"https://github.com/sinagilassi.png","language":"Python","readme":"# Python Reactor Modeling Tools\n\n![PyPI - License](https://img.shields.io/pypi/l/PyREMOT) ![PyPI - Downloads](https://img.shields.io/pypi/dm/PyREMOT) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1a1TUPt_9H-l77yfuBVv1CXoA3uI4j1Rt?usp=sharing) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1UN5nhSigfIZ95gYHU5hThCagL2iXcpdk?usp=sharing)\n\nPython Reactor Modeling Tools (PyREMOT) is an open-source package which can be used for process simulation, optimization, and parameter estimation. The current version consists of homogeneous models for steady-state and dynamic conditions.\n\nYou can visit [dashboard](https://pyremot.herokuapp.com/) to build model input and load examples!\n\nYou can also run your modeling on Google Colaboratory. \n\n1- [Steady-state pseudo-homogeneous model](https://colab.research.google.com/drive/1a1TUPt_9H-l77yfuBVv1CXoA3uI4j1Rt?usp=sharing)\n\n2- [Dynamic pseudo-homogeneous model](https://colab.research.google.com/drive/1UN5nhSigfIZ95gYHU5hThCagL2iXcpdk?usp=sharing)\n\n## Getting started\n\nYou can install this package\n\n```bash\n  pip install PyREMOT\n```\n\n## Documentation\n\nThe main method is called as:\n\n```python\n    from PyREMOT import rmtExe\n\n    # model inputs\n    # using dashboard to build model inputs\n    modelInput = {...}\n\n    # run\n    res = rmtExe(modelInput)\n```\n\nCheck component list available in the current version:\n\n```python\n    from PyREMOT import rmtCom\n\n    # display component list\n    res = rmtCom()\n    print(res)\n\n```\n\nPyREMOT UI dashboard contains some panels as:\n\n1- MODEL SELECTION\n\n2- COMPONENTS\n\n    H2;CO2;H2O;CO;CH3OH;DME\n\nthis code is automatically converted to python as:\n\n```python\n  compList = [\"H2\",\"CO2\",\"H2O\",\"CO\",\"CH3OH\",\"DME\"]\n```\n\n3- REACTIONS\n\ndefine reactions as:\n\n**_ Add ; in the end of each line _**\n\n    CO2 + 3H2 \u003c=\u003e CH3OH + H2O;\n    CO + H2O \u003c=\u003e H2 + CO2;\n    2CH3OH \u003c=\u003e DME + H2O\n\nthen:\n\n```python\n    reactionSet = {\n    \"R1\":\"CO2+3H2\u003c=\u003eCH3OH+H2O\",\n    \"R2\":\"CO+H2O\u003c=\u003eH2+CO2\",\n    \"R3\":\"2CH3OH\u003c=\u003eDME+H2O\"\n    }\n```\n\nIn order to define reaction rate expressions, there are two code sections as\n\n**_ Add ; in the end of each line _**\n\na) define parameters:\n\n    \"CaBeDe\" : CaBeDe;\n    \"RT\": x['R_CONST']*x['T'];\n    \"K1\": 35.45*math.exp(-1.7069e4/x['RT']);\n    \"K2\": 7.3976*math.exp(-2.0436e4/x['RT']);\n    \"K3\": 8.2894e4*math.exp(-5.2940e4/x['RT']);\n    \"KH2\": 0.249*math.exp(3.4394e4/x['RT']);\n    \"KCO2\": 1.02e-7*math.exp(6.74e4/x['RT']);\n    \"KCO\": 7.99e-7*math.exp(5.81e4/x['RT']);\n    \"Ln_KP1\": 4213/x['T'] - 5.752 * math.log(x['T']) - 1.707e-3*x['T'] + 2.682e-6 * (math.pow(x['T'], 2)) - 7.232e-10*(math.pow(x['T'], 3)) + 17.6;\n    \"KP1\": math.exp(x['Ln_KP1']);\n    \"log_KP2\": 2167/x['T'] - 0.5194 * math.log10(x['T']) + 1.037e-3*x['T'] - 2.331e-7 * (math.pow(x['T'], 2)) - 1.2777;\n    \"KP2\": math.pow(10, x['log_KP2']);\n    \"Ln*KP3\": 4019/x['T'] + 3.707 * math.log(x['T']) - 2.783e-3*x['T'] + 3.8e-7 * (math.pow(x['T'], 2)) - 6.56e-4/(math.pow(x['T'], 3)) - 26.64;\n    \"KP3\": math.exp(x['Ln_KP3']);\n    \"yi*H2\": x['MoFri'][0];\n    \"yi_CO2\": x['MoFri'][1];\n    \"yi_H2O\": x['MoFri'][2];\n    \"yi_CO\": x['MoFri'][3];\n    \"yi_CH3OH\": x['MoFri'][4];\n    \"yi_DME\": x['MoFri'][5];\n    \"PH2\": x['P']*(x['yi_H2'])_1e-5;\n    \"PCO2\": x['P']_(x['yi_CO2'])_1e-5;\n    \"PH2O\": x['P']_(x['yi_H2O'])_1e-5;\n    \"PCO\": x['P']_(x['yi_CO'])_1e-5;\n    \"PCH3OH\": x['P']_(x['yi_CH3OH'])_1e-5;\n    \"PCH3OCH3\": x['P']_(x['yi_DME'])*1e-5;\n    \"ra1\": x['PCO2']*x['PH2'];\n    \"ra2\": 1 + (x['KCO2']*x['PCO2']) + (x['KCO']*x['PCO']) + math.sqrt(x['KH2']_x['PH2']);\n    \"ra3\": (1/x['KP1'])_((x['PH2O']_x['PCH3OH'])/(x['PCO2']_(math.pow(x['PH2'], 3))));\n    \"ra4\": x['PH2O'] - (1/x['KP2'])*((x['PCO2']*x['PH2'])/x['PCO']);\n    \"ra5\": (math.pow(x['PCH3OH'], 2)/x['PH2O'])-(x['PCH3OCH3']/x['KP3'])\n\nthen converted:\n\n```python\n   varis0 = {\n   \"CaBeDe\" : CaBeDe,\n   \"RT\": lambda x: x['R_CONST']*x['T'],\n   \"K1\": lambda x: 35.45*math.exp(-1.7069e4/x['RT']),\n   \"K2\": lambda x: 7.3976*math.exp(-2.0436e4/x['RT']),\n   \"K3\": lambda x: 8.2894e4*math.exp(-5.2940e4/x['RT']),\n   \"KH2\": lambda x: 0.249*math.exp(3.4394e4/x['RT']),\n   \"KCO2\": lambda x: 1.02e-7*math.exp(6.74e4/x['RT']),\n   \"KCO\": lambda x: 7.99e-7*math.exp(5.81e4/x['RT']),\n   \"Ln_KP1\": lambda x: 4213/x['T'] - 5.752 *     math.log(x['T']) - 1.707e-3*x['T'] + 2.682e-6 *     (math.pow(x['T'], 2)) - 7.232e-10*(math.pow(x['T'], 3)) + 17.6,\n   \"KP1\": lambda x: math.exp(x['Ln_KP1']),\n   \"log_KP2\": lambda x: 2167/x['T'] - 0.5194 *     math.log10(x['T']) + 1.037e-3*x['T'] - 2.331e-7 *     (math.pow(x['T'], 2)) - 1.2777,\n   \"KP2\": lambda x: math.pow(10, x['log_KP2']),\n       \"Ln_KP3\": lambda x:  4019/x['T'] + 3.707 *     math.log(x['T']) - 2.783e-3*x['T'] + 3.8e-7 *     (math.pow(x['T'], 2)) - 6.56e-4/(math.pow(x['T'], 3)) - 26.64,\n   \"KP3\": lambda x:  math.exp(x['Ln_KP3']),\n   \"yi_H2\": lambda x:  x['MoFri'][0],\n   \"yi_CO2\": lambda x:  x['MoFri'][1],\n   \"yi_H2O\": lambda x:  x['MoFri'][2],\n   \"yi_CO\": lambda x:  x['MoFri'][3],\n   \"yi_CH3OH\": lambda x:  x['MoFri'][4],\n   \"yi_DME\": lambda x:  x['MoFri'][5],\n   \"PH2\": lambda x:  x['P']*(x['yi_H2'])*1e-5,\n   \"PCO2\": lambda x:  x['P']*(x['yi_CO2'])*1e-5,\n   \"PH2O\": lambda x:  x['P']*(x['yi_H2O'])*1e-5,\n   \"PCO\": lambda x: x['P']*(x['yi_CO'])*1e-5,\n   \"PCH3OH\": lambda x:  x['P']*(x['yi_CH3OH'])*1e-5,\n   \"PCH3OCH3\": lambda x:  x['P']*(x['yi_DME'])*1e-5,\n   \"ra1\": lambda x:  x['PCO2']*x['PH2'],\n   \"ra2\": lambda x:  1 + (x['KCO2']*x['PCO2']) + (x['KCO']*x['PCO']) + math.sqrt(x['KH2']*x['PH2']),\n   \"ra3\": lambda x: (1/x['KP1'])*((x['PH2O']*x['PCH3OH'])/(x['PCO2']*(math.pow(x['PH2'], 3)))),\n   \"ra4\": lambda x:  x['PH2O'] - (1/x['KP2'])*((x['PCO2']*x['PH2'])/x['PCO']),\n   \"ra5\": lambda x: (math.pow(x['PCH3OH'], 2)/x['PH2O'])-(x['PCH3OCH3']/x['KP3'])\n   }\n```\n\nb) define the final form of reaction rate expressions:\n\n    \"r1\": 1000*x['K1']*(x['ra1']/(math.pow(x['ra2'], 3)))*(1-x['ra3'])*x['CaBeDe'];\n    \"r2\": 1000*x['K2']*(1/x['ra2'])*x['ra4']*x['CaBeDe'];\n    \"r3\": 1000*x['K3']*x['ra5']*x['CaBeDe']\n\nthen converted:\n\n```python\n   rates0 = {\n   \"r1\": lambda x: 1000*x['K1']*(x['ra1']/(math.pow(x['ra2'], 3)))*(1-x['ra3'])*x['CaBeDe'],\n   \"r2\": lambda x: 1000*x['K2']*(1/x['ra2'])*x['ra4']*x['CaBeDe'],\n   \"r3\": lambda x: 1000*x['K3']*x['ra5']*x['CaBeDe']\n   }\n```\n\n4- PROPERTIES\n\nfeed properties:\n\n```python\n   # species-concentration [mol/m^3]\n   SpCoi = [574.8978, 287.4489, 1.15e-02, 287.4489, 1.15e-02, 1.15e-02]\n   # flowrate @ P \u0026 T [m^3/s]\n   VoFlRa = 0.000228\n   # pressure [Pa]\n   P = 5000000\n   # temperature [K]\n   T = 523\n   # process-type [-]\n   PrTy = \"non-iso-thermal\"\n```\n\n5- REACTOR\n\nreactor and catalyst characteristics:\n\n```python\n   # reactor-length [m]\n   ReLe = 1\n   # reactor-inner-diameter [m]\n   ReInDi = 0.0381\n   # bed-void-fraction [-]\n   BeVoFr = 0.39\n   # catalyst bed density [kg/m^3]\n   CaBeDe = 1171.2\n   # particle-diameter [m]\n   PaDi = 0.002\n   # particle-density [kg/m^3]\n   CaDe = 1920\n   # particle-specific-heat-capacity  [J/kg.K]\n   CaSpHeCa = 960\n```\n\n6- HEAT-EXCHANGER\n\n```python\n    # overall-heat-transfer-coefficient [J/m^2.s.K]\n    U = 50\n    # medium-temperature [K]\n    Tm = 523\n```\n\n7- SOLVER\n\n```python\n    # ode-solver [-]\n    ivp = \"default\"\n    # display-result [-]\n    diRe = \"True\"\n```\n\nAfter setting all modules, you can find 'model input' in python format in the summary panel. Then, copy the content of this file in your python framework and run it!\n\nYou can also find an example on PyREMOT dashboard, load it and then have a look at the summary panel.\n\n## Run\n\nAs the downloaded python file contains modelInput variable, you can directly run the model as:\n\n```python\n    # model input\n    modelInput = {...}\n    # start modeling\n    res = rmtExe(modelInput)\n```\n\n## Result Format\n\nFor steady-state cases, the modeling result is stored in an array named dataPack:\n\n```python\n    # res\n    dataPack = []\n    dataPack.append({\n        \"modelId\": modelId,\n        \"processType\": processType,\n        \"successStatus\": successStatus,\n        \"computation-time\": elapsed,\n        \"dataShape\": dataShape,\n        \"labelList\": labelList,\n        \"indexList\": indexList,\n        \"dataTime\": [],\n        \"dataXs\": dataXs,\n        \"dataYCons1\": dataYs_Concentration_DiLeVa,\n        \"dataYCons2\": dataYs_Concentration_ReVa,\n        \"dataYTemp1\": dataYs_Temperature_DiLeVa,\n        \"dataYTemp2\": dataYs_Temperature_ReVa,\n        \"dataYs\": dataYs_All\n    })\n```\n\nAnd for dynamic cases,\n\n```python\n    # res\n    resPack = {\n        \"computation-time\": elapsed,\n        \"dataPack\": dataPack\n    }\n```\n\nConcentration results:\n\n    dataYCons1: dimensionless concentration\n\n    dataYCons2: concentration [mol/m^3.s]\n\nTemperature results:\n\n    dataYTemp1: dimensionless temperature\n\n    dataYTemp2: Temperature [K]\n\nAll modeling results is also saved in dataYs.\n\n## FAQ\n\nFor any question, you can contact me on [LinkedIn](https://www.linkedin.com/in/sina-gilassi/) or [Twitter](https://twitter.com/sinagilassi).\n\n## Authors\n\n- [@sinagilassi](https://www.github.com/sinagilassi)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinagilassi%2Fpyremot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinagilassi%2Fpyremot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinagilassi%2Fpyremot/lists"}