|
| 1 | +# Pool-fire puffing as a hydrodynamic global mode: Moreno-Boza et al. (Combustion and Flame, 2018 ) |
| 2 | +This example shows how to use `ff-bifbox` to compute the steady axisymmetric base flow and the leading global modes of the low-Mach-number round pool-fire problem considered by Moreno-Boza et al. (2018) in: |
| 3 | + |
| 4 | +```tex |
| 5 | +@article{moreno2018critical, |
| 6 | + title={On the critical conditions for pool-fire puffing}, |
| 7 | + author={Moreno-Boza, Daniel and Coenen, Wilfried and Carpio, Jaime and S{\'a}nchez, Antonio L and Williams, Forman A}, |
| 8 | + journal={Combustion and Flame}, |
| 9 | + volume={192}, |
| 10 | + pages={426--438}, |
| 11 | + year={2018}, |
| 12 | + publisher={Elsevier} |
| 13 | +} |
| 14 | +``` |
| 15 | + |
| 16 | +The model uses a Lagrange-multiplier formulation for the weak enforcement of the vaporizing-fuel boundary condition at the pool surface (and also the isothermal boundary conditions on the surrounding wall when enforced). The transported scalar variables are the weighted coupling function `Zt` ($\tilde{Z}$) and the excess-enthalpy variable `H` $\xi$. The density and transport coefficients are reconstructed from the thermochemical closures defined in the equation file. This equation system has numerical challenges because the governing equations have a non-smooth dependence on $\tilde{Z}$. As such, it is possible for the solver to stagnate or diverge when successive iterations push the cusp back-and-forth across quadrature points. |
| 17 | + |
| 18 | +The workflow below targets the methanol parameter set and reproduces the base flow and global spectrum near the onset of the axisymmetric puffing instability using `ff-bifbox`. |
| 19 | + |
| 20 | +## Setup environment for `ff-bifbox` |
| 21 | +1. Navigate to the main `ff-bifbox` directory. |
| 22 | +```sh |
| 23 | +cd ~/your/path/to/ff-bifbox/ |
| 24 | +``` |
| 25 | +2. Export working directory and number of processors for easy reference. |
| 26 | +```sh |
| 27 | +export workdir=examples/moreno-boza_etal_2018/data |
| 28 | +export nproc=4 |
| 29 | +``` |
| 30 | +3. Create symbolic links for governing equations and solver settings. |
| 31 | +```sh |
| 32 | +ln -sf examples/moreno-boza_etal_2018/eqns_moreno-boza_etal_2018.idp eqns.idp |
| 33 | +ln -sf examples/moreno-boza_etal_2018/settings_moreno-boza_etal_2018.idp settings.idp |
| 34 | +``` |
| 35 | + |
| 36 | +## Build initial mesh |
| 37 | +`ff-bifbox` uses FreeFEM for adaptive meshing during the solution process, but it needs an initial mesh to adaptively refine. |
| 38 | +#### Build initial mesh using BAMG in FreeFEM |
| 39 | +```sh |
| 40 | +FreeFem++-mpi -v 0 examples/moreno-boza_etal_2018/puffing_geom.md -mo $workdir/jet |
| 41 | +``` |
| 42 | + |
| 43 | +## Perform parallel computations for methanol using `ff-bifbox` |
| 44 | +0. Select whether to run the adiabatic or isothermal wall BC case. |
| 45 | +```sh |
| 46 | +export wallBC=adiabatic |
| 47 | +``` |
| 48 | +OR |
| 49 | +```sh |
| 50 | +export wallBC=isothermal |
| 51 | +``` |
| 52 | + |
| 53 | +1. Compute a series of base states for gradually increasing $q/S$ (defined in the input files as `qoS`) and $Ra$. The target value used here is $Ra = 2 \times 10^4$, which is close to the onset of the axisymmetric puffing instability for the methanol parameter set. |
| 54 | +```sh |
| 55 | +[[ "$wallBC" == "isothermal" ]] && export isotherm=1 || export isotherm=0 |
| 56 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -mi jet.msh -fo methanol_"$wallBC"_ignite_0 -pv 1 -Ra 1 -Pr 0.70 -sigma 0.70 -qoS 0.2 -S 6.47 -TB 1.12 -lv 2.84 -LeF 1.15 -WFoWA 1.1 -isotherm $isotherm |
| 57 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi methanol_"$wallBC"_ignite_0.base -fo methanol_"$wallBC"_ignite_1 -pv 1 -Ra 5 -qoS 0.4 -snes_linesearch_type l2 -snes_atol 1e-6 |
| 58 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi methanol_"$wallBC"_ignite_1.base -fo methanol_"$wallBC"_ignite_2 -pv 1 -Ra 10 -qoS 0.6 -snes_linesearch_type l2 -snes_atol 1e-6 |
| 59 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi methanol_"$wallBC"_ignite_2.base -fo methanol_"$wallBC"_ignite_3 -pv 1 -Ra 30 -qoS 0.7 -snes_linesearch_type l2 -snes_atol 1e-6 |
| 60 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi methanol_"$wallBC"_ignite_3.base -fo methanol_"$wallBC"_ignite_4 -pv 1 -Ra 100 -qoS 1.2 -snes_linesearch_type l2 -snes_atol 1e-6 |
| 61 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi methanol_"$wallBC"_ignite_4.base -fo methanol_"$wallBC"_ignite_5 -pv 1 -Ra 200 -qoS 2.5 -snes_linesearch_type l2 -snes_atol 1e-6 |
| 62 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi methanol_"$wallBC"_ignite_5.base -fo methanol_"$wallBC"_ignite_6 -pv 1 -Ra 400 -qoS 4 -snes_linesearch_type l2 -snes_atol 1e-4 |
| 63 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi methanol_"$wallBC"_ignite_6.base -fo methanol_"$wallBC"_ignite_7 -pv 1 -Ra 500 -qoS 6 -snes_linesearch_type l2 -snes_atol 1e-4 |
| 64 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi methanol_"$wallBC"_ignite_7.base -fo methanol_"$wallBC"_ignite_8 -pv 1 -Ra 600 -qoS 7 -snes_linesearch_type l2 -snes_atol 1e-4 |
| 65 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi methanol_"$wallBC"_ignite_8.base -fo methanol_"$wallBC"_ignite_9 -pv 1 -Ra 800 -qoS 7.7 -snes_linesearch_type l2 -snes_atol 1e-4 |
| 66 | +ff-mpirun -np $nproc basecontinue.md -v 0 -dir $workdir -fi methanol_"$wallBC"_ignite_9.base -count 9 -fo methanol_"$wallBC"_ignite -pv 1 -paramtarget 20000 -param Ra -snes_linesearch_type l2 -snes_atol 1e-3 -contorder 0 -kmax 10 -dmax 10 -maxcount -1 -h0 100 |
| 67 | +cd $workdir && export lastfile=$(printf '%s\n' methanol_"$wallBC"_ignite_*.base | sort -t_ -k4,4n | tail -1) && cd - |
| 68 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi $lastfile -fo methanol_"$wallBC"_ignited -pv 1 -Ra 20000 -snes_linesearch_type l2 -snes_atol 1e-3 |
| 69 | +``` |
| 70 | + |
| 71 | +2. Recompute the final base state on successively adapted meshes. Note that sometimes the solver stagnates here and so re-attempts or modifications to "jitter" the mesh and knock the quadrature points away from the cusp may be necessary. |
| 72 | +```sh |
| 73 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi methanol_"$wallBC"_ignited.base -fo methanol_"$wallBC"_adapt_0 -pv 1 -mo adapt_0 -snes_linesearch_type l2 -snes_atol 1e-3 -anisomax 1e6 -hmax 1.0 |
| 74 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi methanol_"$wallBC"_adapt_0.base -fo methanol_"$wallBC"_adapt_1 -pv 1 -mo methanol_"$wallBC"_adapt_1 -snes_linesearch_type l2 -snes_atol 1e-3 -anisomax 1e6 -hmax 1.0 |
| 75 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi methanol_"$wallBC"_adapt_1.base -fo methanol_"$wallBC"_adapt_2 -pv 1 -mo methanol_"$wallBC"_adapt_2 -snes_linesearch_type l2 -snes_atol 1e-3 -anisomax 1e6 -hmax 1.0 |
| 76 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi methanol_"$wallBC"_adapt_2.base -fo methanol_"$wallBC"_adapt_3 -pv 1 -mo methanol_"$wallBC"_adapt_3 -snes_linesearch_type l2 -snes_atol 1e-4 -anisomax 1e6 -hmax 1.0 |
| 77 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi methanol_"$wallBC"_adapt_3.base -fo methanol_"$wallBC"_adapt_4 -pv 1 -mo methanol_"$wallBC"_adapt_4 -snes_linesearch_type l2 -snes_atol 1e-5 -anisomax 1e6 -hmax 1.0 |
| 78 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi methanol_"$wallBC"_adapt_4.base -fo methanol_"$wallBC"_adapt_5 -pv 1 -mo methanol_"$wallBC"_adapt_5 -snes_linesearch_type l2 -snes_atol 1e-6 -anisomax 1e6 -hmax 1.0 |
| 79 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi methanol_"$wallBC"_adapt_5.base -fo methanol_"$wallBC"_Ra20000 -pv 1 -mo methanol_"$wallBC"_Re20000 -snes_linesearch_type l2 -anisomax 2 -hmax 1.0 |
| 80 | +``` |
| 81 | + |
| 82 | +3. Compute the global eigenvalue spectrum and leading eigenmode of the final methanol base flow. With the eigenvalue convention used by `modecompute.md`, the leading mode has angular frequency approximately $\omega \approx 0.01079$ and $\omega \approx 0.01193$ for the adiabatic and isothermal cases, respectively. In the scaling of Moreno-Boza et al. (2018), these both correspond to $St = \omega/\pi \approx 3.4 \times 10^{-3}$, in agreement with their Fig 2(a). |
| 83 | +```sh |
| 84 | +ff-mpirun -np $nproc modecompute.md -v 0 -dir $workdir -fi methanol_"$wallBC"_Ra20000.base -so methanol_"$wallBC"_Ra20000 -eps_target 0.01+0.01i -targetf 0.01+0.1i -ntarget 10 -eps_nev 10 -pv 1 |
| 85 | +ff-mpirun -np $nproc modecompute.md -v 0 -dir $workdir -fi methanol_"$wallBC"_Ra20000.base -fo methanol_"$wallBC"_Ra20000 -eps_target 0.01+0.01i -eps_nev 1 -pv 1 -strict 1 |
| 86 | +``` |
| 87 | + |
| 88 | +## Perform parallel computations for heptane using `ff-bifbox` |
| 89 | +1. The above process can be repeated for the case of heptane fuel by choosing the correct parameters as indicated in the paper. However, the heptane case has stronger discontinuities, making the numerical scheme less robust. An ignition routine for heptane is given below. This may be followed by successive mesh adaptation and stability analysis similar to the approach given above. |
| 90 | +```sh |
| 91 | +[[ "$wallBC" == "isothermal" ]] && export isotherm=1 || export isotherm=0 |
| 92 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -mi jet.msh -fo heptane_"$wallBC"_ignite_0 -pv 1 -Ra 1 -Pr 0.70 -sigma 0.70 -qoS 0.2 -S 15.2 -TB 1.24 -lv 1.14 -LeF 1.8 -WFoWA 3.45 -isotherm $isotherm |
| 93 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi heptane_"$wallBC"_ignite_0.base -fo heptane_"$wallBC"_ignite_1 -pv 1 -Ra 5 -qoS 0.4 -snes_linesearch_type l2 -snes_atol 1e-6 |
| 94 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi heptane_"$wallBC"_ignite_1.base -fo heptane_"$wallBC"_ignite_2 -pv 1 -Ra 10 -qoS 0.6 -snes_linesearch_type l2 -snes_atol 1e-6 |
| 95 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi heptane_"$wallBC"_ignite_2.base -fo heptane_"$wallBC"_ignite_3 -pv 1 -Ra 30 -qoS 0.7 -snes_linesearch_type l2 -snes_atol 1e-6 |
| 96 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi heptane_"$wallBC"_ignite_3.base -fo heptane_"$wallBC"_ignite_4 -pv 1 -Ra 100 -qoS 1 -snes_linesearch_type l2 -snes_atol 1e-6 |
| 97 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi heptane_"$wallBC"_ignite_4.base -fo heptane_"$wallBC"_ignite_5 -pv 1 -Ra 200 -qoS 1.5 -snes_linesearch_type l2 -snes_atol 1e-4 |
| 98 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi heptane_"$wallBC"_ignite_5.base -fo heptane_"$wallBC"_ignite_6 -pv 1 -Ra 400 -qoS 2.3 -snes_linesearch_type l2 -snes_atol 1e-4 |
| 99 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi heptane_"$wallBC"_ignite_6.base -fo heptane_"$wallBC"_ignite_7 -pv 1 -Ra 500 -qoS 3.6 -snes_linesearch_type l2 -snes_atol 3e-4 |
| 100 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi heptane_"$wallBC"_ignite_7.base -fo heptane_"$wallBC"_ignite_8 -pv 1 -Ra 600 -qoS 5 -snes_linesearch_type l2 -snes_atol 1e-3 |
| 101 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi heptane_"$wallBC"_ignite_8.base -fo heptane_"$wallBC"_ignite_9 -pv 1 -Ra 800 -qoS 5.5 -snes_linesearch_type l2 -snes_atol 1e-3 |
| 102 | +ff-mpirun -np $nproc basecontinue.md -v 0 -dir $workdir -fi heptane_"$wallBC"_ignite_9.base -count 9 -fo heptane_"$wallBC"_ignite -pv 1 -paramtarget 20000 -param Ra -snes_linesearch_type l2 -snes_atol 1e-3 -contorder 0 -kmax 10 -dmax 10 -maxcount -1 -h0 100 |
| 103 | +cd $workdir && export lastfile=$(printf '%s\n' heptane_"$wallBC"_ignite_*.base | sort -t_ -k4,4n | tail -1) && cd - |
| 104 | +ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi $lastfile -fo heptane_"$wallBC"_ignited -pv 1 -Ra 20000 -snes_linesearch_type l2 -snes_atol 1e-3 |
| 105 | +``` |
0 commit comments