ImperialCollegeLondon / sharpy

Simulation of High Aspect Ratio aeroplanes and wind turbines in Python: a nonlinear aeroelastic code
https://imperial.ac.uk/aeroelastics/sharpy
BSD 3-Clause "New" or "Revised" License
120 stars 58 forks source link

examples refer to non-existent solver SHWUvlm #119

Closed wmschy closed 3 years ago

wmschy commented 3 years ago

A few SHARPy examples for Jupyter notebooks specify a solver SHWUvlm. There is no reference to SHWUvlm in the repository, nor any documentation. The problem is in the wind turbine example, and "SHWUvlm" appears in other examples as well.

The first symptom is an unhandled Python exception at a line indexing solvers, e.g., SimInfo.solvers['SHWUvlm']['convection_scheme'] = 2

I would assume SHWUvlm has been superseded by another solver, but it is unclear to a new user how to find a suitable replacement that will yield comparable results.

Aero solver SHWUvlm appears in version 1.1, but not in the current version.

ArturoMS13 commented 3 years ago

HI wmschy,

thank you for reporting this. Yes, SHWUvlm has been replaced by StaticUvlm plus a definition of a helicoidal wake in AerogridPlot.

I will update the Jupyter notebooks. In the mean time, you can see an example on line 118 of this file: https://github.com/ImperialCollegeLondon/sharpy/blob/master/tests/utils/test_generate_cases.py

Best regards, Arturo.

wmschy commented 3 years ago

Arturo,

I applied your suggestion, and the wake looks good so far. I'll let it finish and compare the aero results to those of OpenFAST.

Thank you

wmschy commented 3 years ago

Thank you for your quick response. Here are my results after attempting to implement your suggestions.

The results overall look good, except for the wake. Screenshots of the final results and one wake and the my code diffs for the Jupyter notebook are attached.

Cp and Ct are both .01 closer to OpenFAST results than the original example: OpenFAST SHARPy Cp[-] 0.49 0.54 Ct[-] 0.70 0.75

The blades and the beam look fine over time.

The wake begins to appear aberrant at about timestep 50.

Could you please offer any suggestions about what has gone wrong with the wake?

Here is an excerpt from the Jupyter notebook diffs (with current v1.2) with my main code changes. I:

Diffs follow (sorry for bullets appearing where '+' should be): @@ -252,35 +261,54 @@ "\n", "SimInfo.solvers['SteadyVelocityField']['u_inf'] = WSP\n", "SimInfo.solvers['SteadyVelocityField']['u_inf_direction'] = np.array([0., 0., 1.])\n",

wind_turbine.ipynb.diffs.txt Screenshot from 2021-01-13 12-39-53 Screenshot from 2021-01-13 12-45-00

Thank you.

wmschy commented 3 years ago

Attaching my entire wind_turbine.ipynb as text wind_turbine.ipynb.txt

ArturoMS13 commented 3 years ago

I have fixed the bug you kindly reported. It will be updated in the documentation with the next release.

I am sorry the wake looks aberrant, but it is something quite common with vortex methods in my experience. You can try to reduce those weird shapes by increasing the 'vortex_radius_wake_ind' value in StepUvlm. In my experience, most of the cases these weird shape does not influence blade loads.

About the numerical results: this case is just an example on how to run wind turbines and the discretisation has been generated to run in standard computers. However, it is not a converged case. If you are looking for accurate results you should run a spatial and temporal mesh convergence analysis and refine the discretisation accordingly.

Best regards, Arturo.