SharedNSE_2D_cylindrical.ipynbOpen in CoCalc
Jupyter notebook NSE_2D_cylindrical.ipynb
from sympy import *
#init_printing(use_latex='mathjax')
init_printing()
## variables
r, phi, z, t = symbols("r phi z t", real=True)   
## functions
p, ur, uphi, uz, Psi, Gamma = symbols("p u_r u_phi u_z Psi Gamma", cls=Function)
p     = Function('p')(r,z,t)
Psi   = Function('Psi')(r,z,t)
Gamma = Function('Gamma')(r,z,t)
ur    = Function('u_r')(r,z,t)
uphi  = Function('u_phi')(r,z,t)
uz    = Function('u_z')(r,z,t)
## constants
rho, mu, gz  = symbols('rho mu g_z', integer=True)  

show that the continuity equation is fulfilled automatically:

conti = Function('conti')
conti = 1/r*ur + diff(ur,r) + diff(uz,z)
conti
rur(r,z,t)+zuz(r,z,t)+1rur(r,z,t)\frac{\partial}{\partial r} \operatorname{u_{r}}{\left (r,z,t \right )} + \frac{\partial}{\partial z} \operatorname{u_{z}}{\left (r,z,t \right )} + \frac{1}{r} \operatorname{u_{r}}{\left (r,z,t \right )}
conti = conti.replace(ur,-1/r*diff(Psi,z)).replace(uphi,1/r*Gamma).replace(uz,1/r*diff(Psi,r))
conti
z(1rrΨ(r,z,t))+r(1rzΨ(r,z,t))1r2zΨ(r,z,t)\frac{\partial}{\partial z}\left(\frac{1}{r} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )}\right) + \frac{\partial}{\partial r}\left(- \frac{1}{r} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )}\right) - \frac{1}{r^{2}} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )}
conti.doit() == 0
True

the navier-stokes-equations:

combine first and third equation by cross-differentiation and subtraction.

