tardis.transport.montecarlo.nonhomologous_grid module

tardis.transport.montecarlo.nonhomologous_grid.quartic_roots(a, b, c, d, e, threshold)[source]

Solves ax^4 + bx^3 + cx^2 + dx + e = 0, for the real roots greater than the threshold returns (x - threshold). Uses: https://en.wikipedia.org/wiki/Quartic_function#General_formula_for_roots

Parameters:
a, b, c, d, e: coefficients of the equations ax^4 + bx^3 + cx^2 + dx + e = 0, float
threshold: lower needed limit on roots, float
Returns
———–
roots: real positive roots of ax^4 + bx^3 + cx^2 + dx + e = 0
tardis.transport.montecarlo.nonhomologous_grid.tau_sobolev_factor(r_packet, geometry)[source]

The angle and velocity dependent Tau Sobolev factor component. Is called when ENABLE_NONHOMOLOGOUS_EXPANSION is set to True.

Note: to get Tau Sobolev, this needs to be multiplied by tau_sobolevs found from plasma Parameters ———- r_packet: RPacket geometry: Geometry

Returns:
factor = 1.0 / ((1 - mu * mu) * v / r + mu * mu * dvdr)
tardis.transport.montecarlo.nonhomologous_grid.velocity_dvdr(r_packet, geometry)[source]

Velocity at radius r and dv/dr of current shell

Parameters:
r_packet: RPacket
geometry: Geometry
Returns:
v: float, current velocity
frac: float, dv/dr for current shell