DoMINO per-case parameter loading, and SHIFT support in example. #1033
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.
PhysicsNeMo Pull Request
This PR adds introduces a generalized global parameter system for the DoMINO external aerodynamics example, and adds support for SHIFT dataset. The changes enable the DoMINO model to work with CFD data from multiple solvers beyond OpenFOAM, specifically adding support for SHIFT datasets (which can have case-varying global parameters, different filename conventions and cell-centered surface data, example https://huggingface.co/datasets/luminary-shift/WING) while maintaining backward compatibility.
Description
Key Changes:
Generalized Global Parameter System: Refactored hardcoded parameter handling to use a flexible dictionary-based approach with new utility functions:
extract_global_parameters()
- Extract parameters from JSON filescreate_global_parameters_reference_array()
- Create reference parameter arraysload_parameters_from_json()
- Load parameters with fallback to reference valuesSHIFT Dataset Support: Added
SHIFTPaths
class and updated data processing pipeline to handle SHIFT dataset file structures (merged_surfaces.stl
,merged_surfaces.vtp
,merged_volumes.vtu
,params.json
), renamingOpenFoamDataset
toVtkCfdDataset
to better reflect its broader capability to handle VTK-format CFD data from multiple solversChange to test.py data distribution: Before the change, when running on N gpus, we would miss the remainder of ||data_set||/N samples for evaluation.
The changes allow users to seamlessly work with CFD datasets from different solvers (OpenFOAM, SHIFT, etc.) using a unified interface, while providing more flexible parameter management for aerodynamic simulations.
Checklist
Dependencies
No new external dependencies are introduced. The changes utilize functionality already present in the codebase. Some unused imports were removed during development