(* Look for Information about ASCEND at the bottom of this page *) (* This problem solved by Krishnan Chittur (kchittur@che.uah.edu) Chemical Engineering Department, University of Alabama in Huntsville, Huntsville, AL 35899 (256) 890 6850 (V), (256) 890 6839 (FAX) *) (* Janna, Problem 3-3 *) REQUIRE "atoms.a4l"; MODEL problem_33; rho IS_A mass_density; mu IS_A viscosity; D IS_A distance; A IS_A area; V1, V2, V IS_A speed; Q IS_A volume_rate; g IS_A gravity_constant; pi IS_A circle_constant; epsilon IS_A distance; Re IS_A factor; P1, P2, deltaP IS_A pressure; z1, z2, L IS_A distance; K, Kbasket, Kelbow, Kglobe, Kexit IS_A factor; chenterm, f IS_A fraction; eq1: A*4.0 = pi*D^2; eq2: V*A = Q; eq3: Re = rho*V*D/mu; eq4: K = Kbasket + 4.0*Kelbow + Kglobe + Kexit; eq5: P1 = P2 + deltaP; eqbernoulli: P1*2.0*D + V1^2*rho*D + z1*g*2.0*rho*D = P2*2.0*D + V2^2*rho*D + z2*g*2.0*rho*D + 4.0*f*L*V^2*rho + K*V^2*rho*D; chenterm = (epsilon/D)^(1.1098)*(1.0/2.8257) + 5.8566*Re^(-0.8981); eqchen: 1.0/sqrt(4.0*f) = -(2.0/2.303)*lnm(epsilon/(3.7065*D) - 5.0452*lnm(chenterm)/(2.303*Re)); METHODS METHOD clear; Q.fixed := FALSE; D.fixed := FALSE; rho.fixed := FALSE; mu.fixed := FALSE; epsilon.fixed := FALSE; P1.fixed := FALSE; P2.fixed := FALSE; V1.fixed := FALSE; V2.fixed := FALSE; V.fixed := FALSE; z1.fixed := FALSE; z2.fixed := FALSE; L.fixed := FALSE; Kbasket.fixed := FALSE; Kelbow.fixed := FALSE; Kglobe.fixed := FALSE; Kexit.fixed := FALSE; f.fixed := FALSE; chenterm.fixed := FALSE; END clear; METHOD specify; Q.fixed := TRUE; rho.fixed := TRUE; mu.fixed := TRUE; epsilon.fixed := TRUE; P1.fixed := FALSE; P2.fixed := TRUE; deltaP.fixed := TRUE; V1.fixed := TRUE; V2.fixed := TRUE; z1.fixed := TRUE; z2.fixed := TRUE; L.fixed := TRUE; Kbasket.fixed := TRUE; Kelbow.fixed := TRUE; Kglobe.fixed := TRUE; Kexit.fixed := TRUE; END specify; METHOD values; Q := 50.0 {liter/s}; rho := 1100.0 {kg/m^3}; mu := 16.2E-3 {N*s/m^2}; epsilon := 0.0 {cm}; P2 := 101.3 {kPa}; deltaP := 200.0 {kPa}; V1 := 0.0 {m/sec}; V2 := 0.0 {m/sec}; z1 := 0.0 {m}; z2 := 0.0 {m}; L := 2000.0 {m}; Kbasket := 0.0; Kelbow := 0.0; Kglobe := 0.0; Kexit := 0.0; V.nominal := 1.0 {m/s}; V.lower_bound := 0.0 {m/s}; END values; METHOD seqmod; RUN clear; RUN specify; RUN values; END seqmod; END problem_33; (* This is written in the ASCEND Language ... ASCEND is an environment to pose modeling problems and solve the resulting equations in an object oriented fashion ... ASCEND is copyrighted by Carnegie Mellon University ... the project has been directed by Prof. Art Westerberg in the Chemical Engineering Department ...*) (* ASCEND is free software, released under GNU ... and you can get it from http://www.cs.cmu.edu/~ascend ... The software has been released WITH source code ... it compiles under Solaris, Linux and IRIX (SGI) ... thanks to the excellent job in putting the software together by the folks at CMU! ... and autoconf ... I have no idea of how people compiled things before ./configure ! *)