Skip to content

Airfoil field output#235

Closed
fgvangessel-umd wants to merge 3 commits intomainfrom
airfoil-field-output
Closed

Airfoil field output#235
fgvangessel-umd wants to merge 3 commits intomainfrom
airfoil-field-output

Conversation

@fgvangessel-umd
Copy link
Contributor

Description

New functionality that enables outputting airfoil surface fields from a simulation analysis.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Screenshots

Please attach before and after screenshots of the change if applicable.

Checklist:

  • I have run the pre-commit checks with pre-commit run --all-files
  • I have run ruff check . and ruff format
  • I have run mypy .
  • I have commented my code, particularly in hard-to-understand areas

Reviewer Checklist:

  • The content of this PR brings value to the community. It is not too specific to a particular use case.
  • The tests and checks pass (linting, formatting, type checking). For a new problem, double check the github actions workflow to ensure the problem is being tested.
  • The documentation is updated.
  • The code is understandable and commented. No large code blocks are left unexplained, no huge file. Can I read and understand the code easily?
  • There is no merge conflict.
  • The changes are not breaking the existing results (datasets, training curves, etc.). If they do, is there a good reason for it? And is the associated problem version bumped?
  • For a new problem, has the dataset been generated with our slurm script so we can re-generate it if needed? (This also ensures that the problem is running on the HPC.)
  • For bugfixes, it is a robust fix and not a hacky workaround.

Extends simulate() with a field_output flag that additionally returns
surface pressure and velocity fields (shape 6×N) from the post-simulation
slice file alongside the aerodynamic performance array.

- utils.py: add reorder_coords_fields(), mirroring reorder_coords() but
  carrying VelocityX/Y/Z and CoefPressure through the reordering pipeline
- v0.py: extend simulator_output_to_design() and simulate() with
  field_output=False parameter; simulate returns tuple[NDArray, NDArray]
  when field_output=True
- simulation_jobs.py: propagate field_output through simulate_slurm(),
  adding surface_fields key to the result dict when requested
- dataset_slurm_airfoil.py: add --field_output CLI flag and forward it
  to each job config

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Brings the command line argument descriptions up to date with all current
arguments, including the previously undocumented -account, -type,
-minutes_per_sim, -n_slurm_array, and the new --field_output flag.
Adds defaults to each entry for clarity.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@fgvangessel-umd
Copy link
Contributor Author

Closing and opening new PR reflecting appropriate changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants