User-defined materials

All existing implementation of materials in this library are based on the abstract baseclass Material. This class defines a number of supportive functions that are common between all material implementations. These include mostly operations between the different material states, such as Hugoniots and isentropes and finding their intersection to enable to Forward and backward propagation of the shock-wave experiment.

Material Class

Methods

class Material(gamma_eff: float, initial_density: float, released=True, is_stochastic=False)

Initializer of the Material baseclass.

Parameters:
  • gamma_eff\(\Gamma_{eff}\) is the updated Mie-Grüneisen (MG) parameter \(\Gamma\) for the linear reference of the Mie-Grüneisen (MGLR) model, that assumes the release path can be accurately reproduced with constant \(\Gamma\) along nearly its entirety. More details on the process of calculating the \(\Gamma_{eff}\) given experimental data can be found in [1].

  • initial_density – Ambient density of the material.

  • released

    Boolean parameter indicating whether the reflected shock produced at the interface of the current material with the next is a rarefaction or a reshock.

    • If True, then the algorithms assumes that the material undergoes release and compute the release part of the isentrope.

    • If False, then the algorithm assumes the material will be reshocked and computed the respective part of the isentrope.

    Default value: True.

  • is_stochastic

    Boolean that defines if the Hugoniot used for this material is the deterministic one or multiple Hugoniots that are produced as a result of the Bayesian Inference framework will be used.

    • If True, then samples of the Bayesian Inference will be used to generate the hugoniots_list attributed.

    • If False, only the nominal Hugoniot populates the list, and is derived from the least-square fitting of its analytical equation to the experimental data.

    Default value: False.

initialize_isentropes_at_pressure(shock_pressure: float)

Auxiliary function: Given an input shock pressure, it finds the shocked Hugoniot state of the material and subsequently the release Isentrope that goes through the specific shocked state. In case of an uncertain Hugoniot, a single isentrope for each Hugoniot is calculated.

Parameters:

shock_pressure – Input laser drive (GPa)

Returns:

A list containing the Isentropes of the materia at a specific input pressure.

calculate_intersection(hugoniot: Hugoniot, isentrope: Isentrope)

Given a Hugoniot and an Isentrope this function calculates their intersection in the \((u_p - P)\) space and then calculates all other quantities (e.g. \(U_s\)) using the Rankine Hugoniot equations.

Parameters:
  • hugoniot – A Hugoniot object containing all required info about the next material.

  • isentrope – An Isentrope object of the current material

Returns:

An Intersection containing the common state of the Hugoniot and Intersection

find_previous_material_intersections_from_current(current_intersection: Intersection, next_material)

Auxiliary function for the backward propagation of the experiment. Given the current material shocked state in the form of an intersection, as well as a reference to the next material, tries to find the Isentrope of the current material that goes through the next material shocked state.

Parameters:
  • current_intersection – An Intersection object containing the next material shocked state.

  • next_material – A reference to the next material which gives access to its Hugoniots and material properties

Returns:

A list containing one (if the current material is deterministic) or multiple shocked states (if the material is uncertain) in the form of Intersection objects.

Attributes

Material.isentrope_calculator = <ShockPy.shock_wave_compression.material_states.isentrope_calculators.IntegratedIsentrope.IntegratedIsentrope object>

Static attribute common for all materials throughout an experiment. Defines the way in which the code approximates the release isentrope of a material, with two available alternatives, either ReflectedHugoniot or IntegratedIsentrope

Custom Material Example

The code below provides an example of how to create a new material with a simple linear parametric Hugoniot equation. The material in considered to be uncertain, as the distributions of its parameters are inferred using Bayesian Parameter Estimation.

>>> class CustomMaterial(Material):
>>>
>>>    def __init__(self,
>>>                 gamma_eff: float,
>>>                 initial_density:float,
>>>                 released:bool,
>>>                 is_stochastic:bool):
>>>        super().__init__(gamma_eff, initial_density, released)
>>>        with open(os.path.join(os.path.dirname(__file__), "data", "InferenceResult.p"), "rb") as input_file:
>>>            data = pickle.load(input_file)
>>>
>>>        self.nominal_hugoniot = self.calculate_hugoniot(np.array([1.3, 0.5]))
>>>
>>>        self.hugoniots_list = [self.nominal_hugoniot] if not is_stochastic \
>>>            else [self.calculate_hugoniot(x) for x in data[:1000:10]]
>>>
>>>
>>>    def analytical_shock_velocity_equation(self, parameters: list, hugoniot_particle_velocity: np.ndarray):
>>>        return parameters[0] + parameters[1] * hugoniot_particle_velocity