Coder Social home page Coder Social logo

omchemsim's Introduction

Documentation Status

OMChemSim: OpenModelica Chemical Simulator

The OMChemSim or OpenModelica Chemical Simulator is library of chemical system component models written in the Modelica language that can be used for chemical process simulations, such as creating binary phase envelopes, simulating a process plant flowsheet.

OMChemSim is currently developed and maintained by Prof. Kannan M Moudgalya's research group FOSSEE at Indian Institute of Technology Bombay.

omchemsim's People

Contributors

gjjayaram23 avatar mehul009 avatar nayakpriyam avatar pravindalve avatar rahulnagraj444 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

omchemsim's Issues

Warning of example model

I have tested the Meth_Wat_Distillation_Seq example, I simulate the Flowsheet_two file(I am not sure whether it's right to run the example by simulating this file).
I get a warning message as shown below, I do not know whether this is normal or bug.

[1] 12:12:33 翻译 警告
[Simulator.Files.Connection: 4:3-9:14]: Connector .Simulator.Files.Connection.matConn$Cooler$inlet is not balanced: The number of potential variables (12) is not equal to the number of flow variables (0).

[2] 12:12:33 翻译 警告
[Simulator.Files.Connection: 4:3-9:14]: Connector .Simulator.Files.Connection.matConn$Cooler$outlet is not balanced: The number of potential variables (12) is not equal to the number of flow variables (0)

I also get the output as shown below.

C:/Users/Lanlan/AppData/Local/Temp/OpenModelica/OMEdit/Meth_Wat_Distillation_Seq.Flowsheet_Two/Meth_Wat_Distillation_Seq.Flowsheet_Two.exe -port=51750 -logFormat=xmltcp -override=startTime=0,stopTime=1,stepSize=0.002,tolerance=1e-6,solver=dassl,outputFormat=mat,variableFilter=.* -r=C:/Users/Lanlan/AppData/Local/Temp/OpenModelica/OMEdit/Meth_Wat_Distillation_Seq.Flowsheet_Two/Meth_Wat_Distillation_Seq.Flowsheet_Two_res.mat -w -lv=LOG_STATS -inputPath=C:/Users/Lanlan/AppData/Local/Temp/OpenModelica/OMEdit/Meth_Wat_Distillation_Seq.Flowsheet_Two -outputPath=C:/Users/Lanlan/AppData/Local/Temp/OpenModelica/OMEdit/Meth_Wat_Distillation_Seq.Flowsheet_Two
Matrix singular!
under-determined linear system not solvable!
Matrix singular!
under-determined linear system not solvable!
Matrix singular!
under-determined linear system not solvable!
Matrix singular!
under-determined linear system not solvable!
Matrix singular!
under-determined linear system not solvable!
Matrix singular!
under-determined linear system not solvable!
Matrix singular!
under-determined linear system not solvable!
The following assertion has been violated at time 0.000000<br>
DC.condensor.inVapCompMolFrac[1] &gt;= 0.0 and DC.condensor.inVapCompMolFrac[1] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.condensor.inVapCompMolFrac[1] &lt;= 0.0, has value: 0.901246
The following assertion has been violated at time 0.000000<br>
DC.condensor.inVapCompMolFrac[2] &gt;= 0.0 and DC.condensor.inVapCompMolFrac[2] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.condensor.inVapCompMolFrac[2] &lt;= 0.0, has value: 0.0987544
The following assertion has been violated at time 0.000000<br>
DC.reboiler.inLiqCompMolFrac[1] &gt;= 0.0 and DC.reboiler.inLiqCompMolFrac[1] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.reboiler.inLiqCompMolFrac[1] &lt;= 0.0, has value: 0.0439381
The following assertion has been violated at time 0.000000<br>
DC.reboiler.inLiqCompMolFrac[2] &gt;= 0.0 and DC.reboiler.inLiqCompMolFrac[2] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.reboiler.inLiqCompMolFrac[2] &lt;= 0.0, has value: 0.956062
The following assertion has been violated at time 0.000000<br>
DC.tray[1].vapCompMolFrac[1,1] &gt;= 0.0 and DC.tray[1].vapCompMolFrac[1,1] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[1].vapCompMolFrac[1,1] &lt;= 0.0, has value: 0.766704
The following assertion has been violated at time 0.000000<br>
DC.tray[1].vapCompMolFrac[1,2] &gt;= 0.0 and DC.tray[1].vapCompMolFrac[1,2] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[1].vapCompMolFrac[1,2] &lt;= 0.0, has value: 0.233296
The following assertion has been violated at time 0.000000<br>
DC.tray[1].liqCompMolFrac[2,1] &gt;= 0.0 and DC.tray[1].liqCompMolFrac[2,1] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[1].liqCompMolFrac[2,1] &lt;= 0.0, has value: 0.696868
The following assertion has been violated at time 0.000000<br>
DC.tray[1].liqCompMolFrac[2,2] &gt;= 0.0 and DC.tray[1].liqCompMolFrac[2,2] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[1].liqCompMolFrac[2,2] &lt;= 0.0, has value: 0.303132
The following assertion has been violated at time 0.000000<br>
DC.tray[1].compMolFrac[1,1] &gt;= 0.0 and DC.tray[1].compMolFrac[1,1] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[1].compMolFrac[1,1] &lt;= 0.0, has value: 0.821323
The following assertion has been violated at time 0.000000<br>
DC.tray[1].compMolFrac[1,2] &gt;= 0.0 and DC.tray[1].compMolFrac[1,2] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[1].compMolFrac[1,2] &lt;= 0.0, has value: 0.178677
The following assertion has been violated at time 0.000000<br>
DC.tray[2].vapCompMolFrac[1,1] &gt;= 0.0 and DC.tray[2].vapCompMolFrac[1,1] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[2].vapCompMolFrac[1,1] &lt;= 0.0, has value: 0.615354
The following assertion has been violated at time 0.000000<br>
DC.tray[2].vapCompMolFrac[1,2] &gt;= 0.0 and DC.tray[2].vapCompMolFrac[1,2] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[2].vapCompMolFrac[1,2] &lt;= 0.0, has value: 0.384646
The following assertion has been violated at time 0.000000<br>
DC.tray[2].liqCompMolFrac[2,1] &gt;= 0.0 and DC.tray[2].liqCompMolFrac[2,1] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[2].liqCompMolFrac[2,1] &lt;= 0.0, has value: 0.461497
The following assertion has been violated at time 0.000000<br>
DC.tray[2].liqCompMolFrac[2,2] &gt;= 0.0 and DC.tray[2].liqCompMolFrac[2,2] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[2].liqCompMolFrac[2,2] &lt;= 0.0, has value: 0.538503
The following assertion has been violated at time 0.000000<br>
DC.tray[2].compMolFrac[1,1] &gt;= 0.0 and DC.tray[2].compMolFrac[1,1] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[2].compMolFrac[1,1] &lt;= 0.0, has value: 0.648175
The following assertion has been violated at time 0.000000<br>
DC.tray[2].compMolFrac[1,2] &gt;= 0.0 and DC.tray[2].compMolFrac[1,2] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[2].compMolFrac[1,2] &lt;= 0.0, has value: 0.351825
The following assertion has been violated at time 0.000000<br>
DC.tray[3].vapCompMolFrac[1,1] &gt;= 0.0 and DC.tray[3].vapCompMolFrac[1,1] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[3].vapCompMolFrac[1,1] &lt;= 0.0, has value: 0.450633
The following assertion has been violated at time 0.000000<br>
DC.tray[3].vapCompMolFrac[1,2] &gt;= 0.0 and DC.tray[3].vapCompMolFrac[1,2] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[3].vapCompMolFrac[1,2] &lt;= 0.0, has value: 0.549367
The following assertion has been violated at time 0.000000<br>
DC.tray[3].liqCompMolFrac[2,1] &gt;= 0.0 and DC.tray[3].liqCompMolFrac[2,1] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[3].liqCompMolFrac[2,1] &lt;= 0.0, has value: 0.300382
The following assertion has been violated at time 0.000000<br>
DC.tray[3].liqCompMolFrac[2,2] &gt;= 0.0 and DC.tray[3].liqCompMolFrac[2,2] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[3].liqCompMolFrac[2,2] &lt;= 0.0, has value: 0.699618
The following assertion has been violated at time 0.000000<br>
DC.tray[3].compMolFrac[1,1] &gt;= 0.0 and DC.tray[3].compMolFrac[1,1] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[3].compMolFrac[1,1] &lt;= 0.0, has value: 0.421811
The following assertion has been violated at time 0.000000<br>
DC.tray[3].compMolFrac[1,2] &gt;= 0.0 and DC.tray[3].compMolFrac[1,2] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[3].compMolFrac[1,2] &lt;= 0.0, has value: 0.578189
The following assertion has been violated at time 0.000000<br>
DC.tray[4].vapCompMolFrac[1,1] &gt;= 0.0 and DC.tray[4].vapCompMolFrac[1,1] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[4].vapCompMolFrac[1,1] &lt;= 0.0, has value: 0.274277
The following assertion has been violated at time 0.000000<br>
DC.tray[4].vapCompMolFrac[1,2] &gt;= 0.0 and DC.tray[4].vapCompMolFrac[1,2] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[4].vapCompMolFrac[1,2] &lt;= 0.0, has value: 0.725723
The following assertion has been violated at time 0.000000<br>
DC.tray[4].liqCompMolFrac[2,1] &gt;= 0.0 and DC.tray[4].liqCompMolFrac[2,1] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[4].liqCompMolFrac[2,1] &lt;= 0.0, has value: 0.184049
The following assertion has been violated at time 0.000000<br>
DC.tray[4].liqCompMolFrac[2,2] &gt;= 0.0 and DC.tray[4].liqCompMolFrac[2,2] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[4].liqCompMolFrac[2,2] &lt;= 0.0, has value: 0.815951
The following assertion has been violated at time 0.000000<br>
DC.tray[4].compMolFrac[1,1] &gt;= 0.0 and DC.tray[4].compMolFrac[1,1] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[4].compMolFrac[1,1] &lt;= 0.0, has value: 0.290192
The following assertion has been violated at time 0.000000<br>
DC.tray[4].compMolFrac[1,2] &gt;= 0.0 and DC.tray[4].compMolFrac[1,2] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[4].compMolFrac[1,2] &lt;= 0.0, has value: 0.709808
The following assertion has been violated at time 0.000000<br>
DC.tray[5].vapCompMolFrac[1,1] &gt;= 0.0 and DC.tray[5].vapCompMolFrac[1,1] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[5].vapCompMolFrac[1,1] &lt;= 0.0, has value: 0.138998
The following assertion has been violated at time 0.000000<br>
DC.tray[5].vapCompMolFrac[1,2] &gt;= 0.0 and DC.tray[5].vapCompMolFrac[1,2] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[5].vapCompMolFrac[1,2] &lt;= 0.0, has value: 0.861002
The following assertion has been violated at time 0.000000<br>
DC.tray[5].liqCompMolFrac[2,1] &gt;= 0.0 and DC.tray[5].liqCompMolFrac[2,1] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[5].liqCompMolFrac[2,1] &lt;= 0.0, has value: 0.0959473
The following assertion has been violated at time 0.000000<br>
DC.tray[5].liqCompMolFrac[2,2] &gt;= 0.0 and DC.tray[5].liqCompMolFrac[2,2] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[5].liqCompMolFrac[2,2] &lt;= 0.0, has value: 0.904053
The following assertion has been violated at time 0.000000<br>
DC.tray[5].compMolFrac[1,1] &gt;= 0.0 and DC.tray[5].compMolFrac[1,1] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[5].compMolFrac[1,1] &lt;= 0.0, has value: 0.166465
The following assertion has been violated at time 0.000000<br>
DC.tray[5].compMolFrac[1,2] &gt;= 0.0 and DC.tray[5].compMolFrac[1,2] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[5].compMolFrac[1,2] &lt;= 0.0, has value: 0.833535
The following assertion has been violated at time 0.000000<br>
DC.tray[6].compMolFrac[1,1] &gt;= 0.0 and DC.tray[6].compMolFrac[1,1] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[6].compMolFrac[1,1] &lt;= 0.0, has value: 0.0813322
The following assertion has been violated at time 0.000000<br>
DC.tray[6].compMolFrac[1,2] &gt;= 0.0 and DC.tray[6].compMolFrac[1,2] &lt;= 0.0
Variable violating min/max constraint: 0.0 &lt;= DC.tray[6].compMolFrac[1,2] &lt;= 0.0, has value: 0.918668
The following assertion has been violated at time 0.000000<br>
Distillate.liqPhasMasFrac &gt;= 0.0 and Distillate.liqPhasMasFrac &lt;= 1.0
Variable violating min/max constraint: 0.0 &lt;= Distillate.liqPhasMasFrac &lt;= 1.0, has value: 1
The following assertion has been violated at time 0.000000<br>
Bottoms.liqPhasMasFrac &gt;= 0.0 and Bottoms.liqPhasMasFrac &lt;= 1.0
Variable violating min/max constraint: 0.0 &lt;= Bottoms.liqPhasMasFrac &lt;= 1.0, has value: 1
The following assertion has been violated at time 0.000000<br>
Outlet.liqPhasMasFrac &gt;= 0.0 and Outlet.liqPhasMasFrac &lt;= 1.0
Variable violating min/max constraint: 0.0 &lt;= Outlet.liqPhasMasFrac &lt;= 1.0, has value: 1
The initialization finished successfully without homotopy method.
### STATISTICS ###
**The simulation finished successfully**.

Dynamics

  • Step & Ramp change are added in the Material stream for Process Variables (Flow rate and
    Temperature).
  • Mixer and Flash Models are completed. The results are validated by Performing Material & Energy
    Balance at every time instant.
  • Working on Modelling and Validation of Distillation Column.

Problems installing OMChemSim

Thanks for this package. tl;dr: Can you provide instructions for how to install the package?

** Longer version**
I received several errors when trying to run any of the examples related to imports.

First, OpenModellica does like global imports (e.g., Simulator.Files.ThermodynamicFunctions.*) and throws up errors like the following:

[5] 22:17:07 Translation Error
[Simulator.Files.ThermodynamicPackages.RaoultsLaw: 4:5-4:53]: Import Simulator.Files.Thermodynamic_Functions not found in scope <top>.

[1] 22:17:10 Translation Error
[Simulator.Files.ThermodynamicPackages.RaoultsLaw: 4:5-4:53]: Import Simulator.Files.Thermodynamic_Functions not found in scope <top>.

I converted some of the global imports to direct imports as suggested here, but I continue to find more problems.

Design of Packed Bed Absorption Column

  • Will consist of an exhaustive preliminary design of an absorption column based on first principles of mass transfer.
  • The packing type will be subjected to availability and modelling constraints.
  • Experimental results may be considered for validation

Taking input for variable Base Component twice while simulating PFR

While simulating the PFR example, It is noticed that the user has to give input for variable Base Component twice (once for Base_C and again for BC_r[Nr]).

The variable which is used to define "Base Component" in a reaction is defined twice: once in the kinetic reaction model (BC_r[Nr]) and once in the PFR model (Base_C). Also, the variable is declared once as an array(BC_r[Nr]) and again as an integer(Base_C). Since both these variables are used in the code, therefore they cannot be removed arbitrarily.

This leads to taking input from the user twice in two different forms for the same variable, which represents the base component. This conflict needs to be addressed.

image

Adding documentation for OMChemSim library

  • Adding documentation for models using Documentation View in OMChemSim library
  • Adding rst files to generate documentation in readthedocs.io using python-sphinx - Deferred to v1.1

Missing Property Data

Hello,

I'm trying to simulate an air liquefaction process using OMChemSim. During some preliminary tests I realized there is no Joule-Thomson effect observable when performing an isenthalpic expansion of the components "Air" or a mixture of "Nitrogen" and "Oxygen". (The expansion was performed using two material streams and the "valve" unit operation)

Since the effect can be observed using different components from the property databank, I assume my issue arises from missing property data for the before mentioned components. When I looked up the property data for "Air", "Nitrogen" and "Oxygen" I realized there are several parameters that have the value 0 assigned to them. To fix my issue I want to look up the corresponding property data but I can't figure out what the abbreviations in the "General_Properties" model stand for.

In explicit I'm looking for the meanig of the abbreviations "DM", "SH", "IGHF" and "GEF". If there is some general documentation for the abbreviations in the "General_Properties" model I would be very thankful for a hint on where to find it.

Thank you in advance and kind regards

Flash Column outside VLE range issue

In the existing flash model, if either temperature or pressure is given out of VLE range, the model was throwing error. Also, energy balance may be added, similar to that of DWSIM flash model

Generation of Guess Values for existing models

-Mapping of an external model consisting of equations used to generate start values for existing models of the simulator package

  • Implementation of initial equation approach to call the values from one model to another.

Addition of Batch Reactor

This issue is opened to track the progress of the addition of a batch reactor model in the OMChemSim library.

Addition of Orifice Plate Model

This issue is opened to track the progress of the addition of a steady-state orifice plate model in the OMChemSim library. The model was created by Aditi Jain during the FOSSEE Summer Fellowship which is compatible with Simulator-v0.9. However, the pull request for the model will be sent after making it compatible with the latest changes made in the library.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.