#

Ultra-relativistic simplifications of density, energy density and pressure calculations

import numpy


__path__ = "../.."


name = 'radiation'
#

Density

def density(particle):

    from particles import STATISTICS

    density = particle.T**3 * particle.dof / numpy.pi**2 * 1.2
    if particle.statistics == STATISTICS.FERMION:
#

Multiplied by for fermions

        density *= 3./4.
#
    return density
#

Energy density

def energy_density(particle):

    from particles import STATISTICS

    density = particle.dof * numpy.pi**2 / 30. * particle.T**4
    if particle.statistics == STATISTICS.FERMION:
#

Multiplied by for fermions

        density *= 7./8.
#
    return density
#

Pressure

def pressure(particle):

    return 1. * energy_density(particle) / 3.
#

def numerator(particle):

    return 0.
#

def denominator(particle):

    return 2. * numpy.pi**2 / 15. * particle.dof * (particle.aT)**3