Skip to content

Commit

Permalink
Merge branch 'production' into production-pilot
Browse files Browse the repository at this point in the history
  • Loading branch information
MTCam committed Jul 17, 2023
2 parents 82a06b3 + 15190bf commit 31fe3f0
Show file tree
Hide file tree
Showing 22 changed files with 6,880 additions and 519 deletions.
1 change: 1 addition & 0 deletions .rtd-env-py3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies:
- islpy
- pip
- pyopencl
- scipy
- pip:
- "git+https://github.com/inducer/pymbolic.git#egg=pymbolic"
- "git+https://github.com/inducer/loopy.git#egg=loopy"
Expand Down
1 change: 1 addition & 0 deletions doc/discretization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ discussion. The following references are useful:
* Shock handling [Woodward_1984]_
* Artificial viscosity [Persson_2012]_
* Boundary Condtitions [Mengaldo_2014]_, and [Poinsot_1992]_
* Phenolics modeling [Lachaud_2014]_

*MIRGE-Com* currently employs a strategy akin to the BR1 algorithm outlined in
[Bassi_1997]_, but with thermal terms and chemical reaction sources as outlined in
Expand Down
2 changes: 2 additions & 0 deletions doc/misc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,5 @@ References
`(DOI) <https://doi.org/10.1002/0471461296>`__
.. [Giles_1988] Michael Giles (1988), Non-Reflecting Boundary Conditions for the Euler \
Equations, CFDL-TR-88-1
.. [Lachaud_2014] Jean Lachaud and Nagi Mansour (2014), Porous-Material Analysis Toolbox Based
on OpenFOAM and Applications, Journal of Thermophysics and Heat Transfer 28 2
195 changes: 195 additions & 0 deletions doc/operators/composite_materials.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
Wall Degradation Modeling
=========================

Conserved Quantities
^^^^^^^^^^^^^^^^^^^^
.. autoclass:: mirgecom.wall_model.PorousFlowDependentVars

Equations of State
^^^^^^^^^^^^^^^^^^
.. autoclass:: mirgecom.wall_model.WallEOS
.. autoclass:: mirgecom.wall_model.WallDependentVars

Model-specific properties
^^^^^^^^^^^^^^^^^^^^^^^^^
The properties of the materials are defined in specific files. These files
are required by :class:`~mirgecom.wall_model.WallEOS`.

Carbon fiber
------------
.. automodule:: mirgecom.materials.carbon_fiber

TACOT
-----
.. automodule:: mirgecom.materials.tacot

Carbon Fiber Oxidation
^^^^^^^^^^^^^^^^^^^^^^

This section covers the response of carbon fiber when exposed to oxygen.
The carbon fibers are characterized as a highly porous material,
with void fraction $\approx 90\%$. As the material is exposed to the flow,
oxygen can diffuse inside the wall and result in oxidation, not only
limited to the surface but also as a volumetric process. For now, convection
inside the wall will be neglected and the species are only allowed to diffuse.

The temporal evolution of mass density is solved in
order to predict the material degradation. As the
:class:`~mirgecom.materials.carbon_fiber.Oxidation` progresses,
the temporal evolution of the fibers mass is given by

.. math ::
\frac{\partial \rho_s}{\partial t} = \dot{\omega_s} \mbox{ .}
This process creates gaseous species following

.. math ::
\frac{\partial \rho_g}{\partial t} = - \dot{\omega}_s \mbox{ ,}
where the
:attr:`~mirgecom.fluid.ConservedVars.mass`
is $\rho_g$. The source term indicates that the fibers become gas in order
to satisfy mass conservation.

The
:attr:`~mirgecom.fluid.ConservedVars.energy`
of the bulk material is given by

.. math::
\frac{\partial \rho_b e_b}{\partial t}
= \nabla \cdot \left( \bar{\boldsymbol{\kappa}} \nabla T
+ h_\alpha \mathbf{J}_{\alpha} \right)
\mbox{ .}
The first term on the RHS is modeled as an effective diffusive transfer
using Fourier's law, where the thermal conductivity is given by
$\bar{\boldsymbol{\kappa}}$.
The second term on the RHS is due to the species diffusion, where the
species specific enthalpy ${h}_{\alpha}$, and the species
diffusive flux vector $\mathbf{J}_{\alpha}$. The sub-index $b$ is the bulk
material consisting of both solid and gas phases, where

.. math::
\rho_b e_b = \epsilon_{g} \rho_g e_g + \epsilon_s \rho_s h_s \mbox{ .}
The internal energy of the gas is given by $e_g(T)$ and the solid
energy/enthalpy is $h_s(T)$.

From the conserved variables, it is possible to compute the oxidation
progress, denoted by
:attr:`~mirgecom.wall_model.WallDependentVars.tau`.
As a consequence, the instantaneous material properties will change due to
the mass loss.

The
:attr:`~mirgecom.eos.GasDependentVars.temperature`
is evaluated using Newton iteration based on both
:attr:`~mirgecom.eos.PyrometheusMixture.get_internal_energy` and
:attr:`~mirgecom.wall_model.WallEOS.enthalpy`,
as well as their respective derivatives, namely
:attr:`~mirgecom.eos.PyrometheusMixture.heat_capacity_cv` and
:attr:`~mirgecom.wall_model.WallEOS.heat_capacity`.
Note that :mod:`pyrometheus` is used to handle the species properties.

