Parametrization class
Parametrization class link the (possibly filtered) density parameter to the simulation material propertie. Each parametrization requires the parametrized material property name such as defined in the solver IO shield. A helper plot function also allow visualizing the transformation of the density parameter to material properties. See the end of the page.
- class HydrOpTop.Materials.Identity(cell_ids_to_parametrize, property_name)
- Description:
Create a 1 for 1 correspondance between the density parameter and the material property. Designed for debugging purpose.
- class HydrOpTop.Materials.SIMP(cell_ids_to_parametrize, property_name, bounds, power=3, reverse=False)
- Description:
SIMP stands for Standard Isotropic Material Parametrization. It applies the following relation between the material properties \(X\) and the density parameter \(p\):
\[X(p) = X_0 + (X_1 - X_0) p^n\]Where \(X_0\) and \(X_1\) is the material property values when \(p=0\) and \(p=1\). \(n\) the penalization power (see X).
- Parameters:
cell_ids_to_parametrize(iterable): the cell ids on which to apply the parametrizationproperty_name(str): the name of the material parameter (same as defined in the solver IO shield)bounds(list): the X_0 and X_1 values in a listpower(float): the penalization power nreverse(bool): set toTrue, reverse the bounds.
Similar to the previous parametrization but in logarithm scale
- class HydrOpTop.Materials.Log_SIMP(cell_ids_to_parametrize, property_name, bounds, power=3, reverse=False)
- Description:
SIMP stands for Standard Isotropic Material Parametrization. It applies the following relation between the material properties \(X\) and the density parameter \(p\):
\[X(p) = 10^{\log{X_0} + \log(\frac{X_1}{X_0}) p^n}\]Where \(X_0\) and \(X_1\) is the material property values when \(p=0\) and \(p=1\). \(n\) the penalization power (see X).
- Parameters:
cell_ids_to_parametrize(iterable): the cell ids on which to apply the parametrizationproperty_name(str): the name of the material parameter (same as defined in the solver IO shield)bounds(list): the X_0 and X_1 values in a listpower(float): the penalization power nreverse(bool): set toTrue, reverse the bounds.
- class HydrOpTop.Materials.RAMP(cell_ids_to_parametrize, property_name, bounds, parameter=3, reverse=False)
- Description:
RAMP stands for Rational Approximation of of Material Properties. It applies the following relation between the material properties \(X\) and the density parameter \(p\):
\[X(p) = X_0 + (X_1 - X_0) \frac{p} {1 + q (1-p)}\]Where \(X_0\) and \(X_1\) is the material property values when \(p=0\) and \(p=1\), and \(q\) is the RAMP parameter.
- Parameters:
cell_ids_to_parametrize(iterable): the cell ids on which to apply the parametrizationproperty_name(str): the name of the material parameter (same as defined in the solver IO shield)bounds(list): the X_0 and X_1 values in a listparameter(float): the RAMP parameter qreverse(bool): set toTrue, reverse the bounds.
- HydrOpTop.Materials.plot_function.plot_function(parametrization_class, block=True)
- Description:
Help visualize the transformation applied to the (filtered) density parameter the get the material properties. Require the
matplotliblibrary to be installed.- Parameter:
parametrization_class(parametrization instance): the material parametrization instance as define above.block(bool): set toFalse, does not block the GUI.