Menu

DWSIM IronPython documentation not available?

2025-02-19
2025-03-05
  • Patrick Zieverink

    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!

     
  • enjenir

    enjenir - 2025-03-03

    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).

     
  • Patrick Zieverink

    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!