Computational Physics, Physics, Math, Python.
def p_analytical(x, y): X, Y = numpy.meshgrid(x,y) p_an = numpy.sinh(1.5*numpy.pi*Y / x[-1]) /\ (numpy.sinh(1.5*numpy.pi*y[-1]/x[-1]))*numpy.sin(1.5*numpy.pi*X/x[-1]) return p_an Ok, let’s try out the analytical solution and use it to test the plot_3D function we wrote above. nx = 41 ny = 41 x =