# need help with Physics/Math

hey I’m trying to make a cyclone as in a hydro-cyclone: http://www.youtube.com/watch?v=QfTZUMq-LGI

having quite some trouble with this… at this time i don’t even know where to start explaining my troubles…

this piece of code should give the physics for a particle once in the cyclone… as you can see i trying lots of different approaches
but i must admit i got lost in al the iterations and different formula…

``````public Transform cycloon;
public GameObject Obj;
//weight
public float w;
//particle density
public float d;
public float r;
//particle velocity
public float v;
//public bool free=true;
public bool cyclone;

void FixedUpdate ()
{
if(cyclone)
{
float R = Vector3.Distance(transform.position, new Vector3(cycloon.position.x,transform.position.y,cycloon.position.z));
//Circle
float C = 2*Mathf.PI*R;
//Rotational period
float T = (1/v)*C;
//Rotational speed
float W = 2*Mathf.PI/T;
//Tangential speed
float V = W*R;
//Inertia
float I = w*Mathf.Pow(R,2);
//Acceleration
float A = Mathf.Pow(V,2)/R;
//constantForce.force = Vector3.Cross((-rigidbody.velocity/d), Vector3.up)*(W/C);
//print(T+" "+W/C+" "+I+" "+A+" "+V);
//v=rigidbody.velocity.magnitude;
//print (V+"_"+V2);
}
}
``````

here are some links i used to try and figure out what formulas to use…

I got 10 days left to solve this so any help is more then welcome!!

here is my project if someone would benifit from playing around with it…

got it to work with like this:

``````void FixedUpdate ()
{
v=rigidbody.velocity.magnitude;
if(cyclone)
{
Vector3 relativePos=transform.position- new Vector3(cycloon.position.x,transform.position.y,cycloon.position.z);
float R = Vector3.Distance(transform.position, new Vector3(cycloon.position.x,transform.position.y,cycloon.position.z));
//Circle
float C = 2*Mathf.PI*R;
//Rotational period
float T = v/C;
//Rotational speed
float W = 2*Mathf.PI/T;
//Tangential speed
float V = W*R;
//Inertia
float I = w*Mathf.Pow(R,2);
//Acceleration
float A = (Mathf.Pow(V,2))/R;
float S =((2*(d-1.2041f))*Mathf.Pow(r, 2)*Mathf.Pow(W, 2)*R)/(9*1.983f);

constantForce.force = Vector3.Cross(relativePos, Vector3.up)*S;

}

}
``````

S is based on Stokes law working in a centrifuge Wet van Stokes - Wikipedia (sorry in dutch)
so that seems to work only there should also be an inward force, pushing smaller particles toward the centre of the centrifuge…
so i was thinking of doing this with relative force of the constant force, but it doesn’t seem to work…

how do i let multiple forces work on the same object?