Question: how do i display divergence of vector into sum of derivatives?

 

Hello,

I'm writing an equation that has a term including divergence .. i'd like to print that as the sum of the derivatives

for example instead of nabla(u) display it as ux+uy+uz

 

restart

VectorCalculus[SetCoordinates]('cartesian'[x, y, z]); F := x, y, z, t

vel := VectorCalculus[VectorField](`<,>`(u(F), v(F), w(F)))

vel := u(x, y, z, t)*`#mover(mi("e"),mo("&lowbar;"))`[x]+v(x, y, z, t)*`#mover(mi("e"),mo("&lowbar;"))`[y]+w(x, y, z, t)*`#mover(mi("e"),mo("&lowbar;"))`[z]

(1)

Mass_eqn := diff(rho(F), t)+Divergence(rho(F)*vel)

Mass_eqn := diff(rho(x, y, z, t), t)+VectorCalculus[Nabla].(Vector(3, {(1) = rho(x, y, z, t)*u(x, y, z, t), (2) = rho(x, y, z, t)*v(x, y, z, t), (3) = rho(x, y, z, t)*w(x, y, z, t)}))

(2)

print(Mass_eqn)

diff(rho(x, y, z, t), t)+VectorCalculus[Nabla].(Vector(3, {(1) = rho(x, y, z, t)*u(x, y, z, t), (2) = rho(x, y, z, t)*v(x, y, z, t), (3) = rho(x, y, z, t)*w(x, y, z, t)}))

(3)

NULL


 

Download aero.mw

Please Wait...