TypeError: cannot create 'Windpower' instances

  • martinho
  • Topic Author
More
04 Jul 2023 12:07 #12274 by martinho
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.

  • pgilman
More
08 Jul 2023 00:03 #12295 by pgilman
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: pgilman
Powered by Kunena Forum