Composite Materials
^^^^^^^^^^^^^^^^^^^

This section covers the response of composite materials made of phenolic
resin and carbon fibers.
The carbon fibers are characterized as a highly porous material,
with void fraction $\approx 90\%$. Phenolic resins are added to rigidize
the fibers by permeating the material and filling partially the gaps between
fibers. As the material is heated up by the flow, the resin pyrolysis, i.e.,
it degrades and produces gaseous species.

The temporal evolution of wall density is solved in
order to predict the material degradation. As the
:class:`~mirgecom.materials.tacot.Pyrolysis` progresses, the mass of each
$i$ constituents of the resin, denoted by
:attr:`~mirgecom.wall_model.PorousFlowDependentVars.material_densities`,
is calculated as

.. math ::
\frac{\partial \rho_i}{\partial t} = \dot{\omega}_i \mbox{ .}
This process creates gaseous species following

.. math ::
\frac{\partial \rho_g}{\partial t} + \nabla \cdot \rho_g \mathbf{u} =
- \sum_i \dot{\omega}_i \mbox{ ,}
where the
:attr:`~mirgecom.fluid.ConservedVars.mass`
is $\rho_g$. The source term indicates that all solid resin must become
gas in order to satisfy mass conservation. Lastly, the gas velocity
$\mathbf{u}$ is obtained by Darcy's law, given by

.. math::
\mathbf{u} = \frac{\mathbf{K}}{\mu \epsilon} \cdot \nabla P \mbox{ .}
In this equation, $\mathbf{K}$ is the second-order permeability tensor,
$\mu$ is the gas viscosity, $\epsilon$ is the void fraction and $P$ is
the gas pressure.

The
:attr:`~mirgecom.fluid.ConservedVars.energy`
of the bulk material is given by

.. math::
\frac{\partial \rho_b e_b}{\partial t}
+ \nabla \cdot (\epsilon_{g} \rho_g h_g \mathbf{u})
= \nabla \cdot \left( \bar{\boldsymbol{\kappa}} \nabla T \right)
+ \mu \epsilon_{g}^2 (\bar{\mathbf{K}}^{-1} \cdot \vec{v} ) \cdot \vec{v}
\mbox{ .}
The first term on the RHS is modeled as an effective diffusive transfer
using Fourier's law, where the thermal conductivity is given by
$\bar{\boldsymbol{\kappa}}$. The second term on the RHS account for the
viscous dissipation in the Darcy's flow. The sub-index $b$ is the bulk
material consisting of both solid and gas phases, where

.. math::
\rho_b e_b = \epsilon_{g} \rho_g e_g + \epsilon_s \rho_s e_s \mbox{ .}
The energy of the gas is given by $e_g(T) = h_g(T) - \frac{P}{\rho_g}$,
where $h_g$ is its enthalpy.

From the conserved variables, it is possible to compute the decomposition
status, denoted by
:attr:`~mirgecom.wall_model.WallDependentVars.tau`.
This yields the proportion of virgin (unpyrolyzed material) to char (fully
pyrolyzed) and, consequently, the different thermophysicochemical
properties of the solid phase. Thus, the instantaneous material properties
depend on the current state of the material, as well as the
:attr:`~mirgecom.eos.GasDependentVars.temperature`.
It is evaluated using Newton iteration based on both
:attr:`~mirgecom.materials.tacot.GasProperties.enthalpy` (tabulated
data) or
:attr:`~mirgecom.eos.PyrometheusMixture.get_internal_energy` (Pyrometheus)
and
:attr:`~mirgecom.wall_model.WallEOS.enthalpy`,
as well as their respective derivatives, namely
:attr:`~mirgecom.materials.tacot.GasProperties.heat_capacity` and
:attr:`~mirgecom.wall_model.WallEOS.heat_capacity`.

In *MIRGE-Com*, the solid properties are obtained by fitting polynomials
to tabulated data for easy evaluation of the properties based on the
temperature. The complete list of properties can be find, for instance, in
:mod:`~mirgecom.materials.tacot`.
Different materials can be incorporated as separated files.

The
:class:`~mirgecom.materials.tacot.GasProperties` are obtained based on
tabulated data, assuming chemical equilibrium, and evaluated with splines
for interpolation of the entries. However, the data is currently obtained
by PICA.

.. important ::
The current implementation follows the description of [Lachaud_2014]_
for type 2 code. Additional details, extensive formulation and references
are provided in https://github.com/illinois-ceesd/phenolics-notes
Helper Functions
----------------
.. autofunction:: mirgecom.multiphysics.phenolics.initializer
1 change: 1 addition & 0 deletions doc/operators/operators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Operators
artificial_viscosity
gas-dynamics
thermally_coupled
composite_materials
1 change: 1 addition & 0 deletions examples/ablation-workshop-mpi-lazy.py
Loading

0 comments on commit 31fe3f0

Please sign in to comment.