rybchuk / amr-wind-tutorial

An unofficial guide on how to use AMR-Wind
8 stars 2 forks source link

Simulation terminates abruptly #1

Closed AsimUdel closed 5 months ago

AsimUdel commented 6 months ago

Hello Alex, I ran simulations following your tutorial guide. 1) First ran Spinup simulation (successfully completed) 2) Second ran Precursor simulation using restart file of Spinup (successfully completed) 3) Third ran the Turbines simulation using Spinup restart files (following your guide, should not I use Precursor chk files?)(Uniform Ct actuator model, previously I could not run FastDisk model, due to not OpenFAST compatible with AMR-Wind), it started successfully but ended as failed simulation (after 55 minutes). Also in the log output file of the Turbine simulation, there is a 0 value of Iters, Initial residual, and Final residual of temperature_solve, tke_solve, velocity_solve, and Nodal_projection. Let me attach the input files and log output files. Could you please guide me to where I am making a mistake? Thank you Best Regards Asim

rybchuck_spinup.txt rybchuck_Precursor.txt.txt rybchuk_turbines_ctuniform.txt

AMRW26925494.out.Spinup_simulation.txt AMRW26925703.out.Precursor_simulation.txt AMRW26927877.out.Turbine_simulation.txt

rybchuk commented 6 months ago

Hi Asim, thanks for including the details and error files. For (3), you should restart using the precursor chk files.

This error looks similar but distinct from anything I've encountered before. The fact that tke_solve, velocity_solve, and Nodal_projection drop to 0 is suspicious. Just to be certain - did you include the avg_theta.dat file in the same place as your .i file?

If that doesn't solve your error, I recommend creating a "no turbine" version of your ct_uniform input file. In that version, delete everything related to the actuator, and confirm that you can run a simple inflow-outflow simulation without a turbine in there. That will help tell you if the error is tied to the ABL or to the turbine. Let me know if you're still running into errors after that.

AsimUdel commented 6 months ago

Hi Alex, Thank you for your response and guidance, No, I had not included avg_theta.dat in the directory, in fact, I am sorry I could not find the "avg_theta.dat" file, I have searched in the AMR-Wind directories it is not there, It was not in your guide also, right? It would be great if you could guide me about that file. I will surely try to run the no-turbine version and will see if the problem is the turbine or ABL. Best Asim

rybchuk commented 6 months ago

Yep! Check out the part about calc_inflowoutflow_stats.py here.

AsimUdel commented 6 months ago

Hi Alex, Thank you for the information. I tried following the step, but I came across an error. I could not generate the avg_theta.dat file. Let me attach the error in .txt file. error_in_cal_inflowoutflo.txt Thank you

rybchuk commented 6 months ago
python: can't open file '/work/archer/asim/amr-wind-frontend/calc_inflowoutflow_stats.py': [Errno 2] No such file or directory

It looks like Python couldn't find the file. Be sure to run the command in the same directory as the .py file or give the full path to the file

AsimUdel commented 6 months ago

Hi Alex, I tried finding the calc_inflowoutflow_stats.py file in the amr-wind-frontend directory but I could not find it.

"[(archer:rajaasim)@login01.caviness asim]$ cd amr-wind-frontend/ [(archer:rajaasim)@login01.caviness amr-wind-frontend]$ find . -name 'calc_inflowoutflow_stats.py' [(archer:rajaasim)@login01.caviness amr-wind-frontend]$"

Also, I tried to find calc_inflowoutflow_stats.py in the directory where amr-wind-openfast-rosco has been installed but again could not find it. "[(archer:rajaasim)@login01.caviness ~]$ cd /work/archer/sw/rawcof-openfast-3.1/ [(archer:rajaasim)@login01.caviness rawcof-openfast-3.1]$ ls 1.0.0 src [(archer:rajaasim)@login01.caviness rawcof-openfast-3.1]$ cd 1.0.0/ [(archer:rajaasim)@login01.caviness 1.0.0]$ ls bin compiler_compat doc etc lib licensing mkspecs phrasebooks qml share translations cmake conda-meta env include libexec man opt plugins sbin ssl var [(archer:rajaasim)@login01.caviness 1.0.0]$ cd .. [(archer:rajaasim)@login01.caviness rawcof-openfast-3.1]$ cd src/ [(archer:rajaasim)@login01.caviness src]$ ls amr-wind cmake_build_extension OpenFAST rosco-cmake.patch ROSCO-v2.9.0 [(archer:rajaasim)@login01.caviness src]$ find . -name 'calc_inflowoutflow_stats.py' [(archer:rajaasim)@login01.caviness src]$ cd .. [(archer:rajaasim)@login01.caviness rawcof-openfast-3.1]$ cd 1.0.0/ [(archer:rajaasim)@login01.caviness 1.0.0]$ find . -name 'calc_inflowoutflow_stats.py' [(archer:rajaasim)@login01.caviness 1.0.0]$"

can you please take a look into this matter and guide me, I would be grateful to you. I have tried running turbine simulation with actuator disk (fast disk using openfast) and was successful, but I want to complete your (last turbine tutorial), just stuck at last step.

rybchuk commented 6 months ago

Hey, glad to hear that the fast disk is working! That Python script isn't in the frontend repo, but you can find it in the tutorial repo here.

AsimUdel commented 6 months ago

Awesome, thank you Alex for your help. I will check it out.

AsimUdel commented 6 months ago

Hi Alex, Hi Alex, I wanted to ask you something. • I ran your Spinup and Precusror simulations (https://github.com/rybchuk/amr-wind-tutorial/blob/main/03_turbines.md) and also ran tried to run with turbine (I downloaded calc_inflowoutflow_stats.py and successfully extract the data from abl_statistics14400.nc and pasted into the turbine input file, I used 5 MW NREL no servo wind turbine and modified files (.fst, ServoDyn, AirDyn, ElasDyn), to the newer version of OpenFAST (3.1.0) following (https://github.com/lawrenceccheung/amrwind-frontend/blob/afbc1dd284095ee869ba8a9cd3760fdf8b08ca82/docs/openfast_turbine.md#going-from-openfast-v26-to-v300), in my directory all the files (turbine input, wind turbines files, avg_theta.dat, bndry_file.native, restart files (chk) are present. I came up with the weird error, Let me attach the input file, error output file, (information to be pasted following calc_inflowoutflow_stats.py), avg_theta.dat file. Thank you for your time. Asim information_to_be_pasted_in_turbine_input_file.txt second_error_output_file.txt avg_theta_dat.txt rybchuck_turbine.txt

rybchuk commented 6 months ago

first_error_output_file.txt is saying ABL.reference_temperature not found in table, so add that variable into your .i file. If you are using a Boussinesq reference temperature, I set the ABL reference temperatuer equal to that one.

second_error_output_file.txt is saying ParmParse: Multiple lines in BoussinesqBuoyancy.tprofile_filename = avg_theta.dat Statistics. Must use \ for line continuation.. I haven't seen that error before. I've attached a file below that has worked for me in the past. Our files look like they're formatted the same, but maybe there's a weird whitespace issue?

alex_avg_theta.dat.txt

I'll ask around internally and see if maybe that part of AMR-Wind has been changed recently.

AsimUdel commented 6 months ago

Thank you Alex, I will try with this file and will get back to you.

AsimUdel commented 6 months ago

@Alex, I have tried running the turbine simulation (first with the avg_theta generated by the simulation and also by the file you have uploaded " alex_avg_theta.dat.txt" . I will attach the screenshot of the output generated by using 'calc_inflowoutflow_stats.py' and the error_log_file. I have a query

"(/home/2937/work/archer/asim/amr-wind-frontend) [(archer:rajaasim)@login01.caviness amr-wind-frontend]$ python calc_inflowoutflow_stats.py -sf post_processing/abl_statistics14400.nc -ts 7200 -te 9000

Statistics file = post_processing/abl_statistics14400.nc Desired start time = 7200.0 Desired end time = 9000.0 abl_forcing_x = 0.0003348618089035564 abl_forcing_y = 0.0009009316931788419 hvelmag = 7.709555971516807 u_mean = 7.657552380063032 v_mean = 0.04143942475519858 theta_mean = 291.05130286835237" you mentioned that these information should be copy and pasted in config file (I should copy exact these texts or add prefix "BoussinesqBuoyancy" infront of every line ?"

theta_main_error error_log_file.txt

rybchuk commented 6 months ago

Ooh good point. Don't copy the full, exact text. Just copy over the values. Make sure your config file variables have the prefixes used here.

Are you still running into this line continuation error after copy-pasting like above? This sounds like a dependency error related to AMReX, based off the ParmParse message. I sadly don't have any idea how to go about fixing a problem like that. I recommend posting your problem to the main AMR-Wind repo. AMR-Wind periodically updates its latests supported version of AMReX, so maybe there's a mismatch there.

rybchuk commented 6 months ago

One other debugging strategy would be to specifically download AMR-Wind in its state from July 2023 when I put together this tutorial. If at any point you are git clone ing AMR-Wind , be sure to use the--recursive flag: git clone --recursive git@github.com:Exawind/amr-wind.git

AsimUdel commented 6 months ago

Hi @rybchuk I have successfully ran the turbine simulation (last simulation of your tutorial), I used 4 different actuator models (Joukowsky disk, Uniform ct disk, FastDisk, and FastLine) for NREL 2.8-127 wind turbine model. Except FastLine, every simulation terminates at the last time step (near completion), I have plotted the results too. FastLine is giving me some error, I will attach screenshot of error out file for that. Thank you so much for your time and guidance and the tutorial It is so helpful for the new users like me, really appreciate it. error_fastline log_error_output_file.txt

One other debugging strategy would be to specifically download AMR-Wind in its state from July 2023 when I put together this tutorial. If at any point you are git clone ing AMR-Wind , be sure to use the--recursive flag: git clone --recursive git@github.com:Exawind/amr-wind.git

Thank you but I used --recursive flag:' while cloning

AsimUdel commented 5 months ago

@rybchuk , I noticed that you used " AVERAGING " in the Config file, (can you please explain how can I plot average wind velocity in post processing rather than sampling (any script or something)?) Let me attach the screenshot of velocity at the last time step. Rybchuck_hub_height_velocity_Fastdisk

justhawk98 commented 5 months ago

Just thought I'd chime in. I also get the tower strike error when using the TurbineFastLine model. But the simulation runs just fine when I use TurbineFastDisk.

rybchuk commented 5 months ago

@AsimUdel Hi Asim, I just got back from vacation, sorry about the delayed response :) Glad to hear that you and Justin are starting to successfully run!

When I put this tutorial together, I think I only actually ran it out for like a minute of simulation time. That's interesting to hear that you're seeing tower strike errors (and that they only show up with the FastLine model). I've never seen those. My first thought - maybe I specified the azimuth of the turbine incorrectly, and maybe the turbine is rotated 90 degrees or 180 degrees from where I wanted it to go? My second thought - now that you've got a proof-of-concept simulation working, maybe move onto a different atmosphere or simulation that you're interested in studying.

As for time averaging: I don't think that I plotted time-averaged output when creating this tutorial. Looking through the code now, I recommend re-running the spinup simulation with all the averaging lines of code uncommented, and then re-running the precursor and turbine simulations. I haven't investigated the time-averaging capabilities of AMR-Wind much, but if you are using that capability, I think you need to warn AMR-Wind from the very first simulation. Otherwise, plotting files/netCDF probably gets angry.

AsimUdel commented 5 months ago

@rybchuk thank you so much for your response, I will definitely look into those aspects you have mentioned, right now I am facing "out_of_memory" error in simulation :(, working on that.

rybchuk commented 5 months ago

Try adding more nodes. If that doesn't work, try decreasing TMax in the OpenFAST files. The TMax OOM scenario is a sneaky one.

AsimUdel commented 5 months ago

I am restricted on nodes, but I will try to reduce the TMax in OpenFAST files , thanks

AsimUdel commented 5 months ago

Hi @rybchuk , not relevant question to this issue (don't want to open a new issue here), could you please explain a bit how could we set different atmospheric stabilities (i.e., neutral, stable, unstable) and different values of turbulence intensities (e.g., 0.17 or 0.11) in the AMR-Wind input files ? If you have come across any information or literature, please share, I would be grateful. Thank you for your time and efforts. P.S., I have asked the same question on another forum also.

rybchuk commented 5 months ago

So you can change the surface heat flux (common approach for unstable ABLs) using ABL.surface_temp_flux with units K m/s. Alternatively, you can prescribe a surface temperature change rate (common approach for stable ABLs) using ABL.surface_temp_rate. The units on this variable are either K/sec or K/hr. I think it's the latter.

As for turbulence intensity, you can't prescribe that one directly. Your surface heat flux/temperature change rate will impact TI, and ABL.surface_roughness_z0 (units of meter) also impact TI.

AsimUdel commented 5 months ago

Thank you Alex for the comprehensive detail about that.

rybchuk commented 5 months ago

I am going to close this issue, but feel free to open a new one if a new question arises.

AsimUdel commented 5 months ago

Okay sure, thank you so much Alex. Have a great day.