Code covered by the BSD License  

Highlights from
Discrete Lorenz Water Wheel Simulation

image thumbnail

Discrete Lorenz Water Wheel Simulation

by

 

This is a simulation of an 8 tank lorenze water wheel. The water speed is manually controlled.

AlphaCalc(Pr,Ptheta,mass,P)
function alpha = AlphaCalc(Pr,Ptheta,mass,P)

% Finds the Angular acceleration of the Lorenze wheel
% the parameter was included in case later developments require some of the
% physical parameters from the Initialize.m file



COM_position = CenterOfMass(Pr,Ptheta,mass);

r_COM = COM_position(1);
theta_COM = COM_position(2);

Inertia = MomentOfInertia(Pr,Ptheta,mass,r_COM,theta_COM);

relativeTheta = mod(theta_COM,pi/2);

if theta_COM > 3*pi/2
    
    Angle = -(pi/2 - relativeTheta);
    
elseif theta_COM > pi
    
    Angle = -((pi/2-relativeTheta) +pi/2);
    
elseif theta_COM > pi/2
    
    Angle = (relativeTheta + pi/2);
    
else
    Angle = relativeTheta;
    
end




F_mag = 9.8*sum(mass); 


torque = r_COM*F_mag*sin(Angle);

alpha = torque/Inertia;









end

Contact us