- Posts: 6
TypeError: cannot create 'Windpower' instances
- martinho
- Topic Author
Less
More
04 Jul 2023 06:07 #12274
by martinho
TypeError: cannot create 'Windpower' instances was created 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()
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
Less
More
- Posts: 5447
07 Jul 2023 18:03 #12295
by pgilman
Replied by pgilman 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 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