Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix turbine solver #36

Merged
merged 3 commits into from
Jan 9, 2025
Merged

Fix turbine solver #36

merged 3 commits into from
Jan 9, 2025

Conversation

jwallwork23
Copy link
Member

Closes #31.

This PR adjusts the turbine setup as in thetisproject/thetis#381. It also uses clearer variable names and adds a debugging option.

@jwallwork23 jwallwork23 added bug Something isn't working enhancement New feature or request labels Jan 6, 2025
@jwallwork23 jwallwork23 self-assigned this Jan 6, 2025
Copy link
Collaborator

@acse-ej321 acse-ej321 left a comment

Choose a reason for hiding this comment

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

Looks straightforward. Just one comment: when I tried to run make test the optimization failed on the 6th iteration with a control_turbine area of 0. From the .vtu files, it appears to be approaching the boundary of the domain.

@jwallwork23
Copy link
Member Author

Looks straightforward. Just one comment: when I tried to run make test the optimization failed on the 6th iteration with a control_turbine area of 0. From the .vtu files, it appears to be approaching the boundary of the domain.

Thanks for reviewing this and testing it yourself. Yes, mine fails in the same place.

@jwallwork23 jwallwork23 merged commit 8f29976 into main Jan 9, 2025
1 check passed
@jwallwork23 jwallwork23 deleted the 31_fix-turbine branch January 9, 2025 15:02
jwallwork23 added a commit that referenced this pull request Jan 15, 2025
Closes #37.

While #36 re-enables
the turbines in the turbine example, there's still something not right
because the optimisation progress is non-monotonic and the control
turbine area occasionally goes to zero.

I added a Taylor test and found that the gradient of the QoI wasn't
being computed correctly with the existing setup. I tracked the problem
down to the `turbine_density` expression, which includes several terms.
By projecting this expression into $\mathbb{P}1_{DG}$ space, the Taylor
test passed.

In addition, this PR overhauls the plotting functionality.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Turbine solver not working
2 participants