Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
de746a3
first pass at documenting what multicomponent spray stuff would look …
baperry2 Aug 28, 2025
a7d8a23
start to manifold Spray stuff
baperry2 Aug 28, 2025
7ea69ef
Swap all \chi with X
d-montgomery Sep 3, 2025
36e5566
subtract 1 in sum indexing, add matrix L
d-montgomery Sep 3, 2025
02d71de
Remove sums to Npc, add comment about mixture vapor pres
d-montgomery Sep 3, 2025
2aac452
Remove remaining Npc, other minor changes
d-montgomery Sep 4, 2025
e055e7b
Missed a couple Ng's
d-montgomery Sep 4, 2025
29e1dfe
Replace \forall var \in N, update rhoD
d-montgomery Sep 4, 2025
c4c4626
Fix L^T indexing
d-montgomery Sep 4, 2025
5053b44
use \in instead of = in \forall statements
baperry2 Sep 8, 2025
daef603
define different species sets to simplify notation
baperry2 Sep 9, 2025
e1cf702
Update set notation, edits for consistency
d-montgomery Sep 9, 2025
2e1b8a7
spray docs: conditioning on Y_vi>0 where appropriate
baperry2 Sep 9, 2025
3bca999
Merge pull request #4 from dmontgomeryNREL/my-spray-multicomponent-ch…
baperry2 Sep 9, 2025
e458e80
Merge branch 'development' into spray-multicomponent-changes
baperry2 Sep 9, 2025
22a6110
fix spelling errors
baperry2 Sep 10, 2025
9867f85
some progress on manifold docs
baperry2 Sep 10, 2025
3628dea
Manifold documentation mostly finished
baperry2 Sep 11, 2025
2f423da
Merge branch 'development' into spray-multicomponent-changes
baperry2 Sep 24, 2025
0b5f3a8
document that cp in phi is cp of fuel, not skin mix (see PeleMP #12)
baperry2 Sep 24, 2025
ae0ef1c
Merge branch 'development' into spray-multicomponent-changes
d-montgomery Oct 7, 2025
778bb48
Update link in docs, add fuel_names member to BaseLiqProps
d-montgomery Oct 7, 2025
39b86da
Merge branch 'AMReX-Combustion:development' into many-to-one
d-montgomery Oct 13, 2025
e51bd4e
Add many-to-one mechanism
d-montgomery Oct 13, 2025
4651187
Revert SprayProperties.H
d-montgomery Oct 13, 2025
cb53db1
Replace all indx with dep_indx, add mapping matrix
d-montgomery Oct 13, 2025
bdcf43a
Add dynamically alocated pc_indx
d-montgomery Oct 13, 2025
7b19274
Make csr functions const.
d-montgomery Oct 20, 2025
39b9336
Progress. Works for WongLin but not Daif...
d-montgomery Oct 22, 2025
ec8b84a
Working many-to-one with Daif, needs cleaning/justification
d-montgomery Oct 22, 2025
a7ef1af
Rename some variables for better alignment with docs
d-montgomery Oct 22, 2025
afb5feb
Update WallFilm.H for many-to-one (untested)
d-montgomery Oct 22, 2025
bf53c00
Merge branch 'development' into many-to-one
d-montgomery Oct 23, 2025
3de80bb
Relax SPRAY_FUEL_NUM <= NUM_SPECIES
d-montgomery Oct 23, 2025
e38bf48
Format
d-montgomery Oct 23, 2025
5700e0c
remove many-to-one mechanism
d-montgomery Oct 23, 2025
a02c71c
Enable many-to-one for PeleMP model
d-montgomery Oct 23, 2025
208add4
Formatting...
d-montgomery Oct 23, 2025
abea89e
Remove full L matrix from testing
d-montgomery Oct 23, 2025
792afbb
Update docs for non-manifold case
d-montgomery Oct 23, 2025
fedc394
Fix clang-tidy errors
d-montgomery Oct 24, 2025
a803349
Formatting
d-montgomery Oct 24, 2025
8dc677c
Update notation for manifold in docs
d-montgomery Oct 27, 2025
d8b703e
Remove duplicate array for gpv.mw, clean up comments
d-montgomery Oct 28, 2025
97718bd
Formatting........
d-montgomery Oct 28, 2025
924fd67
Bring back X_dn
d-montgomery Oct 28, 2025
ea7a79e
Merge branch 'development' into many-to-one
d-montgomery Oct 28, 2025
246124a
document temperature ref state changes for manifold properties
baperry2 Oct 29, 2025
d8eb163
Merge development
d-montgomery Nov 4, 2025
1272244
Merge branch 'many-to-one' of https://github.com/d-montgomery/PelePhy…
d-montgomery Nov 4, 2025
6b4cd54
Resolve downstream clang-tidy error
d-montgomery Nov 5, 2025
79aedb5
Spelling error in docs
d-montgomery Nov 5, 2025
7055654
Fix error in WallFilm.H
d-montgomery Nov 6, 2025
d8d00dd
Format and change conditional back to original
d-montgomery Nov 6, 2025
69bd0d9
Debugging w/liquid_fuels_nonreacting mech
d-montgomery Nov 10, 2025
5099de9
correct pc to pcspec
d-montgomery Nov 10, 2025
5b07a09
Indexing for source terms
d-montgomery Nov 11, 2025
6734961
Update print statements, add many-to-one test mechanism for debuggin
d-montgomery Nov 11, 2025
3142614
Add some additional debug print statements to figure out Segfault. I …
d-montgomery Nov 11, 2025
f342234
Format
d-montgomery Nov 17, 2025
df9f9e4
Merge branch 'development' into many-to-one
d-montgomery Nov 17, 2025
3b6dfdf
Progress toward Manifold w/o M21
d-montgomery Nov 18, 2025
1d309ee
Hacky fix for Manifold. Need dep_indx to be same for both EOS
d-montgomery Nov 18, 2025
fc7db01
Add dep_manifold_indx, rename indx to dep_indx in Manifold
d-montgomery Nov 18, 2025
e956524
Format and remove many-to-one mech
d-montgomery Nov 18, 2025
d1e4fd6
Fix bug
d-montgomery Nov 18, 2025
8e2b1d8
Add oldY when SPRAY_FUEL_NUM = 1
d-montgomery Nov 18, 2025
aa380df
Fix spelling
d-montgomery Nov 18, 2025
983ade5
remove unused var
d-montgomery Nov 19, 2025
2d33bac
Remove some debug print statements
d-montgomery Nov 19, 2025
a9052e3
Add/remove some debug print statments
d-montgomery Nov 19, 2025
eef045a
More debugging...
d-montgomery Nov 20, 2025
2af7c75
Add fix for Spray-A-WBreakup test PeleC
d-montgomery Nov 20, 2025
90f0aac
Format
d-montgomery Nov 20, 2025
13df23c
First stab at many-to-one manifold
d-montgomery Nov 21, 2025
763a9a1
Working many-to-one with Manifold
d-montgomery Nov 24, 2025
69505a6
Add mapping from phase-change species to manifold vars
d-montgomery Nov 24, 2025
5d6a57f
Remove debugging print statements
d-montgomery Nov 24, 2025
7d64e89
Formatting
d-montgomery Nov 24, 2025
efab511
Add loop over oldT in WallFilm.H
d-montgomery Nov 25, 2025
92aee2d
Clang-tidy fix
d-montgomery Nov 25, 2025
0ff479e
Minor docs update
d-montgomery Nov 25, 2025
5adfa94
Add Manifold to all validation plots in docs
d-montgomery Nov 25, 2025
5f6171c
Update user guide for Validate.py tests
d-montgomery Nov 25, 2025
e4e8b43
Update docs, initialize dep_manifold_indx and pc_manifold_indx with l…
d-montgomery Nov 25, 2025
64705ee
print spray mappings only if verbose
baperry2 Nov 26, 2025
8a3ee47
eliminate depricated liquid_spec_share_gas_dep variable
baperry2 Nov 26, 2025
7a54e2a
simplify pc_index for GPU
baperry2 Nov 26, 2025
0be5166
update many-to-one check in init_mw to compare SPRAY_FUEL_NUM to N_pc…
baperry2 Dec 3, 2025
c7fa32e
Fix spelling error
d-montgomery Dec 3, 2025
3efe4ac
Merge pull request #3 from baperry2/many2one-mods
d-montgomery Dec 3, 2025
c4628f3
update consistency checks for manifold cases
baperry2 Dec 3, 2025
2ba7b74
remove redundant check
baperry2 Dec 3, 2025
9f0a321
Merge pull request #4 from baperry2/many2one-mods2
d-montgomery Dec 5, 2025
7e70427
Remove AMREX_GPU_HOST_DEVICE from init_mw
d-montgomery Dec 17, 2025
18883e8
Spelling and clang-tidy
d-montgomery Dec 17, 2025
cbae200
More GPU fixes
d-montgomery Dec 17, 2025
b21d70c
Merge branch 'development' into many-to-one
d-montgomery Jan 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
394 changes: 285 additions & 109 deletions Docs/sphinx/Spray.rst

Large diffs are not rendered by default.

Binary file modified Docs/sphinx/Visualization/daif_res_2025.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/sphinx/Visualization/nomura_res_2025.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/sphinx/Visualization/runge_jp8_res_2025.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/sphinx/Visualization/runge_simple_res_2025.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/sphinx/Visualization/wonglin_res_2025.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
99 changes: 60 additions & 39 deletions Source/Spray/BreakupSplash/WallFilm.H
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ calculateFilmSource(
bool get_chi = false;
amrex::GpuArray<amrex::Real, NUM_SPECIES> Y_skin;
amrex::GpuArray<amrex::Real, NUM_SPECIES> h_film;
amrex::GpuArray<amrex::Real, NUM_SPECIES> cp_n;
amrex::GpuArray<amrex::Real, NUM_SPECIES> Ddiag;
amrex::GpuArray<amrex::Real, SPRAY_FUEL_NUM> L_fuel = {{0.0}};
amrex::GpuArray<amrex::Real, SPRAY_FUEL_NUM> mi_dot = {{0.0}};
amrex::GpuArray<amrex::Real, SPRAY_FUEL_NUM> Y_film = {
{0.0}}; // Liquid mass fractions
amrex::GpuArray<amrex::Real, SPRAY_FUEL_NUM> X_vapor = {{0.0}};
amrex::GpuArray<amrex::Real, NUM_SPECIES> cp_i;
amrex::GpuArray<amrex::Real, NUM_SPECIES> rhoD_ri;
amrex::GpuArray<amrex::Real, SPRAY_FUEL_NUM> L_n{};
amrex::GpuArray<amrex::Real, SPRAY_FUEL_NUM> mn_dot = {};
amrex::GpuArray<amrex::Real, SPRAY_FUEL_NUM> Y_film{}; // Liquid mass fracs
amrex::GpuArray<amrex::Real, SPRAY_FUEL_NUM> oldY_film{}; // Prev. mass fracs
amrex::GpuArray<amrex::Real, SPRAY_FUEL_NUM> X_vn{};
for (int spf = 0; spf < SPRAY_FUEL_NUM; ++spf) {
Y_film[spf] = p.rdata(SprayComps::pstateY + spf);
}
Expand All @@ -80,21 +80,20 @@ calculateFilmSource(
amrex::Real T_skin = T_film + rule * delT;

// Calculate the C_p at the skin temperature for each species
eos.T2Cpi(T_skin, cp_n.data());
eos.T2Cpi(T_skin, cp_i.data());
eos.T2Hi(T_film, h_film.data());
for (int n = 0; n < NUM_SPECIES; ++n) {
Y_skin[n] = 0.;
h_film[n] *= SprayUnits::eng_conv;
cp_n[n] *= SprayUnits::eng_conv;
cp_i[n] *= SprayUnits::eng_conv;
}
amrex::Real cp_skin = 0.; // Average C_p in modeled skin phase
amrex::Real mw_skin = 0.; // Average molar mass of skin phase
amrex::Real B_M = 0.; // Mass Spalding number
amrex::Real sumXVap = 0.; // Sum of X_v
calcVaporState<pele::physics::PhysicsType::eos_type>()(
fdat, gpv, rule, T_film, C_eps, mw_film, Y_film.data(), T_skin, cBoilT,
Y_skin.data(), X_vapor.data(), L_fuel.data(), B_M, sumXVap, cp_skin,
mw_skin);
Y_skin.data(), X_vn.data(), L_n.data(), B_M, sumXVap, cp_skin, mw_skin);
amrex::Real lambda_skin = 0.;
amrex::Real mu_skin = 0.;
amrex::Real xi_skin = 0.;
Expand All @@ -105,11 +104,21 @@ calculateFilmSource(
auto trans = pele::physics::PhysicsType::transport();
trans.transport(
get_xi, get_mu, get_lambda, get_Ddiag, get_chi, T_skin, rho_cgs,
Y_skin.data(), Ddiag.data(), nullptr, mu_skin, xi_skin, lambda_skin,
Y_skin.data(), rhoD_ri.data(), nullptr, mu_skin, xi_skin, lambda_skin,
trans_parm);
lambda_skin *= SprayUnits::lambda_conv;
// If gas phase is not saturated
if (sumXVap > 0.) {
// Convert mass diffusion coefficient from mixture average to binary for
// fuel only, not concerned with other species
for (int pc = 0; pc < fdat.N_pc; ++pc) {
const int pcspec = fdat.pc_indx[pc];
rhoD_ri[pcspec] *= mw_skin / gpv.mw[pcspec] * SprayUnits::rhod_conv;
amrex::Real X_vi =
fdat.binary_csr_rowdotprod(pcspec, fdat.L_row, fdat.L_col, X_vn.data());
amrex::Real X_norm = X_vi / sumXVap;
rhoD_ri[pcspec] *= X_norm;
}
// Estimate convective heat transfer using O'Rourke and Amsden 1996 assuming
// y+ < y+c
// TODO: This is very rudimentary and should be improved to account for gas
Expand All @@ -128,18 +137,19 @@ calculateFilmSource(
amrex::Real m_dot = 0.;
for (int spf = 0; spf < SPRAY_FUEL_NUM; ++spf) {
// Species index
const int fspec = fdat.indx[spf];
// Gas species index, might be the same
// const int fdspec = fdat.dep_indx[spf];
// Convert mass diffusion coefficient from mixture average
// to binary for fuel only, not concerned with other species
Ddiag[fspec] *= mw_skin / gpv.mw[fspec] * SprayUnits::rhod_conv;
if (X_vapor[spf] > 0.) {
// Normalize mass diffusivity by fuel vapor molar fraction
amrex::Real cur_rhoD = X_vapor[spf] * Ddiag[fspec] / sumXVap;
mi_dot[spf] = -amrex::max(h_mass * std::pow(cur_rhoD, 2. / 3.), 0.);
m_dot += mi_dot[spf];
sumL += mi_dot[spf] * L_fuel[spf];
const int fdspec = fdat.dep_indx[spf];
if (X_vn[spf] > 0.) {
amrex::Real X_vi =
fdat.binary_csr_rowdotprod(fdspec, fdat.L_row, fdat.L_col, X_vn);
amrex::Real Xnorm = 1.;
if (X_vi > X_vn[spf]) {
// Multiple species deposit to fdspec, scale rhoD_{r,n} accordingly
Xnorm = X_vn[spf] / X_vi;
}
mn_dot[spf] =
-amrex::max(h_mass * std::pow(Xnorm * rhoD_ri[fdspec], 2. / 3.), 0.);
m_dot += mn_dot[spf];
sumL += mn_dot[spf] * L_n[spf];
}
}
amrex::Real part_temp_src =
Expand All @@ -152,40 +162,51 @@ calculateFilmSource(
film_height = new_mass / (rho_film * film_area);
if (film_height > min_height) {
if (SPRAY_FUEL_NUM > 1) {
// rho_film = 0.;
amrex::Real sumY = 0.;
for (int spf = 0; spf < SPRAY_FUEL_NUM; ++spf) {
Y_film[spf] = amrex::min(
1., amrex::max(
(Y_film[spf] * film_mass + mi_dot[spf] * dt) / new_mass, 0.));
(Y_film[spf] * film_mass + mn_dot[spf] * dt) / new_mass, 0.));
oldY_film[spf] = p.rdata(SprayComps::pstateY + spf);
if (Y_film[spf] < 1.E-12) {
Y_film[spf] = 0.;
}
// rho_film += Y_film[spf] / fdat.liqprops.rho_i(T_film, spf);
sumY += Y_film[spf];
}
// rho_film = 1. / rho_film;
} // else {
// rho_film = fdat.liqprops.rho_i(T_film, 0);
//}
for (int spf = 0; spf < SPRAY_FUEL_NUM; ++spf) {
Y_film[spf] /= sumY;
}
} else {
oldY_film[0] = p.rdata(SprayComps::pstateY);
}
} else {
for (int spf = 0; spf < SPRAY_FUEL_NUM; ++spf) {
oldY_film[spf] = p.rdata(SprayComps::pstateY + spf);
}
film_height = 0.;
new_mass = 0.;
p.id() = -1;
}
film_mass = new_mass;
}

p.rdata(SprayComps::pstateT) = T_film;
amrex::Real mdot_total = (film_mass - start_mass) / dt;
gpv.fluid_mass_src = mdot_total;
for (int spf = 0; spf < SPRAY_FUEL_NUM; ++spf) {
const int fdspec = fdat.dep_indx[spf];
amrex::Real oldY = p.rdata(SprayComps::pstateY + spf);
amrex::Real newY = Y_film[spf];
amrex::Real midot = (newY * film_mass - oldY * start_mass) / dt;
gpv.fluid_Y_dot[spf] = midot;
p.rdata(SprayComps::pstateY + spf) = newY;
gpv.fluid_eng_src += midot * h_film[fdspec];
for (int pc = 0; pc < fdat.N_pc; ++pc) {
const int pcspec = fdat.pc_indx[pc];
amrex::Real oldY_film_pc =
fdat.binary_csr_rowdotprod(pcspec, fdat.L_row, fdat.L_col, oldY_film);
amrex::Real newY =
fdat.binary_csr_rowdotprod(pcspec, fdat.L_row, fdat.L_col, Y_film);
amrex::Real midot = (newY * film_mass - oldY_film_pc * start_mass) / dt;
gpv.fluid_Y_dot[pcspec] = midot;
gpv.fluid_eng_src += midot * h_film[pcspec];
}
p.rdata(SprayComps::pstateDia) = film_dia;
p.rdata(SprayComps::pstateFilmHght) = film_height;
for (int spf = 0; spf < SPRAY_FUEL_NUM; ++spf) {
p.rdata(SprayComps::pstateY + spf) = Y_film[spf];
}
}
#endif
Loading
Loading