Enhance SAM with features tailored to your specific needs! We collaborate with companies, universities, and organizations to privately fund new capabilities or analyses. Your investment drives innovation while benefiting the broader energy community. Email us to learn more.

TypeError: cannot create 'Windpower' instances

  • Martineau
  • Topic Author
More
04 Jul 2023 06:07 #12274 by Martineau
Hello, i have created a wind turbine simulation code but when I execute him, it display the following error message : TypeError: cannot create 'Windpower' instances

Here is the code :

import PySAM.Windpower as wp

# Create a Windpower object
wind_turbine = wp.Windpower()


# Set the turbine parameters
turbine_parameters = {
    "system_capacity": 200,  # Turbine capacity in kW
    "max_cp": 0.45,  # Maximum power coefficient
    "max_tip_speed": 80,  # Maximum tip speed in m/s
    "cut_in_speed": 3,  # Cut-in wind speed in m/s
    "cut_out_speed": 25,  # Cut-out wind speed in m/s
}

# Set the turbine parameters
for key, value in turbine_parameters.items():
    wind_turbine.Solve(key, value)

# Run the simulation
wind_turbine.execute()

Please Log in or Create an account to join the conversation.

  • Paul Gilman
More
07 Jul 2023 18:03 #12295 by Paul Gilman
Replied by Paul Gilman on topic TypeError: cannot create 'Windpower' instances
Hello,

Please see the "Getting Started" topic in the PySAM documentation for a description of how to create a new instance of a PySAM module:

nrel-pysam.readthedocs.io/en/latest/getting-started.html

Best regards,
Paul.

Please Log in or Create an account to join the conversation.

Moderators: Paul Gilman
Powered by Kunena Forum