eqr = rho*(diff(ur,t)+ur*diff(ur,r)+uz*diff(ur,z)-uphi**2/r) - mu*(1/r*diff((r*diff(ur,r)),r)+diff(ur,z,z)-ur/r**2) + diff(p,r)
eqr
μ(2z2ur(r,z,t)+1r(r2r2ur(r,z,t)+rur(r,z,t))1r2ur(r,z,t))+ρ(ur(r,z,t)rur(r,z,t)+uz(r,z,t)zur(r,z,t)+tur(r,z,t)1r2(r,z,t))+rp(r,z,t)- \mu \left(\frac{\partial^{2}}{\partial z^{2}} \operatorname{u_{r}}{\left (r,z,t \right )} + \frac{1}{r} \left(r \frac{\partial^{2}}{\partial r^{2}} \operatorname{u_{r}}{\left (r,z,t \right )} + \frac{\partial}{\partial r} \operatorname{u_{r}}{\left (r,z,t \right )}\right) - \frac{1}{r^{2}} \operatorname{u_{r}}{\left (r,z,t \right )}\right) + \rho \left(\operatorname{u_{r}}{\left (r,z,t \right )} \frac{\partial}{\partial r} \operatorname{u_{r}}{\left (r,z,t \right )} + \operatorname{u_{z}}{\left (r,z,t \right )} \frac{\partial}{\partial z} \operatorname{u_{r}}{\left (r,z,t \right )} + \frac{\partial}{\partial t} \operatorname{u_{r}}{\left (r,z,t \right )} - \frac{1}{r} \operatorname{u_{\phi}}^{2}{\left (r,z,t \right )}\right) + \frac{\partial}{\partial r} p{\left (r,z,t \right )}
eqz = rho*(diff(uz,t)+ur*diff(uz,r)+uz*diff(uz,z)) - mu*(1/r*diff(r*diff(uz,r),r)+diff(uz,z,z))  + diff(p,z) - rho*gz
eqz = eqz.collect(rho)
eqz
μ(2z2uz(r,z,t)+1r(r2r2uz(r,z,t)+ruz(r,z,t)))+ρ(gz+ur(r,z,t)ruz(r,z,t)+uz(r,z,t)zuz(r,z,t)+tuz(r,z,t))+zp(r,z,t)- \mu \left(\frac{\partial^{2}}{\partial z^{2}} \operatorname{u_{z}}{\left (r,z,t \right )} + \frac{1}{r} \left(r \frac{\partial^{2}}{\partial r^{2}} \operatorname{u_{z}}{\left (r,z,t \right )} + \frac{\partial}{\partial r} \operatorname{u_{z}}{\left (r,z,t \right )}\right)\right) + \rho \left(- g_{z} + \operatorname{u_{r}}{\left (r,z,t \right )} \frac{\partial}{\partial r} \operatorname{u_{z}}{\left (r,z,t \right )} + \operatorname{u_{z}}{\left (r,z,t \right )} \frac{\partial}{\partial z} \operatorname{u_{z}}{\left (r,z,t \right )} + \frac{\partial}{\partial t} \operatorname{u_{z}}{\left (r,z,t \right )}\right) + \frac{\partial}{\partial z} p{\left (r,z,t \right )}
eqrz = diff(eqr,z)-diff(eqz,r)
eqrz = eqrz.collect(mu).collect(rho)
eqrz
μ(3z3ur(r,z,t)+3rz2uz(r,z,t)1r(r3r2zur(r,z,t)+2rzur(r,z,t))+1r(r3r3uz(r,z,t)+22r2uz(r,z,t))1r2(r2r2uz(r,z,t)+ruz(r,z,t))+1r2zur(r,z,t))+ρ(ur(r,z,t)2rzur(r,z,t)ur(r,z,t)2r2uz(r,z,t)+uz(r,z,t)2z2ur(r,z,t)uz(r,z,t)2rzuz(r,z,t)+rur(r,z,t)zur(r,z,t)rur(r,z,t)ruz(r,z,t)+zur(r,z,t)zuz(r,z,t)ruz(r,z,t)zuz(r,z,t)+2tzur(r,z,t)2rtuz(r,z,t)2r(r,z,t)z(r,z,t))\mu \left(- \frac{\partial^{3}}{\partial z^{3}} \operatorname{u_{r}}{\left (r,z,t \right )} + \frac{\partial^{3}}{\partial r\partial z^{2}} \operatorname{u_{z}}{\left (r,z,t \right )} - \frac{1}{r} \left(r \frac{\partial^{3}}{\partial r^{2}\partial z} \operatorname{u_{r}}{\left (r,z,t \right )} + \frac{\partial^{2}}{\partial r\partial z} \operatorname{u_{r}}{\left (r,z,t \right )}\right) + \frac{1}{r} \left(r \frac{\partial^{3}}{\partial r^{3}} \operatorname{u_{z}}{\left (r,z,t \right )} + 2 \frac{\partial^{2}}{\partial r^{2}} \operatorname{u_{z}}{\left (r,z,t \right )}\right) - \frac{1}{r^{2}} \left(r \frac{\partial^{2}}{\partial r^{2}} \operatorname{u_{z}}{\left (r,z,t \right )} + \frac{\partial}{\partial r} \operatorname{u_{z}}{\left (r,z,t \right )}\right) + \frac{1}{r^{2}} \frac{\partial}{\partial z} \operatorname{u_{r}}{\left (r,z,t \right )}\right) + \rho \left(\operatorname{u_{r}}{\left (r,z,t \right )} \frac{\partial^{2}}{\partial r\partial z} \operatorname{u_{r}}{\left (r,z,t \right )} - \operatorname{u_{r}}{\left (r,z,t \right )} \frac{\partial^{2}}{\partial r^{2}} \operatorname{u_{z}}{\left (r,z,t \right )} + \operatorname{u_{z}}{\left (r,z,t \right )} \frac{\partial^{2}}{\partial z^{2}} \operatorname{u_{r}}{\left (r,z,t \right )} - \operatorname{u_{z}}{\left (r,z,t \right )} \frac{\partial^{2}}{\partial r\partial z} \operatorname{u_{z}}{\left (r,z,t \right )} + \frac{\partial}{\partial r} \operatorname{u_{r}}{\left (r,z,t \right )} \frac{\partial}{\partial z} \operatorname{u_{r}}{\left (r,z,t \right )} - \frac{\partial}{\partial r} \operatorname{u_{r}}{\left (r,z,t \right )} \frac{\partial}{\partial r} \operatorname{u_{z}}{\left (r,z,t \right )} + \frac{\partial}{\partial z} \operatorname{u_{r}}{\left (r,z,t \right )} \frac{\partial}{\partial z} \operatorname{u_{z}}{\left (r,z,t \right )} - \frac{\partial}{\partial r} \operatorname{u_{z}}{\left (r,z,t \right )} \frac{\partial}{\partial z} \operatorname{u_{z}}{\left (r,z,t \right )} + \frac{\partial^{2}}{\partial t\partial z} \operatorname{u_{r}}{\left (r,z,t \right )} - \frac{\partial^{2}}{\partial r\partial t} \operatorname{u_{z}}{\left (r,z,t \right )} - \frac{2}{r} \operatorname{u_{\phi}}{\left (r,z,t \right )} \frac{\partial}{\partial z} \operatorname{u_{\phi}}{\left (r,z,t \right )}\right)
eqrz = eqrz.replace(ur,-1/r*diff(Psi,z)).replace(uphi,1/r*Gamma).replace(uz,1/r*diff(Psi,r))
eqrz
μ(3rz2(1rrΨ(r,z,t))3z3(1rzΨ(r,z,t))+1r(r3r3(1rrΨ(r,z,t))+22r2(1rrΨ(r,z,t)))1r(r3r2z(1rzΨ(r,z,t))+2rz(1rzΨ(r,z,t)))1r2(r2r2(1rrΨ(r,z,t))+r(1rrΨ(r,z,t)))+1r2z(1rzΨ(r,z,t)))+ρ(r(1rrΨ(r,z,t))z(1rrΨ(r,z,t))r(1rrΨ(r,z,t))r(1rzΨ(r,z,t))+z(1rrΨ(r,z,t))z(1rzΨ(r,z,t))+r(1rzΨ(r,z,t))z(1rzΨ(r,z,t))2rt(1rrΨ(r,z,t))+2tz(1rzΨ(r,z,t))1rrΨ(r,z,t)2rz(1rrΨ(r,z,t))+1rrΨ(r,z,t)2z2(1rzΨ(r,z,t))+1rzΨ(r,z,t)2r2(1rrΨ(r,z,t))1rzΨ(r,z,t)2rz(1rzΨ(r,z,t))2r2Γ(r,z,t)z(1rΓ(r,z,t)))\mu \left(\frac{\partial^{3}}{\partial r\partial z^{2}} \left(\frac{1}{r} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )}\right) - \frac{\partial^{3}}{\partial z^{3}} \left(- \frac{1}{r} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )}\right) + \frac{1}{r} \left(r \frac{\partial^{3}}{\partial r^{3}} \left(\frac{1}{r} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )}\right) + 2 \frac{\partial^{2}}{\partial r^{2}} \left(\frac{1}{r} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )}\right)\right) - \frac{1}{r} \left(r \frac{\partial^{3}}{\partial r^{2}\partial z} \left(- \frac{1}{r} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )}\right) + \frac{\partial^{2}}{\partial r\partial z} \left(- \frac{1}{r} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )}\right)\right) - \frac{1}{r^{2}} \left(r \frac{\partial^{2}}{\partial r^{2}} \left(\frac{1}{r} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )}\right) + \frac{\partial}{\partial r}\left(\frac{1}{r} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )}\right)\right) + \frac{1}{r^{2}} \frac{\partial}{\partial z}\left(- \frac{1}{r} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )}\right)\right) + \rho \left(- \frac{\partial}{\partial r}\left(\frac{1}{r} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )}\right) \frac{\partial}{\partial z}\left(\frac{1}{r} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )}\right) - \frac{\partial}{\partial r}\left(\frac{1}{r} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )}\right) \frac{\partial}{\partial r}\left(- \frac{1}{r} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )}\right) + \frac{\partial}{\partial z}\left(\frac{1}{r} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )}\right) \frac{\partial}{\partial z}\left(- \frac{1}{r} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )}\right) + \frac{\partial}{\partial r}\left(- \frac{1}{r} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )}\right) \frac{\partial}{\partial z}\left(- \frac{1}{r} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )}\right) - \frac{\partial^{2}}{\partial r\partial t} \left(\frac{1}{r} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )}\right) + \frac{\partial^{2}}{\partial t\partial z} \left(- \frac{1}{r} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )}\right) - \frac{1}{r} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )} \frac{\partial^{2}}{\partial r\partial z} \left(\frac{1}{r} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )}\right) + \frac{1}{r} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )} \frac{\partial^{2}}{\partial z^{2}} \left(- \frac{1}{r} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )}\right) + \frac{1}{r} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )} \frac{\partial^{2}}{\partial r^{2}} \left(\frac{1}{r} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )}\right) - \frac{1}{r} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )} \frac{\partial^{2}}{\partial r\partial z} \left(- \frac{1}{r} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )}\right) - \frac{2}{r^{2}} \Gamma{\left (r,z,t \right )} \frac{\partial}{\partial z}\left(\frac{1}{r} \Gamma{\left (r,z,t \right )}\right)\right)
eqrz = eqrz.doit().expand()
eqrz
μr4r4Ψ(r,z,t)+2μr4r2z2Ψ(r,z,t)+μr4z4Ψ(r,z,t)2μr23r3Ψ(r,z,t)2μr23rz2Ψ(r,z,t)+3μr32r2Ψ(r,z,t)3μr4rΨ(r,z,t)ρr3r2tΨ(r,z,t)ρr3tz2Ψ(r,z,t)ρr2rΨ(r,z,t)3r2zΨ(r,z,t)ρr2rΨ(r,z,t)3z3Ψ(r,z,t)+ρr2zΨ(r,z,t)3r3Ψ(r,z,t)+ρr2zΨ(r,z,t)3rz2Ψ(r,z,t)+ρr22rtΨ(r,z,t)2ρr3Γ(r,z,t)zΓ(r,z,t)+ρr3rΨ(r,z,t)2rzΨ(r,z,t)3ρr3zΨ(r,z,t)2r2Ψ(r,z,t)2ρr3zΨ(r,z,t)2z2Ψ(r,z,t)+3ρr4rΨ(r,z,t)zΨ(r,z,t)\frac{\mu}{r} \frac{\partial^{4}}{\partial r^{4}} \Psi{\left (r,z,t \right )} + \frac{2 \mu}{r} \frac{\partial^{4}}{\partial r^{2}\partial z^{2}} \Psi{\left (r,z,t \right )} + \frac{\mu}{r} \frac{\partial^{4}}{\partial z^{4}} \Psi{\left (r,z,t \right )} - \frac{2 \mu}{r^{2}} \frac{\partial^{3}}{\partial r^{3}} \Psi{\left (r,z,t \right )} - \frac{2 \mu}{r^{2}} \frac{\partial^{3}}{\partial r\partial z^{2}} \Psi{\left (r,z,t \right )} + \frac{3 \mu}{r^{3}} \frac{\partial^{2}}{\partial r^{2}} \Psi{\left (r,z,t \right )} - \frac{3 \mu}{r^{4}} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )} - \frac{\rho}{r} \frac{\partial^{3}}{\partial r^{2}\partial t} \Psi{\left (r,z,t \right )} - \frac{\rho}{r} \frac{\partial^{3}}{\partial t\partial z^{2}} \Psi{\left (r,z,t \right )} - \frac{\rho}{r^{2}} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )} \frac{\partial^{3}}{\partial r^{2}\partial z} \Psi{\left (r,z,t \right )} - \frac{\rho}{r^{2}} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )} \frac{\partial^{3}}{\partial z^{3}} \Psi{\left (r,z,t \right )} + \frac{\rho}{r^{2}} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )} \frac{\partial^{3}}{\partial r^{3}} \Psi{\left (r,z,t \right )} + \frac{\rho}{r^{2}} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )} \frac{\partial^{3}}{\partial r\partial z^{2}} \Psi{\left (r,z,t \right )} + \frac{\rho}{r^{2}} \frac{\partial^{2}}{\partial r\partial t} \Psi{\left (r,z,t \right )} - \frac{2 \rho}{r^{3}} \Gamma{\left (r,z,t \right )} \frac{\partial}{\partial z} \Gamma{\left (r,z,t \right )} + \frac{\rho}{r^{3}} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )} \frac{\partial^{2}}{\partial r\partial z} \Psi{\left (r,z,t \right )} - \frac{3 \rho}{r^{3}} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )} \frac{\partial^{2}}{\partial r^{2}} \Psi{\left (r,z,t \right )} - \frac{2 \rho}{r^{3}} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )} \frac{\partial^{2}}{\partial z^{2}} \Psi{\left (r,z,t \right )} + \frac{3 \rho}{r^{4}} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )}
print(eqrz)
mu*Derivative(Psi(r, z, t), r, r, r, r)/r + 2*mu*Derivative(Psi(r, z, t), r, r, z, z)/r + mu*Derivative(Psi(r, z, t), z, z, z, z)/r - 2*mu*Derivative(Psi(r, z, t), r, r, r)/r**2 - 2*mu*Derivative(Psi(r, z, t), r, z, z)/r**2 + 3*mu*Derivative(Psi(r, z, t), r, r)/r**3 - 3*mu*Derivative(Psi(r, z, t), r)/r**4 - rho*Derivative(Psi(r, z, t), r, r, t)/r - rho*Derivative(Psi(r, z, t), t, z, z)/r - rho*Derivative(Psi(r, z, t), r)*Derivative(Psi(r, z, t), r, r, z)/r**2 - rho*Derivative(Psi(r, z, t), r)*Derivative(Psi(r, z, t), z, z, z)/r**2 + rho*Derivative(Psi(r, z, t), z)*Derivative(Psi(r, z, t), r, r, r)/r**2 + rho*Derivative(Psi(r, z, t), z)*Derivative(Psi(r, z, t), r, z, z)/r**2 + rho*Derivative(Psi(r, z, t), r, t)/r**2 - 2*rho*Gamma(r, z, t)*Derivative(Gamma(r, z, t), z)/r**3 + rho*Derivative(Psi(r, z, t), r)*Derivative(Psi(r, z, t), r, z)/r**3 - 3*rho*Derivative(Psi(r, z, t), z)*Derivative(Psi(r, z, t), r, r)/r**3 - 2*rho*Derivative(Psi(r, z, t), z)*Derivative(Psi(r, z, t), z, z)/r**3 + 3*rho*Derivative(Psi(r, z, t), r)*Derivative(Psi(r, z, t), z)/r**4
eqrz2 = mu*(Derivative(Psi, r, r, r, r)/r + 2*Derivative(Psi, r, r, z, z)/r + Derivative(Psi, z, z, z, z)/r - 2*Derivative(Psi, r, r, r)/r**2 - 2*Derivative(Psi, r, z, z)/r**2 + 3*Derivative(Psi, r, r)/r**3 - 3*Derivative(Psi, r)/r**4) + rho*(-Derivative(Psi, r, r, t)/r - Derivative(Psi, t, z, z)/r - Derivative(Psi, r)*Derivative(Psi, r, r, z)/r**2 - Derivative(Psi, r)*Derivative(Psi, z, z, z)/r**2 + Derivative(Psi, z)*Derivative(Psi, r, r, r)/r**2 + Derivative(Psi, z)*Derivative(Psi, r, z, z)/r**2 + Derivative(Psi, r, t)/r**2 - 2*Gamma*Derivative(Gamma, z)/r**3 + Derivative(Psi, r)*Derivative(Psi, r, z)/r**3 - 3*Derivative(Psi, z)*Derivative(Psi, r, r)/r**3 - 2*Derivative(Psi, z)*Derivative(Psi, z, z)/r**3 + 3*Derivative(Psi, r)*Derivative(Psi, z)/r**4)
eqrz2
μ(1r4r4Ψ(r,z,t)+2r4r2z2Ψ(r,z,t)+1r4z4Ψ(r,z,t)2r23r3Ψ(r,z,t)2r23rz2Ψ(r,z,t)+3r32r2Ψ(r,z,t)3r4rΨ(r,z,t))+ρ(1r3r2tΨ(r,z,t)1r3tz2Ψ(r,z,t)1r2rΨ(r,z,t)3r2zΨ(r,z,t)1r2rΨ(r,z,t)3z3Ψ(r,z,t)+1r2zΨ(r,z,t)3r3Ψ(r,z,t)+1r2zΨ(r,z,t)3rz2Ψ(r,z,t)+1r22rtΨ(r,z,t)2r3Γ(r,z,t)zΓ(r,z,t)+1r3rΨ(r,z,t)2rzΨ(r,z,t)3r3zΨ(r,z,t)2r2Ψ(r,z,t)2r3zΨ(r,z,t)2z2Ψ(r,z,t)+3r4rΨ(r,z,t)zΨ(r,z,t))\mu \left(\frac{1}{r} \frac{\partial^{4}}{\partial r^{4}} \Psi{\left (r,z,t \right )} + \frac{2}{r} \frac{\partial^{4}}{\partial r^{2}\partial z^{2}} \Psi{\left (r,z,t \right )} + \frac{1}{r} \frac{\partial^{4}}{\partial z^{4}} \Psi{\left (r,z,t \right )} - \frac{2}{r^{2}} \frac{\partial^{3}}{\partial r^{3}} \Psi{\left (r,z,t \right )} - \frac{2}{r^{2}} \frac{\partial^{3}}{\partial r\partial z^{2}} \Psi{\left (r,z,t \right )} + \frac{3}{r^{3}} \frac{\partial^{2}}{\partial r^{2}} \Psi{\left (r,z,t \right )} - \frac{3}{r^{4}} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )}\right) + \rho \left(- \frac{1}{r} \frac{\partial^{3}}{\partial r^{2}\partial t} \Psi{\left (r,z,t \right )} - \frac{1}{r} \frac{\partial^{3}}{\partial t\partial z^{2}} \Psi{\left (r,z,t \right )} - \frac{1}{r^{2}} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )} \frac{\partial^{3}}{\partial r^{2}\partial z} \Psi{\left (r,z,t \right )} - \frac{1}{r^{2}} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )} \frac{\partial^{3}}{\partial z^{3}} \Psi{\left (r,z,t \right )} + \frac{1}{r^{2}} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )} \frac{\partial^{3}}{\partial r^{3}} \Psi{\left (r,z,t \right )} + \frac{1}{r^{2}} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )} \frac{\partial^{3}}{\partial r\partial z^{2}} \Psi{\left (r,z,t \right )} + \frac{1}{r^{2}} \frac{\partial^{2}}{\partial r\partial t} \Psi{\left (r,z,t \right )} - \frac{2}{r^{3}} \Gamma{\left (r,z,t \right )} \frac{\partial}{\partial z} \Gamma{\left (r,z,t \right )} + \frac{1}{r^{3}} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )} \frac{\partial^{2}}{\partial r\partial z} \Psi{\left (r,z,t \right )} - \frac{3}{r^{3}} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )} \frac{\partial^{2}}{\partial r^{2}} \Psi{\left (r,z,t \right )} - \frac{2}{r^{3}} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )} \frac{\partial^{2}}{\partial z^{2}} \Psi{\left (r,z,t \right )} + \frac{3}{r^{4}} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )}\right)
# show that the manual collect() of mu and rho is correct:
(eqrz - eqrz2).doit().expand() == 0
True

