[Scilab-users] ODE Simulation Problem Initially solved with FORTRAN to be numrically solved using Scilab/MATLAB

Radovan Omorjan omorr at uns.ac.rs
Fri Aug 9 19:50:16 CEST 2013


Hello,

To be honest, I do not understand your problem, sorry. There are two 
ordinary differential equations
d?/dt = 0.0107h -- 0.00205?^2 .....................eqn(1)
dh/dt = 0.311 -- 0.0624?..............................eqn(2)

what is the interval of integration t=[0,?]  ?
what are the initial conditions v, h for t=0 ?
I suppose that v,h are changed somehow in t=[0,?]. In what way?

Regards,
Radovan

On 8/9/2013 7:00 PM, Debola Abduljeleel wrote:
>
> Hi All,
>
> I humbly seek kind assistance in solving a Simulation Problem (GRAVITY 
> FLOW TANK) that was initially written with FORTRAN to numerically 
> integrate two ODEs (to be given below, eqns 1&2).
> *Gravity-flow tank data:*
> /Pipe:/
> Internal Diameter = 3 ftArea = 7.06 ft^2Length = 3000 ft
> /Tank:/
> Internal Diameter = 12ftArea = 113 ft^2Height = 7 ft
> **
> *Steady State values:*
> F = 35.1 ft^3 /s (15, 700 gpm)
> h = 4.72 ft
> ? = 4.97 ft/s
> d?/dt = 0.0107h -- 0.00205?^2 .....................eqn(1)
>
> dh/dt = 0.311 -- 0.0624?...........................eqn(2)
>
> The following FORTRAN program numerically integrates the two ODEs 
> describing the system for two different initial conditions of flow and 
> liquid level in the tank: (1) when the initial flow rate is 50 percent 
> of the design rate, and (2) when the initial flow rate is 67 percent 
> of the design flow rate. At time equal zero, the flow rate into the 
> tank is increased to the maximum design flow rate of 35.1 ft^3 /s.
> Gravity-flow tank simulation (FORTRAN)
> C(TIME IN SECONDS)
> C TWO CASES ARE RUN. AT TIME EQUAL ZERO THE FEED FLOW RATE IS
> CINCREASED TO 100% OF THE DESIGN FLOW RATE (15, 700 GPM)
> CCASE NO.1 STARTS FROM 67% OF DESIGN FLOW RATE
> CCASE NO.2 STARTS FROM 50% OF DESIGN FLOW RATE
> DATA V1,H1/3.40,2.05/
> DATA V2,H2/2.50,1.2/
> DO 200 N=1,2
> IF(N.=EQ.1)THEN
> V=V1
> H=H1
> ELSE
> V=V2
> H=H2
> ENDIF
> TIME=0.
> DELTA=1.
> TPRINT=0.
> WRITE(6,1)V,H
> 1 FORMAT('INITIAL CONDITIONS: V= ',F6.3,' H=',F8.3)
> WRITE(6,2)
> 2 FORMAT('TIMEVH')
> C
> C EVALUATE DERIVATIVES
> C
> 100 VDOT=0.0107*H-0.00205*V**2
> HDOT=0.311-0.0624*V
> IF(TIME.LT <http://time.lt.tp/>.TPRINT)GO TO 10
> WRITE(6,3)TIME,V,H
> 3 FORMAT(3X,3F8.2)
> TPRINT=TPRINT+20.
> C
> C INTEGRATE USING EULER
> C
> 10 V = V+ VDOT+VDELTA
> H= H+HDOT+DELTA
> TIME=TIME+DELTA
> IF(TIME.LE.200.)GO TO 100
> 200 CONTINUE
> STOP
> END
> The explicit first-order Euler algorithm is used. The variables that 
> we are solving for as functions of time are V and H. the right-hand 
> sides of eqns (1) and (3) are the derivative functions. These are 
> called VDOT and HDOT in the program. At the nth step in time
> (VDOT)_n = 0.0107(H)_n -- 0.00205[(V)_n ]^2 
> ..................................eqn(3)
> (HDOT)_n = 0.311 -- 0.0624(V)_n 
> ...........................................eqn(4)
> The new values of H and V at the (n+1)st step are calculated from the 
> Euler algorithm with a step size of DELTA.
> (H)_n+1 = (H)_n + DELTA(HDOT)_n .................................eqn(5)
> (V)_n+1 = (V)_n +DELTA(VDOT)_n .................................eqn(6)
> A plot was equally generated to illustrate the relationship between h, 
> ft and process time, s.
>
> Thanks as I anticipate various professional inputs.
> ABDULJELEEL A. OSUNKUNLE
> SCIENTIFIC OFFICER
> PROJECTS DEVELOPMENT INSTITUTE, P.M.B. 01609, EMENE INDUSTRIAL LAYOUT, 
> ENUGU, NIGERIA.
> +2347058408440.
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org <mailto:users at lists.scilab.org>
> http://lists.scilab.org/mailman/listinfo/users
>
>
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20130809/7ba2b5fe/attachment.htm>


More information about the users mailing list