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

Initialize.m

% ----------------------------------
% Simulation a Lorenze wheel with 8 discrete water tanks
% Trevor Slade: Brigham Young University
% If you have any questions feel free to contact me at:
% trevor.slade@byu.edu
% ------------------------------------
% ------------------------------------
% This simulation was done with the hope to figure out how to control
% the wheel with the minimal amount of feedback information. This
% simulation does not implement any controls, but the implementation only
% requires the manual adjustment for gamma (a slider bar in the simulink
% file ( LorenzeSimulinkV1) to be replaced by a controller
% I am continuing to work on improving the controller, and if you are
% intersted in working on this problem, or want to hear about the progress
% feel free to contact me!
% -------------------------------------
% Initializing the Parameters and APM
% Physical Parameters of the System
% These Parameters can be edited to match an actual system
P.rmax = 1; % radius of the wheel (m^3)
P.TH = .4; % Height of the Tanks (m)
P.TW = .3; % Width of the Tanks (m)
P.holeDiameter = .05; % Diameter of the outlet for each tank (m)
P.holeAc = pi*(P.holeDiameter/2)^2; % area of the outlet for each tank (m^3)
% ----------------
% Flow out constant: v = (outFlowConst)*sqrt(h)
P.outFlowConst = sqrt(2*9.8*1000)*P.holeAc;
% Initial velocity of the wheel
P.v0 = 0;
% damping Coefficient of the wheel (To account for friction)
P.b = 2;
P.VolFlowMax = .01; % Maximum Volumetric flow rate of the incoming water (m^3/s)