Menu

Python unit operation CAPE OPEN

sadki
2021-10-18
2021-10-18
  • sadki

    sadki - 2021-10-18

    Hi everyone,

    Actually i'a using a CAPE OPEN Python unit operation under DWSIM to develop an EDO models.I encountered a problem when I try this script : unit.add_parameter("Type d'alimentation", unit.ParameterType.STRING, unit.ParameterMode.INPUT, default="Fibre (Bore)", options=["Fibre (Bore)", "Calandre (Shell)"] )

    I think DWSIM does not support the STRING INPUTS

    Could you help me please

    Regards

     
  • Daniel Medeiros

    Daniel Medeiros - 2021-10-18

    Are you running a Python UO under the CAPE-OPEN block in DWSIM? Can you explain it to me a little more? Thanks

     
  • sadki

    sadki - 2021-10-18

    Hello Daniel,

    Yes exactly, i'm running Python unit operation under the CAPE-OPEN block in DWSIM.
    I need to specify some strings input variables and when i run the simulation i have an error/ exception as you can see below.
    Generally, i use Python UO under the CAPE-OPEN block in COCO and now i would like to run it in DWSIM.

    Regards

     
  • Daniel Medeiros

    Daniel Medeiros - 2021-10-18

    You could use the native Python Unit Operation from DWSIM, it would be much faster and easier for you...

     
  • Daniel Medeiros

    Daniel Medeiros - 2021-10-18

    DWSIM should support string variables, anyway...

     
  • sadki

    sadki - 2021-10-18

    I am more comfortable on Python Unit Operation under the CAPE-OPEN block and This avoids to rewrite and modify the code.

     
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.