11.07.2015 Views

Modeling Tools for Environmental Engineers and Scientists

Modeling Tools for Environmental Engineers and Scientists

Modeling Tools for Environmental Engineers and Scientists

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

comm<strong>and</strong> is used to keep the plot frame the same until all the µ values havebeen evaluated.As can be seen from this example, several lines of comm<strong>and</strong>s have to betyped in the Comm<strong>and</strong> window every time the program is run. A major partof the comm<strong>and</strong>s shown in this example can be moved to the Lake M-File orto another M-File to make the program less tedious to maintain <strong>and</strong> run.MATLAB ® also contains a set of tools to construct a graphic user interface toimprove the interactivity.Plotting graphs in MATLAB ® also has to be scripted with specifications<strong>for</strong> all the plot objects, such as axis labels, annotations, etc., as in the case ofMathematica ® . In addition, unit conversion factors have to be provided by themodeler/user as MATLAB ® does not maintain dimensional homogeneity. Ascan be seen from this example, the MATLAB ® environment dem<strong>and</strong>s somedegree of programming skills, as does the Mathematica ® environment.7.5.5 LAKE PROBLEM MODELED IN TK SolverFigure 7.9 shows the TK Solver model <strong>for</strong> the steady state solution <strong>for</strong> thelake problem, illustrating the backsolving feature. The equation, as entered inthe Rule Sheet, is in the same <strong>for</strong>m as Equation (7.1), but the C ss is entered asa known value in the Variable Sheet (= 1.63 mg/L) so as to determine theallowable waste load, W 0 . When run, TK Solver inverts the equation specifiedin the rule sheet to calculate the unknown W 0 <strong>and</strong> returns the result(= 1081) in the output column. Also of interest to note, in TK Solver, all theparameters in the right-h<strong>and</strong> side of the equation need not be known to solvethe model—this is not possible with the other packages.TK Solver also has the ability to maintain dimensional homogeneity <strong>and</strong>to per<strong>for</strong>m calculations in a consistent set of units to provide the result in thecorrect unit; however, this feature is not fully automatic as in the case ofMathcad ® . The developer has to incorporate a unit conversion sheet specifyingthe conversion factors between the units in which the calculations aredone <strong>and</strong> the units in which the variables are displayed in the output sheet.This feature is also illustrated in Figure 7.9, where the reaction rate constantis entered in day –1 instead of in yr –1 ; TK Solver automatically calculates <strong>and</strong>displays the same numerical value as be<strong>for</strong>e <strong>for</strong> the waste load in the unitsspecified in the output sheet.In contrast to Mathcad ® , in TK Solver, the various components of themodel, such as inputs, equations, <strong>and</strong> plots, etc., are displayed in separatewindows. Also, the model is not live as in the other packages. After makingany changes in the model parameters, the user has to use the menu comm<strong>and</strong>Solve to recalculate the results or update the plots. TK Solver includes aMathLook window, which re<strong>for</strong>mats the line <strong>for</strong>m of the equation entered intothe Rule sheet, into a st<strong>and</strong>ard mathematical <strong>for</strong>m <strong>for</strong> checking complexequations or <strong>for</strong> presentation purposes.© 2002 by CRC Press LLC

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!