CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Gradients. (https://www.cfd-online.com/Forums/main/8738-gradients.html)

J. Ca February 24, 2005 10:30

Gradients.
 
Hi all,

Can anyone tell me how to calculate the angle between the gradient of a scalar field and a vector field in general curvilinear cordinates. Cheers.

Runge_Kutta February 24, 2005 14:06

Re: Gradients.
 
Well, first you have to decide how you have represented the two vectors; as contravariant or covariant vectors. Also, you need your metric tensor. So, for

n^{i} = nabla(scalar)

v^{j} = vector

n^{i}g_{ij}v^{j} = Sqrt(n^{i}g_{ij}n^{j})*Sqrt(n^{i}g_{ij}n^{j}) Cos(theta)

or

n_{i} = nabla(scalar)

v_{j} = vector

n_{i}g^{ij}v_{j} = Sqrt(n_{i}g^{ij}n_{j})*Sqrt(n_{i}g^{ij}n_{j}) Cos(theta)

You could also use physical components.

J. Ca February 25, 2005 06:27

Re: Gradients.
 
Thank you Runge_Kutta. What is the g^{ij} you use in your notation above? Also, can you give me a simple intepretation of what the terms covariant and contravariant mean, particularly as applied to vectors. I am having difficulty understanding books when they try to explain this.

Runge_Kutta February 25, 2005 13:04

Re: Gradients.
 
g^{ij} is the inverse of g_{ij} - the metric tensor.

A year ago, I could have said something intellegent about covariant and contravariant quantities but I'm not going to post my fuzzy recollections on this board. Sorry!

J. Ca February 25, 2005 14:11

Re: Gradients.
 
Thank you. Yes, I am empatize with you!


All times are GMT -4. The time now is 22:58.