Equation (A.2) from Lopez1998:

How it is published: D(η/r)=1Re[2(η/r)+2r(η/r)r]+(Γ2/r4)z D(\eta/r) = \frac{1}{\operatorname{Re}} \left[ \nabla^2(\eta/r) + \frac{2}{r}(\eta/r)_r \right] + (\Gamma^2/r^4)_z

corrected: D(η/r)=1Re[2(η/r)+4r(η/r)r]+(Γ2/r4)z D(\eta/r) = \frac{1}{\operatorname{Re}} \left[ \nabla^2(\eta/r) + \frac{{\color{red}4}}{r}(\eta/r)_r \right] + (\Gamma^2/r^4)_z

eta = Function('eta')(r,z,t)
eqrz3 = diff(eta/r,t)-1/r*diff(Psi,z)*diff(eta/r,r)+1/r*diff(Psi,r)*diff(eta/r,z)-diff(Gamma**2/r**4,z)-mu/rho*(diff(eta/r,r,r)-1/r*diff(eta/r,r)+diff(eta/r,z,z)+4/r*diff(eta/r,r))
(eqrz3*r).expand().collect(mu/rho)
μρ(2r2η(r,z,t)2z2η(r,z,t)1rrη(r,z,t)+1r2η(r,z,t))+tη(r,z,t)+1rrΨ(r,z,t)zη(r,z,t)1rzΨ(r,z,t)rη(r,z,t)+1r2η(r,z,t)zΨ(r,z,t)2r3Γ(r,z,t)zΓ(r,z,t)\frac{\mu}{\rho} \left(- \frac{\partial^{2}}{\partial r^{2}} \eta{\left (r,z,t \right )} - \frac{\partial^{2}}{\partial z^{2}} \eta{\left (r,z,t \right )} - \frac{1}{r} \frac{\partial}{\partial r} \eta{\left (r,z,t \right )} + \frac{1}{r^{2}} \eta{\left (r,z,t \right )}\right) + \frac{\partial}{\partial t} \eta{\left (r,z,t \right )} + \frac{1}{r} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )} \frac{\partial}{\partial z} \eta{\left (r,z,t \right )} - \frac{1}{r} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )} \frac{\partial}{\partial r} \eta{\left (r,z,t \right )} + \frac{1}{r^{2}} \eta{\left (r,z,t \right )} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )} - \frac{2}{r^{3}} \Gamma{\left (r,z,t \right )} \frac{\partial}{\partial z} \Gamma{\left (r,z,t \right )}

die korrigierte "4" schlägt sich in den Vorzeichen von 1rηr+1r2η-\frac{1}{r}\frac{\partial \eta}{\partial r} + \frac{1}{r^2}\eta nieder

eqrz3 = eqrz3.replace(eta,-1/r*(diff(Psi,r,r)-1/r*diff(Psi,r)+diff(Psi,z,z))).doit().expand()
eqrz3
μr2ρ4r4Ψ(r,z,t)+2μr2ρ4r2z2Ψ(r,z,t)+μr2ρ4z4Ψ(r,z,t)2μr3ρ3r3Ψ(r,z,t)2μr3ρ3rz2Ψ(r,z,t)+3μr4ρ2r2Ψ(r,z,t)3μr5ρrΨ(r,z,t)1r23r2tΨ(r,z,t)1r23tz2Ψ(r,z,t)1r3rΨ(r,z,t)3r2zΨ(r,z,t)1r3rΨ(r,z,t)3z3Ψ(r,z,t)+1r3zΨ(r,z,t)3r3Ψ(r,z,t)+1r3zΨ(r,z,t)3rz2Ψ(r,z,t)+1r32rtΨ(r,z,t)2r4Γ(r,z,t)zΓ(r,z,t)+1r4rΨ(r,z,t)2rzΨ(r,z,t)3r4zΨ(r,z,t)2r2Ψ(r,z,t)2r4zΨ(r,z,t)2z2Ψ(r,z,t)+3r5rΨ(r,z,t)zΨ(r,z,t)\frac{\mu}{r^{2} \rho} \frac{\partial^{4}}{\partial r^{4}} \Psi{\left (r,z,t \right )} + \frac{2 \mu}{r^{2} \rho} \frac{\partial^{4}}{\partial r^{2}\partial z^{2}} \Psi{\left (r,z,t \right )} + \frac{\mu}{r^{2} \rho} \frac{\partial^{4}}{\partial z^{4}} \Psi{\left (r,z,t \right )} - \frac{2 \mu}{r^{3} \rho} \frac{\partial^{3}}{\partial r^{3}} \Psi{\left (r,z,t \right )} - \frac{2 \mu}{r^{3} \rho} \frac{\partial^{3}}{\partial r\partial z^{2}} \Psi{\left (r,z,t \right )} + \frac{3 \mu}{r^{4} \rho} \frac{\partial^{2}}{\partial r^{2}} \Psi{\left (r,z,t \right )} - \frac{3 \mu}{r^{5} \rho} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )} - \frac{1}{r^{2}} \frac{\partial^{3}}{\partial r^{2}\partial t} \Psi{\left (r,z,t \right )} - \frac{1}{r^{2}} \frac{\partial^{3}}{\partial t\partial z^{2}} \Psi{\left (r,z,t \right )} - \frac{1}{r^{3}} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )} \frac{\partial^{3}}{\partial r^{2}\partial z} \Psi{\left (r,z,t \right )} - \frac{1}{r^{3}} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )} \frac{\partial^{3}}{\partial z^{3}} \Psi{\left (r,z,t \right )} + \frac{1}{r^{3}} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )} \frac{\partial^{3}}{\partial r^{3}} \Psi{\left (r,z,t \right )} + \frac{1}{r^{3}} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )} \frac{\partial^{3}}{\partial r\partial z^{2}} \Psi{\left (r,z,t \right )} + \frac{1}{r^{3}} \frac{\partial^{2}}{\partial r\partial t} \Psi{\left (r,z,t \right )} - \frac{2}{r^{4}} \Gamma{\left (r,z,t \right )} \frac{\partial}{\partial z} \Gamma{\left (r,z,t \right )} + \frac{1}{r^{4}} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )} \frac{\partial^{2}}{\partial r\partial z} \Psi{\left (r,z,t \right )} - \frac{3}{r^{4}} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )} \frac{\partial^{2}}{\partial r^{2}} \Psi{\left (r,z,t \right )} - \frac{2}{r^{4}} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )} \frac{\partial^{2}}{\partial z^{2}} \Psi{\left (r,z,t \right )} + \frac{3}{r^{5}} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )}

show that Lopez' equation is correct:

(eqrz-eqrz3*rho*r).expand().doit() == 0
True

second equation:

eqphi = rho*(diff(uphi,t)+ur*diff(uphi,r)+uz*diff(uphi,z)+ur*uphi/r) - mu*(1/r * diff(r*diff(uphi,r),r) + diff(uphi,z,z) - uphi/r**2)
eqphi
μ(2z2(r,z,t)+1r(r2r2(r,z,t)+r(r,z,t))1r2(r,z,t))+ρ(ur(r,z,t)r(r,z,t)+uz(r,z,t)z(r,z,t)+t(r,z,t)+1r(r,z,t)ur(r,z,t))- \mu \left(\frac{\partial^{2}}{\partial z^{2}} \operatorname{u_{\phi}}{\left (r,z,t \right )} + \frac{1}{r} \left(r \frac{\partial^{2}}{\partial r^{2}} \operatorname{u_{\phi}}{\left (r,z,t \right )} + \frac{\partial}{\partial r} \operatorname{u_{\phi}}{\left (r,z,t \right )}\right) - \frac{1}{r^{2}} \operatorname{u_{\phi}}{\left (r,z,t \right )}\right) + \rho \left(\operatorname{u_{r}}{\left (r,z,t \right )} \frac{\partial}{\partial r} \operatorname{u_{\phi}}{\left (r,z,t \right )} + \operatorname{u_{z}}{\left (r,z,t \right )} \frac{\partial}{\partial z} \operatorname{u_{\phi}}{\left (r,z,t \right )} + \frac{\partial}{\partial t} \operatorname{u_{\phi}}{\left (r,z,t \right )} + \frac{1}{r} \operatorname{u_{\phi}}{\left (r,z,t \right )} \operatorname{u_{r}}{\left (r,z,t \right )}\right)
eqphi = eqphi.replace(ur,-1/r*diff(Psi,z)).replace(uphi,1/r*Gamma).replace(uz,1/r*diff(Psi,r))
eqphi.doit()
μ(1r(2r2Γ(r,z,t)1rrΓ(r,z,t)+1r2Γ(r,z,t))+1r2z2Γ(r,z,t)1r3Γ(r,z,t))+ρ(1r(1rrΓ(r,z,t)1r2Γ(r,z,t))zΨ(r,z,t)+1rtΓ(r,z,t)+1r2zΓ(r,z,t)rΨ(r,z,t)1r3Γ(r,z,t)zΨ(r,z,t))- \mu \left(\frac{1}{r} \left(\frac{\partial^{2}}{\partial r^{2}} \Gamma{\left (r,z,t \right )} - \frac{1}{r} \frac{\partial}{\partial r} \Gamma{\left (r,z,t \right )} + \frac{1}{r^{2}} \Gamma{\left (r,z,t \right )}\right) + \frac{1}{r} \frac{\partial^{2}}{\partial z^{2}} \Gamma{\left (r,z,t \right )} - \frac{1}{r^{3}} \Gamma{\left (r,z,t \right )}\right) + \rho \left(- \frac{1}{r} \left(\frac{1}{r} \frac{\partial}{\partial r} \Gamma{\left (r,z,t \right )} - \frac{1}{r^{2}} \Gamma{\left (r,z,t \right )}\right) \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )} + \frac{1}{r} \frac{\partial}{\partial t} \Gamma{\left (r,z,t \right )} + \frac{1}{r^{2}} \frac{\partial}{\partial z} \Gamma{\left (r,z,t \right )} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )} - \frac{1}{r^{3}} \Gamma{\left (r,z,t \right )} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )}\right)
eqphi2 = (eqphi*r).doit().expand()
eqphi2
μ2r2Γ(r,z,t)μ2z2Γ(r,z,t)+μrrΓ(r,z,t)+ρtΓ(r,z,t)ρrrΓ(r,z,t)zΨ(r,z,t)+ρrzΓ(r,z,t)rΨ(r,z,t)- \mu \frac{\partial^{2}}{\partial r^{2}} \Gamma{\left (r,z,t \right )} - \mu \frac{\partial^{2}}{\partial z^{2}} \Gamma{\left (r,z,t \right )} + \frac{\mu}{r} \frac{\partial}{\partial r} \Gamma{\left (r,z,t \right )} + \rho \frac{\partial}{\partial t} \Gamma{\left (r,z,t \right )} - \frac{\rho}{r} \frac{\partial}{\partial r} \Gamma{\left (r,z,t \right )} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )} + \frac{\rho}{r} \frac{\partial}{\partial z} \Gamma{\left (r,z,t \right )} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )}
eqphi3 = eqphi2.expand().collect(mu).collect(rho)
eqphi3
μ(2r2Γ(r,z,t)2z2Γ(r,z,t)+1rrΓ(r,z,t))+ρ(tΓ(r,z,t)1rrΓ(r,z,t)zΨ(r,z,t)+1rzΓ(r,z,t)rΨ(r,z,t))\mu \left(- \frac{\partial^{2}}{\partial r^{2}} \Gamma{\left (r,z,t \right )} - \frac{\partial^{2}}{\partial z^{2}} \Gamma{\left (r,z,t \right )} + \frac{1}{r} \frac{\partial}{\partial r} \Gamma{\left (r,z,t \right )}\right) + \rho \left(\frac{\partial}{\partial t} \Gamma{\left (r,z,t \right )} - \frac{1}{r} \frac{\partial}{\partial r} \Gamma{\left (r,z,t \right )} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )} + \frac{1}{r} \frac{\partial}{\partial z} \Gamma{\left (r,z,t \right )} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )}\right)
print(latex(eqphi3))
\mu \left(- \frac{\partial^{2}}{\partial r^{2}} \Gamma{\left (r,z,t \right )} - \frac{\partial^{2}}{\partial z^{2}} \Gamma{\left (r,z,t \right )} + \frac{1}{r} \frac{\partial}{\partial r} \Gamma{\left (r,z,t \right )}\right) + \rho \left(\frac{\partial}{\partial t} \Gamma{\left (r,z,t \right )} - \frac{1}{r} \frac{\partial}{\partial r} \Gamma{\left (r,z,t \right )} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )} + \frac{1}{r} \frac{\partial}{\partial z} \Gamma{\left (r,z,t \right )} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )}\right)

solution from sympy (copied from cell above):

tΓ(r,z,t)1rrΓ(r,z,t)zΨ(r,z,t)+1rzΓ(r,z,t)rΨ(r,z,t)=μρ(2r2Γ(r,z,t)+2z2Γ(r,z,t)1rrΓ(r,z,t)) \frac{\partial}{\partial t} \Gamma{\left (r,z,t \right )} - \frac{1}{r} \frac{\partial}{\partial r} \Gamma{\left (r,z,t \right )} \frac{\partial}{\partial z} \Psi{\left (r,z,t \right )} + \frac{1}{r}\frac{\partial}{\partial z} \Gamma{\left (r,z,t \right )} \frac{\partial}{\partial r} \Psi{\left (r,z,t \right )} = \frac{\mu}{\rho} \left(\frac{\partial^{2}}{\partial r^{2}} \Gamma{\left (r,z,t \right )} + \frac{\partial^{2}}{\partial z^{2}} \Gamma{\left (r,z,t \right )} - \frac{1}{r}\frac{\partial}{\partial r} \Gamma{\left (r,z,t \right )}\right)

solution from [Lopez1998] eq. A.1:

(t1rΨzr+1rΨrz)Γ=1Re(r21rr+z2)Γ \left( \partial_t - \frac{1}{r}\Psi_z\partial_r + \frac{1}{r}\Psi_r\partial_z \right) \Gamma = \frac{1}{\operatorname{Re}} \left( \partial_r^2 - \frac{1}{r} \partial_r + \partial_z^2 \right) \Gamma

mit 1Re=μρ\frac{1}{\operatorname{Re}} = \frac{\mu}{\rho}

q.e.d.q.e.d.

third equation (subsitution of second whirl entry) ωϕ=η\omega_\phi = \eta