import math


def phugo(v2,d1,p1,g):
	"""
	Calculates the pressure along the hugoniot
	Input:
	v2 - Velocity jump
	d1 - Old density
	p1 - Old pressure
	g - Adiabatic index
	"""


	return (4*p1 + d1*(1 + g)*v2**2 + \
			math.sqrt(d1)*v2*\
			math.sqrt(16*g*p1 + \
					  d1*(1 + g)**2*v2**2))/4.