pyrk.density_model module

class pyrk.density_model.DensityModel(a=<Quantity(0.0, 'kilogram / meter ** 3')>, b=<Quantity(0.0, 'kilogram / kelvin / meter ** 3')>, model='linear')[source]

Bases: object

This class has a public api supporting just one function, rho(temp). If the temperature is irrelevant to the model, so be it. TODO: It would be great to implement a model that handles dpa.

constant(temp=<Quantity(0, 'kelvin')>)[source]

Returns a constant density, a.

Parameters:temp (float.) – The temperature of the object
linear(temp=<Quantity(0.0, 'kelvin')>)[source]

Returns a linear dependence on temperature ($ a + b*temp$) .

Parameters:temp (float. units of kelvin) – The temperature of the object
rho(temp=<Quantity(0, 'kelvin')>)[source]

Returns the density based on the temperature and the irradiation.

Parameters:temp (float.) – the temperature