Menu

Python Script Snippets: Inset Snippet from Toolbar

Mohammad
2021-08-29
2021-08-31
  • Mohammad

    Mohammad - 2021-08-29

    DWSIM provides the nice tool "Insert Snippet" which is smart and makes life pretty easy when you develop custom user model or do any kind of automation!

    For example to get vapor phase kinetic viscosity one can simply insert the below snippet

    # Get Stream Phase Property: kinematic_viscosity
    
    obj = Flowsheet.GetFlowsheetSimulationObject('MSTR-02')
    value = obj.GetPhase('Vapor').Properties.kinematic_viscosity
    
    print value
    

    Questions:

    1. Is always the unit of these values SI?
    2. What if we want to get these values in other system of units?
     
  • Mohammad

    Mohammad - 2021-08-31

    Thank you Daniel!

     
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.