tardis.model.geometry.radial1d module

class tardis.model.geometry.radial1d.NumbaRadial1DGeometry(*args, **kwargs)[source]

Bases: NumbaRadial1DGeometry

Radial 1D Geometry for the Numba mode

Parameters:
r_innernumpy.ndarray
r_outernumpy.ndarray
v_innernumpy.ndarray
v_outernumpy.ndarray
velocity_gradientnumpy.ndarray
volumenumpy.ndarray
class_type = jitclass.NumbaRadial1DGeometry#7fa005335a50<r_inner:array(float64, 1d, A),r_outer:array(float64, 1d, A),v_inner:array(float64, 1d, A),v_outer:array(float64, 1d, A),velocity_gradient:array(float64, 1d, A),volume:array(float64, 1d, A)>
class tardis.model.geometry.radial1d.Radial1DGeometry(r_inner: Quantity, r_outer: Quantity, v_inner: Quantity, v_outer: Quantity, r_inner_boundary: Quantity, r_outer_boundary: Quantity, v_inner_boundary: Quantity, v_outer_boundary: Quantity)[source]

Bases: object

Holds information about model geometry for non-homologous radial 1D models.

Attributes:
volumeastropy.units.quantity.Quantity

Volume in shell computed from r_outer and r_inner

get_velocity(r: Quantity, shell_id: int) Quantity[source]

Calculate the velocity at a given radius within a shell.

Assume a piece-wise linear velocity with radius.

Parameters:
rastropy.units.quantity.Quantity

Radius at which to calculate the velocity

shell_idint

Shell index

Returns:
astropy.units.quantity.Quantity

Velocity at radius r within shell shell_id

Examples

geometry.get_velocity(rpacket.r, rpacket.current_shell_id)

property no_of_shells
property no_of_shells_active
property r_inner_active
property r_inner_boundary_index

Index of the shell at the active inner boundary.

property r_middle

Radius at the middle of each shell.

property r_middle_active

Radius at the middle of each active shell.

property r_outer_active
property r_outer_boundary_index

Index of the shell at the active outer boundary.

to_numba()[source]

Returns a new NumbaRadial1DGeometry object

Returns:
NumbaRadial1DGeometry

Numba version of Radial1DGeometry with properties in cgs units

property v_inner_active

Inner velocities for the active shells.

property v_inner_boundary: Quantity

Velocity at the active inner boundary.

property v_inner_boundary_idx

Index of the active inner velocity boundary.

property v_middle

Velocity at the middle of each shell.

property v_middle_active

Velocity at the middle of each active shell.

property v_outer_active

Outer velocities for the active shells.

property v_outer_boundary: Quantity

Velocity at the active outer boundary.

property v_outer_boundary_idx

Index of the active outer velocity boundary.

property velocity_gradient

Velocity gradient in each cell

property velocity_gradient_active

Velocity gradient in each cell

property volume

Volume in shell computed from r_outer and r_inner

property volume_active

Volume in shell computed from r_outer and r_inner