Write 1D equations using tensorial form

Hello,

I have an 1D domain and I want to solve the Navier-Stokes equations. Instead of writing the 1D form of the terms I want to write it in a tensorial form. Supposing that u is the velocity I want to replace u.dx(0) with grad(u) for example. I don’t know if tensorial operations are allowed when the domain is 1D.

Thanks

Hi, you can use gradient and divergence in one dimension too. However, you have to be careful with the rank of these operators. For example, in 1D the gradient of u (a scalar) will be rank 1 (a vector) although it will only have one entry. So in that case you would have to take grad(u)[0] otherwise you could use div(u) which will return a scalar.

1 Like