# Finding drag equation for any triangle. [solved]

This topic is 1013 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

EDIT. Seems to be solved i rotated body each frame not by velocity but by the change in velocity

i find local velocity of each element by

vec3 cog2pC = vectorAB(pos + ROTATION_MAT * CENTER_OF_GRAVITY, ACTUAL_FRAME[i].pC);
vec3 local_vel = vel + AngVel * cog2pC;
where ACTUAL_FRAME.pC is pressure center in world coord

AngVel  is the angular velocity of the body

then i calculate skin and form drag,

then i apply moment like that

cog2cob_vec = vectorAB(pos + ROTATION_MAT * CENTER_OF_GRAVITY, ACTUAL_FRAME[i].pC);
ETorque = cog2cob_vec *  ( element_skin_drag + element_form_drag );
elements_torque = elements_torque + ETorque; //this is overall moment which will determine angular vel

then after looping through each element i do:

mat4 inv_rot = ROTATION_MAT;
inv_rot.Inverse();

vec3 local_torque = inv_rot * elements_torque;

vec3 EAngAcc;
EAngAcc.x = local_torque.x / Ixx;
EAngAcc.y = local_torque.y / Iyy;
EAngAcc.z = local_torque.z / Izz;

AngVel = AngVel + EAngAcc*dt;

then

vec3 vLocalAngularMoment = (EAngVel*dt)*RAD_TO_DEG; //i convert that to degrees this should give me how much i should rotate (by degrees) my object

i get inproper rotation

i think its because  i use radians/ s in local velocity calculation but i need degrees / s (maybe), since my linear movement is defined by m/s

im not sure if what i am doing is correct or wrong, so i can move on with finding other bugs.

i forgot to mention that i also apply these element skin and form drag forces to linear motion.

Edited by WiredCat

1. 1
2. 2
3. 3
Rutin
13
4. 4
5. 5

• 26
• 10
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633696
• Total Posts
3013394
×