Skip to content

Commit 76d2f9d

Browse files
d-montgomerybaperry2Copilot
authored
GCM for liquid fuel properties in spray (#615)
* Add GCM functions * Add temperature unit conversions * Parse GCM inputs, add mw to liqprops * Forgot to add changes to SpraySetup * Fix Y2X function * Add sigma=-1 so GCM compiles, need to figure out logic for spray breakup init * Parse for family, add template to getInpVal * Generalize requirements for BreakupSpray model during initialization * remove unwanted spaces in CONTRIBUTING.md * Formatting * Update plots in docs to show diff between LiqPropsType * Add GCM to docs * Update spray validation in docs * Fix typo in docs * Resolve clang-tidy errors * Overload rho_mix * Add base struct for LiqProps, use gas-phase mw when SPRAY_FUEL_NUM <= NUM_SPECIES * More clang-tidy fixes * Fix spelling error in Docs/sphinx/Spray.rst Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Add many const, SprayUnits::, and all other required changes * Const in calcBoilT function * Fix static_assert * Reorg of SprayProps --------- Co-authored-by: Bruce Perry <Bruce.Perry@nrel.gov> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 789ac21 commit 76d2f9d

19 files changed

+914
-398
lines changed

CONTRIBUTING.md

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,37 @@ Follow [GitHub directions](https://docs.github.com/en/free-pro-team@latest/githu
1111
to fork *PelePhysics* main repo on your GitHub account, and use a recursive `git clone` to get your fork of *PelePhysics* and its dependencies.
1212

1313
Then step into the *PelePhysics* folder and add the main *PelePhysics* repository as the `upstream` remote in order to keep track of the main repo :
14-
15-
git add remote upstream https://github.com/AMReX-Combustion/PelePhysics
14+
~~~
15+
git add remote upstream https://github.com/AMReX-Combustion/PelePhysics
16+
~~~
1617

1718
At any point, you can update the `development` branch of your local repository with changes implemented in the main *PelePhysics* repo by pulling from `upstream` :
18-
19-
git checkout development
20-
git pull upstream development
19+
~~~
20+
git checkout development
21+
git pull upstream development
22+
~~~
2123

2224
We recommend setting your development branch to track the upstream one instead of your fork:
23-
24-
git branch -u upstream/development
25+
~~~
26+
git branch -u upstream/development
27+
~~~
2528

2629
You are now free to modify your own fork of *PelePhysics*. To add a new feature to *PelePhysics*, the procedure is:
2730

2831
1. Create a branch for the new feature from the `development` branch (locally) :
29-
30-
git checkout development
31-
git checkout -b AmazingNewFeature
32-
32+
~~~
33+
git checkout development
34+
git checkout -b AmazingNewFeature
35+
~~~
3336
2. and commit your changes to your local repo :
34-
35-
git commit -m "Developed AmazingNewFeature"
36-
37+
~~~
38+
git commit -m "Developed AmazingNewFeature"
39+
~~~
3740
3. Alongside your development, regularly merge changes from the main repo `development` branch into your `AmazingNewFeature` branch,
3841
fix any conflicts, and push your changes to your GitHub fork :
39-
40-
git push -u origin AmazingNewFeature
41-
42+
~~~
43+
git push -u origin AmazingNewFeature
44+
~~~
4245
4. When you are ready to propose your new feature/improvement/bug fix to the main *PelePhysics* repo, reiterate Step 3 and submit a PR through the GitHub page from your fork onto the `development` branch of the main repo:
4346

4447
- Click on the ``compare & pull request`` button to start your PR.
@@ -56,8 +59,9 @@ If you want to fix a bug, make a small pull request that only fixes a bug.
5659
## PelePhysics Coding Style Guide
5760

5861
Source code files can be automatically formatted to adhere to the appropriate formatting rules using ``clang-format``. To format all files, use the command:
59-
60-
find Source Testing \( -name "*.cpp" -o -name "*.H" \) -exec clang-format -i {} +
62+
~~~
63+
find Source Testing \( -name "*.cpp" -o -name "*.H" \) -exec clang-format -i {} +
64+
~~~
6165

6266
from within the PelePhysics base directory. You can also format files individually using ``clang-format -i /path/to/file``. Adherence to this format is checked for all PRs.
6367

Docs/sphinx/Spray.rst

Lines changed: 108 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,17 @@ Firstly, spray modeling relies on the following assumptions:
2222

2323
* The radiation, Soret, and Dufour effects are neglected
2424

25-
Secondly, accurate spray modeling requires accurate thermophysical and transport properties for both the gas and liquid phases. The gas phase properties are computed using information from the mechanism files in `PelePhysics` while the liquid-phase properties are provided by the user.
26-
The required inputs and the forms of the component-level and mixture-level liquid-phase properties are discussed in detail in the :ref:`Liquid Spray Properties <SprayLiquidProperties>` section.
25+
Secondly, accurate spray modeling depends on accurate thermophysical and transport properties for both the gas and liquid phases.
26+
Gas-phase properties are obtained directly from the mechanism files in `PelePhysics`, while liquid-phase properties are derived from user-provided inputs for each liquid fuel species.
27+
Currently, two approaches are available for estimating liquid fuel properties:
2728

28-
The evaporation models follow the work by Abramzon and Sirignano [#abram]_ and the multicomponent evaporation is based on work by Tonini. [#ton]_ Details regarding the energy balance are provided in Ge et al. [#Ge]_
29+
* The original PeleMP [#owen]_ method, which utilizes a combination of constant values and temperature-based fits.
30+
31+
* A group contribution method (GCM) based on the work of Constantinou & Gani [#gani94]_ [#gani95]_ and Govindaraju & Ihme [#govindaraju]_, previously implemented and validated in `FuelLib <https://github.com/nrel/fuellib>`_.
32+
33+
Further details on the required inputs, as well as the formulations of both component-level and mixture-level liquid-phase properties, are provided in the :ref:`Liquid Spray Properties <SprayLiquidProperties>` section.
2934

35+
The evaporation models follow the work by Abramzon and Sirignano [#abram]_ and the multicomponent evaporation is based on work by Tonini. [#ton]_ Details regarding the energy balance are provided in Ge et al. [#Ge]_
3036
The subscript notation for this section is: :math:`d` relates to the liquid droplet, :math:`v` relates to the vapor state that is in equilibrium with the liquid and gas phase, :math:`L` relates to the liquid phase, and :math:`g` relates to the gas phase. The subscript :math:`r` relates to the reference state with which to approximate the thermophysical and transport properties. This reference state is assumed to be in the evaporating film that surrounds the droplet state and is approximated as
3137

3238
.. math::
@@ -239,7 +245,7 @@ The procedure is as follows for updating the spray droplet:
239245

240246
For such cases, fully three-dimensional simulations are recommended.
241247

242-
248+
243249
Spray Flags and Inputs
244250
======================
245251

@@ -292,13 +298,35 @@ Spray Flags and Inputs
292298
Liquid Spray Properties
293299
-----------------------
294300

295-
* The units for `PeleLM` and `PeleLMeX` are MKS while the units for `PeleC` are CGS. This is the same for the spray inputs. E.g. when running a spray simulation coupled with `PeleC`, the units for ``particles.fuel_cp`` must be in erg/g.
301+
The required inputs and corresponding correlations for the original *PeleMP* [#owen]_
302+
and the *FuelLib-based GCM* are outlined in the subsections below. Please note the following details:
303+
304+
**Units:**
305+
306+
* `PeleLM` and `PeleLMeX` use MKS units, while `PeleC` uses CGS units. The Spray inputs follow the same convention.
296307

297-
* There are many required ``particles.`` flags in the input file for liquid fuel properties. For demonstration purposes, 2 liquid species of ``NC7H16`` and ``NC10H22`` will be used.
308+
* For example, when running a spray simulation coupled with `PeleC`, the values for ``particles.fuel_cp`` must be provided in erg/g.
298309

299-
* Many values must be specified on a per-species basis. Following the current example, one would have to specify ``particles.NC7H16_crit_temp = 540.`` and ``particles.NC10H22_crit_temp = 617.`` to set a critical temperature of 540 K for ``NC7H16`` and 617 K for ``NC10H22``.
310+
**Input flags:**
300311

301-
* The following table lists other inputs related to ``particles.``, where ``SP`` will refer to a fuel species name
312+
* A number of ``particles.`` flags are required in the input file to define liquid fuel properties.
313+
314+
* For demonstration purposes, two liquid species will be used: ``NC7H16`` and ``NC10H22``.
315+
316+
* Many values must be specified on a per-species basis. In this example, one would need to specify:
317+
318+
- ``particles.NC7H16_crit_temp = 540`` critical temperature of 540 K for ``NC7H16``
319+
320+
- ``particles.NC10H22_crit_temp = 617`` critical temperatures of 617 K for ``NC10H22``.
321+
322+
**Additional method-specific inputs:**
323+
324+
* The following tables list other required inputs related to ``particles.``, where ``SP`` refers to a given fuel species name.
325+
326+
The source code for the liquid spray properties can be found in ``SprayProperties.H``.
327+
328+
PeleMP Implementation
329+
^^^^^^^^^^^^^^^^^^^^^
302330

303331
.. table::
304332

@@ -322,10 +350,13 @@ Liquid Spray Properties
322350
| | | | |
323351
+-----------------------+-------------------------------+-------------+-------------------+
324352
|``SP_lambda`` |Liquid thermal conductivity |No |0. |
325-
| |(currently unused) | | |
353+
| | | | |
326354
+-----------------------+-------------------------------+-------------+-------------------+
327355
|``SP_mu`` |Liquid dynamic viscosity |No |0. |
328-
| |(currently unused) | | |
356+
| | | | |
357+
+-----------------------+-------------------------------+-------------+-------------------+
358+
|``SP_sigma`` |Liquid surface tension |No |0. |
359+
| | | | |
329360
+-----------------------+-------------------------------+-------------+-------------------+
330361

331362

@@ -359,6 +390,53 @@ Liquid Spray Properties
359390
If only a single value is provided, :math:`a_n` is assigned to that value and the other coefficients are set to zero, effectively using a constant value for the parameters.
360391

361392

393+
FuelLib-Based GCM
394+
^^^^^^^^^^^^^^^^^
395+
396+
Currently the *GCM* approach of estimating liquid fuel properties is only available in PeleLMeX and requires:
397+
398+
* Setting the compile-time flag ``SPRAY_GCM=TRUE`` in the case's ``GNUmakefile``
399+
400+
* Generating a liquid-fuel-specific GCM input file from FuelLib, and copying the input file into the case directory.
401+
402+
- The process for generating this input file is provided in FuelLib's tutorial: `Exporting GCM Properties for Pele <https://nrel.github.io/FuelLib/tutorials.html#exporting-gcm-properties-for-pele>`_.
403+
404+
- An example of using the GCM in Pele is provided in ``PeleLMeX/Exec/RegTests/SingleDropEvap``.
405+
406+
The following inputs are generated from FuelLib for each liquid fuel species.
407+
408+
.. table::
409+
410+
+------------------------+-------------------------------+-------------+
411+
|Input |Description |Required |
412+
+========================+===============================+=============+
413+
|``SP_family`` |Compound family |Yes |
414+
+------------------------+-------------------------------+-------------+
415+
|``SP_molar_weight`` |Molecular weight |Yes |
416+
+------------------------+-------------------------------+-------------+
417+
|``SP_crit_temp`` |Critical temperature |Yes |
418+
+------------------------+-------------------------------+-------------+
419+
|``SP_crit_press`` |Critical pressure |Yes |
420+
+------------------------+-------------------------------+-------------+
421+
|``SP_crit_vol`` |Critical volume |Yes |
422+
+------------------------+-------------------------------+-------------+
423+
|``SP_boil_temp`` |Boiling temperature at |Yes |
424+
| |atmospheric pressure | |
425+
+------------------------+-------------------------------+-------------+
426+
|``SP_accentric_factor`` |Critical temperature |Yes |
427+
+------------------------+-------------------------------+-------------+
428+
|``SP_molar_vol`` |Molecular volume |Yes |
429+
+------------------------+-------------------------------+-------------+
430+
|``SP_cp_a``, |GCM coefficients for specific |Yes |
431+
|``SP_cp_c``, |heat | |
432+
|``SP_cp_c`` | | |
433+
+------------------------+-------------------------------+-------------+
434+
|``SP_latent`` |Latent heat at 298.15 K |Yes |
435+
+------------------------+-------------------------------+-------------+
436+
437+
The specific equations, correlations and mixture rules used in the GCM implementation are detailed in the `Fuel Property Prediction Model <https://nrel.github.io/FuelLib/fuelprops.html>`_ section of FuelLib's documentation.
438+
439+
362440
Spray Injection
363441
---------------
364442

@@ -484,9 +562,13 @@ Spray Validation
484562
Single Droplet Tests
485563
--------------------
486564

487-
Single droplet tests are performed in 2D with PeleLMeX and compared with experimental results published in literature. These tests are setup in ``PeleLMeX/Exec/RegTests/SprayEvap``. To run a test case, simply open ``Validate.py`` and set the case name from the table below, for example ::
565+
Single droplet tests are performed in 2D with PeleLMeX and compared with experimental results published in literature. These tests are setup in ``PeleLMeX/Exec/RegTests/SingleDropEvap`` and can be compiled with ``SPRAY_GCM=TRUE`` or ``FALSE``. To run a test case with the *PeleMP* or *GCM* liquid properties, simply open ``Validate.py`` and set the ``LiqPropsType`` and case name from the table below, for example ::
488566

489-
case = WongLin()
567+
# Liquid properties model: "mp" or "gcm"
568+
LiqPropsType = "mp"
569+
570+
# Case object
571+
case = WongLin(LiqPropsType)
490572

491573
then run ``python Validate.py``.
492574
The following table details the parameters of each test:
@@ -533,18 +615,25 @@ The following table details the parameters of each test:
533615

534616
Droplet evaporation of heptane, decane, and a binary mixture of heptane and decane compared to experimental measurements from with Runge et al. [#runge]_
535617

618+
.. [#owen] "PeleMP: The Multiphysics Solver for the Combustion Pele Adaptive Mesh Refinement Code Suite," L. D. Owen, W. Ge, M. Rieth, M. Arienti, L. Esclapez, B. S. Soriano, M. E. Mueller, M. Day, R. Sankaran, and J. H. Chen, J. Fluids Eng., vol. 146, no. 4, pp. 1-18 (2024), doi: `10.1115/1.4064494 <https://doi.org/10.1115/1.4064494>`_.
536619
537-
.. [#ton] "Fuel spray modeling in direct-injection diesel and gasoline engines", S. Tonini, Dissertation, City University London (2006), url: `https://openaccess.city.ac.uk/id/eprint/8486/ <https://openaccess.city.ac.uk/id/eprint/8486/>`_.
620+
.. [#gani94] "New group contribution method for estimating properties of pure compounds", L. Constantinou, and R. Gani, AIChE J., Vol. 40, No. 10, pp.1697-1710 (1994), doi: `10.1002/aic.690401011 <https://doi.org/10.1002/aic.690401011>`_.
538621
539-
.. [#abram] "Droplet vaporization model for spray combustion calculations", B. Abramzon and W. A. Sirignano, Int. J. Heat Mass Transfer, Vol. 32, No. 9, pp. 1605-1618 (1989)
622+
.. [#gani95] "Estimation of the acentric factor and the liquid molar volume at 298 K using a new group contribution method", L. Constantinou, and R. Gani, Fluid Phase Equilibria, Vol. 103, No. 1, pp.11-22 (1995), doi: `10.1016/0378-3812(94)02593-P. <https://doi.org/10.1016/0378-3812(94)02593-P.>`_.
623+
624+
.. [#govindaraju] "Group contribution method for multicomponent evaporation with application to transportation fuels", Int. J. of Heat and Mass Transfer, Vol. 102, pp.833–845 (2016), doi: `10.1016/j.ijheatmasstransfer.2016.06.079 <https://doi.org/10.1016/j.ijheatmasstransfer.2016.06.079>`_.
625+
626+
.. [#abram] "Droplet vaporization model for spray combustion calculations", B. Abramzon and W. A. Sirignano, Int. J. Heat Mass Transfer, vol. 32, no. 9, pp. 1605-1618 (1989), doi: `10.1016/0017-9310(89)90043-4 <https://doi.org/10.1016/0017-9310(89)90043-4>`_.
627+
628+
.. [#ton] "Fuel spray modeling in direct-injection diesel and gasoline engines", S. Tonini, Dissertation, City University London (2006), url: `https://openaccess.city.ac.uk/id/eprint/8486/ <https://openaccess.city.ac.uk/id/eprint/8486/>`_.
540629
541-
.. [#Ge] "Development of a CPU/GPU portable software library for Lagrangian-Eulerian simulations of liquid sprays", W. Ge and R. Sankaran and J. H. Chen, Int. J. Multiph. Flow, Vol. 128 (2020), doi: `10.1016/j.ijmultiphaseflow.2020.103293 <https://doi.org/10.1016/j.ijmultiphaseflow.2020.103293>`_.
630+
.. [#Ge] "Development of a CPU/GPU portable software library for Lagrangian-Eulerian simulations of liquid sprays", W. Ge and R. Sankaran and J. H. Chen, Int. J. Multiph. Flow, vol. 128 (2020), doi: `10.1016/j.ijmultiphaseflow.2020.103293 <https://doi.org/10.1016/j.ijmultiphaseflow.2020.103293>`_.
542631
543-
.. [#nomura] Experimental study on high-pressure droplet evaporation using microgravity conditions, H. Nomura and Y. Ujiie and H. J. Rath and J. Sato and M. Kono, Symposium (International) on Combustion, vol. 26, no. 1, pp. 1267–1273 (1996), doi: `10.1016/S0082-0784(96)80344-4 <https://doi.org/10.1016/S0082-0784(96)80344-4>`_.
632+
.. [#nomura] "Experimental study on high-pressure droplet evaporation using microgravity conditions", H. Nomura and Y. Ujiie and H. J. Rath and J. Sato and M. Kono, Symposium (International) on Combustion, vol. 26, no. 1, pp. 1267–1273 (1996), doi: `10.1016/S0082-0784(96)80344-4 <https://doi.org/10.1016/S0082-0784(96)80344-4>`_.
544633
545-
.. [#wonglin] Internal temperature distributions of droplets vaporizing in high-temperature convective flows, S.-C. Wong and A.-C. Lin, J. Fluid Mech., vol. 237, pp. 671–687 (1992), doi: `10.1017/S0022112092003574 <https://doi.org/10.1017/S0022112092003574>`_.
634+
.. [#wonglin] "Internal temperature distributions of droplets vaporizing in high-temperature convective flows", S.-C. Wong and A.-C. Lin, J. Fluid Mech., vol. 237, pp. 671–687 (1992), doi: `10.1017/S0022112092003574 <https://doi.org/10.1017/S0022112092003574>`_.
546635
547-
.. [#daif] "Comparison of multicomponent fuel droplet vaporization experiments in forced convection with the Sirignano model", A. Daı̈f and M. Bouaziz and X. Chesneau and A. Ali Chérif, Exp. Therm. Fluid Sci., Vol. 18, No. 4, pp. 282-290, Issn 0894-1777 (1998), doi: `10.1016/S0894-1777(98)10035-3 <https://doi.org/10.1016/S0894-1777(98)10035-3>`_.
636+
.. [#daif] "Comparison of multicomponent fuel droplet vaporization experiments in forced convection with the Sirignano model", A. Daı̈f and M. Bouaziz and X. Chesneau and A. Ali Chérif, Exp. Therm. Fluid Sci., vol. 18, no. 4, pp. 282-290, Issn 0894-1777 (1998), doi: `10.1016/S0894-1777(98)10035-3 <https://doi.org/10.1016/S0894-1777(98)10035-3>`_.
548637
549-
.. [#runge] "Low-temperature vaporization of JP-4 and JP-8 fuel droplets", T. Runge and M. Teske and C. E. Polymeropoulos, At. Sprays, Vol. 8, pp. 25-44 (1998), doi: `10.1615/AtomizSpr.v8.i1.20 <https://doi.org/10.1615/AtomizSpr.v8.i1.20>`_.
638+
.. [#runge] "Low-temperature vaporization of JP-4 and JP-8 fuel droplets", T. Runge and M. Teske and C. E. Polymeropoulos, At. Sprays, vol. 8, pp. 25-44 (1998), doi: `10.1615/AtomizSpr.v8.i1.20 <https://doi.org/10.1615/AtomizSpr.v8.i1.20>`_.
550639
10.6 KB
Loading
5.1 KB
Loading
12.8 KB
Loading
7.98 KB
Loading

Source/Spray/BreakupSplash/ReitzKHRT.H

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ updateBreakupKHRT(
3030
const amrex::Real We_crit = 6.;
3131
// RT model constants
3232
const amrex::Real A1 = 0.188;
33-
SprayUnits SPU;
3433
// Retrieve particle data
3534
amrex::RealVect vel_part(AMREX_D_DECL(
3635
p.rdata(SprayComps::pstateVel), p.rdata(SprayComps::pstateVel + 1),
@@ -48,7 +47,7 @@ updateBreakupKHRT(
4847
// Should not create child droplets that are near to or less than the minimum
4948
// allowable mass to avoid unphysical evaporation of mass
5049
amrex::Real min_rad =
51-
4. * std::cbrt(SPU.min_mass * 3. / (4. * M_PI * rho_part));
50+
4. * std::cbrt(SprayUnits::min_mass * 3. / (4. * M_PI * rho_part));
5251
amrex::Real shed_mass = p.rdata(SprayComps::pstateBM1);
5352
amrex::Real N0 = p.rdata(SprayComps::pstateN0);
5453
// To prolong RT breakup, rt_time is set to -1 on injection. RT breakup can

Source/Spray/BreakupSplash/TABBreakup.H

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ updateBreakupTAB(
2929
// Constants for ETAB
3030
const amrex::Real Wet = 80.;
3131
const amrex::Real k2 = 2. / 9.;
32-
SprayUnits SPU;
3332

3433
// Retrieve particle data
3534
amrex::RealVect vel_part(AMREX_D_DECL(
@@ -50,7 +49,7 @@ updateBreakupTAB(
5049
amrex::Real Utan_total = 0.;
5150
amrex::Real rad_part = 0.5 * dia_part;
5251
amrex::Real min_rad =
53-
4. * std::cbrt(SPU.min_mass * 3. / (4. * M_PI * rho_part));
52+
4. * std::cbrt(SprayUnits::min_mass * 3. / (4. * M_PI * rho_part));
5453
if (rad_part < min_rad) {
5554
return 0.;
5655
}

0 commit comments

Comments
 (0)