def compute_energy_density(energy, x_dimension, y_dimension, chemical_potential):
    """Computes energy density from raw energy."""
    return (energy / (x_dimension * y_dimension)) + chemical_potential