New tabulation framework - #23
Conversation
…fluid data interpolation function
…to fix_LUT_twophase
…g flamelets for a single equivalence ratio
There was a problem hiding this comment.
Pull request overview
This PR introduces a new object-oriented tabulation framework (shared base + per-application generators) and updates tutorials/tests/docs to use the new API, aiming to make table generation/refinement extensible for NICFD and FGM workflows.
Changes:
- Adds a new shared
SU2TableGenerator_Baseand new meshing utilities to support 2D/3D tables, refinement criteria, smoothing, and VTK export. - Refactors NICFD/FGM table generators to build on the base implementation and updates call sites to the new method names.
- Updates documentation, tutorials, and regression/test cases to demonstrate the new framework and behaviors.
Reviewed changes
Copilot reviewed 37 out of 58 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| Tutorials/FGM/01_methane_tabulation/01_generate_config.py | Adds tutorial script to generate an FGM config for methane LUT workflow. |
| Tutorials/FGM/01_methane_tabulation/02_accumulate_flamelets.py | Adds tutorial script to concatenate flamelet point-cloud data for LUT generation. |
| Tutorials/FGM/01_methane_tabulation/03_generate_table.py | Adds tutorial script using new FGM table generator API (refinement/smoothing/export). |
| TestCases/NICFD/LUT_Twophase/generate_table.py | Updates NICFD two-phase LUT test to new generator API and refinement options. |
| TestCases/LUT/Flamelet_Table_H2/0_generate_config.py | Adds H2 LUT test config generator script. |
| TestCases/LUT/Flamelet_Table_H2/1_generate_flamelet_data.py | Adds H2 LUT flamelet data generation script (with thread limiting). |
| TestCases/LUT/Flamelet_Table_H2/2_optimize_progress_variabele.py | Adds PV optimization script for H2 LUT test case. |
| TestCases/LUT/Flamelet_Table_H2/3_collect_flamelet_data.py | Adds flamelet concatenation script for H2 LUT test case. |
| TestCases/LUT/Flamelet_Table_H2/4_generate_table.py | Adds LUT generation/export script for H2 LUT test case. |
| TestCases/LUT/Flamelet_Table_H2/.gitignore | Ignores generated flamelet_data directory for H2 LUT test case. |
| TestCases/LUT/Flamelet_Table_CH4_phi080/3_generate_table.py | Replaces legacy CH4 LUT generator usage with new TableGenerator_FGM workflow. |
| TestCases/Flamelet_Table_H2/generate_table.py | Renames legacy API calls to new generateTableNodes() / writeSU2Table() methods. |
| TestCases/FGM/hydrogen_LUT/1_generate_config.py | Adds hydrogen FGM config generator script using new config API. |
| TestCases/FGM/hydrogen_LUT/3_accumulate_flamelets.py | Adds hydrogen flamelet concatenation script with PV definition loading. |
| TestCases/FGM/hydrogen_LUT/3_generate_table.py | Adds hydrogen LUT generation script using new FGM generator API. |
| RegressionTests/TableGeneration/NICFD/twophase_lut.py | Updates regression test table generation to new NICFD generator API and exports. |
| RegressionTests/FluidTraining/MM_PINN/train_MLP.py | Adjusts training regression test (removes inline data generation, tweaks grid size). |
| RegressionTests/FluidTraining/MM_PINN/SU2_MLP.mlp | Updates stored MLP weights/normalization used in regression tests. |
| RegressionTests/FluidTraining/MM_PINN/SU2_MLP_ref.mlp | Updates reference MLP weights/normalization used in regression tests. |
| RegressionTests/FluidTraining/MM_PINN/fluid_data_test.csv | Adds fixed fluid dataset for regression testing/training. |
| RegressionTests/FluidTraining/MM_PINN/.gitignore | Stops ignoring fluid_data files (to allow committed test dataset). |
| Manifold_Generation/LUT/MeshTools.py | Adds new gmsh-based 2D meshing utilities (hull, refinement callback, saturation handling). |
| Manifold_Generation/LUT/LUTGenerators.py | Refactors NICFD/FGM table generators onto the new base generator architecture. |
| Manifold_Generation/LUT/LUTGenerator_Base.py | Adds new shared base class implementing table-level meshing, interpolation, smoothing, and export. |
| Manifold_Generation/LUT/FlameletTableGeneration.py | Updates legacy flamelet-table generator to new Invdisttree API/method naming. |
| Documentation/source/Tutorials/NICFD/tablegeneration.rst | Updates NICFD tutorial to new API and adds sections on limits/refinement/smoothing. |
| Documentation/source/Tutorials/FGM/methane_LUT/methane_LUT_tutorial.rst | Adds a new methane FGM LUT end-to-end tutorial for the new framework. |
| Documentation/source/Tutorials/FGM/index.rst | Adds methane LUT tutorial to the FGM tutorials index. |
| Documentation/source/documentation/tabulation/tabulationbase.rst | Adds base tabulation documentation page for the new framework. |
| Documentation/source/documentation/tabulation/NICFD.rst | Updates NICFD tabulation docs to new API names and refinement methods. |
| Documentation/source/documentation/tabulation/index.rst | Adds tabulation base page to the tabulation documentation index. |
| Data_Generation/DataGenerator_NICFD.py | Adjusts NICFD data generation (transport indentation fix, saturation sampling parameter). |
| Data_Generation/DataGenerator_FGM.py | Handles equal mixture bounds by generating a single mixture point instead of linspace. |
| Common/Interpolators.py | Refactors inverse-distance interpolator API (Invdisttree.query, fluidDataInterpolator). |
| Common/DataDrivenConfig.py | Changes FGM config synchronization to auto-select 2D vs 3D controlling variables. |
| Common/CommonMethods.py | Moves shared geometry/math utilities (shoelace, finite-difference derivative) into common module. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… information from mixtures with a lot of species.
bigfooted
left a comment
There was a problem hiding this comment.
Thanks, will the documentation also be updated online on su2code somewhere?
Yes. I'm including the instructions on how to run SU2 simulations with the tables in the tutorials in this repo and the SU2 tutorials repo. |
Proposed Changes
Improved the code structure for table generation, made the table generators for NICFD and FGM more object-oriented, allowing for easier integration of new refinement methods and applications, and makes the code easier to read and use.
New features to the tabulation base class:
New features to the FGM tabulation class:
PR Checklist
Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.