from sympy.abc import x, n from sympy.utilities.lambdify import lambdify from scipy.special import j1, j0, jn_zeros import numpy as np import matplotlib.pyplot as plt from sympy import * import math from mpltools.style import use as uuu from matplotlib.patches import Ellipse uuu('ggplot') k = 2.4 h = 1.0 D = 1.0 w = 1.0 a = 0.01 def x(x0, y0, t): return 2 * exp(1 - 2 * h * k) * cosh(k * (h + y0)) * sin(k * x0 - w * t) - x0 # return -exp(k*y1)*sin(k*x1 - w*t) - x1 def y(x0, y0, t): return 2 * exp(1 - 2 * h * k) * sinh(k * (h + y0)) * cos(k * x0 - w * t) - y0
from sympy.abc import x,n from sympy.utilities.lambdify import lambdify from scipy.special import j1,j0,jn_zeros import numpy as np import matplotlib.pyplot as plt from sympy import * import math from mpltools.style import use as uuu from mpmath import besseljzero uuu('ggplot') a=10.0 nu=10.0 nmax=50 U = 10.0 h = 1.0 def u(y,t): summ=0 print "y=",y for n in xrange(1,nmax): summ+= (1./n)*exp(-n**2*pi**2*nu*t / h**2) * sin( n*pi*y/h) return U * (1 - y/h - (2./pi)*summ ) fig = plt.figure(num=None, figsize=(7.5,5), dpi=300) ax = fig.add_subplot(1,1,1) box = ax.get_position() ax.set_position([box.x0, box.y0, box.width, box.height])