-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finish docs (?) and include function for user-prescribed materials
- Loading branch information
1 parent
2fdc22d
commit 01c205a
Showing
5 changed files
with
175 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
""":mod:`mirgecom.materials.simple_material` for user-defined materials.""" | ||
|
||
__copyright__ = """ | ||
Copyright (C) 2023 University of Illinois Board of Trustees | ||
""" | ||
|
||
__license__ = """ | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, 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 IN | ||
THE SOFTWARE. | ||
""" | ||
|
||
from typing import Optional | ||
from meshmode.dof_array import DOFArray | ||
from mirgecom.wall_model import PorousWallProperties | ||
|
||
|
||
class SolidProperties(PorousWallProperties): | ||
"""Evaluate the properties of the solid state containing only fibers. | ||
.. automethod:: void_fraction | ||
.. automethod:: enthalpy | ||
.. automethod:: heat_capacity | ||
.. automethod:: thermal_conductivity | ||
.. automethod:: volume_fraction | ||
.. automethod:: permeability | ||
.. automethod:: emissivity | ||
.. automethod:: tortuosity | ||
.. automethod:: decomposition_progress | ||
""" | ||
|
||
def __init__(self, char_mass, virgin_mass, enthalpy_func, heat_capacity_func, | ||
thermal_conductivity_func, volume_fraction_func, permeability_func, | ||
emissivity_func, tortuosity_func): | ||
|
||
self._char_mass = char_mass | ||
self._virgin_mass = virgin_mass | ||
self._enthalpy_func = enthalpy_func | ||
self._heat_capacity_func = heat_capacity_func | ||
self._thermal_conductivity_func = thermal_conductivity_func | ||
self._volume_fraction_func = volume_fraction_func | ||
self._permeability_func = permeability_func | ||
self._emissivity_func = emissivity_func | ||
self._tortuosity_func = tortuosity_func | ||
|
||
def void_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$. | ||
""" | ||
return 1.0 - self.volume_fraction(tau) | ||
|
||
def enthalpy(self, temperature: DOFArray, tau: Optional[DOFArray]) -> DOFArray: | ||
r"""Evaluate the solid enthalpy $h_s$ of the fibers.""" | ||
return self._enthalpy_func(temperature) | ||
|
||
def heat_capacity(self, temperature: DOFArray, | ||
tau: Optional[DOFArray]) -> DOFArray: | ||
r"""Evaluate the heat capacity $C_{p_s}$ of the fibers.""" | ||
return self._heat_capacity_func(temperature) | ||
|
||
def thermal_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. | ||
""" | ||
return self._thermal_conductivity_func(temperature) | ||
|
||
def volume_fraction(self, tau: DOFArray) -> DOFArray: | ||
r"""Fraction $\phi$ occupied by the solid.""" | ||
actx = tau.array_context | ||
return self._volume_fraction_func(tau) + actx.np.zeros_like(tau) | ||
|
||
def permeability(self, tau: DOFArray) -> DOFArray: | ||
r"""Permeability $K$ of the porous material.""" | ||
actx = tau.array_context | ||
return self._permeability_func(tau) + actx.np.zeros_like(tau) | ||
|
||
def emissivity(self, tau: DOFArray) -> DOFArray: | ||
"""Emissivity for energy radiation.""" | ||
actx = tau.array_context | ||
return self._emissivity_func(tau) + actx.np.zeros_like(tau) | ||
|
||
def tortuosity(self, tau: DOFArray) -> DOFArray: | ||
r"""Tortuosity $\eta$ affects the species diffusivity.""" | ||
actx = tau.array_context | ||
return self._tortuosity_func(tau) + actx.np.zeros_like(tau) | ||
|
||
def decomposition_progress(self, mass: DOFArray) -> DOFArray: | ||
r"""Evaluate the progress rate $\tau$.""" | ||
return 1.0 - (self._virgin_mass - mass)/self._virgin_mass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters