Skip to content

Pywake integration#28

Open
daanvanderhoek wants to merge 11 commits into
mainfrom
pywake-integration
Open

Pywake integration#28
daanvanderhoek wants to merge 11 commits into
mainfrom
pywake-integration

Conversation

@daanvanderhoek
Copy link
Copy Markdown
Member

No description provided.

Daan van der Hoek and others added 8 commits April 15, 2026 14:39
- Implement PyWakeModel class in wake_model.py with support for multiple deficit models
- Update TWFSolver to recognize PyWake wake models
- Create example configuration file (run_example_pywake.yaml)
- Support for IEA37SimpleBastankhahGaussian, BastankhahGaussian, NOJDeficit, TurboNOJDeficit, and GCLDeficit models
- Optional turbulence models: CrespoHernandez and STF2017TurbulenceModel
- Fix conditional FLORIS YAML generation in off_interface.py
- Fix conditional FLORIS yaml file handling in off.py
- Create working PyWake example configuration (001_two_turbines_yaw_step_pywake.yaml)
- Add integration test script (test_pywake_integration.py)
- Fix method name (get_current_ct vs get_current_Ct)
- Remove invalid ti parameter from PyWake model call
- All tests passing successfully
…zation

- Implement get_point_vel to return velocity at specific points
- Match FLORIS output shape (3, n_points) for u, v, w components
- Use simplified implementation returning ambient wind speed
- Simulation runs successfully with PyWake backend
Uses momentum theory relationship CT = 4a(1-a) to derive axial induction
from PyWake's thrust coefficient output. Includes empirical correction
for high thrust conditions (CT > 0.96).
@ivovs-tud ivovs-tud force-pushed the pywake-integration branch from 539189f to afc0bc3 Compare April 15, 2026 12:44
@daanvanderhoek
Copy link
Copy Markdown
Member Author

Added pywake class to wake models

@daanvanderhoek daanvanderhoek marked this pull request as ready for review April 15, 2026 12:46
@ivovs-tud ivovs-tud self-requested a review May 5, 2026 20:46
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file can be removed right? (since it is called 'tmp')

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be renamed to either 002_Something or 005_Something

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, we would include this in the rest of the documentation

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of lines a commented here, should be cleaned up (I don't know what we would want to include though in this one)

np.savetxt(sim_dir + "/mountain_plot_v_" + str(int(t)).zfill(6) + "s.csv",
data_v, delimiter=',')

# # Also create a WS_eff contour map at hub height with OP lines overlay
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was previously all uncommented. Should this be uncommented again?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this file be removed? I cannot tell if it is actually used/important

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably this change can be undone, since it is specific for the case/run

Comment thread runs/plot_sim_res.ipynb
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one can either be removed, or alternatively cleaned and put in examples

Comment thread analyse_OFFpy.ipynb
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably can be removed, or potentially upgraded to example

Copy link
Copy Markdown
Collaborator

@ivovs-tud ivovs-tud May 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be combined with an example. I would suggest to postpone actual testing until after refactoring (or at least a plan on how/what we refactor)

Copy link
Copy Markdown
Collaborator

@ivovs-tud ivovs-tud May 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I tried to run this, but

FileNotFoundError: [Errno 2] No such file or directory: '/home/ivovs/miniconda3/envs/wf/lib/python3.10/site-packages/py_wake/examples/data/iea22mw/IEA-22-280-RWT_tabular.csv'

This .csv is not included by default when installing pywake with

pip install py_wake

or

pip install git+https://gitlab.windenergy.dtu.dk/TOPFARM/PyWake.git

(which is very strange as this means the example in py_wake itself is broken). In order to make it run I needed to manually copy the csv into the py_wake installation folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants