How do i solve this equations?
Ältere Kommentare anzeigen
Hi, i'm working on a model for a water rocket launch. But i'm struggling to get the drag and velocity formula's time related. The drag depends on the velocity and the velocity on the drag. Does anyone know how i can solve this?
P = 400000; %pressure difference (MpA)
rhow = 999.1026; %density of water (kg/m^3)
rhoa = 1.2922; %density of air (kg/m^3)
Cd = 0.4; %coefficient of drag
An = 0.0003801327111; %nozzle area (m^2)
As = 0.003848; %surface area rocket (m^2)
Mempty = 0.067; %empty mass of the rocket (kg)
Mwater = 0.350; %mass of the added water (kg)
Mfull = Mempty+Mwater; %mass of the rocket full (kg)
g = 9.81; %gravitational constant (m/s^2)
K = 0.4; %k-loss factor
Ta = 0.0238; %time of acceleration (s)
deltaP = 0.5*rhow*(29.8^2)*K; %minor losses of pressure in nozzle
Ve = 2*sqrt((P-deltaP)/rhow); %exit velocity of the propellant (m/s)
Mf = rhow*Ve*An; %mass flow of the propellant (kg/s)
Fthrust = Ve*Mf; %thrust generated by mass flow of propellant (N)
athrust = Fthrust/Mfull; %acceleration due to thrust force (m/s^2)
Ta = Mwater/Mf; %time of acceleration (s)
Vmax = (athrust-g)*Ta; %maximum velocity achieved (m/s)
H1 = ((athrust-g)/2)*Ta^2; %height achieved after acceleration (m)
Fd = -0.5*Cd*As*rhoa*V^2; %drag force (N)
adrag = Fd/Mempty; %decelleration due to drag (m/s^2)
V = Vmax -g*(t-Ta)+adrag*(t-Ta); %flight trajectory velocity (m/s)
H = Vmax*(t-Ta) -0.5*g*(t-Ta)^(2) + 0.5*adrag*(t-Ta)^(2);
1 Kommentar
Jyotish Robin
am 20 Jan. 2017
In the above code, you are using 'V' to calculate 'adrag' and 'adrag' to calculate 'V'. This will obviously lead to problems.
>>Fd = -0.5*Cd*As*rhoa*V^2;
This will throw an error since 'V' is not defined.
Also in your code, the variable 't' is not defined. You can use something similar to below code to define 't'.
>>t=0:.01:100
Hope the above suggestions help!
Antworten (0)
Kategorien
Mehr zu Ordinary Differential Equations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!