• Advertisement
Sign in to follow this  

Finding drag equation for any triangle. [solved]

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

If you intended to correct an error in the post then please contact us.

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;

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;


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

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement