Menu

Writing code for power generation in turbine

2019-11-24
2019-11-25
  • Jogesh Shivshankar Mankar

    Dear Daniel,

    I have developed model for power generation predictions using turbine. I am written code in python for reading input data from excel and writing the predictions output back to excel.
    The code written as per my model is as follows:

    turbine_15 = Flowsheet.GetFlowsheetSimulationObject("15 MW Turbine")
    ws1.UsedRange.Cells[x+9, 38].Value2 = turbine_15.GetPropertyValue("PROP_CL_4").EnergyStream.EnergyFlow

    I am not able to write the power/energy predictions to excel. Plz provide me your guidance.

    Thanks and Regards
    Jogesh Mankar. ABSTC.

     
  • Daniel Medeiros

    Daniel Medeiros - 2019-11-25

    Try this:

    ws1.UsedRange.Cells[x+9, 38].Value2 = turbine_15.DeltaQ
    

    or

    es = Flowsheet.GetFlowsheetSimulationObject("ESTR-X")
    ws1.UsedRange.Cells[x+9, 38].Value2 = es.EnergyFlow
    

    where ESTR-X is the name of the energy stream attached to the turbine.

     
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.