Add inflow_scaling_factor for simple scaling/fine-tuning of ABL boundary velocity fields #1808
+19
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new optional ABL input parameter:
ABL.inflow_scaling_factor = # default = 1.0
When reading boundary inflow files, the velocity components (u, v, w) are multiplied by this factor before being injected into the simulation (i.e., 1.1 = +10%, 0.9 = -10% velocity magnitude). All other fields remain unchanged. This enables simple scaling (or fine-tuning) of inflow velocity time-series without having to re-run a precursor, and is particularly useful for custom boundary files that are not generated from AMR-Wind. I have been using this feature here at the Technical University of Munich on our CPU based HPC system.
Pull request type
Checklist
The following is included:
This PR was tested by running:
Manual testing:
Compiled successfully on linux HPC system
Verified that the inflow_scaling_factor is correctly read from the input file
Confirmed that only the "velocity" field is scaled, and other fields remain unchanged (mass_inflow, pressure_outflow)
Confirmed default behavior (inflow_scaling_factor = 1.0) produces identical results to the baseline
Confirmed behavior when the parameter is missing (defaults to 1.0)
Confirmed that negative or zero values are reset to 1.0 safely
Additional background
This feature allows rapid testing of different inflow magnitudes without regenerating boundary files. It hopefully adds minimal overhead, and preserves all existing solver behavior when the parameter is not set or set to 1.0.
Scaling the inflow in this way likely interferes with other physics in the boundary layer, but for fine tuning, or minimal wind speed changes, it seems to work well. I have only been able to test this on our CPU based system (LRZ supermuc) with OpenMP.
Open for any and all feedback, and please let me know if there is a better way to achieve this function.
Thanks :)