Skip to content

Spray: dual-fidelity liquid/gas phase coupling (aka Many-to-one)#633

Merged
baperry2 merged 120 commits intoAMReX-Combustion:developmentfrom
d-montgomery:many-to-one
Feb 18, 2026
Merged

Spray: dual-fidelity liquid/gas phase coupling (aka Many-to-one)#633
baperry2 merged 120 commits intoAMReX-Combustion:developmentfrom
d-montgomery:many-to-one

Conversation

@d-montgomery
Copy link
Copy Markdown
Contributor

@d-montgomery d-montgomery commented Oct 23, 2025

This cleans up the indexing in the spray module, specifically how liquid spray species deposit to corresponding gas-phase species. The changes include:

  • Relaxation of the SPRAY_FUEL_NUM <= NUM_SPECIES requirement. This requires molecular weights to be read in from the input file for both the GCM and MP models. Users can now have multiple spray species deposit to a single, or multiple gas-phase species.
  • Removal of fdat.indx. This erroneously mapped species to a gas species with the exact same name regardless of how fdat.dep_indx was defined.
  • Full adoption of fdat.dep_indx
  • The addition of a compressed sparse row matrix $L$ which handles the specific mapping from liquid species to gas phase species.

The implementation has been tested with the SingleDropEvap validation cases, specifically WongLin, Daif, and the RungeJP8 tests (see PeleLMeX #593). For the WongLin and Daif cases, a test mechanism was created that mapped multiple species of heptane or decane to a single heptane or decane species (eg. NC7H16_1, NC7H16_2, ... mapped to a single NC7H16).

The RungeJP8 case was tested with 67 liquid fuel components mapping to a single Hychem species for POSF10264 with and without Manifold EOS. The figure below shows results comparing the new "many-to-one" capability to a detailed mechanism for POSF10264. The PeleMP cases demonstrate the impact of using different models for saturated vapor pressure. Note that the PeleMP: Antoine Many-to-One and the PeleGCM: Many-to-One are the same because the Antoine coefficients used in the PeleMP model are generated from FuelLib, so both models have effectively the same saturated vapor pressure implementation.

RungeJP8

To do:

  • Update for use with the manifold model in one-to-one mapping
  • Update for use with the manifold model with many-to-one mapping
  • Remove many debug print statements used during development
  • Needs to be tested with PeleMP model. I think this can also be done with SPRAY_FUEL_NUM > NUM_SPECIES as long as the molecular weights for each species is provided.
  • Test breakup capabilities with Spray-A-Wbreakup in PeleC with PeleMP model (see PeleC #1007)
  • Test with CounterFlowSpray in PeleLMeX
  • Double check docs (remove unused alternative criteria for $X_{g,i} p_g &gt; \bar{p}_{sat,i}$)
  • Update PeleLMeX to allow SPRAY_FUEL_NUM > NUM_SPECIES (see [PeleLMeX #593](https://github.com/AMReX-Combustion/PeleLMeX/pull/593))
  • Update SingleDropEvap tests to include many-to-one validation for RungeJP8 (see PeleLMeX #593)

baperry2 and others added 30 commits August 28, 2025 15:50
Copilot AI review requested due to automatic review settings February 4, 2026 15:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors spray species deposition so multiple liquid spray species can map to a single gas-phase species by removing the erroneous indx mapping, fully adopting dep_indx, and introducing a CSR-form mapping matrix L (plus pc_indx/N_pc) to drive phase-change coupling.

Changes:

  • Replace legacy fuel→gas indexing (indx) with dep_indx and build a CSR mapping (L_row/L_col) plus a phase-change species set (pc_indx, N_pc).
  • Update evaporation/source-term accumulation to work over phase-change gas species (N_pc) rather than assuming one-to-one liquid↔gas species.
  • Update documentation to describe many-to-one mapping and add/adjust visualization assets.

Reviewed changes

Copilot reviewed 10 out of 15 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
Source/Spray/SpraySetup.cpp Builds dep_indx, CSR mapping L, pc_indx/N_pc; adds manifold deposition-name handling and debug prints.
Source/Spray/SprayFuelData.H Introduces CSR storage and helpers; changes fluid_Y_dot sizing; adds manifold index arrays.
Source/Spray/SprayProperties.H Requires per-species input values when needed; updates MW initialization for many-to-one.
Source/Spray/SprayParticles.cpp Accumulates species source terms over phase-change set (N_pc).
Source/Spray/SprayParticles.H Applies gas-phase species source terms using pc_indx/N_pc; updates helper accessor.
Source/Spray/SprayJet.cpp Tightens input parsing for jet composition array length.
Source/Spray/SprayInterpolation.H Uses dep_indx when extracting chemical species from the EOS.
Source/Spray/Drag.H Updates vapor/reference-state calculations to use CSR mapping and phase-change species set.
Source/Spray/BreakupSplash/WallFilm.H Updates wall-film evaporation/source logic to use CSR mapping and phase-change species set.
Docs/sphinx/Spray.rst Documents many-to-one mapping and manifold-model considerations; updates inputs/validation text.
Docs/sphinx/Visualization/nomura_res_2025.png Adds/updates a visualization asset.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

d-montgomery and others added 8 commits February 12, 2026 15:25
Resolved conflicts in:
- Source/Spray/Drag.H: Kept many-to-one variable naming (mn_dot, X_vn, L_n) and added template syntax for amrex::min/max
- Source/Spray/BreakupSplash/WallFilm.H: Kept many-to-one variable naming and added template syntax for amrex::min/max
Manifold with dual fidelity spray model
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 17 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@baperry2 baperry2 changed the title Spray: many liquid species to depositing to a single gas species Spray: dual-fidelity liquid/gas phase coupling (aka Many-to-one) Feb 16, 2026
Copy link
Copy Markdown
Contributor

@baperry2 baperry2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This capability should still be viewed as being in beta, but the validation looks good for various mappings for both detailed and manifold gas phase chemistry:

PeleLMeX_RungeJP8_6

@baperry2 baperry2 merged commit 46793dd into AMReX-Combustion:development Feb 18, 2026
14 checks passed
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.

3 participants