









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
The main points in the home work assignment of the Modeling of Physical Systems are:Convention, Independent States, Bearing Friction,, Bearing, Constitutive, Linear, Original, System, Silent Air Pump, Rotor Inertia
Typology: Exercises
1 / 17
This page cannot be seen from the preview
Don't miss anything!
R.G. Longoria, Fall 2012 ME 383Q, UT-Austin
R.G. Longoria, Fall 2012 ME 383Q, UT-Austin
0 200 400 600 800 1000 1200 1400 1600 1800 2000 0 2 4 Flow Velocity in Tunnel 0 200 400 600 800 1000 1200 1400 1600 1800 2000
0 500 1000 1500 2000 2500 3000
% This file defines the tabular constitutive % laws for functions used in the surge tank % simulation. % % Make variables global. clear all global Vc Pc topen sopen tclose sclose sw global It Qp Pin Gamma_t Rl Rt % % Surge tank: V=V(P) % If called P=table1(volume,V), will return % linearly interpolated pressure. % Vc=[0 200 800 1500 2700 3300 4100 4550 4750]; Pc=[0 98100 196200 294300 588600 686700 784800 882900 1079100]; z=zeros(9,2); z(:,1)=[3100;3110;3120;3130;3160;3170;3180;3190;3210]; z(:,2)=Vc; % % S(t) functions for opening or closing of valve. % tclose=[0 5 20 5000.0]; sclose=[1 0.15 0 0]; % topen=[0 5 15 20 30 35 40 5000]; sopen=[0 0.4 0.4 0.8 0.8 1.0 1.0 1.0]; % % Define variables % It = fluid inertance It = 1000.013580.0/12.0; % Qp = magnitude of flow rate modulated by S(t). Qp = 0.6sqrt(2.09.807(3168-3072)); % Pin = source of pressure at inlet to tunnel. Pin = 1000.09.807(3168-3100); % Gamma_t = Critical value of fluid momentum where flow is turbulent. Gamma_t=2000.010001e-613580/sqrt(412/3.1415927); % Rl = coefficient for friction in tunnel if laminar. Rl = 8.01.0e-613580.0/(9.807144); % Rt = coefficient for friction in tunnel if turbulent. Rt = 4.110009.807/(144It*It);
% Simulation of the differential equations defined in surgetank % from 0.0 < t < Nstepstintrval. Using the routine ODE45. sw = 0; Nsteps = 600; tinterval = 5.0; t0 = -tinterval; tfinal = Nstepstinterval; t(Nsteps)=tfinal; t(1)=0.0; % note: these initial conditions come from running the % surge_tank_open.m routine, and finding final values x(1,1) = 2247.395202707482; x(1,2) = 2.946369274944220e+07; tsfinal = t(1); xs0 = [x(1,1) x(1,2)]; % Define initial conditions. Pinertial(1) = Pin-fluidresist(x(1,2))-interp1(Vc,Pc,x(1,1)); Wlevel(1) = interp1(Vc,Pc,x(1,1))/9807 + 3100.0; % % for i=2:Nsteps, ts0 = tsfinal; tsfinal = ts0 + tinterval; tol = 1.e-3; % Accuracy trace = 0; [ts,xs] = ode15s(@surgetank,[ts0 tsfinal],xs0); intdim=size(ts); t(i) = ts(intdim(1)); x(i,1) = xs(intdim(1),1); x(i,2) = xs(intdim(1),2); Pinertial(i) = Pin-fluidresist(x(i,2))-interp1(Vc,Pc,x(i,1)); Wlevel(i) = interp1(Vc,Pc,x(i,1))/9807 + 3100.0; xs0 = [x(i,1) x(i,2)]; % Define initial conditions. end vt = x(:,2)/(It*12); figure(2) subplot(3,1,1), plot(t,vt), title('Flow Velocity in Tunnel') subplot(3,1,2), plot(t,Pinertial), title('Inertial Pressure in Tunnel') subplot(3,1,3), plot(t,Wlevel), title('Water Level in Surge Tank (m)')
function xprime = surgetank(t,x); % surgetank(t,x) returns the state derivatives of the surge tank % system. Used by sim_surge. % Equation 1: volume of surge tank % Equation 2: fluid momentum in pressure tunnel % global It Qp Pin Gamma_t Rl Rt tclose sclose topen sopen Vc Pc sw if sw == 1 sfunc = interp1(topen,sopen,t); else sfunc = interp1(tclose,sclose,t); end xprime = [x(2)/It-Qp*sfunc;Pin-fluidresist(x(2))-interp1(Vc,Pc,x(1))];
function resistance = fluidresist(fmom) global Gamma_t Rt It Rl if fmom > Gamma_t resistance = Rtfmomabs(fmom); else resistance = Rl*fmom/It; end