First of all, great work! I love that I have been able to learn myself some process engineering. However... I want to learn how to use the custom model: Python Script. But I cannot find any documentation, besides some examples/ code snippets. How do I discover what functions are available and what they require and do? I am okay at programming, but I always start by looking at documentation, which is hard if I cannot find it. If you could help me, that would be amazing!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Depends. Do you want to use IronPython or Python.NET? In either case, most of the functions you'll be calling are C#/.NET, with the documentation available here - DWSIM implementation allows to call these functions from Python (e.g. you can get a FlowsheetSimulationObject with x = Flowsheet.GetFlowsheetSimulationObject("Object Name") and then run "x.GetOverallComposition()" or similar).
You're looking in the wrong place probably, you're not looking for Python documentation but .NET documentation (which I've linked above).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the reply! I did find that documentation, however it tell me nothing about the options of what I can enter. For example I find MaterialStream.DefinedFlow property. How do I use it and what are the parameters I need? Is an interger needed, do I need a materialstream to begin with? Is there a way that explains to me how I should read these docs or is there something else I am forgetting?
Many thanks for the help so far!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
First of all, great work! I love that I have been able to learn myself some process engineering. However... I want to learn how to use the custom model: Python Script. But I cannot find any documentation, besides some examples/ code snippets. How do I discover what functions are available and what they require and do? I am okay at programming, but I always start by looking at documentation, which is hard if I cannot find it. If you could help me, that would be amazing!
Depends. Do you want to use IronPython or Python.NET? In either case, most of the functions you'll be calling are C#/.NET, with the documentation available here - DWSIM implementation allows to call these functions from Python (e.g. you can get a FlowsheetSimulationObject with x = Flowsheet.GetFlowsheetSimulationObject("Object Name") and then run "x.GetOverallComposition()" or similar).
You're looking in the wrong place probably, you're not looking for Python documentation but .NET documentation (which I've linked above).
Thanks for the reply! I did find that documentation, however it tell me nothing about the options of what I can enter. For example I find MaterialStream.DefinedFlow property. How do I use it and what are the parameters I need? Is an interger needed, do I need a materialstream to begin with? Is there a way that explains to me how I should read these docs or is there something else I am forgetting?
Many thanks for the help so far!