
Vector field help
Hello!
One of my assignments is to create a vector field resembling a tornado, shapewise, at least...
I've gotten the basic shape of the tornado, given by the function f(x,y) = 2*ln(x^2+y^2)... How would I go about converting this function to a vector field resembling this shape?
Thanks in advance!

I assume the function you've given is a surface $\displaystyle z=2\ln{(x^2+y^2)}$ where the magnitude of the velocity is constant. You need to also say how the speed changes when you move away from the surface.
So you'll need a function of the form:
$\displaystyle \text{speed}=f(x,y,z)$
To get this function, you'll probably want to simplify the equation for your surface, then write an expression that is constant on your surface and increases when $\displaystyle x^2+y^2$ decreases.
The direction at (x,y,z) will be (y,x,0), which will make the wind go in a circle clockwise around the zaxis. It needs to be a unit vector, so:
$\displaystyle \text{direction}=(\frac{y}{\sqrt{x^2+y^2}},\frac{x}{\sqrt{x^2+y^2}},0) \text{ or } \frac{y}{\sqrt{x^2+y^2}}i\frac{x}{\sqrt{x^2+y^2}}j$
and to get your vector field, just multiply speed by direction.
Post again if you're still having trouble.

Thank you for your reply!
Let's say if I were to model the speed with something like 1/e^(x^2+y^2) because it's a tornado and tornadoes have 0 outside and inside of the "wall"... (Well, 0 is impossible without piecewise functions, so really, really small magnitudes will suffice)... How would I go about doing the actual modeling and integrating with the direction vector?
Sorry, I've just gotten into vector fields and my teacher threw this assignment at me so I don't really have the hang of it yet... Please bear with me.

Ok. You can make the speed $\displaystyle 1/e^{x^2+y^2}$. Of course, that will mean that everything is independent of z. So we don't really need to keep z around  we can just use 2 dimensions. Vector fields still work in 2 dimensions, so that's not really a problem.
A vector field is just a vector for every point, and a vector is just magnitude and direction. If the direction is a unit vector $\displaystyle \frac{u}{r}i+\frac{v}{r}j\text{, where }r=\sqrt{u^2+v^2}$, you just multiply the unit vector by the magnitude r to get the actual vector ui + vj.
If the components u and v of the vector are functions of the coordinates x and y, you have a vector field u(x,y)i + v(x,y)j. In three dimensions, it would look like u(x,y,z)i + v(x,y,z)j + w(x,y,z)k.
So you have the speed (which is the magnitude of the velocity vector) and the direction unit vector (which I gave you in my previous post). Multiply them together to get the equations of the vector field:
$\displaystyle v(x,y)\text{ = speed * direction = }1/e^{x^2+y^2} * \left(\frac{y}{\sqrt{x^2+y^2}}i\frac{x}{\sqrt{x^2+y^2}}j\right)$, and substituting $\displaystyle r=\sqrt{x^2+y^2}$ gives us:
$\displaystyle v(x,y) = \frac{y}{re^{r^2}}i\frac{x}{re^{r^2}}j\text{, where }r=\sqrt{x^2+y^2}$.
Hope that helps! Post again if there's something you don't understand.

Thank you! I think I understand the concept a lot more now...
But the problem still remains.
My goal is to create a vector field that resembles a tornado and the surface z = 2*ln(x^2+y^2), but I'd assume, as you said, it's a constant function... Is it possible to integrate the properties of 1/e^(x^2+y^2) with the surface z = 2*ln(x^2+y^2)?
Sorry if I sound a little lost!

Let's set the speed to be 1 on z = 2*ln(x^2+y^2) and behaving as 1/e^(x^2+y^2) when off the curve.
Let q0 be the value e^(z/2) of x^2+y^2 when speed=1. Let q=x^2+y^2. So we want speed=1 when q=q0 and speed goes like 1/e^q. So the equation is speed=1/e^(qq0). Substituting in gives:
speed = 1/e^(x^2y^2e^(z/2))
Is that what you're looking for?