Menu

Using numpy and scipy modules in DWSIM

2015-12-01
2024-04-20
<< < 1 2 (Page 2 of 2)
  • Charan

    Charan - 2018-06-08

    Thank you, It works perfectly now .

     
  • George Manoti

    George Manoti - 2018-06-23

    Could someone kindly email the ironpkg-1.0.0.py file my email adress is gmanoti123@gmail.com, would be great! I have followed the instructions to the letter and have been unable to aquire the file. Thank you very much, George.

     
  • Premice

    Premice - 2018-11-24

    hello thank you very much daniel for your software
    I tried to use the lbfgsb algo but i got an error when computing the gradiant

    Can you help me ?

    here is my code

    import clr
    import DWSIM
    import System
    import sys
    
    from DWSIM import *
    from System import *
    
    clr.AddReference('DWSIM.MathOps.DotNumerics')
    from DotNumerics import *
    from DotNumerics.LinearAlgebra import *
    from DotNumerics.Optimization import *
    from System import Array, Math
    
    def ecart_sortie(param):
        eff_tu = param[0];
        eff_comp = param[1];
        exp011 = Flowsheet.GetFlowsheetSimulationObject("EXP-011");
        comp001 = Flowsheet.GetFlowsheetSimulationObject("COMP-001");
        exhaust = Flowsheet.GetFlowsheetSimulationObject("exhaust");
        exp011.SetPropertyValue("PROP_TU_1",eff_tu);
        comp001.SetPropertyValue("PROP_CO_1",eff_comp);
        Solver.SolveFlowsheet(Flowsheet,1);
        tu_duty = exp011.GetPropertyValue("PROP_TU_3");
        comp_duty = comp001.GetPropertyValue("PROP_CO_3");
        exhaust_temp = exhaust.GetPropertyValue("PROP_MS_0");
        return Math.Sqrt((tu_duty/1000.0-711.0)**2/711.0**2+(exhaust_temp-984)**2/984.0**2);
    
    f = OptMultivariateFunction(ecart_sortie)
    df = OptMultivariateGradient(ecart_sortie)
    
      1204    24/11/2018 09:58:18 Error   Error running script: Traceback (most recent call last):
    

    File "<string>", line 38, in <module>
    TypeError: expected Array[float], got float
    + Info</module></string>

     
  • omid

    omid - 2024-04-20
     

    Last edit: omid 2024-04-20
<< < 1 2 (Page 2 of 2)
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.