Hello,
In my script, I am trying to give a bucket an water inflow and an outflow if the bucket is located between two angles on a wheel (Lorenz Malkus water wheel is what i'm actually trying to program). For some reason, the script says, there isn't ever a bucket that has an inflow.
This is what I have as script now(this is just a part of the script):
if (Theta(th,j1) > ((7*pi)/16) && Theta(th,j1) < ((9*pi)/16))
h(th,j1)=h(th-1,j1) - ((A0/(pi .* Re .^ 2)) .* sqrt(2.*g.*h(th-1,j1))) .* dt + Q;
Theta is the angle in this problem, and it has an initial value (theta0)
th is the timestep, on th=1, theta = theta0, so we are trying to calculate theta on th=2 and so on.
j1 is the number of the bucket, if we have 4 buckets, j1 goes from 1 to 4.
h is the height of the water, and the part behind the - sign is the water that flows out of the bucket, Q is the inflow.
We are almost sure the fault is in the if-statement.
All help is welcome, Thanks a lot!

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Specialized Power Systems에 대해 자세히 알아보기

질문:

Lex
2014년 3월 27일

답변:

2014년 3월 27일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by