Menu

SetOverallComposition

DavidB
2021-06-22
2022-01-25
  • DavidB

    DavidB - 2021-06-22

    Hello, in the Iron Python example about setting ms outlet properties, the outlet composition setting is coded as follows:
    comp = feed.GetOverallComposition()
    outflow.SetOverallComposition(comp) # where comp is the inlet ms composition

    How can I set my own composition? I tried:
    myComp = Array[float] ((1,0,0))
    outflow.SetOverallComposition(myComp)
    but it didn't work.
    Does anyone know the right formulation to set one's own composition?

    Best regards,
    David B.

     

    Last edit: DavidB 2021-06-22
  • DavidB

    DavidB - 2021-06-22

    It works, i forgot to import math and array....

     
    • James Williams

      James Williams - 2022-01-24

      Hey David, do you mind sharing your code for this? I can't seem to create an 'Array' type only an array

       
  • DavidB

    DavidB - 2022-01-25

    Hey James, this is how i created the array :

    import math
    from System import Array
    myComp = Array[float] ((1.0,0.0,0.0))

     
    ❤️
    1

    Last edit: DavidB 2022-01-25
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.