Source code for mirgecom.materials.prescribed_porous_material
""":mod:`mirgecom.materials.prescribed_porous_material` for user-defined material.The user can create any material with driver-oriented functions... autoclass:: PrescribedMaterialEOS"""__copyright__="""Copyright (C) 2023 University of Illinois Board of Trustees"""__license__="""Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included inall copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS INTHE SOFTWARE."""fromtypingimportOptionalfrommeshmode.dof_arrayimportDOFArrayfrommirgecom.wall_modelimportPorousWallEOS
[docs]defvoid_fraction(self,tau:DOFArray)->DOFArray:r"""Return the volumetric fraction $\epsilon$ filled with gas. The fractions of gas and solid phases must sum to one, $\epsilon_g + \epsilon_s = 1$. Both depend only on the oxidation progress ratio $\tau$. """return1.0-self.volume_fraction(tau)
[docs]defenthalpy(self,temperature:DOFArray,tau:Optional[DOFArray])->DOFArray:r"""Evaluate the solid enthalpy $h_s$ of the fibers."""returnself._enthalpy_func(temperature)
[docs]defheat_capacity(self,temperature:DOFArray,tau:Optional[DOFArray])->DOFArray:r"""Evaluate the heat capacity $C_{p_s}$ of the fibers."""returnself._heat_capacity_func(temperature)
[docs]defthermal_conductivity(self,temperature:DOFArray,tau:DOFArray)->DOFArray:r"""Evaluate the thermal conductivity $\kappa$ of the fibers. It employs a rescaling of the experimental data based on the fiber shrinkage during the oxidation. """returnself._thermal_conductivity_func(temperature)
[docs]defvolume_fraction(self,tau:DOFArray)->DOFArray:r"""Fraction $\phi$ occupied by the solid."""actx=tau.array_contextreturnself._volume_fraction_func(tau)+actx.np.zeros_like(tau)
[docs]defpermeability(self,tau:DOFArray)->DOFArray:r"""Permeability $K$ of the porous material."""actx=tau.array_contextreturnself._permeability_func(tau)+actx.np.zeros_like(tau)
[docs]defemissivity(self,temperature=None,tau=None)->DOFArray:"""Emissivity for energy radiation."""actx=tau.array_contextreturnself._emissivity_func(tau)+actx.np.zeros_like(tau)
[docs]deftortuosity(self,tau:DOFArray)->DOFArray:r"""Tortuosity $\eta$ affects the species diffusivity."""actx=tau.array_contextreturnself._tortuosity_func(tau)+actx.np.zeros_like(tau)
[docs]defdecomposition_progress(self,mass:DOFArray)->DOFArray:r"""Evaluate the progress rate $\tau$."""returnself._decomposition_progress_func(mass)