Menu

DWSIM command line modus

Natalie
2020-01-08
2020-01-16
  • Natalie

    Natalie - 2020-01-08

    Dear Daniel,

    I have some questions related to the DWSIM command line modus:

    • Is there a way to start and calculate an existing DWSIM model (flowsheet) via the command line without having to open DWSIM manually?
    • And is it possible to call on and to run a DWSIM internal IronPython script that is embedded in DWSIM flowsheet via cmd without opening DWSIM manually?

    I found a command in the DWSIM source code to execute a flowsheet via the cmd; however, using this command (e.g.: DWSIM.exe -commandline -nosplash -input in.xml -output out.xml -simfile test.dwxmz), there are additional xml in- and outputfiles required. Does there exist another command to execute an existing DWSIM flowsheet including an internal IronPython skript and other linked DWSIM flowsheets using the cmd WITHOUT the additional in- and output files?

    Thank you and kind regards,

    Natalie

     
  • Daniel Medeiros

    Daniel Medeiros - 2020-01-08

    Hi Natalie,

    Please see https://web.archive.org/web/20170826230337/http://dwsim.inforside.com.br/wiki/index.php?title=Command_Line_Mode

    This hasn't been tested in years, so I don't know if it is still working as expected.

    Regarding the ironpython script, you can create a routine to extract the xml simulation file from the dwxmz file, then parse the xml structure to find the script.

    Regards
    Daniel

     
  • Natalie

    Natalie - 2020-01-13

    Dear Daniel,

    Thank you for the quick answering. Did I understand correctly, there is no other option to open and execute a DWSIM flowsheet via CMD than to use the XML in- and output files as argument for the DWSIM.exe?

    I think I expressed myself unclear, sorry for that. My intention was not to extract an ironpython script from a closed DWSIM model file. What I want to do is execute a DWSIM simulation that is internally initialized and controlled by an ironpython script. So I could avoid opening DWSIM GUI and run the script by clicking the "run-bottom" in the Script manager. Is this possible?

    Kind regards,
    Natalie

     
  • Nithya

    Nithya - 2020-01-16

    Dear Daniel,
    can you please test the command line mode of DWSIM in the latest version.

     
  • Nithya

    Nithya - 2020-01-16

    Dear Daniel,
    can you please test the command line mode of DWSIM in the latest version.

     
  • Daniel Medeiros

    Daniel Medeiros - 2020-01-16

    I strongly recommend using the automation interface. You can write the code in C#, VB or Python and then run it using free command line tools on Windows, Linux or macOS.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.