Thanks Bill.. Also ..I see that both the versions are the same for a 2D case.... Dominic -----Original Message----- From: overture-bounce@xxxxxxxxxxxxx [mailto:overture-bounce@xxxxxxxxxxxxx] On Behalf Of Bill Henshaw Sent: Friday, June 20, 2008 11:24 PM To: overture@xxxxxxxxxxxxx Subject: [overture] Re: Rigidbody Torque / angular acceleration Hi Dominic, These are Euler's equations, see http://en.wikipedia.org/wiki/Euler%27s_equations ...Bill #DOMINIC DENVER JOHN CHANDAR# wrote: > Hi Bill, > > In OverBlown v21, the code RigidBodyMotion.C had the following > lines to compute the angular acceleration from the torque as : > > for( axis=0; axis<3; axis++ ) > { > omegaDot(axis)=( > (1.-alpha)*( > g(0,ip1)*e(0,axis,ip1) > +g(1,ip1)*e(1,axis,ip1) > +g(2,ip1)*e(2,axis,ip1)) > > +alpha *( > g(0,i)*e(0,axis,i) > +g(1,i)*e(1,axis,i) > +g(2,i)*e(2,axis,i)) > )/mI(axis); > } > > /So this is equivalent to the statement G dot e_i = mI_i > \omegaDot_i (From Newtons Laws). / > > whereas in cg.v22, the same code is as follows : > > for( axis=0; axis<3; axis++ ) > { > const int axisp1=(axis+1) % 3; > const int axisp2=(axis+2) % 3; > > omegaDot(axis)=( > (1.-alpha)*( > (mI(axisp1)-mI(axisp2))*w(axisp1,ip1)*w(axisp2,ip1)+ > g(0,ip1)*e(0,axis,ip1)+ > g(1,ip1)*e(1,axis,ip1)+ > g(2,ip1)*e(2,axis,ip1)) > > +alpha *( > (mI(axisp1)-mI(axisp2))*w(axisp1,i)*w(axisp2,i)+ > g(0,i)*e(0,axis,i)+ > g(1,i)*e(1,axis,i)+ > g(2,i)*e(2,axis,i)) > )/mI(axis); > } > > > Now, both versions look alike except for the additional term in > cg.v22 - " (mI(axisp1)-mI(axisp2))*w(axisp1,ip1)*w(axisp2,ip1) " ~ > (I2-I3)*w2*w3 .. > I'd like to know the basis for adding this term... > > Regards, > Dominic >