OpenFAST / openfast

Main repository for the NREL-supported OpenFAST whole-turbine and FAST.Farm wind farm simulation codes.
http://openfast.readthedocs.io
Apache License 2.0
654 stars 447 forks source link

Circulation solving method in OLAF #1465

Closed robytian closed 11 months ago

robytian commented 1 year ago

Dear all @ebranlard @jjonkman I want to conduct secondary development for OLAF module, especially for the calculation of blade bound circulation. Could you please tell me the specific code location? The large amount of code is a little difficult for me.

In particular, I would like to take van A.Grrel's approach and I would like to know where his approach is applied in OLAF (Aero module). OLAF All I need is the part that iterates to update the bound circulation based on the lift coefficient. (Obtain blade information, give the initial bound circulation, look up the table, calculate the bound circulation, iterate, output the blade bound circulation). Thank you so much!

ebranlard commented 1 year ago

Hi @robytian The iterative for the circulation solving, using the method of van Garrel is found here: https://github.com/OpenFAST/openfast/blob/dev/modules/aerodyn/src/FVW_Wings.f90#L312 I hope that helps.

robytian commented 1 year ago

Hi @ebranlard I'd like to ask you a few more questions, which I hope you can answer. 1.Did the code location you gave me last time include this theoretical part? https://openfast.readthedocs.io/en/dev/source/user/aerodyn-olaf/OLAFTheory.html#cl-based-iterative-method Is there any other.f90 needed? 2.Can two tests, "EllipticalWing_OLAF" and "HelicalWake_OLAF", output blade circulation and wake velocity field separately? Or do I need to implement the output by modifying WakeMod[3] in AeroDyn15 with OLAF integration? 3.I don't care about the structure, servo control and other modules given in openfast, I just want to achieve blade circulation calculation and helix wake output, is it possible to select "HelicalWake_OLAF" as a test? 4.If I want to model NREL5MW or IEA15MW, do I have to re-model it in "HelicalWake_OLAF"? Or do you need to model in OPENFAST 5MW_Baseline? Thank you very much! Best wishes

ebranlard commented 1 year ago

Hi, Here are some answers to your questions:

  1. Yes, the code implements exactly this theory, and the link I provided, from the line I pointed to to the bottom, is the code that implements the iteration algorithm and the circulation solving. The most important piece of code that is not in this function is the computation of the Cl as function of angle of attack, AFI_ComputeAirfoilCoefs, which is part of the file AirfoilInfo.f90.
  2. I'm not sure I fully understand your question. AeroDyn can output the circulation along the blade using Blade nodal outputs and the variable Gam. OLAF can output velocity fields using the grid outputs. OLAF is selected using WakeMod=3. You'll have to modify the AeroDyn and OLAF inputs files to get the circulation and velocity field outputs.
  3. Yes, HelicalWake OLAF is a good test case for that. The best, when you only care about aerodynamics, is to use the aerodyn driver. You'll find the HelicalWake test case for the aerodyn driver here.
  4. If you want to model a realistic turbine, you'll have to go through the process highlighted in the guidelines. We do not provide OLAF input files for the NREL-5MW or IEA15MW (we might provide those in the future). All the input files you see on the r-test are only example files for testing purposes and are not intended to be used directly. I hope that helps!
robytian commented 1 year ago

Hi @ebranlard I also want to ask you a question about modeling.I hope you can help with that. As before, I went to see the test(ad_HelicalWakeInf_OLAF) in the aerodyn module. I find that this test seems to have only one section of data about the blade, in which case the circulation calculated is actually not referential.

As I said before, I only want to model the blade and calculate the circulation and velocity fields using the lift line and free vortex wake methods.I'd like to ask your opinion on two questions about this:

1.Should I continue to use "ad_HelicalWakeInf_OLAF" for modeling, or should I use other examples such as "ad_BAR_OLAF" for modeling? (My understanding is that the former actually only has blades, but the latter can have other modules for computing (but I can actually turn off modules I don't care about).)

2.If I use "ad_HelicalWakeInf_OLAF" or "ad_BAR_OLAF" to model a 5MW wind turbine, are there other tests I can refer to? (The reference here means that I can model per file alignment for a particular test)

One more question:

This is the image I got after opening vtk using the "r-test\modules\aerodyn\ad_BAR_OLAF" test. I modified the following parameters” The TMax in "ad_driver.dvr" is set to 1000. nGirdOut in the "OLAF.dat file" is set to:

GridName GridType TStart TEnd DTGrid XStart XEnd nX YStart YEnd nY ZStart ZEnd nZ "horiHD" 2 default default default -100 500 100 -120. 120. 120 140. 140. 1

Although the resolution is not high, the velocity field with large area is given, and the calculation time is long. 1000s is enough for the rotor to rotate more than 10 revolutions. Here's the problem: It doesn't match the wake length and belocity deficit I expected. The figure below is my calculation using fast.farm, and it's not quite what I expected. May I ask the cause of this? Is something wrong with the Settings?

Thank you very much !

OLAF wake Farm wake

robytian commented 1 year ago

Hi @ebranlard After several days of simulation and modeling, in addition to the above questions, I also want to consult some other questions, please forgive me.

I modeled 5MW wind turbine according to "ad_HelicalWakeInf_OLAF".The following problems were found:

1.The WakeRegParam shown here in the manual does not exist in the OLAF test. Instead of WakeRegFactor and WingRegFactor, I would like to know what these two parameters should be set to for NREL 5MW wind turbine?

2.Based on the above problems, I want to know how the initial vortex core radius rc0 is calculated?

3.The Regularization parameters here state: (1)Does WakeRegFactor=0.6 correspond to the formula given here, I wonder which value is multiplied by 0.6? How to understand Deltar is the length of the spanwise station?

(2)Here(Regularization parameters) the manual recommends CoreSpreadEddyVisc=1000 and and here The default value is 100.

4.The calculation of deltat, Ttarget, ntarget,distance (1)The deltat calculation formula is given here. If I use NREL5MW fan, can it be understood as deltat=1/12.1, and the 5MW turbine default speed is 12.1rpm. (2)It is pointed out here (Wake length and number of panels) that there is no turbulence simulation ka=1.5, and there is turbulence simulation ka=1. I would like to know how the current test reflects whether my simulation is turbulence simulation or not. (3)Based on (2), I want to simulate the wake region of 10 times the rotor diameter, then the calculation formula is as follows: (10×126)/(11.4×(1-ka×a)),right? (4)ntarget,distance equals Ttarget in (3) divided by deltat in (1) , right? According to the above calculation,the deltat is 0.083 the total simulation time is about 221s, and ntarget,distance is 2674. However, the calculation will stop at 186s, and the calculation does not reach 10 times the length of impeller. I wonder why?

5.Figure 1 and Figure 2 are completely different results from my two simulations, and Figure 3 is what I want to achieve.I want to know which parameters to adjust in the example to get the perfect helix and velocity field cloud picture. image figure1 cdcd84abb8825ae902d19fc5d7aa6d2 figure2 image figure3 image image image

ebranlard commented 1 year ago

Hi @robytian

I don't have the time to go into all of your questions in details, but it seems like you are making progress.

1-3 We indeed switched from "RegParam" to "RegFactor" and some places of the documentation needs updating, but they are the same thing, so you can replace "Param" by "Factor" in the definitions of rc here: https://openfast.readthedocs.io/en/dev/source/user/aerodyn-olaf/InputFiles.html#wake-regularization-and-diffusion-options Delta r is the distance between two aerodyn nodes.

  1. If your simulation stops at 186s is likely because the .fst file stops at 186s, no? or does the simulation crash? The python script in the guidelines will help you set the parameters according to the equations of the guidelines.

  2. If you want pure helices, then you can turn off the wake roll up by setting FreeWakeStart to a very large value. Note that the wake won't be physical, but you'll get the perfect helix if that's what you are after.

I can see that you have nNWPanelsFree to default. You can try to set it according to the guidelines, it will make the end of the wake less "messy".

In Paraview, make sure to "rescale" the range of your colorscale for the velocity and the circulation (Paraview by default will set the range at t=0).

To speed up the computation, you don't need to output the VTK and velocity fields at each time step.

I hope that helps,

Emmanuel

robytian commented 1 year ago

Hi @ebranlard

Recently, I made a comparison on the software using the free vortex wake method. The wind turbine model is NREL-5MW, the wind speed is 10m/s, the rotor speed is 10RPM, the DT is set to 0.1, the total simulation time is 300s, and the panels of nNWPanels are set to 3000, while the rest are not set. It always stops at 113s (Instead of stopping the calculation, the calculation is done), I don't know why.

In addition, this is the velocity field distribution calculated and simulated by me. You can see that the wind speed distribution simulated by OLAF is completely opposite to that of Qblade. In my cognition, Qblade may be more consistent with the velocity distribution. What's the reason, I wonder?

I opened the visualization in paraview and selected the y distribution at x=100m and z=90m. image

Here are the parameters I set in OLAF: image image

ebranlard commented 11 months ago

Something might be wrong in the postprocessing, because the VTK figure of the wake you showed earlier has a wake deficit in the near wake that makes sense (double hump shape). In Figure 8 of this paper, the wake deficit from OLAF, obtained from the Grid output, are consistent with what you would indeed expect.

The issue is diverging from the original question, so I'll close this issue, but feel free to post a dedicated issue if the problem persists.