Question about processing sampling planes #1690
Replies: 5 comments 10 replies
-
Hi, thanks for reaching out. I think we answer most of those questions in our documentation. I refer you to the following links:
I hope this helps.
No, particularly if you use the |
Beta Was this translation helpful? Give feedback.
-
Format depends on whether you specify native or netCDF. There is a Python script to load the files if you save them in amrex particles format. For netCDF, you can use netCDF4 or xarray. You need to use glob or other directory readers in Python to sample all the planes in a directory and then reshape them into a 2-D array using numpy and then perform POD or other surrogate model studies. |
Beta Was this translation helpful? Give feedback.
-
Hi @passboy666, We have also looked at doing some (Spectral) POD analysis from AMR-Wind sampling planes and our code to do that is available online. In case it helps, you can look at the AMR-Wind frontend postprocessing engine, and our method for SPOD analysis of rotor plane sampling data https://github.com/Exawind/amr-wind-frontend/blob/main/postproengine/doc/spod.md. We're still working on the full documentation for this, but there's a pre-print of the analysis that @gyalla did here: https://wes.copernicus.org/preprints/wes-2025-14/. Lawrence |
Beta Was this translation helpful? Give feedback.
-
Hi all, Thanks so much for providing your suggestions earlier — I’ve tried them out on my case setup. I'm currently using PlaneSampler with native format in AMR-Wind, and my amrwind.inp sampling section looks like this: incflo.post_processing = sampling sampling.yz1D.type = PlaneSampler ... (similarly for yz2D to yz9D) However, only the yz1D, yz8D, and yz9D planes have any data, and even those don’t contain the expected 40,000 points — typically far fewer. All other planes return empty after duplicate removal, or are entirely missing. Has anyone encountered this issue before? I’ve checked the following: The origin and axes are correctly defined for each plane. The simulation domain should cover all the planes. The output directory does contain the binary samplingNNNNN files for the correct time steps. Any ideas on what might be going wrong? Could it be AMR level coverage, domain truncation, or something else? Thanks again for your help! Best, |
Beta Was this translation helpful? Give feedback.
-
Unrelated to all the comments before this but I use paraview to view the sampling planes. Though I remember some newer versions had trouble reading the sampling files. Check out this old discussion: #1305 . I use paraview 5.10.1. Also, once you have the sampling file open in paraview, you can click the save data button and output it as a csv file. That's mostly how I've worked with them, save to csv then use a different language (julia) to process the data. Though I imagine python would also be well suited for this. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear all,
I am currently working with AMR-Wind and using the plane sampling feature as described in the documentation. I have successfully defined a sampling plane in my input file (e.g., at hub height), and the simulation runs without any issues.
However, I am unsure how to extract the velocity field data from this sampled plane. My objective is to perform POD (Proper Orthogonal Decomposition) on a series of velocity snapshots from this plane.
I would greatly appreciate your guidance on the following:
I would greatly appreciate your guidance on the following:
Where exactly are the sampled plane velocity data stored after the simulation?
In what format is the data saved (e.g., .csv, .nc, .plt, etc.)?
Is it possible to export the sampled data to CSV format directly or through a post-processing script?
Is there a recommended way to extract and organize these plane snapshots over time for POD analysis (e.g., in MATLAB or Python)?
Will enabling plane sampling significantly affect the simulation speed or memory usage?
Any suggestions, examples, or scripts would be extremely helpful. Thank you very much for your time and support!
Best regards
Beta Was this translation helpful? Give feedback.
All reactions