User defined inflow python script #1693
justhawk98
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
A few days ago, I asked about creating uniform turbulence in AMR-Wind and was pointed to this python script. With the help of ChatGPT, I now have a modified version of that script that allows the user to input any time varying inflow plane they want and get a corresponding AMR-Wind boundary file. I thought this might be useful to others so I'm sharing it here. The script takes the turbsim human-readable output text files as its input (TurbSim.u, TurbSim.v, and TurbSim.w. Examples attached). But, being human readable, I imagine it would be pretty easy to write a Python or Julia script that output text files in the same TurbSim format and you could define whatever inflow you want. After reading the TurbSim files, it centers your defined flow field on whatever y-z coordinate you want. In my case, the turbine hub was at y=1260, z=1260, so that's what's in the script (magic numbers on lines 74 and 168, sorry!). Then, any points needed by AMR-Wind which are not defined in the input files are set to u=mean_velocity, v=0, w=0. Here are some images of an AMR-Wind simulation I ran using the script:
And here is the script along with the supporting files I used, like my AMR-Wind input and turbsim files. The script itself is found in tools/generate_native_planes_turbsim.py:
custom_inflow.zip
P.S. Are you impressed with my work? Looking for someone with AMR-Wind or wind farm/wind turbine modeling experience? I'm about to graduate with my Master's Degree from Brigham Young University and haven't found a job yet. If you think there's a place for me at your company, please reach out: https://www.linkedin.com/in/justhawk98/ or email me at [email protected]
Beta Was this translation helpful? Give feedback.
All reactions