TP1 : First step with radforce combustion
This practical work 1 contains input data to perform flux calculus with
radforce_combustion. In these exercises, inspired by [1], boundaries are
cylindrical and defined by a triangular mesh. The thermodynamic data field
meaning temperature, pressure, specie's concentration (H2O, CO2, soot) is
analytical. radforce-combustion compute statistically the surface density
flux at a given point on the boundary or at a specific location inside the
media (i.e. a fictitious captor).
Content
Spectroscopic data
Spectroscopic files extracted from the HITRAN database
IE Gordon et al and put into radforce_combustion format
to delete useless spectral lines informations. The starter pack is conceived
for two gaseous species and so available datafile are:
./data/spectroscopic_data/H2O_iso_0_10000.out: 247,883 spectral lines of all H2O isotopes./data/spectroscopic_data/CO2_iso_0_10000.out: 533,235 spectral lines of all CO2 isotopes./data/spectroscopic_data/2species_iso_0_10000.out: 781,118 spectral lines of all H2O+CO2 isotopes
Geometry
The geometry format are .obj files of a cylinder created with the library
star-3dut
./data/geometry/cylinder.obj: cylinder of 1,000 triangles of height 1.2 meter
along z axis.
Part 1 : Create binary tree for line sampling with radforce-combustion
In the following exercise we assume that radforce-combustion is properly
installed and registered on your current shell by running
source ../local/etc/profile
radforce-combustion compute radiative quantities without calculating the
absorption coefficient but rather by sampling it. The sampling is done throw
acceleration structure on the frequency domains: the binaries trees. For each
species, H2O/CO2, one must build these structures for given thermodynamic
conditions (p=pressure, t=temperature, c=concentration) by running:
buildTree -b ./data/spectroscopic_data/CO2_iso_0_10000.out \
-n ./CO2_lorentz_0_10000_iso -p 1 -t 1200 -c 1e-1
buildTree -b ./data/spectroscopic_data/H2O_iso_0_10000.out \
-n ./H2O_lorentz_0_10000_iso -p 1 -t 1200 -c 2e-1
Remark to have a better understanding of the buildTree arguments run:
buildTree
Part 2 : Compute density radiative fluxes at discrete wall positions
Part 2.1 : Estimate flux density value integrated over the infrared range
On the interval [300,9999]cm-1 at a given position "z=0.9" meter on the
cylinder's wall using radforce-combustion executable fmc (flux monte carlo):
../fmc -n 40000 -s lw=300,9999 \
-m ./data/spectroscopic_data/2species_iso_0_10000.out \
-C ./CO2_lorentz_0_10000_iso.sav \
-H ./H2O_lorentz_0_10000_iso.sav \
-d 0.9 -g ./data/geometry/cylinder.obj \
-vvv
Remark
One can play with the number of Monte Carlo realization (-n), spectral range
-s lw=nu_min,nu_max, wall position : -d z [zmin=0.001;1.1999] or other
parameter given by the executable fmc. See:
man ../fmc.1
to read the documentation of the program.
Part 2.2 : Estimate the values along the z axis of the cylinder:
for i in 0.0375 0.0975 0.1575 0.2175 0.2775 \
0.3375 0.3975 0.4575 0.5175 0.5775 \
0.6375 0.6975 0.7575 0.8175 0.8775 \
0.9375 0.9975 1.0575 1.1175 1.1775
do
echo "Computing for z=$i meter"
../fmc -n 40000 -s lw=300,9999 \
-m ./data/spectroscopic_data/2species_iso_0_10000.out \
-C ./CO2_lorentz_0_10000_iso.sav \
-H ./H2O_lorentz_0_10000_iso.sav \
-d $i -g ./data/geometry/cylinder.obj \
>> monte_carlo_fluxes_z_axis.txt
done
After the calculation, the resulting values are stored in
monte_carlo_fluxes_z_axis.txt and can be plotted with:
{
echo "set grid"
echo "set key left top box"
echo "set ylabel 'Incident Heat Fluxes (W/m^2)'"
echo "set xlabel 'z (m)'"
echo "set key box opaque"
echo "set xrange [0:1.2]"
echo "plot 'monte_carlo_fluxes_z_axis.txt' u 1:2:3 w errorbars pt 1 \
ps 0.8 lt rgb 'red' title 'MC-LS HITRAN'"
echo "pause -1"
} > plotting.gp
gnuplot plotting.gp
Part 2.3 : Plot only specific gas contribution.
One can fix soot density to zero (path_ctx.soot_density = 1e-30 to avoid
division error) in:
cd ..
sed -i '390c\ path_ctx.soot_density = 1e-30*5.5*1e-7;' \
./src/fmc_compute_radiance_lw.c
make
cd ./TP1/
Then re-run the fmc previous command and change filename:
for i in 0.0375 0.0975 0.1575 0.2175 0.2775 \
0.3375 0.3975 0.4575 0.5175 0.5775 \
0.6375 0.6975 0.7575 0.8175 0.8775 \
0.9375 0.9975 1.0575 1.1175 1.1775
do
echo "Computing for z=$i meter"
../fmc -n 40000 -s lw=300,9999 \
-m ./data/spectroscopic_data/2species_iso_0_10000.out \
-C ./CO2_lorentz_0_10000_iso.sav \
-H ./H2O_lorentz_0_10000_iso.sav \
-d $i -g ./data/geometry/cylinder.obj \
>> monte_carlo_fluxes_z_axis_no_soot.txt
done
After the calculation, the resulting without soot can be compared with the result with:
{
echo "set grid"
echo "set key left top box"
echo "set ylabel 'Incident Heat Fluxes (W/m^2)'"
echo "set xlabel 'z (m)'"
echo "set key box opaque"
echo "set xrange [0:1.2]"
echo "plot 'monte_carlo_fluxes_z_axis.txt' u 1:2:3 w errorbars pt 1 \
ps 0.8 lt rgb 'red' title 'MC-LS gases-soot', \
'monte_carlo_fluxes_z_axis_no_soot.txt' u 1:2:3 w errorbars pt 1 \
ps 0.8 lt rgb 'blue' title 'MC-LS gases-no soot'"
echo "pause -1"
} > plotting.gp
gnuplot plotting.gp
Part 2.4 : plot only wall contribution:
The same methodology can be applied :
cd ..
sed -i '390c\ path_ctx.soot_density = 1e-30*5.5*1e-7;' \
./src/fmc_compute_radiance_lw.c
sed -i '388c\ path_ctx.h2o_concentration = 1e-30*0.1;' \
./src/fmc_compute_radiance_lw.c
sed -i '389c\ path_ctx.co2_concentration = 1e-30*0.1;' \
./src/fmc_compute_radiance_lw.c
make
cd ./TP1/
Then re-run the fmc previous command and change filename:
for i in 0.0375 0.0975 0.1575 0.2175 0.2775 \
0.3375 0.3975 0.4575 0.5175 0.5775 \
0.6375 0.6975 0.7575 0.8175 0.8775 \
0.9375 0.9975 1.0575 1.1175 1.1775
do
echo "Computing for z=$i meter"
../fmc -n 40000 -s lw=300,9999 \
-m ./data/spectroscopic_data/2species_iso_0_10000.out \
-C ./CO2_lorentz_0_10000_iso.sav \
-H ./H2O_lorentz_0_10000_iso.sav \
-d $i -g ./data/geometry/cylinder.obj \
>> monte_carlo_fluxes_z_axis_wall.txt
done
After the calculation, the resulting without soot and gaz can be compared with the previous results:
{
echo "set grid"
echo "set key left top box"
echo "set ylabel 'Incident Heat Fluxes (W/m^2)'"
echo "set xlabel 'z (m)'"
echo "set key box opaque"
echo "set xrange [0:1.2]"
echo "plot 'monte_carlo_fluxes_z_axis.txt' u 1:2:3 w errorbars pt 1 \
ps 0.8 lt rgb 'red' title 'MC-LS gases-soot', \
'monte_carlo_fluxes_z_axis_no_soot.txt' u 1:2:3 w errorbars pt 1 ps \
0.8 lt rgb 'blue' title 'MC-LS gases-no soot', \
'monte_carlo_fluxes_z_axis_wall.txt' u 1:2:3 w errorbars pt 1 ps 0.8 \
lt rgb 'magenta' title 'MC-LS no gases-no soot'"
echo "pause -1"
} > plotting.gp
gnuplot plotting.gp
Reference
[1] Coelho, P. J., Perez, P., & El Hafi, M., "Benchmark numerical
solutions for radiative heat transfer in two-dimensional axisymmetric
enclosures with nongray sooting media",
https://doi.org/10.1080/713836240, 2003