MICROCOMPUTIR PROGRAMS fOR GRoUNDWAIIR BIUDIIB DAVID CLARKE 20 Musgrave Street, Crystal Brook, S.A. 5523 (Australia)
E...
62 downloads
629 Views
10MB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
MICROCOMPUTIR PROGRAMS fOR GRoUNDWAIIR BIUDIIB DAVID CLARKE 20 Musgrave Street, Crystal Brook, S.A. 5523 (Australia)
ELSEVIER
Amsterdam - Oxford - New York - Tokyo 1987
ELSEVIER SCIENCE PUBLISHERS B.V. Sara Burgerhartstraat 25 P.O. Box 211, 1000 AE Amsterdam, The Netherlands
Distributors for the United States and Canada: ELSEVIER SCIENCE PUBLISHING COMPANY INC. 52, Vanderbilt Avenue New York, N.Y. 10017, U.S.A.
ISBN 0-444-42793-7 (Vol. 30) ISBN 0-444-41669-2 (Series)
© Elsevier Science Publishers B.V., 1987 All rights reserved. No part of this publication may be reproduced, stored ina retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without the prior written permission of the publisher, Elsevier Science Publishers B.V./Science & Technology Division, P.O. Box 330,1000 AH Amsterdam, The Netherlands. Special regulations for readers in the USA - This publication has been registered with the Copyright Clearance Center Inc. (CCC), Salem, Massachusetts. I nformation can be obtained from the CCC about conditons under which photocopies of parts of this publication may be made in the USA. All other copyright questions, including photocopying outside of the USA, should be referred to the publisher. Printed in The Netherlands
Appreciation
I must t h a n k my f o r m e r b o s s , M i c h a e l Cobb, f o r t h e e n c o u r a g e m e n t t h a t he g i v e me i n d e v e l o p i n g t h e p r o g r a m s t h a t p r e c e d e d t h e s e . P e t e r Pavy drew t h e l i n e d r a w i n g s t h a t I found t o o d i f f i c u l t . H i s drawi n g s a r e t h e p r o f e s s i o n a l l o o k i n g o n e s . Thankyou P e t e r . Thanks a r e a l s o due t o my e m p l o y e r , The S o u t h A u s t r a l i a n D e p a r t m e n t of Mines and E n e r g y , f o r p u t t i n g m e i n a p o s i t i o n where t h e w r i t i n g o f t h e p r o g r a m , and t h e n t h e b o o k , became t h e o b v i o u s c o u r s e o f a c t i o n . I ' m g r a t e f u l t o Carl McElwee, M . Cobb, and Munir A . B u t t o f t h e K a n s a s (USA) G e o l o g i c a l S u r v e y f o r t h e F o r t r a n program on which i s b a s e d t h e s o l u t i o n o f t h e Leaky Well f u n c t i o n i n t h i s work. P a u l v a n der H e i j d e o f t h e I n t e r n a t i o n a l Groundwater M o d e l l i n g C e n t e r ( I n d i a n a , USA) o f f e r e d v e r y welcome e n c o u r a g e m e n t i n t h e e a r l i e r s t a g e s o f the writing. C o l l i n H a z e l o f t h e Q u e e n s l a n d ( A u s t . ) Water R e s o u r c e s Commission produced t h e d e s c r i p t i o n t h a t a l l o w e d t h e w r i t i n g of program f o r t h e M o d i f i e d S t e r n b e r g A n a l y s i s i n t h i s book. More t h a n a n y o t h e r , I t h a n k my w i f e , D e n e c e , a p a t i e n t and u n d e r s t a n d i n g c o m p u t e r widow, f o r h e r e n c o u r a g e m e n t and h e l p .
Disclaimer
While t h e p r o g r a m s i n t h i s book a r e g i v e n i n t h e b e l i e f t h a t t h e y w i l l g i v e c o r r e c t r e s u l t s i f ' t h e y a r e used a s i n s t r u c t e d , no r e s p o n s i b i l i t y i s assumed by t h e a u t h o r o r p u b l i s h e r f o r a n y e r r o r s , m i s t a k e s , or m i s r e p r e s e n t a t i o n s t h a t may o c c u r f r o m t h e u s e o f t h e s e p r o g r a m s , and no c o m p e n s a t i o n c a n be g i v e n f b r a n y damages o r losses w h a t e v e r t h e i r c a u s e . %
Index Addition of a constant to the elements of a vector; 6.11, 6.28 Alteration of step test data; 6.11, 6.27 Analytical models; 8.1 Angle hole, correction of readings; 6.11 ANMODL, listing; 8.7 ANMODL, method used; 8.5 ANMODL, units of time; 8.3 ANMODL, using; 8.2 ANMODL, variables; 8.6 ANMODL, verification; 8.2 ANMODL; 8.2 Anomalous readings, removal of; 6.13, 6.26 Anomalous readings, search for; 6.13, 6.25 Anomalous readings; 6.13 Approximation of reality; 1.2 Aquifer discharge test simulation (see also simulation); 4.1 Automatic renumbering of readings; 6.12 Automatic scaling of graphs; 9.1, 9.4 Average discharge rate, calculation of; 6.15, 6.29 Basic, computer language; 1.3 Basic, use of in modifying DTDHA data; 6.4 Bessel Function, requirement for double precision; 1.7 Bessel Function; 5.5 Bessel Functions, The; 1.4 BESSEL, description; 1.4 BESSEL, listing; 1.10 BESSEL, variables; 1.5 BESSEL, verification; 1.4 Boundary, aquifer; 2.5 Boundary, discharge; 10.1 Boundary, discharge; 2.5 Boundary, partial; 10.1 Boundary, recharge; 10.1 Boundary, recharge; 2.5 Boundary; 10.1 Built in data, DTDHA; 6.5 Built in data, 1NTERP1; 5.5, 5.12 Built in data, INTERP2; 5.7, 5.13 Calculation of drawdown when R=O; 8.4 CB2, listing; 3.11 CB2, variables; 3.8 CB2N, description; 3.5 CB2N, description; 3.8
Ix.1
CB2N, listing; 3.10 CB2N, variables; 3.7 CLEAR; 6.6 Colour for graph plotting; 9.5 COMPERF, description; 1.8 COMPERF, listing; 1.16 COMPERF, variables; 1.8 COMPERF, verification; 1.8 Complimentary Error Function; 1.8 Computers, use of; 1.1 CONFBOUN, description; 2.5 CONFBOUN, listing; 2.18 CONFBOUN, variables; 2.8 CONFBOUN, verification; 2.8 CONFDD, description; 2.1 CONFDD, listing; 2.13 CONFDD, variables; 2.2 CONFDD, verification; 2.2 CONFDDB, listing; 10.11 CONFDDB; 10.10 Confined aquifer with a boundary, drawdown in; 2.5 Confined aquifer, drawdown in; 2.1 CONFSTRP, description 2.11 CONFSTRP, listing; 2.23 CONFSTRP, variables; 2.12 CONFSTRP, verification; 2.12 Conversion for a different reference point; 6.11 Conversion of step test data, limitations of; 6.8 Conversion of step test data; 6.8, 6.33 Cooper-Jacob Approximation, limitation of; 3.1 CSTR1PB, listing; 10.11 CSTR1PB; 10.10 Cumulative flow meter readings; 6.4 Data from a flow rate recorder; 7.2 Data statements in DTPLOT; 9.6 Data statements, in STRNBRG; 7.2 Data, displaying, DTDHA; 6.8, 6.38 Data, entry of, DTDHA; 6.6, 6.36, 6.38 Data, printing, DTDHA; 6.8, 6.38 Delay of data display; 6.39 Deleting a number of readings; 6.12, 6.28 Deleting a reading; 6.12, 6.29 Delta s, calculation of; 6.16, 6.30
Ix.2
Index
Dependent variables, matrix of; 5.7 Dependent variables, vector of; 5.7 Dependent variables; 5.1 Derivative at a point; 3.2 Derivative, calculation of; 3.3 Derived Function; 3.2, 6.39 DIP switches on plotter; 9.2 Discharge rate in data; 7.1 Discharge rate of an image well; 10.2 Discharge rate, change in; 7.1 Discharge Test Data Handling and Analysis; 6.1 Disk data file, used in STRNBRG; 7.2 Disk file, loading; 6.6, 6.39 Disk space insufficient; 6.2 Double precision in Bessel Function; 1.7 Double precision in Leaky Well Function; 1.7 Double precision variables; 1.7 Double precision; 3.2 Drawdown curve, three part; 10.4 DTDHA, care in using; 6.2 DTDHA, description of; 6.24 DTDHA, functions of; 6.1 DTDHA, menus; 6.3 DTDHA, structure; 6.3 DTDHA, subroutines; 6.3 DTDHA, using; 6.5 DTDHA, variables in; 6.21 DTDHA, verification; 6.5 DTDHA, well equation; 4.27 DTDHA; 6.1 DTPLOT, capabilities; 9.1 DTPLOT, description; 9.3 DTPLOT, listing; 9.9 DTPLOT, subroutines; 9.6 DTPLOT, variables; 9.7 DTPLOT, verification; 9.2 DTPLOT; 9.1 DTPLOT; data statements; 9.6 Error Function; 1.8 Error, accumulating; 1.6 Error, Basic interpreter; 6.2 Error, operating system; 6.2 Error, round off; 1.1 Evaluation of the Well Equation by s/Q vs. Q; 6.17, 6.31 Evaluation of the Well Equation, Rorabaugh; 6.19, 6.32, 6.34
Evaluation of the Well Equation, Sternberg; 7.7 Evaluation of the Well Equation; 6.17, 6.31 Exponential series; 5.8 FACT, description; 1.7 FACT, listing; 1.15 FACT, variables; 1.8 FACT, verification; 1.7 Factorial Function; 1.7 File name, precaution; 6.6 Function of two variables, interpolation of; 5.2, 5.7, 5.12 Function, Bessel; 1.4 Function, Complimentary Error; 1.8, 1.16 Function, Error; 1.8 Function, Factorial; 1.7 Function, Gamma; 1.7 Function, Leaky Well; 1.6 Function, Well; 1.1 Gamma Function; 1.7 Gaussian Error Function, see Error Function Gaussian Error Function; 1.8 Graph types produced by DTPLOT; 9.1, 9.3, 9.4 Graphs, automatic scaling; 9.1, 9.4 Graphs, log-linear; 9.1 Graphs, log-log; 9.1 Graphs, names; 9.3, 9.5 Graphs, recovery; 9.1 Graphs, root t minus root t1 residual drawdown; 9.1 Graphs, root-time; 9.1 Graphs, t/t1 residual drawdown; 9.1 Gunter, Edmond; 3.1 Image well, calculation of distance to; 2.5 Image well, discharge rate of; 10.2 Image well; 10.1 Image well; 2.5 Image wells, calculation of drawdown due to; 2.5, 2.12 Independent variables, vector of; 5.7 Independent variables; 5.1 Inflection point in a set of data; 6.14, 6.26 Inflection point, search for; 6.14, 6.15, 6.26 Initial conditions; 7.1
Index Inserting a reading; 6.12, 6.29 INTERP1, description; 5.6 INTERP1, listing; 5.11 INTERP1, usage of variables; 5.7, 5.5 INTERP1, use of; 5.5 INTERP1, verification; 5.7 INTERP1; 5.5 INTERP2, description; 5.7 INTERP2, listing; 5.12 INTERP2, usage of variables; 5.9 INTERP2, verification; 5.9 INTERP2; 5.7 Interpolation, in g/w science; 5.1 Interpolation, Lagrangian; 5.1, 5.3 Interpolation, linear; 5.2 Keyboard entry of data, DTDHA; 6.6, 6.36 LAGRANGE 5.3 LAGRANGE, description; 5.3 LAGRANGE, listing; 5.10 LAGRANGE, variables; 5.5 LAGRANGE, verification; 5.4 Lagrange; 5.1 LEAKBOUN, description; 2.8 LEAKBOUN, listing; 2.20 LEAKBOUN, variables; 2.9 LEAKBOUN, verification; 2.9 LEAKDD, description; 2.3 LEAKDD, listing; 2.15 LEAKDD, variables; 2.4 LEAKDD, verification 2.4 LEAKFUNC, description; 1.6 LEAKFUNC, listing; 1.12 LEAKFUNC, variables; 1.7 LEAKFUNC, verification; 1.6 LEAKSTRP, listing; 2.26 LEAKSTRP, verification; 2.13 Leaky Artesian Well Function; (see Leaky Well Function) Leaky confined aquifer with a boundary, drawdown in; 2.8 Leaky confined aquifer, drawdown in; 2.3 Leaky confined strip aquifer, drawdown in; 2.13 Leaky Well Function, requirement for double precision; 1.7 Leaky Well Function; 1.6 Leaky Well Function; 5.7 Line feed character sent by DOS to a printer; 8.5
Ix.3
Linear regression; 6.13, 6.15, 6.18, 6.28, 6.36 Linear series; 5.2 Linearizing an exponential series; 5.8 Loading of a disk file, DTDHA; 6.6, 6.39 Log cycles, number plotted; 9.5 Log-linear graphs; 9.1 Log-log graphs; 9.1 Manual scaling of graphs; 9.4 Matrix model; 8.1 Matrix of groundwater heads; 8.1, 8.4 Menu, main menu of DTDHA; 6.6 Menu, menu 2 of DTDHA; 6.11 Merging data files; 6.12, 6.28 Models, limitations of; 1.2 Multiple discharge rates; 7.1 Multiple pump model; 4.2 Multiplication of the elements of a vector by a constant; 6.11, 6.28 Names for graphs; 9.3, 9.5 Napier, John; 3.1 Newton's Method; 3.1, 6.27, 6.39 NEWTON, description; 3.2 Newton, Isaac; 3.1 NEWTON, listing; 3.9 NEWTON, variables; 3.3 Newtons Method, speed of solution; 3.3 Noisy data; 6.14 Numerical models; 8.1 Partial boundary; 10.1 Piezometric surface; 8.2 Plotter commands; 9.8 Plotter, DIP SWitches; 9.2 Plotter, setting up; 9.2 Polynomial approximations of the Well Function; 1.1, 2.1, 3.5, 6.39 Printer control commands; 8.5 Printer, using, DTDHA; 6.8 Program structure; 1.2 Program, modular structure; 6.2 Programs, on disk; 1.4 Ratio between two transmissivities; 10.1 Reading number; 6.4 Reading; 7. 1 Record; 6.4 Record; 7.1 Recovery between steps; 6.8, 6.33 Recovery graphs; 9.1
Ix.4
Index
Recovery period; 7.1, 7.3 Recovery, calculation from residual drawdown; 6.20, 6.27 Renumbering of readings, automatic; 6.12 RESET; 6.2 Root t minus root t1 residual drawdown graphs; 9.1 Root-time graphs; 9.1 Saving data to a disk file, DTDHA; 6.6, 6.39 Semi-strip aquifer; 10.10 Series, exponential; 5.6 Series, linear; 5.2 Shell-Metzner sort; 6.12, 6.26 SIM1, description; 4.2 SIM1, listing; 4.31 S1M1, variables; 4.29 SIM1, verification; 4.4 SIM1; 4.12 SIM2, description; 4.6 SIM2, listing; 4.34 SIM2, variables; (also see SIM1 and LEAKDD) 4.31 SIM2, verification; 4.6 SIM2; 4.6 SIM3, description; 4.10 SIM3, listing; 4.36 SIM3, variables; 4.29 SIM3, verification; 4.10 SIM3; 4.10 SIM3B, listing; 10.12 S1M3B; 10.10 SIM4, description; 4.16 SIM4, listing; 4.40 SIM4, variables; (see also SIM3 and LEAKBOUN) 4.31 SIM4, verification; 4.16 SIM4; 4.16 SIM5, listing; 4.42 SIM5, variables; 4.29 SIM5, verification; 4.16 SIM5; 4.16 SIM5B, listing; 10.12 S1M5B; 10.10 S1M6, description; 4.22 SIM6, listing; 4.45 S1M6, variables; (see also SIM5 and LEAKSTRP) 4.31 S1M6, verification; 4.25 SIM6; 4.22 SIM7, description; 4.26 SIM7, listing; 4.47 SIM7, variables; 4.29 SIM7, verification; 4.26
S1M7; 4.26 Simulation; a bounded confined aquifer; 4.10 Simulation; a bounded leaky confined aquifer; 4.16 Simulation; a confined aquifer; 4.2 Simulation; a confined strip aquifer; 4.16 Simulation; a leaky confined aquifer; 4.6 Simulation; a leaky confined strip aquifer; 4.1 Simulation; a pumped well; 4.2, 4.26 Sorting data into order of time; 6.12, 6.26 Specific capacity; 6.4 Square root of time, graphing; 4.19 Steady state models; 6.1 Step test data, conversion of; 6.6, 6.33 Sternberg analysis graphs; 7.6, 7.6 Sternberg analysis with a period of recovery; 7.7 Sternberg analysis without a period of recovery; 7.7 Sternberg analysis, advantage of; 6.6 Sternberg analysis; 7.1, 7.2 Stirlings Approximation; 1.7 Storage coefficient, calculation of; 6.16, 6.32 Strip aquifer image wells; 2.9 Strip aquifer with partial boundaries; 10.3 Strip aquifer, drawdown in; 2.11 Strip aquifer; 2.9 STRIPCAL, verification; 2.10 STRIPCAL, description; 2.9 STRIPCAL, listing; 2.23 STRNBRG, data requirements; 7.1 STRNBRG, listing; 7.11 STRNBRG, well equation; 4.27 Subset of data for interpolation; 5.6 Successive bisection; 3.6 Summation of drawdowns; 6.2 SWAP; 6.12 Symbol for graph plotting; 9.5 t/t1 conversion; 6.11, 6.12, 6.27 t/t1 in DTPLOT; 9.6
Index t/t1 residual drawdown graphs; 9.1 Test description data, alteration ofj 6.8, 6.27 Theis Equation (also see Well Function); 3.4 Theis Equation; 10.8 Theis Function; (also see Well Function) 1.1, 2.1 Time of change in discharge rate; 7.1 Time, as date and time of day; 6.7, 6.37 Time, specification of; 6.1 Total absolute deviation; 6.15, 6.26 Transient state models; 8.2 Transmissivity, calculation of; 6.16, 6.30 Turbulent flowj 6.17 Two part aquifer, drawdown in; 10.10 Units for Delta Sj 6.1 Units 1.1, 4.2, 6.1, 9.6 Units of time in ANMODL; 8.3 Units of transmissivity; 6.1 Units, conversion of; 6.1 Units, conversion ofj 6.11 VALj 6.7 NEWTON, verification; 3.2 Well equation; 4.25 Well equation; 7.9 Well Function of Uj (see Well Function) Well Function, evaluation of; 1.1 Well Function; 1.1, 2.1 Well loss; 4.26, 6.17 Well, image; 10.1 WELLFUNC, description; 1.2 WELLFUNC, listing; 1.9 WELLFUNC, variables; 1.4 WELLFUNC, verification; 1.3 Width of a printed character; 8.5
Ix.5
Introduction
1.1
Introduction
The primary aims of' this book are to provide a selection of subroutines and programs with as wide and as basic as possible an application to groundwater science, and to explain their uperation. Readers familiar with microcomputer programming may apply the programs given here to their own work, perhaps incorporating them as subroutines into larger, more specialized programs; and those unfamiliar with programming can use the programs as they are listed. The programs in this book are in no way a substitute for knowledge and experience in groundwater science. The aim is more to make complex procedures readily available to the practising hydrogeologist. Several procedures that are described in this book are not confined to groundwater in their application, but have been found to have a number of uses in groundwater. This is a practical book, written to solve real-life problems, overheads have therefore been kept to a minimum. The derivation of equations and functions are not described here, equations are taken from other sources and For those readers Who want to check on derivations, references used here. are given. The first programs to be described are functions usable as subroutines in practical applications. These are then used to solve typical groundwater problems. More functions and procedures are introduced, and applied in generally more involved groundwater situations as the reader progresses into the book. A program to produce a disk file from discharge test data, and to analyse those data, is given later, as well as a program to graph the data. An analytical model of changes in the piezometric surface due to a number of discharging or recharging wells is included. Most of the programs can be used with any set of consistent units. Where units are specified, they are metric (normally metres and days are the primary units used, although in order to follow common practice, minutes are used in discharge test analysis). The programs are designed to be run with little prior instruction. Prompts given by the computer should give sufficient information about what is required for the user to get right through a particular program with no more than an occasional reference to the written instructions. 1. THE USE OF MICROCOMPUTERS IN GROUNDWATER SCIENCE. Any complicated mathematical task not only can, but should be done by a computer if one is available because of the fallibility of humans in solving arithmetic operations. As well as almost never making arithmetical errors, computers are much qUicker in any arithmetical operation. (Programmers do make errors, as many as anyone else, but once the errors in a program have been found and removed, they will not recur.) I believe that a complex mathematical operation should be done manually only so that the person using it can fully understand it. Thenceforth it should be computerised.
I.2
In~roduction
The computer is a tool which has recently become available for our use. It should be used in any situation where it offers the best available method of achieving the desired result.
2. APPLICATION OF NUMERICAL/ANALYTICAL METHODS TO GROUNDWATER PROBLEMS. Geology in general, and hydrogeology especially, often involves applying numerical values to naturally occurring systems. ego An age to a rock formation, a transmissivity to an aquifer. While in physics quantities may be known to high degrees of accuracy, hydrogeology uses approximations and generalizations. It is often not possible, or even desirable, to be totally accurate. ego The age of which part of the formation? - The transmissivity of which part of the aquifer, and in which direction? Answers will be required for these questions at times, but usually an approximate answer for the whole unit is all that is needed. The moment one applies a mathematical equation (ie. a model) to a groundwater problem, even if that equation is as simple a Darcy's law (Bouwer, 1978), some simplifying assumptions must be made. Some common assumptions are; 1/ The porous medium is homogeneous. 2/ The piezometers used to monitor the system give values that are representative of a significant cross-section of the system rather than of just one point. 3/ Vertical flow within the aquifer is negligible. 4/ The aquifer is fully confined. 5/ The aquifer is of infinite extent. In reality these assumptions are very often not justified. If unjllstified simplifying assumptions are applied to a complex real world situation in order to obtain information on that system, then it foll~s that the information so obtained will at best be approximate. Only in an ideal (and therefore nonexistent) groundwater system will our methods of mathematical analysis give completely accurate answers. Hydrogeology is not, cannot be, an exact science. The skill of the competent and experienced hydrogeologist rests largely in his/her ability to make meaningful generalizations and approximations, and in knowing how far these can be pushed before errors become so great as to invalidate any conclusions that he/she may make. These arguments must be borne in mind in using the programs in this book. There seems to be a tendency among some people to take any numbers There is a saying in produced by a computer to be absolutely correct. computer science; "rubbish in - rubbish out". You cannot expect the output of your computer to be better than it's input. In many cases errors in data will be magnified, and results will be less accurate than input. If all this sounds pessimistic and defeatist, then it is time for a note of optimism. Very often the bulk properties of an aquifer can be approximated by average figures in such a way as to produce a reasonable simulation of the behaviour of that aquifer under given conditions of
Introduction
1.3
recharge or discharge. I've seen discharge test results from many wells that indicated an aquifer that behaved very similarly to an ideal infinite, confined, homogeneous, isotropic aquifer, at least for the duration of the test. In summary, I would like to make two suggestions. 1/ Don't expect five figure accuracy when using these programs to evaluate some aquifer parameter, often one figure, or even order of magnitude values may be both useful and the best that can be expected. 2/ Perhaps mathematical rigour should take second place to seat of the pants empiricism at times?
3. THE BASIC COMPUTER LANGUAGE AS USED IN THIS BOOK. Basic is universally used as the first language of microcomputers. It's greatest advantages over other languages are it's capability to interact with the programmer, and it's ease of debugging. It's greatest disadvantage is it's lack of any enforced structure. Any structure in a Basic program is present due to a conscious effort from the programmer. There are a number of versions of Basic that have been implemented in modern microcomputers. In most cases they vary only in which key words are recognised. The form of Basic used here will suit most micros other than the cheap, games orientated machines. Most of these programs could be readily rewritten to run on a more limited Basic, but it was thought likely that readers interested in serious use of microcomputers would have access to machines with a good version of Basic. ~. GETTING STARTED. I will assume that you know how to setup your computer, this book is not the place for that sort of instruction. Nor is this the place for detailed instructions on the use of the Basic interpreter, you may find that you will have to refer to your Basic manual, especially if you decide to type the programs in from the listings in the book. 1/ Load your Basic interpreter. In most cases this will involve making sure that you have a disk with Basic on it in the computer, and then typing "Basic", or perhaps "Gwbasic", then pressing the enter key. 2/ If you have the programs on disk, put that disk in the computer and type 'Load"filename'" (the double quotes are required) where filename is the name as it appears in this book. Your computer may require either '/bas', or '.bas' to be appended to filename, inside the quotes. 3/ If you want to type in the program, do so now, following the directions in your Basic manual. Before switching off the computer, take care to save the program to disk; or at least save Whatever part of the program that you type in in one session. ~I Type the word "run", and press enter. Now the program will take control. 51 If you are using an IBM or compatible, you can at any time temporarily delay the program execution by holding down the 'Ctrl' key, and at the same time pressing 'Num Lock'. Other computers may have other methods
1.4
Introduction
of achieving the same result. Pressing any key will then resume execution of the program, and the display and printout should not be affected. 6/ Again, if you are using an IBM or compatible, if you want to stop the program and return to the Basic command level at any time, hold down 'Ctrl' and press 'Break'. This allows you to interact with the computer at any time in a program, perhaps to check the contents of variables. Typing 'cont' and pressing the Enter key will resume program execution, but in this case the display will be affected. 7/ All the programs in this book are designed to terminate at the end of their particular function, or when instructed to by the operator. At that time you will be returned to the Basic command level. 5. THE PROGRAMS ON DISK. To avoid the tedious job of typing the programs in from the listings, you may purchase them on a thirteen centimetre double sided floppy disk for (Australian) $100 from the author at Clarke Computer Services, 20 Musgrave St., Crystal Brook, S.A., Australia, 5523. The disk is in a format compatible with an IBM PC. The programs will run on many other computers, and it may be possible to have the disk put into a format compatible with your computer, especially if it is either a MS DOS machine, or a CP/M machine, however, this will incur an additional cost. The programs detailed in this book total some 10 000 lines of code or more. I have no doubt that, even after many, many, hours of testing and improving, there are still some bugs to be found, and many improvements that could be made. Therefore I intend to make the latest versions of the programs available on a second disk for a price around (Aust.) $25. (This being for those who have purchased the original. Others could, of course, have both for $125.) The prices are subject to change without notice, and do not include postage and packing. If any errors are found in any of the programs after the time that this book goes to print, those errors will be corrected in the programs on disk, and details given in a file named "READ.ME" on the disk. The programs on the distribution disk are in ASCII format for greater compatibility. This will cause them to be relatively slow to load. After loading each program into Basic from the distribution disk, save it to another disk in your own computers condensed form. (This is the default mode that your computer will use unless instructed otherwise.) Do not use the distribution disk for general work, after copying the programs from it onto another disk, put it away in a safe place. The programs will load from your copies more quickly than from the distribution disk; unless you make copies using a Dos command rather than with Basic.
6. REFERENCE Bouwer, H., (1978). pp.
Groundwater Hydrology.
McGraw-Hill Kogakusha, Ltd.
480
Functions
1.1
Chapter 1
Over the last sixty years several functions have been developed that have proved to have wide and fundamental importance in groundwater science. Functions like the Gausian Error Function have been found to have more limited use. Computer programs yielding solutions to some of these are described in this chapter. Although these programs do not solve any practical problems alone, later chapters will show that they can be put to use in a number of field applications. 1. THE WELL FUNCTION Theis (1935) adapted an equation from heat flow theory to describe the lowering of the piezometric surface on pumping from a well fully penetrating a confined aquifer. His equation (used in a form suitable for giving answers in field applications in the next chapter) includes an integral with the solution: u2
W(u) = -0.577216 -In u
+
u
u3 +--2 21 3 31
( 1.1)
The variables W(u) and u will be defined in chapter 2. is quite possible to evaluate this equation by programming i t directly into a microcomputer, but there are several disadvantages. The larger the value of u, the more terms must be included. With u greater than about 10 to 15, (quite common in real cases, as the distance from the discharging well to the point of observation becomes large) some of these terms are very large although the well function itself is very small. This is a classic case where round-off error due to addition or subtraction can arise, (see Appendix II). Also, when more than a few of the terms must be considered, the method becomes slow. There is a better method. Huntoon (1980) described the use of two polynomial approximations which gave values sufficiently close to be quite acceptable for most, if not all, field applications. It
for 080 THEN GOSUB 9000:GOTO 40:REM # Invalid input 230 IF U(=O THEN 9999 240 GOSUB 2500 :REM # Solve for W(u) 250 GOSUB 7250:REM # Video output section 280 GOTO 210 2500 REM == SUbroutine W(u) == 2510 U2=U.U:U3=U.U2:IF U(1 THEN 2540 2520 W=1/(U.EXP(U)).(C6+C7.U+U2)/(C8+C9.U+U2) 2530 GOTO 2550 2540 W=-LOG(U)+CO+C1.U+C2.U2+C3.U3+C4.U2.U2+C5.U2.U3 2550 RETURN 7000 REM === Input section === 7010 PRINT"Enter zero or a negative number to end." 7020 PRINT:INPUT"Enter the value of U"jU 7030 RETURN 7250 REM === Video output section === 7260 PRINT"W(";Uj") ="j:PRINT USING G1jW 7270 RETURN 8600 REM === Assign values to variables === 8610 CO=-.57721566#:C1=.99999193#:C2=-.24991055#:C3=5.519968E-02 8620 C4=-9.76004E-03:C5=1.07857E-03 8630 C6=.250621:C7=2.334733:C8=1.681534:C9=3.330657 8640 G1="##.###AA4A,, 8650 RETURN 9000 REM === Invalid input === 9010 PRINT"Invalid input, please check instructions and re-enter." 9020 RETURN 9999 END 7.2.
The Bessel function, program BESSEL
REM ••••• BESSEL/BAS ••••• 2 REM • Last modified 18th. Jan. 1986 10 REM === Initialization === 20 DEFINT F,I-L:DEFSTR G,S 30 DIM C(40) 40 CLS 50 PRINT" Evaluation of the modified Bessel functions of the first" 60 PRINT"and second kind, zero order." 70 PRINT" Loading variables, please wait." 80 PRINT 90 GOSUB 8800:REM # Load variables 200 REM === Program control === 210 GOSUB 7000:REM # Input section. 240 IF RB(=O THEN 9999:REM # End. 270 IF ZX2 THEN 5480 5420 TJ=RB/2:GOSUB 5530:REM Bessel, 1 5430 A2=TJ*TJ:A4=A2*A2 5440 B1=C(1)+C(2)*A2+C(3)*A4+C(4)*A2*A4+C(5)*A4*A4 5450 B2=C(6)*A4*A4*A2+C(7)*A4*A4*A4 5460 AK=-LOG(TJ)*AI+B1+B2 5470 GOTO 5520 5480 TN=2/RB:A2=TN*TN:A3=TN*A2 5490 B1=C(8)+C(9)*TN+C(lD)*A2+C(11)*A3 5500 B2=C(12)*A2*A2+C(13)*A2*A3+C(14)*A3*A3 5510 AK=1/SQR(RB)*EXP(-RB)*(B1+B2) 5520 RETURN 5530 REM === Modified Bessel, First kind, zero order === 5540 TF=RB/C(30):A2=TF*TF:IF RB4+-- R1- R2----..,;>i i~-~~ CT
o
~
well
dischorge
C
well
::J
0.
o...,
-.
--
=1 THEN 5050 5030 IF RB'RB>U1 THEN 5010 5040 GOTO 5100 5050 GOSUB 5190:REM Leaky # 5060 Wl=HJ:GOTO 5180 5010 GOSUB 5190:REM Leaky #
2.15
2.16 5080 5090 5100 5110 5120 5130 5140 5150 5160 5170 5180 5190 5200 5210 5220 5230 5240 5250 5260 5270 5280 5290 5300 5400 5410 5420 5430 5440 5450 5460 5470 5480 5490 5500 5510 5520 5530 5540 5550 5560 5570 5580 5590 5600 5610
Drawdown GOSUB 5400:REM Bessel, 2 Wl=2'AK#-HJ:GOTO 5180 GOSUB 5400:REM Bessel, 2 GOSUB 5530:REM Bessel, 1 GOSUB 5640:REM Leaky # 2 Hl=RB'RB'C(31)/Ul U=Hl:GOSUB 2500:REM Subroutine W(u) HA=W U=Ul:GOSUB 2500:HC=W:REM Subroutine W(u) Wl=2'AK#-AIO'HA+EXP(-H1)'(C(32)+LOG(U1)+HC-Ul+ Ul'«AI#-1)/(RB'RB'C(31»)-Ul'Ul'HK) RETURN REM -- Subroutine Leaky # 1 -B=RB'RB:HP=C:HJ=O 1=1 IF Ul80, drawdown can be taken as zero." 9050 RETURN 9060 REM -- Impossible combination of distances -9010 PRINT"There is an error in the entered distancesl" 9080 RETURN 9800 REM -- Await valid key -9810 ZZ$=INKEY$ 9820 ZZ$=INKEY$:IF ZZ$="" THEN 9820 9830 FOR ZX=1 TO LEN(Z$):IF MID$(Z$,ZX,1)=ZZ$ THEN RETURN 9840 NEXT ZX 9850 GOTO 9820 9999 END 9.4.
A bounded leaky confined aquifer. program LEAKBOUN
REM ••••• LEAKBOUN/BAS ••••• 2 REM • Last modified 5th. Apr. 1986 10 REM === Initialization === 20 DEFINT F,I-L:DEFSTR G,S 30 DIM C(40),C1(15),C2(15) 40 CLS 50 PRINT" Calculation of drawdown in a piezometer at a given distance" 60 PRINT"from a discharging well in a leaky confined aquifer." 10 PRINT"Storage in the aquitard is neglected." 80 PRINT"One discharge/recharge boundary is present." 90 PRINT" Loading variables, please wait." 100 GOSUB 8600:REM # Assign values to variables. 110 GOSUB 8800:REM , All other oonstants 200 REM === Program control === 210 F1=0:REM # Set flag for discharge well 220 GOSUB 1000:REM , Input seotion 2JO IF R80 THEN GOSUB 9030:DD=0:GOTO 300:REM # Excessive u 280 GOSUB 5000:REM # Solve for W(u,rb) 290 GOSUB 3030:REM # Calculate drawdown 300 GOSUB 7250:REM n Video output section 310 DE=DD 320 REM -- Image well section -330 F1=1:REM n Set flag for image well 340 GOSUB 3300:REM # Calculate distance of image well 350 R5~R:R=R4:REM n Save R, send R4 to subroutine 360 GOSUB 3000:REM n Calculate u, RB 370 IF U1>80 THEN GOSUB 9030:DD=0:GOTO 390 380 GOSUB 500o:GOSUB 3030:REM n Calculate drawdown 390 GOSUB 7250:REM n Printout 400 R=R5:REM n Restore R 410 IF F2=0 THEN DD=DD+DE ELSE DD=DE-DD 420 F1=2:GOSUB 7250:REM n Final video output 430 GOTO 200 2500 REM == Subroutine W(u) == 2510 2520 2530 These lines are identical to those in CONFDD. 2540 2550 3000 REM === Calculation of u given R, S, T, & TI - __ 3010 U1=R*R*CS/(4*T*TI):RB=R/SQR(T/(VK/TB» 3020 RETURN 3030 REM === Calculation of dd given W, Q, & T --3040 DD=Q*Wl/(4*PI*T) 3050 RETURN 3300 REM === Calculate distance to image well === 3310 R3=SQR(R*R-(R1-R2)*(R1-R2» 3320 R4=SQR«R1+R2)*(R1+R2)+R3*R3) 3330 RETURN 5000 REM === Group of subroutines for function W(u,RB) === 5010 5020 These lines are identical to those of LEAKDD. 5750 5760 7000 REM === Input section === 7010 PRINT:PRINT"Please enter all figures in consistant units." 7020 PRINT"Enter a negative distance to end.":PRINT 7030 PRINT"Distance of observation point from discharging" 7040 INPUT" well"; R 7050 IF R(=O THEN 7240 7060 INPUT" Storage coefficient"jCS
2.21
2.22 Drawdown 7070 7080 7090 7100 7110 7120 7130 7140 7150 7160 7170 7180 7190 7200 7240 7250 7260 7270 7280 7290 7300 7490 8600 8610 8620 8630 8650 8800 8810 8820 8970 9000 9010 9020 9030 9040 9050 9060 9070 9080 9800 9810 9820 9850 9999
INPUT" TransmissivitY"iT INPUT" Time"iTI INPUT" Discharge rate"iQ PRINT"Vertical hydraulic conductivity of" INPUT" aquitard" i VK INPUT"Thickness of aquitard"iTB PRINT"Distance from discharge well to" INPUT" boundary" i R1 PRINT"Distance from observation well to" INPUT" boundarY"iR2 PRINT"ischarge or echarge boundary?" Z$="DdRr":GOSUB 9800:REM I Single key input IF ZX80, drawdown can be taken as zero." RETURN REM -- Impossible combination of distances -PRINT"There is an error in the entered distancesl" RETURN REM -- Await valid key -These lines are identical to those of CONFBOUN. END
Drawdown 9.5.
The image wells in a strip aquifer, program STRIPCAL
REM ••••• STRIPCAL/BAS ••••• 2 REM • Last modified 1/8/85 10 CLS 20 PRINT"Calculation of distance to image wells for strip aquifer." 200 REM === Control section === 210 GOSUB 7000:REM # Input section 220 GOSUB 3300:REM # Distance component along aquifer. 230 GOSUB 3340:REM # Distance component accross aquifer. 240 GOSUB 7250:REM # Video output. 250 IF DR.R6>=AA/2 AND F3=1 THEN 9999 260 IF DR.R6>=AA/2 THEN FT=1:DR=0:F3=1 300 GOTO 230 3300 REM === Calculate distance to image well === 3310 R3=SQRCR·R-CR1-R2).CR1-R2» 3320 RETURN 3330 REM -- Second part --. 3340 IF FT=1 THEN DR=DR+2 3350 IF FT=1 THEN D1=-R1 ELSE D1=R1 3360 IF F3=O THEN D2=R2 ELSE D2=-R2 3370 IF FT=1 THEN FT=O ELSE FT=1 3380 R4=SQR(CD2+DR·R6+D1).CD2+DR.R6+D1)+R3.R3) 3390 RETURN 7000 REM === Input section === 7010 PRINT 7020 PRINT"Distance of observation point from discharging" 7030 INPUT" well"jR 7040 INPUT"Distance from discharge well to a boundary"jR1 7050 PRINT"Distance from observation well to the" 7060 INPUT" same boundary"jR2 7070 INPUT" Wid th of aquifer" jR6 7080 INPUT" Width of area of interest"jAA 7090 PRINT 7240 RETURN 7250 REM === Video output section === 7260 PRINT" Image well at R =" jR4j: IF F3=0 THEN PRINT TAB(34) j "First side" ELSE PRINT TAB(34)j"Second side" 7490 RETURN 9999 END 9.6.
A confined strip aquifer, program CONFSTRP
REM ••••• CONFSTRP/BAS ••••• 2 REM • Last modified 29/9/85 10 REM === Initialization === 20 DEFINT F,I-L:DEFSTR G,S 30 DIM C(40)
2.23
2.24 Drawdown 40 CLS 50 PRINT" Calculation of drawdown in a piezometer at a given distance" 60 PRINT"from a discharging well in a confined strip aquifer." 80 PRINT 90 PRINT" Loading variables, please wait." 100 GOSUB 8600 :REM , Assign values to variables. 200 REM === Program control === 210 F1=0:REM b Set flag for discharge well 220 GOSUB 7000:REM b Input section 230 IF R80 THEN GOSUB 9030:DD=0:GOTO 300:REM H Excessive u 280 GOSUB 2500:REM b Solve for W(u) 290 GOSUB 3030:REM # Calculate drawdown 300 GOSUB 7250:REM # Video output section 310 DE=DD:REM # Save drawdown 320 REM -- Image well section -330 F1=1:REM # Set flag for image well 340 GOSUB 3300:REM # Distance component along aquifer 350 R5=R:REM # Save R 360 GOSUB 3340:REM # Distance of image well 370 R=R4:REM H Prepare to send R4 to subroutine 380 GOSUB 3000:REM # Calculate u 390 IF U>80 THEN GOSUB 9030:DD=0:GOTO 420:REM # Excessive u 400 GOSUB 2500:REM # Solve for W(u) 410 GOSUB 3030:REM # Calculate drawdown 420 DE=DD+DE:REM # Accumulate drawdown 430 GOSUB 7250:REM # Video output 440 IF ABS(DD)80, drawdown can be taken as zero." 9050 RETURN 9060 REM -- Impossible combination of distances -9070 PRINT"There is an error in the entered distancesl" 9080 RETURN 9999 END
Evaluation of S
3.1
Chapter 3
The speed of computers makes possible the use of methods that would be quite impractical if attempted by pencil and pocket calculator. Indeed, it makes very practicable, the use of qUite workable methods that have been long known, but not frequently used because they are so time consuming in association with traditional techniques. 1. NEWTONS METHOD Isaac Newton developed a method for solving difficult equations to which the digital computer can be readily applied. Newton himself must have used the method manually, or with the help of a slide rule at most, his method will come into it's own in this age of computers. (Isaac Newton lived from 1642 to 1121. John Napier invented logarithms in 1614, and Edmund Gunter plotted logs on a two foot straight line in 1620. From such a straight line it was possible to multiply and divide by adding and subtracting distances using a pair of dividers. So Newton would have had access to some minimal computational aids.) When aquifer parameters are being evaluated from information obtained in the field, it is sometimes desirable to make a direct evaluation of storage coefficient, rather than use a graphical method (or perhaps there may be insufficient data for graphical methods). While the Cooper-Jacob approximation (1946) can be used when the value of u is less than 0.01, if the investigator has only small, late, responses from some of his more distant observation wells, u is likely to be much greater than this. In chapter 1 the polynomial equations described by Huntoon (1980) were used to solve the well equation. That is, given the value u, we calculated the value of W(u). Using Newtons method we can efficiently calculate u from W(u), and so solve the Theis equation for storage coefficient. Before going further with the well equation, it is worth looking at Newtons method itself as it will be found to have many other applications in groundwater science. Newtons method of solution relies on the fact that the derivative of an equation at a point is the slope of the graph of that equation at that point. In Newtons method, an initial guess of the solution is made, then the derivative of the equation is calculated at that point and can be used to make an improved estimate of the solution. This process is then repeated until the change between the current estimate and the previous one is judged to be so small as to indicate an acceptably close approach to the solution. (The notes below on Newtons method applied to the solution of the well function include an illustrated example which will make this relationship plainer.) It is not the purpose of this book to give a detailed description of the workings of Newtons method, I suggest that the reader refer to one of the
3.2
Evaluation of S
many books on the oaloulus or applied oaloulus if he desires more information. A good book on the sUbjeot is 'Caloulus' by Grossman (1984). Miller (1981) also gives a fuller explanation of the use of Newtons method. There are two basic approaohes to solution of equations by Newtons method; they vary in the way that the derivative is oaloulated. 1/ For every funotion f(x) there is a 'derived funotion' g(x) suoh that for any given value of x, g(x) is the derivative of the funotion f(x) at x. This is the method used" by the program CB2N to solve the Theis equation for storage ooeffioient later in this ohapter. 2/ An alternative that may be of wider applioation is to oaloulate the derivative of the given funotion f(x) at a point, as required, by testing the way in whioh the value of the funotion ohanges with small ohanges in the value of x around that point. This second method has the advantage of not requiring that the derived equation be known. It is the second method that is employed in the program NEWTON. 1.1. An applioation of Newtons method, program NEWTON. As an example of the use of the program, the fourth order polynomial;
4 2 AX +BX +CX=D, where A=0.02, B=-6, C=25, and D=-100 will be used. This must first be put into the form f(x)=O by adding 100 to both sides. Funotion A is now defined in line 210 as below;
(Note that the Basic exponentiation funotion "A" has been avoided, for the sake of accuraoy and speed.) The program may now be run. The user will be asked to enter an initial guess, and given the option of suffixing that guess with a 'd' if he requires that the oalculations be done in double precision. (There will be little, if anything, to be gained by using double precision if built in functions such as SIN, EXP, and LOG are inoluded in the defined funotion, as these are normally oalculated by the Basio interpreter to only single preoision accuraoy.) This partioular equation has four solutions as shown in figure 3.1, and which of these solutions is discovered by NEWTON will depend upon the initial guess. The solutions are -18.77229444, -2.514514318, 7,93101872, and 13.35579069.
Evaluation of S
3.3
Figure 3.1 f(xl
500
A
B
a
c
o x
-500 A sketch B, C, and D.
graph
of the example function, showing the four solutions, A,
Some features of the program. No attempt is made to produce the most accurate possible derivative. On trial it was found that measuring the slope of a small, but not necessarily vanishingly small, part of the graph of the function allowed a faster solution to be achieved. Although the approximation to the derivative produced by this method is less accurate than may be obtained, it can be produced in a much shorter time than that required to produce the best approximation to the derivative. (It is probably worth pointing out that the accuracy of the derivative has no bearing on the accuracy of the final solution.) Some equations don't have a solution at all. If not made to stop, the program would go on forever searching for a non-existent solution to such an equation. Line 360 terminates the program if no solution has been found after 100 iterations. (Failure to find a solution is not proof of the lack of a solution. It may mean that the initial guess needs to be changed. Try graphing the functjon.) The program is designed for speed. To this end, most numerical constants are loaded into variables at the beginning, and in the iterative part of the program it is these variables that are referred to rather than the numeric constants. (This avoids the time consuming process of conversion from a decimal representation to single or double precision having to be done more than once.) Finally an indication of the accuracy of the found solution is given. Useage of variables in program Newton. Is the 'small number' which is added to X so that the approximate derivative may be calculated from the slope of the line joining f(X) and f(X+H) . 1.2.
H
3.4
Evaluation of S
Ie
Iteration count. The fourth power of two. Used to increase H if that variable is found to be too small to allow the calculation of a derivative. The twentieth power of two. The value of H is made equal to X/P2. The approximation of the derivative. The allowable tolerance in the change in the approximate solution calculated in successive iterations. If the proportional change is less than T, then the solution is accepted. The current guess at the solution. The last guess at the solution. The error in the value of the equation if the last value of X is taken as the solution. is used to input the initial guess. A string is used so that a suffix may be added if so desired. This method results in minimal key punching by the operator at run time.
Pl
P2 S T
X Xl
Y Z$
2. SOLUTION OF THE THEIS EQUATION FOR STORAGE. The reader will probably recall that the Theis equation (Theis, 1935) is generally used to calculate the drawdown at a given distance from a discharging well in a confined aquifer, at some time after the commencement of pumping, but before the system has reached steady state. In solving the equation in the 'normal' direction the storage coefficient is required as input, and the output is the drawdown. A similar method to those given here could be used to solve the equation for transmissivity if storage coefficient was known, but there can be more than one valid solution for a given set of data, and in any case, transmissivity is easier to quantify from field data than is storage coefficient.
Figure 3.2 1200
T
Transmissivity plotted against storage coefficient
Evaluation of S
3.5
Figure 3.2 shows transmissivity plotted against storage coefficient for a drawdown of 0.2m, a distance of 1400m, a pumping rate of 2000 cubic metres per day, and a time of one day. Notice that if storage coefficient is 4.00E-4 then transmissivity could be evaluated at approximately either 240 or 959 cubic metres per day per metre. Two programs are given for the 'reverse' solution of the Theis equation. The first is called CB2N/BAS and employs Newtons method, the second is CB2/BAS and uses the less sophisticated, slower, but easier, and less fallible method of successive bisection. 2.1. Program CB2N/BAS. This adaptation uses the derived equations of the so called polynomial approximations of the well equations. As drawdown, transmissivity, and discharge rate are known, the value of the well function of u may be calculated, although u itself is not known. In this program the polynomial approximations to the well equation are the defined functions N1 and N2, the former being used when u is less than one, and the latter in all other cases. Note from fig. 3.3 that if the initial guess for u is much too large Newtons method will yield a negative value for u. Negative u values cannot be handled by the polynomial approximations, so they are converted to new, smaller, guesses. in line 3490. Line 3500 similarly adjusts excessive values of u. Figure 3.3 shows graphically how an example solution is obtained. The program inputs are; drawdown = 1m, distance from the pumped well to the observation well = 100m, transmissivity = 100m squared per day, pumping rate = 500 cubic metres per day, and the duration of pumping is 1 day. A value of 2.51327 is calculated for the well function in line 3410, and a first guess of 0.01 is made for the value of u. Line 3430 uses defined function N1 to calculate the value of the well function at u=O.Ol. Line 3470 uses defined function D4 (Functions D3 and D4 are the derived functions of the two polynomial approximations to the well equation) to calculate the slope of the well function at u, -99.005, and produces an improved guess at u, 0.0254. This procedure is repeated with successive estimates of u being 0.041234, 0.0471988, and the final value of 0.0476711, which is found to produce an acceptable value for the well function in the test in line 3460. Now it is a simple matter to calculate the storage coefficient, which is done in line 3520. The value given by your computer should be close to 0.001907.
3.6
Evaluation of S
Figure
3·3
a6
N
Solution of W(u) for u, using Newtons Method; see text.
Evaluation of S
3.7
2.2. Usage of variables in program CB2N. CO to C9 are constants used in the calculation of the well function from the estimated values of u. CS is the coefficient of storage. DD is the measured drawdown. F An integer variable used as a flag. As mentioned previously, negative u values can be obtained in the process of refining the estimate of u. A negative u cannot be used because of the nature of the so called polynomial approximations to the well equation, so they are converted to very low values under the control of flag F in line 3490. It was found that convergence upward from very low estimates of u was slow; the flag permits a stepwise reduction of u as required. F actually records the number of times that u has been changed from a negative value to a small positive value, and it permits the use of a smaller value each step. In practice u values less than 1E-4 will be infrequent, and less than 1E-10 very rare. PI is the constant, Pi. Q is the discharge rate. is the distance from the discharging well to the piezometer or R observation well where the drawdown is measured. is the transmissivity. T is the time since commencement of discharge. TI is the tolerance allowed in the proportionate difference between TL the value of the well function calculated from the measured drawdown, and that calculated from the estimated value of u. is used to hold the value of u. U and U3 hold the second and third powers, respectively, of u. U2 has the value of the well function as calculated from the measured W drawdown. contains the absolute (unsigned) difference between the two values of WO the well function. It is used to test for sufficient accuracy. WM is the value of the known well function subtracted from the well function produced from the estimated u. WM is used to calculate the refined estimate for u. wu has the well function value calculated from the estimated u. Z$, ZX, and ZZ$ are all used for the one key program flow subroutine. 2.3. Defined functions in program CB2N. Functions N1 and N2 are the two polynomial approximations to the well equation. Function D3 is the derivative of function N2. Note that functions D1 and D2 are used in the definition of D3 in order to keep it a reasonable length. Function D4 is the derivative of N1. functions have been checked against approximate (The derivative derivatives calculated from tabulated values of the well function. They give
3.8
Evaluation of S
as good an agreement as can be expected considering the approximate nature of the test over the full range of the available tables, ie. u=1E-15 to u=9.5). 2.4. Program CB2/BAS This solves the same problem as CB2N, but goes about the solution in entirely a different way. The principal used by this method depends on the fact that while we cannot simply solve the well equation for storage, we can, for any given estimate, decide whether we are too high or too low. We therefore start with two values, the high one (1 is used in the program) we know to be too high, and the low one (1E-38 is the programs lower limit) which must be too low. Now take the half way point between the two. (The arithmetic mean is about 0.5, but for our purposes the geometric mean, about 1E-19 is much better). Right, we'll guess that the storage coefficient is 1E-19 and then test whether that is too high or too low. Almost certainly it will be found to be too low, so we make 1E-19 our new lower limit, take the new half way point as a next guess, test it, adjust one or other end points, and repeat the process until we are satisfied that our approximation is good enough. This method is called Successive bisection. To explain the operation of the program we can probably start With line 2705 where variables D1 and D2 are set as the upper and lower limits respectively. Line 2710 makes a first guess at the storage coefficient (CS) by making it the geometric mean of D1 and D2. Given this assumed value of CS, the next few lines calculate u, call the Well Function subroutine to get a value for W(u), and then calculate an experimental value for drawdown, D3. D3 is then tested against the measured drawdown, DD in line 2760. If the discrepancy is found to be less than the allowable tolerance (TL), or if it is found that our upper and lower limits have become equal to one another, then we accept the value of CS as good enough. If the match is not acceptable then line 2770 resets the upper limit if the experimental drawdown is too small, or resets the lower limit if it is too large. In other words, if our guess at storage leads to too small a drawdown, our guess is too big, otherwise it's too small. 2.5. Usage of variables in program CB2 CO to C9 are constants used for the solution of the well equation. CS, D1, D2, D3, and DD have been explained above. G1 is used for formatting the numerical output. PI The constant, Pi. Q has the value of the discharge rate. R is the distance from the discharge well to the piezometer. T is the transmissivity. TI is the elapsed time since the commencement of discharge. TL The tolerance, TL, was explained above. U is the value u, the argument of the well function. U~, and U3 are u squared, and u cubed respectively.
Evaluation of S 3.9 W
is the value calculated for the well function, from the latest estimate of CS. Z$, ZX, and ZZ$, are used in program flow control.
3. REFERENCES Cooper and Jacob, 1946. A generalised graphical method for evaluating formation constants and summarizing well field history. Trans. Am. Geoph. Union 27: pp. 526-534. Grossman, S.I., 1984. Calculus. Third edition. Academic Press Inc., Orlando, Florida 32887, USA. 1300pp. Huntoon, P.W., 1980. Computationally efficient polynomial approximations used to program the Theis equation. Groundwater, Vol. 18, No.2, March-April. Miller, A.R., 1981. Basic Programs for Scientists and Engineers. Sybex, Berkley, California. 318 pp. Theis, C.V., 1935. The relation between the lowering of the piezometric surface and the rate and duration of discharge of a well using grounwater storage. Trans. Am. Geophs. Un 16:PP519-524. 4. 4.1.
PROGRAM LISTINGS An application of Newtons Method. program NEWTON.
1 REM ••••• NEWTON.BAS ••••• 2 REM • Last modified 4/9/85 3 REM • By D.K. Clarke, Crystal Brook, S. Australia. 10 CLS 20 PRINT" Solution of equations by Newtons Method." 30 PRINT 40 PRINT" Suffix initial guess with d for double precision." 50 PRINT:INPUT"Initial guess"jZ$ 60 IF RIGHT$(Z$,1)="d" OR RIGHT$(Z$,1)="D" THEN 70 ELSE 90 70 DEFDBL A-Y 80 T=.0000000000001#:GOTO 100 90 T=.000001 100 X=VAL(Z$):X1=1:P2=10485761:P1=16 200 REM === Solution section === 210 DEF FN A(X)=.6.ABS(X-10)+7·LOG(X)+X[-.3 220 REM -- Calculate the derivative at X -230 H=X/P2 240 S=(FN A(X+H)-FN A(X))/H 250 IF S=O THEN H=H.P1:IF ABS(H) cT
l!!I-'
C/.l
4.10
Simulations Table 4.3
No. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
Time (days) 0.0007 0.0017 0.0031 0.0050 0.0078 0.0117 0.0173 0.0251 0.0363 0.0520 0.0742 0.1056 0.1501 0.2080 0.2087 0.2097 0.2111 0.2130 0.2158 0.2197 0.2253 0.2331 0.2443 0.2600 0.2822 0.3136 0.3581 0.4209 0.5098 0.6355 0.8133 1.0647 1.4203 1.9231 2.6342 3.6399 5.0621 6.9000
Drawdown 0.111 0.197 0.261 0.314 0.361 0.404 0.442 0.476 0.506 0.530 0.550 0.564 0.572 0.577 0.466 0.380 0.316 0.263 0.216 0.174 0.136 0.102 0.072 0.048 0.029 0.015 0.007 0.002 0.001 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
Pumps 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Discharge 3.000E+02 3.000E+02 3.000E+02 3·000E+02 3.000E+02 3.000E+02 3·000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3·000E+02 O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO
3. A DISCHARGE TEST IN A CONFINED, BOUNDED, AQUIFER 3.1. Program SIM3 This is a simulation of a discharge test in a confined aquifer with one straight line boundary, which may be either disch~rge or recharge. It uses the first part of the control section of 3IM1 with the addition of one line; line 220 in this program checks that the entered distances are not wrong to the point of making the geometry of the discharge well, piezometer, and boundary, insoluble (similarly to line 240 in CONFBOUN). 3.2. Program verifioation Please enter data as given below. Distanoe from discharging well to observation well, 20. Storage coeffioient, 0.0004.
Q.
C
Q.
.-
ca
CD
:::0
~
8:
8-
~
c
.
.s
.55
.5
.45
.4
.35
.3
.25
.2
. 15
.1
•05
0
1
Figure 4.3
~
•
)(
be
10
)(
•
~
• SIM2rec.IfTD
Time, or t/t1
•
x SIM2dd.IfTD
)(
•
,
'. IX
rx
100
•
)(
T
1000
I
-=-
tll
;;
o
1-"
~
ll>
I-'
~
Ul
1-'-
4.12
Simulations Transmissivity, 200. Discharge rate for the first step, 300. Finishing time of first step, 0.208 days (5 hrs.). Discharge rate for the second (last) step, O. Finishing time of the second step (finishing time of the test), 6.9
days. Distance from the discharge well to the boundary, 150. Distance from the piezometer to the boundary, 155. Specify a discharge boundary. The result should be similar to that shown in table 4.4, and when plotted should give a graph like figure 4.4. Table 4.4 No. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
Time (days) 0.0007 0.0017 0.0031 0.0050 0.0078 0.0117 0.0173 0.0251 0.0363 0.0520 0.0742 0.1056 0.1501 0.2080 0.2087 0.2097 0.2111 0.2130 0.2158 0.2197 0.2253 0.2331 0.2443 0.2600 0.2822 0.3136 0.3581 0.4209 0.5098 0.6355 0.8133 1.0647 1. 4203 1.9231 2.6342 3.6399 5.0621 6.9000
Drawdown 0.112 0.199 0.265 0.321 0.372 0.420 0.467 0.516 0.569 0.626 0.689 0.756 0.826 0.895 0.784 0.698 0.634 0.580 0.532 0.487 0.445 0.404 0.361 0.317 0.273 0.229 0.188 0.151 0.118 0.091 0.068 0.051 0.037 0.027 0.019 0.014 0.010 0.007
Pumps 1 1 1 1 1 1 1
1 1 1 1 1 1 1 2 2 2 2 2 2
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Discharge 3·000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO
..a.
c..
!!.
c.. c
(,0
CD
::;c
i:J
~
c
1.2
1.1
1
.9
.8
.7
.6
.5
.4
.3
.2
•1
0
Figure 4.4
• SIM3drc.WTD
10 Time, or t/t1
)( SIM3ddd. "TO
100
1000
UJ
1-"
~
t'
::l
1-"
o'"'"
.III'"...
n
4.14
Simulations
Table 4.5, and figure 4.5 give the output of the program for the inputs listed above, except that the boundary is treated as a recharge boundary. The reader will probably remember that the difference between the way that the two boundaries are handled is in the sign of the discharge rate of the image well. In the case of a discharge boundary (Water tight, or zero flow boundary) the image well has a discharge rate equal to that of the real well, and in the case of a recharge boundary (constant head boundary) the image well is thought of as recharging the aquifer at the same rate as the real well discharges. The graph of the discharge boundary case shows a downward curve, while that for the recharge boundary shows an similar degree of curvature, but in the opposite direction. Table 4.5 No. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
Time (days) 0.0007 0.0017 0.0031 0.0050 0.0078 0.0117 0.0173 0.0251 0.0363 0.0520 0.0742 0.1056 0.1501 0.2080 0.2087 0.2097 0.2111 0.2130 0.2158 0.2197 0.2253 0.2331 0.2443 0.2600 0.2822 0.3136 0.3581 0.4209 0.5098 0.6355 0.8133 1.0647 1.4203 1.9231 2.6342 3.6399 5.0621 6.9000
Drawdown 0.112 0.199 0.265 0·321 0·372 0.419 0.463 0.502 0.536 0.564 0.586 0.604 0.617 0.626 0.514 0.427 0.361 0.306 0.255 0.208 0.165 0.126 0.093 0.066 0.046 0.030 0.019 0.012 0.007 0.004 0.002 0.001 0.001 0.000 0.000 0.000 0.000 0.000
Pumps 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Discharge 3.000E+02 3·000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3·000E+02 3.000E+02 3.000E+02 3.00.0E+02 3.000E+02 3.000E+02 O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO
Simul a tions
4 . 15
, I
I
x ~
•
8
)C
~
x
)C
~
If
·
..... en
..
•
x
•
•
x
v
)(
.....
>-
•
en )(
-
-
...,LO· LL
o
t--
....
N
LO
CD
Drawdown, Residual d.
en
......
N
.
...
4.16
Simulations
4. A DISCHARGE TEST IN A BOUNDED, LEAKY CONFINED AQUIFER 4.1. Program SIM4 This program applies the leaky well function to the single bounded aquifer of the previous program. The method used is very similar to the previous programs. In this case we have the leaky well function of programs LEAKFUNC, LEAKDD, and SIM2, with the iterative handling of the drawdown calculations of SIMl to SIM3, and the boundary of SIM3. It is worth noting the similarity between the results of this simulation, and the last. In practice it would be impossible to decide which conceptual model you were dealing with from this discharge test alone. Table 4.6 Time (days) 0.0007 0.0017 0.0031 0.0050 0.0078 0.0117 0.0173 0.0251 0.0363 0.0520 11 0.0742 12 0.1056 13 0.1501 14 0.2080 15 0.2087 16 0.2097 17 0.2111 18 0.2130 19 0.2158 20 0.2197 21 0.2253 22 0.2331 23 0.2443 24 0.2600 25 0.2822 26 0.3136 27 0.3581 28 0.4209 29 0.5098 30 0.6355 31 0.8133 32 1.0647 33 1.4203 34 1.9231 35 2.6342 36 3.6399 37 5.0621 38 6.9000
No. 1 2 3 4 5 6 7 8 9 10
Drawdown 0.111 0.197 0.261 0.314 0.361 0.404 0.444 0.482 0.518 0.551 0.579 0.602 0.616 0.624 0.513 0.427 0.363 0.310 0.263 0.221 0.181 0.144 0.108 0.076 0.048 0.026 0.012 0.004 0.001 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
Pumps 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
2 2
Discharge 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO
Simulations
4.17
-
x
I 8
k
)l
. Pc
. ~.
)
-.
-e~n
~
i4
x
.
'v I"
{;
i
x
~.
=8
..
-
~, en
x
o
-
. -. . N. ~. .
~
LO
D~awdown,
(\')
.
.."
Residual d.
.
LO
.
to
.
4.18
Simulations
4.2. Program verification To test that the program is operating correctly, enter the trial data shown below. Distance from discharging well to observation well, 20. Storage coefficient, 0.0004. Transmissivity, 200. Vertical hydraulic conductivity of aquitard, 0.01. Thickness of aquitard, 2. Discharge rate for the first step, 300. Finishing time of first step, 0.208 days (5 hrs.). Discharge rate for the second (last) step, O. Finishing time of the second step 6.9 days. Distance from the discharge well to the boundary, 150. Distance from the piezometer to the boundary, 155. With a discharge boundary specified, this should give the same output as that shown in table 4.6, and when plotted should produce a graph similar to figure 4.6. 5. A DISCHARGE TEST IN A CONFINED STRIP AQUIFER 5.1. Program SIM5 As in programs CONFSTRP and LEAKSTRP, the only boundaries used are discharge. This program will be found to be much slower than SIM3, especially as the total elapsed time of discharge increases. This is due to the radius of influence of the discharging well increasing, and the effect of more and more image wells having to be considered. 5.2. Program verification To check correct operation of the program, run it, and enter the following values. Distance from discharging well to observation well, 20. Storage coefficient, 0.0004. Transmissivity, 200. Number of discharge steps, 2. Discharge rate for the first step, 300. Finishing time of first step, 0.208 days (5 hrs.). Discharge rate for the second (last) step, O. Finishing time of the second step 6.9 days. Distance from the discharge well to the boundary, 150; (note that it does not matter which boundary is used, so long as the same one is used also for the next measurement). Distance from the piezometer to the same boundary, 155. Width of the aquifer, 280. These entries should give the same output as that shown in table 4.7, and when plotted against the logarith of time should result in a graph like figure 4.7a.
Simulations
4.19
Figure 4.7b is a plot of the calculated drawdowns against the square root of time, notice that after a time of about 36 minutes the drawdown plots fall in a straight line, and that the latter part of the recovery phase (toward the left) also falls on a straight line. It seems that if the drawdowns of a constant rate discharge test in a non leaky, confined, strip aquifer are plotted against the square root of time, the result will always be a straight line. It is for this reason that program DTPLOT includes the drawdown against root time option. Similarly, root t over root t1 residual drawdown also yields a straight line. The earlier parts of both lines are curved because of the small value of u at those times. I regret that I am unable to give a reference on this point.
No. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
Table 4.7 Time (days) 0.0007 0.0017 0.0031 0.0050 0.0078 0.0117 0.0173 0.0251 0.0363 0.0520 0.0742 0.1056 0.1501 0.2080 0.2087 0.2097 0.2111 0.2130 0.2158 0.2197 0.2253 0.2331 0.2443 0.2600 0.2822 0.3136 0.3581 0.4209 0.5098 0.6355 0.8133 1.0647 1.4203 1.9231 2.6342 3.6399 5.0621 6.9000
Drawdown 0.112 0.199 0.265 0.321 0.372 0.422 0.474 0.532 0.601 0.681 0.775 0.888 1.021 1.167 1.057 0.973 0.910 0.858 0.813 0.773 0.733 0.692 0.648 0.602 0.552 0.502 0.451 0.400. 0.352 0.306 0.265 0.227 0.194 0.165 0.140 0.118 0.100 0.085
Pumps 1
1 1 1 1 1 1 1 1 1
1 1
1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Discharge 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 3.000E+02 O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO O.OOOE+OO
Q.
.
e,
C
Q.
CI CI
:::u
.§
A. 0
lilt
~
b
1.2
1.1
1
.9
.8
.7
.6
.5
.4
.3
.2
.1
0
-
1
L
l....-
I....-
l...-
L.....
L..-
L-
-
-
-
..-
L..-A A
~
It.
l-
-
Figure4.7a
T
I
I I
I
K
S
X
A
X
A
I
i m5rec. WTO
10
I I I
A
Tille, or tlt1
I
...
)( s i m5dd. WTO
)(
I
X
I
I
X
100
I I I I I
X
A
X
I
X
I
I
I
I
1000
110
.:=
to
g
1,1 CJ CJ
v )(
)(
)(
)(
~
C)
u,
o
CJ
o
N
o
(Y)
o
'q"
Drawdown, Residual d.
CJ
ltl
CJ tD
Simulations
4.29
for the constants. The loss of accuracy is due to the imperfect nature of the method used for conversion. (It is very likely that the loss of accuracy will be insignificant in comparison to errors in measurement, and due to the imperfect fit between model and real world.) I suspect that the accuracy of conversion would be increased by using lengthening stages rather than constant length stages. Unfortunately, in the case of a real world aquifer, this might introduce errors due to the inexact fit between model and aquifer. 8. USAGE OF VARIABLES IN THE SIM PROGRAMS 8.1. Variables in programs SIM1. 3. 5. and 7 Name Fu!lcti~o~n _ A A general purpose variable to hold values temporarily. A1 As above. AA The value of the first term of the Well Equation. BB The value of the second term of the Well Equation. CO - C9 Constants used in the solution of the Well Function. CC The value of the third term of the Well Equation. CS Coefficient of storage. D(x) This vector holds all drawdown values so that they can be saved to disk at the end of calculations if so desired. ego DD(10) is the tenth calculated drawdown. D1, D2 Used in the calculation of the distance of the next observation well. See the notes on STRIPCAL for more details. DD Holds the calculated drawdown for the current pump, time, and image well. DE This variable holds the sum of drawdowns calculated for the current pump and time, for all image wells. DF Accumulates the total drawdown for all pumps, and image wells at the current ti~e. Holds the number of strip widths to be considered in the DR calculation of the distance from the observation point to the current image well. This variable is used to flag the side of the strip aquifer F3 presently under consideration. It is set to zero for the first side, and to one for the second side. FP Flag for print-out. This flag is set if the user has expressed a wish for a print-out of results. This flag is toggled back and forth from zero to one with the FT calculation of each image well. It's value at a given time depends upon which boundary, left or right, was responsible for the most recent reflection. G1 A string variable holding a format for the printing or displaying of a numeric value. The primary (integer) counter. I
4.30
SimUlations
The primary 'second level' counter. This is used so that the primary or secondary counters may be used in subroutines without altering this value. The secondary 'second level' counter. JJ This integer counter holds the number of pumps currently being KS considered. The value of the exponent in the Well Equation. N Holds the total number of datum sets. ND The file name. NM$ Holds the number of pumping steps. NS P(x) The discharge rate of pump number x. Has the constant Pi. PI Q Holds the discharge rate of the current pump. Q(x) This vector holds the discharge rate at time T(x). The discharge rate at pumping step number x. Q1(x) from the observation well (piezometer) to the The distance R discharging well. In the first place this is used to hold the distance between the real wells, but it is also used to pass the distance to the subroutine that calculates the value of u. The distance from the discharging well to a boundary. Which R1 boundary is used is of no concern, except that it must be the same one as is used in R2 below. The distance from the observation well to the same boundary as in R2 R1 above. R3 The distance component along the length of the strip, between the discharging well and the observation well. R4 The total distance between the current image well and the discharging well. R5 This variable is used to retain the original value of R while that variable is used in the calculation of the current value of u. R6 The Width of the strip aquifer. RT Root two. This value is used to increment the time for the next drawdown calculation. It has no special significance, and could be reduced if more drawdown plots are required, or increased if fewer drawdown plots will suffice. SO A string variable holding the heading for the printed output. SY Holds the string used for yes/no response handling. T Transmissivity. T(x) The time relating to time/drawdown/discharge-rate set number x. TI The time of the current drawdown calculation. TI(x) The finishing time of step number x. ie. the number of time units after commencement of discharge. TL The tolerance. Set equal to 10 000 in these programs, but may be altered as required. The current series of image wells will be terminated when the calculated dra\mown due to the current image well, multiplied by TL, is less than the accumulated drawdown due to the discharge well and all image wells thus far considered. (It is the II
Simulations
TM TP
TS
U
U2, W
Z$,
4.31
absolute value of the drawdown that is considered.) The current time. ie. the total accumulated time from the commencement of the first pump. The primary time increment, and the time of the first drawdown calculation. In these programs TP is set to 1/1440 time units (or one minute, on the assumption that times will be entered in days). This may be changed as required. The secondary time increment. This is the time that is added to the time of the previous drawdown calculation, to calculate the current time. It is incremented at each drawdown calculation. is given the value of the u of the Theis equation. U2 The values of u squared and u cubed respectively. The value calculated for the Well Function. ZX, ZZ$, are used in the handling of single key responses.
8.2. Varijl.]lles-l.!!-.-2.!'.Qgrams SIM2, 4. and 6 The variables described above are used for the same purposes, but in addition, all the variables needed for the solution of the Leaky Artesian Well Function are used. The use of these is explained in the notes on program LEAKFUNC. In the notes above, and in general throughout this book, the word 'current' is used to indicate 'that which is at present being considered'. ego The 'current image well' means the image well who's effect is being calculated at the time. Also, the 'pump' as used above is the imaginary pump used to simulate an increase or decrease in discharge rate, as explained earlier in this chapter. 9. 9.1.
PROGRAM LISTINGS A discharge test in a confined aquifer. program SIM1
REM ••••• SIM1.BAS ••••• 2 REM • Last modified 18/10/85 10 REM === Initialization === 20 DEFINT F,I-L:DEFSTR G,S 30 DIM T(200),D(200),Q(200) 40 CLS 50 REM -- Preliminary print statements -60 PRINT" Simulation of mUlti-stage discharge test in a confined" 70 PRINT"aquifer." 80 GOSUB 8600:REM # Assign values to variables. 200 REM === Program control === 210 GOSUB 7000:REM # Input section 220 IF FP=1 THEN LPRINT TAB(7);SO:REM # Printer heading 230II=1:TP=1/1440:TS=TP:TM=TP:KS=1 240 FOR JJ=1 TO KS
4.32 Simulations 250 Q=P(JJ):TI=TM-TI(JJ-1) 260 GOSUB 500:REM # Solve for current 'pump'. 280 DF=DF+DD 290 NEXT JJ 300 T(II)=TM:D(II)=DF:Q(II)=Q1(KS):DF=0 310 GOSUB 7250:REM # Video output 320 IF FP=1 THEN GOSUB 7500:REM # Printer output 330 II=II+1 340 IF TM=TI(NS) THEN 390:REM # Finished calculations 350 IF TM=TI(KS) THEN TM=TI(KS)+TP:TS=TP:KS=KS+1:GOTO 240:REM # Next step 360 TS=TS·RT:TM=TM+TS:REM # Next reading 370 IF TM>TI(KS) THEN TM=TI(KS):REM # Get last reading for step 380 GOTO 240 390 ND=II-1 400 PRINT"Do you want the data saved in a disc file?" 410 Z$=SY:GOSUB 9800lIF ZX>2 THEN 9999 420 GOSUB 8250:REM # Save to disc 430 PRINT"Another save?":Z$=SY:GOSUB 9800 440 IF ZX80 THEN DD=O:GOTO 570:REM # Excessive u 540 GOSUB 2500:REM # Solve for W(u) 550 GOSUB 3030:REM # Calculate drawdown 570 RETURN 2500 REM == Subroutine W(u) == 2510 U2=U.U:U3=U.U2:IF U=1 THEN 5050 IF RB*RB>U1 THEN 5070 GOTO 5100 GOSUB 5190:REM Leaky H W1=HJ:GOTO 5180 GOSUB 5190:REM Leaky H 1 GOSUB 5400:REM Bessel, 2 W1=2*AKH-HJ:GOTO 5180 GOSUB 5400:REM Bessel, 2 GOSUB 5530:REM Bessel, 1 GOSUB 5640:REM Leaky H 2 H1=RB*RB*C(31)/U1 U=H1:GOSUB 2500:REM Subroutine W(u) HA=W U=U1:GOSUB 2500:HC=W:REM Subroutine W(u) W1=2*AKH-AIH*HA+EXP(-H1)*(C(32)+LOG(U1)+HC-U1+ U1*«AIH-1)/(RB*RB*C(31»)-U1*U1*HK) RETURN REM -- Subroutine Leaky H 1 -B=RB*RB:HP=O:HJ=O 1=1 IF U180 THEN DD=O:GOTO 560:REM # Excessive u 540 GOSUB 5000:REM # Solve for W(u,RB) 550 GOSUB 3030:REM # Calculate drawdown 560 DE=DD 570 REM -- Image well section -580 GOSUB 3300:REM # Calculate distance of image well 590 R5=R:R=R4:REM # Save R, send R4 to subroutine 600 GOSUB 3000:REM # Calculate u, RB 610 IF U1>80 THEN DD=O:GOTO 630:REM # Excessive u 620 GOSUB 5000:GOSUB 3030:REM # Solve for W(u), calc. dd. 630 R=R5:REM # Restore R 640 IF F2=0 THEN DD=DD+DE ELSE DD=DE-DD 650 RETURN 2500 REM == Subroutine W(u) == 2510 2520 These lines are identical to those in SIM2. 3050 3300 REM === Calculate distance to image well === 3310 R3=SQR(R*R-(R1-R2)*(R1-R2)) 3320 R4=SQR«R1+R2)*(R1+R2)+R3*R3) 3330 RETURN 5000 REM === Group of subroutines for function W(u,RB) 5010 5020 These lines are identical to those in SIM2. 5760 7000 REM === Input section === 7010 PRINT 7020 PRINT"Please enter all figures in consistent units." 7030 PRINT"Maximum of ten pumping steps." 7040 PRINT 7050 PRINT"Distance of observation point" 7060 INPUT"from discharging well";R 7070 INPUT" Storage coefficient";CS 7080 INPUT" Transmissivity";T 7090 PRINT"Vertical hydraUlic conductivity" 7100 INPUT" of aquitard";VK 7110 INPUT"Thickness of aquitard";TB 7120 INPUT"Number of pumping steps";NS 7130 FOR 1=1 TO NS 7140 PRINT:PRINT"Step NO.";I
4.41
4.42 7150 7160 7170 7180 7182 7184 7186 7188 7190 7192 7194 7196 7200 7210 7240 7250 7260 7490 8660 8800 8810 8840 8850 8970 9060 9070 9080 9600 9610 9620 9999
Simulations INPUT"Discharge rate"jQ1(I) IF 1=1 THEN P(l)=Ql(l) ELSE P(I)=Ql(I)-Ql(I-l) INPUT"Finishing time (days)"jTI(I) NEXT I PRINT"Distance from discharge well" INPUT"to boundary"jRl PRINT"Distance from observation well" INPUT"to boundary"jR2 PRINT"ischarge or echarge boundary?" Z$="DdRr":GOSUB 9800:REM IJ Single key input IF ZX2 THEN 9999 440 GOSUB 8250:REM # Save to disc 450 PRINT"Another save?":Z$=SY:GOSUB 9800 460 IF ZX80 THEN DD=O:GOTO 560:REM # Excessive u 540 GOSUB 2500:REM # Solve for W(u) 550 GOSUB 3030:REM # Calculate drawdown 560 DE=DD:REM # Save drawdown 570 REM -- Image well section 580 GOSUB 3300:REM # Distance component along aquifer 590 R5=R:REM # Save R 600 GOSUB 3340:REM # Distance of image well 610 R=R4:REM # Prepare to send R4 to subroutine 620 GOSUB 3000:REM # Calculate u 630 IF U>80 THEN DD=O:GOTO 660:REM # Excessive u 640 GOSUB 2500:REM # Solve for W(u) 650 GOSUB 3030:REM # Calculate drawdown 660 DE:DD+DE:REM # Accumulate drawdown 670 IF (ABS(DD)2 THEN 310 290 PRINT"How many points C3 - 9)?":Z$="3456789":GOSUB 9800 300 NK=ZX+2 310 INPUT"Enter another value (0 to end)";MX 320 IF MX=O THEN 9999 330 GOTO 250 6000 REM === Lagrangian interpolation === 6010 REM -- Pick out values for interpolation 6020 PRINT:PRINT"Calculating" 6030 J=1 6040 IF MX>C4(J) AND JC4(P1) AND P1xit?":Z$="CcEe":GOSUB 9800:IF ZX>2 THEN 3190 PRINT"Calculating" I=1:Pl(1)=1:P2(1)=1:J=1:IF Q(l)=O THEN J=2:P1(1)=2:P2(1)=2 J=J+1:IF Q(J)=Q(P1(I» AND JDP THEN 3100 I=I+1:P1(I)=J:P2(I)=J:GOTO 3060 IS=I PRINT"Will you enter Delta s (if not, i t will be calculated from the last" PRINT"5 drawdown readings)?":Z$=SY:GOSUB 9800:IF ZX>3 THEN 3140 INPUT"Delta s (base 10)"jA:US=A/NG:GOTO 3160 P1=P1(IS-1):P2=P2(IS-1):IF P2-P1>4 THEN P1=P2-4 GOSUB 4200:REM U Linear regresion FOR I=Pl(IS) TO P2(IS) DD(I)=DD(P2(IS-1»+US*LOG(TI(I)/TI(P2(IS-1»)-DD(I) TI(I)=T(I)-TI(P2(IS-l» NEXT I RETURN REM === Newtons method === W=DD*4*PI*T/Q:U=.01:F=0:I=0:REM PRINT"W ="jW U2=U*U:U3=U*U2:I=I+l:IF 1>99 THEN PRINT"Failure to converge.":FC=1: GOTO 3540 IF U4 THEN 3686 ELSE IF ZX>2 THEN 3678 INPUT"Constant to add to times"jA FOR I=NF TO NL:TI(I)=TI(I)+A:NEXT I:GOTO 3694 INPUT"Constant to add to drawdowns";A FOR I=NF TO NL:DD(I)=DD(I)+A:NEXT I:GOTO 3694 INPUT"Constant to add to discharge rates";A 3690 FOR I=NF TO NL:Q(I)=Q(I)+A:NEXT I 3694 RETURN 3700 REM -- Multiply by a constant -3704 CLS:GOSUB 9100:REM # Get first and last line numbers 3708 PRINT"ime, rawdown, or Discharge ate7" 3712 Z$="TtDdRr":GOSUB 9800 3716 IF ZX>4 THEN 3736 ELSE IF ZX>2 THEN 3728 3720 INPUT"Constant to multiply times by";A 3724 FOR I=NF TO NL:TI(I)=TI(I)-A:NEXT I:GOTO 3744 3728 INPUT"Factor to multiply drawdowns by";A 3732 FOR I=NF TO NL:DD(I)=DD(I)-A:NEXT I:GOTO 3744 3736 INPUT"Factor to multiply discharge rates by";A 3740 FOR I=NF TO NL:Q(I)=Q(I)-A:NEXT I 3744 RETURN 3750 REM -- Delete a number of records 3755 CLS:PRINT"This option deletes a number of consecutive records." 3760 INPUT"Enter the number of the first record to delete";JA 3765 INPUT"Enter the number of the last record to delete";JB 3770 IF JA>=JB OR JB>DP OR JA4 THEN 9999 490 ON ZX GOSUB 8250,7500,7250,6500 500 IF FC=1 THEN FC=O:GOTO 410 510 GOTO 400 4200 REM === Linear regression, drawdown data --4210 U6=0:U7=0:U8=0:U9=0 4220 FOR I=P1(II) TO P2(II) 4230 U6=U6+H(I)·DD(I) 4240 U7=U7+H(I) 4250 U8=U8+DD(I) 4260 U9=U9+H(I).H(I) 4270 NEXT I
7 . 12 Sternberg 4280 4290 4300 4320 4400 4410 4420 4430 4440 4450 4460 4470 4480 4490 4500 4510 6500 6510 6520 6530 6540 6550 6560 6570 6580 6590 6600 6620 6630 6633 6636 6640 NEXT 6650 6660 6670 6680 6690 6700 6710 6720 6730 6740 6750 6760 6770 6780
AN=1+P2(II)-P1(II) US=(AN*U6-U7*U8)/(AN*U9-U7*U7) YI=(U8*U9-U7*U6)/(AN*U9-U7*U7) RETURN REM === Linear regression, well equation --U6=0:U7=0:U8=0:U9=0 FOR I=1 TO NS U6=U6+QS(I)*YQ(I) U7=U7+QS(I) u8=U8+YQ(I) U9=U9+QS(I)*QS(I) NEXT I US=(NS*U6-U7*U8)/(NS*U9-U7*U7) YI=(U8*U9-U7*U6)/(NS*U9-U7*U7) PRINT"Slope = "iUS," Y intercept = ";YI RETURN REM === Solve the well equation === PRINT:PRINT"Calculating" REM -- Set pointers at the start and end of each step -I=1:P1(1)=1:P2(1)=1:J=1 J=J+1:IF Q(J)=Q(P1(I» AND JDP THEN 6590 IF P2(I)-P1(I)80 THEN 1150 1100 U2=U'U:IF U>1 GOTO 1130 1110 DD=(Q(IO,JO)/PT)'(-LOG(U)+CO+C1'U+C2'U2+C3'U'U2+ C4'U2'U2+C5'U'U2'U2) 1120 GOTO 1140 1130 DD=(Q(IO,JO)/PT)'(1/(U'EXP(U)))'(C6+C7'U+U2)/(C8+C9'U+U2) 1140 CD=CD+DD 1150 NEXT IO:NEXT JO 1160 H(I,J)=H(I,J)-CD 1170 PRINT USING G1iH(I,J)i:IF LP=1 THEN LPRINT USING G1iH(I,J); 1180 NEXT I:PRINT" R"iJ:IF LP=1 THEN LPRINT" R"iJ 1190 NEXT J 1200 FOR 1=0 TO NC 1210 PRINT USING" CU# "iIi 1220 IF LP=1 THEN LPRINT USING" C## ";Ii 1230 NEXT I 1240 PRINT:GOTO 9999 7000 REM === Keyboard input === 7004 PRINT"Do you want to use the printer?" 7008 Z$=SY:GOSUB 9800:IF ZX. Either different symbols and/or different colours can be used to identify separate sets of data on the same graph.
9.6
Plotting
1.6. Units used All time data in data files should be in minutes, except when you convert your times to t/t1 in program DTDHA. In this case take care to not do the conversoin again in this program. Drawdown data may be in any units of length; even that ridiculous unit, the foot, is acceptable. 1.7. Writing your data into the program This method is not recommended as a convenient way of getting your data into the computer in this program. However, if you decide to try it, I suggest that you follow the format used for the example data. 1/ Use the section of code from line 7780 to 7860 to load the discharge rates into the vector Q(x). 2/ Use the section from line 7872 to 7990 to enter the timedrawdown data. These data are entered as pairs, with time (minutes suggested) first, then drawdown (metres suggested). Care must be taken to not miss or repeat any datum. Do not put a comma at the end of any line. A time value of -1 marks the end of the data. There must be a drawdown value after this time value, although what it is does not matter.
Line 1 200 440 800 860 1000 1100 3500 3600 3660 3700 3800 3900 4000 4150 4250 4350 4500 4600 4700 5000 5500 5600 5700 6000
1. 8. Major subroutines and program segments No's. Function Initialization - 199 Primary control section - 430 Control of plotting a second and subsequent file - 960 A subroutine to control getting and plotting an additional - 850 data file Print the name of the current file - 960 Control for printing of additional copies - 1080 Print the name of the graph - 1120 Convert times to root t minus root t1 - 3550 Convert times to t/t1 - 3650 Entry of graph name - 3690 Specification of graph type - 3795 Specification of colour and symbol - 3850 Remove zero times from the data - 3980 Plot and label log time reference lines - 4145 - 4240 Plot and label linear drawdown reference lines Plot and label log drawdown reference lines - 4330 Plot and label root t time reference lines - 4450 Plotting data on log-linear, and log-log scales - 4570 Plotting data on root time scale - 4670 Print names on the axes - 4790 Manual setting of scales - 5170 Automatic setting of scales - 5540 Set paper size - 5650 Drawdown scaling factor, log-log scale - 5790 Drawdown scaling factor, log-linear - 6060
Plotting 6100 6200 7250 7750 8000 8200 9500 9600 9800 9999
-
6180 6270 7390 7990 8180 8290 9590 9670 9850
1.9.
9.7
Time scaling factor, log scale Scaling factor, root time Display file details Load data from DATA statements Load disk file Get lower and upper limits of drawdowns and times Load strings and constants Entry of file name Single key program flow control End
Variable used in program DTGRAPH Use of variable A A general use variable. Al As above. BY The y co-ordinate at the bottom of the graph. C A general use constant. CD(x) The colour number for file number x. CE(x) The symbol number for file number x. CL A constant setting the length of the graph. ie. The length of the graph in tenths of millimetres. CF(i) A flag indicating the graph type. 1 for log-linear, 2 for log-log, 3 for square root of time, 4 for t/t1 residual drawdown, 5 for root t minus root t1, and 6 for residual drawdown against time. Least plottable drawdown. Dl D2 Greatest plottable drawdown. The greatest drawdown in the data. DG DL The lowest (numerically) drawdown in the data. Drawdown scaling factor. It's value will be one of the series, .1, DS 0.2, 0.25, 0.5, 1, 2, 2.5, depending on the amount of reduction required. The reduction is directly proportional to the value of DS. The x co-ordinate of the end of the graph. EG A flag for general, short term use. F A flag for general, short term use. F1 The copy flag. This flag is set to 1 on second and subsequent FC copies of the graph. 1 for A flag indicating the layout of the reference lines. FR log-linear, 2 for log-log, and 3 for square root of time. A flag, set to 1 for automatic scaling, 2 for manual scaling. FS The counter for files. ie. It has the ordinal number of the ID current data file. The number of log cycles required on the drawdown scale. W The number of log cycles required on the time scale. LC The log of 10 to the base e. MT A constant recording the total number of files plotted. NF The name of the current file. ~$ Paper type. PT=1 if A3 paper, PT=2 if A4 paper. PT Name
9.8
Plotting
SN(x) SY T1 T2 TD(x) TG TL TS TY VS(i)
A string vector. The name of file No. x. A string for handling yes/no answers. Least plottable time. Greatest plottable time. The total duration of pumping for file number x. The greatest time in the data. The smallest time in the data. The time scaling factor. The y co-ordinate at the top of the graph. A vector of legal increments on the drawdown scale. The vector containes the values, 1, 2, 2.5, and 5. DS is given a value of some power of 10 multiplied by one of the values in this vector. The x co-ordinate of the current plot. The time in minutes of the current plot, and also the x co-ordinate of the left hand end of the current drawdown reference line. The x co-ordinate of the right hand end of the current drawdown reference line. The x co-ordinate of the position for printing the name of the current data file. The current lower y co-ordinate for a time-drawdown reference line. The current higher y co-ordinate for a time-drawdown reference line. Returns the ordinal position from the single key input routine. A string containing the valid entries for the single key input routine. A string used to accept single key input.
X X1 X2 XN Y1 Y2
ZX Z$ ZZ$
2. PLOTTER COMMANDS The set of commands used in this program are known as the DXY commands. They are used by the Roland DXY-880, and may also be used by a number of other plotters. If your plotter cannot use the DXY commands you will need to alter the program to suit whatever set of commands it does use. The plotter commands used in this program are explained below to make the alteration of the program to suit different command sets easier. The coordinate system used by the plotter is in standard form, with x=O on the left, and y=O on the bottom. The units used are tenths of a millimetre. [ie. position (1200,1000) is 120mm from the left limit and 100mm from the bottom limit.] Commands are sent to the plotter as line print commands. The first character is used to tell the plotter what type of command is being given; this may then be followed by the data. [ego The command to move the pen to position (1200,1000) is; LPRINT"M1200,1000".]
Plotting
9.9
Command Function H Moves the pen to (0,0) with the pen up. eg. LPRINT"M". M Must be followed by a set of coordinates. It moves the pen to the given location. The pen will be up, off the paper. ego LPRINT"M300,0". Prints the message which follows the command. eg. LPRINT"PFigure P 1." will cause the message 'Figure 1.' to be printed starting at the current pen position. Q This tells the plotter the direction in which it is to write messages or marks. The command Q must be followed by a numeral from 0 to 3 inclusive. 0 will cause writing to be upright, 1 will cause it to be from bottom towards top (ie. rotated 90 degrees anticlockwise), 2 will cause it to be printed upside down and from right to left, and 3 will cause it to be from top to bottom (ie. rotated 90 degrees clockwise). ego LPRINT"Q1". This must be followed by an integer from 1 to 15. It will draw the N symbol, indicated by the number, centred on the current pen position. ego LPRINT"N12" will cause an eight armed asterisk to be printed. J This command must be followed by an integer from 1 to 8 (in the case of an eight pen plotter). It will cause the plotter to select the pen corresponding to the specified number. ie. LPRINT"J3" will cause the plotter to select the pen in pen holder number 3, and then move back to the position it was in when it received the command. There are a number of other commands which may be given, but the above list covers those that were used in program DTPLOT. 3. PROGRAM LISTING 3.1. Discharge test data plotting, program DTPLOT REM ••••• DTPLOT.BAS ••••• 2 REM # Last modified 27th. Apr. 1986. 30 DEFINT F,I-L:DEFSTR G,S 40 DIM DD(200),TI(200) ,TL(200) ,Q(200) 50 GOSUB 9500:REM # Load strings & constants 60 CLS 70 PRINT"Discharge test plotting program, for the Roland DG or compatibles." 200 REM === Control section === 210 PRINT 220 PR'INT"Do you want to load a disk data file?":Z$=SY:GOSUB 9800 230 IF ZX3 AND TL=O) OR TL(O THEN GOSUB 3900:REM Remove 0 308 IF CF(ID)=4 THEN GOSUB 3600:REM # Convert to t/t1 309 IF CF(ID)=5 THEN GOSUB 3500:REM H Convert to root t minus root t1 310 IF CF(ID)(>1 AND CF(ID)4 THEN FS=1:GOTO 330 315 PRINT:PRINT"utomatic or <M>anual setting of scales?" 320 Z$="AaMm":GOSUB 9800:IF ZX5 THEN GOSUB 4000:REM H Plot ref. lines. 377 IF CF(ID)=3 OR CF(ID)=5 THEN GOSUB 4350:REM H Ref. lines root t. 380 GOSUB 1100:REM H Plot name of graph 385 GOSUB 4700:REM H Name axes 390 GOSUB 3800:REM H Specify colour and symbol 400 GOSUB 4500:REM H Plot data 405 GOSUB 860: LPRINT"h": REM iF Print name of first file 410 IF ID=O THEN 9999:REM H No more data sets 420 CLS:PRINT"Do you want any more sets of data plotted on the same sheet?" 430 Z$=SY:GOSUB 9800:IF ZX>2 THEN 1000:REM H Any more copies 440 REM === Another file to plot === 450 ID=ID+1:GOSUB 3700:REM H Specify graph type 460 GOSUB 3800:REM H Colour and symbol 470 GOSUB 9600:REM H File name 475 SN(ID)=NM$ 480 GOSUB 800:REM H Plot new data 490 GOTO 420 800 REM === Get, and plot new data --805 NM$=SN(ID) 810 GOSUB 8000:REM H Load file 820 IF (CF(ID)3 AND CF(ID)(>5 AND TL=O) OR TL2100 THEN XN=XN-2000:F=1 ELSE F=O 880 IF F=O THEN LPRINT"m"XN","TY+100:LPRINT"n"CE(ID): LPRINT"m"XN+25","TY+100:LPRINT"p"NM$ 890 IF F=1 AND XN3400 THEN 950 920 LPRINT"m"XN","TY+50:LPRINT"n"CE(ID):LPRINT"m"XN+25","TY+50: LPRINT"p"NM$ 950 LPRINT"h" 960 RETURN 1000 REM === Another copy === 1010 CLS:FC=1 1020 PRINT"Do you want another copy?":Z$=SY:GOSUB 9800:IF ZX>2 THEN 9999 1030 NF=ID:ID=l 1040 ON FR GOSUB 4000,4000,4250:REM # Plot reference lines 1045 GOSUB 1100:REM # Print name of graph 1047 GOSUB 4700:REM # Label axes 1050 FOR ID=1 TO NF 1060 GOSUB 800 1070 NEXT ID 1080 GOTO 1010 1100 REM === Print name of graph === 1110 IF PT=1 THEN LPRINT"m100,"TY+50:LPRINT"P"N$ ELSE LPRINT"M100,"TY+100: LPRINT"P"N$ 1120 RETURN 3500 REM === Convert to root t - root tl _ 3510 IF FC=O THEN INPUT "Enter the total duration of pumping";TD(ID) 3520 FOR 1=1 TO DP 3530 TI(I)=SQR(TD(ID)+TI(I»-SQR(TI(I» 3535 TI(I)=TI(I)·TI(I) 3540 NEXT I 3550 RETURN 3600 REM === Convert to t/t1 === 3610 IF FC=O THEN INPUT "Enter the total duration of pumping";TD(ID) 3620 FOR 1=1 TO DP 3630 TI(I)=(TD(ID)+TI(I»/TI(I) 3640 NEXT I 3650 RETURN 3660 REM === Enter graph name === 3670 INPUT"Enter t he name of the graph. (Max. 10 characters)"iN$ 3675 IF LEN(N$»10 THEN PRINTtlName too long, please re-enter.":GOTO 3670 3680 IF N$='"' THEN N$="No name" 3690 RETURN 3700 REM === Specify graph type 3710 IF CF(ID-1)=2 THEN CF(ID)=2:GOTO 3795:REM # No other type on same sheet 3720 PRINTtlWhich type of plot?" 3730 IF CF(ID-1)=3 OR CF(ID-1)=5 THEN 3780 " 3740 PRINT"Log-linear drawdown 3750 PRINT"Log-lin. t/t1 resid. drawdown " 3760 PRINT"Log-lin. residual drawdown " 3770 Z$="146":GOSUB 9800:IF ZX=1 THEN CF(ID)=1 ELSE IF ZX=2 THEN CF(ID)=4 ELSE CF(ID)=6
9.12 3775 3780 3785 3790 3795 3800 3805 3810 3820 3830 3840 3850 3900 3920 3930 3940 3950 3960 3965 3980 4000 4005 4010 4020 4030 4040 4050 4060 4070 4080 4090 4100 4110 4120 4130 4140 4145 4150 4160 4170 4180 4190 4200
Plotting GOTO 3795 PRINT"Root time " PRINT"Root t minus root t1 " Z$="35":GOSUB 9800:IF ZX=1 THEN CF(ID)=3 ELSE CF(ID)=5 RETURN REM === Specify colour and symbol === PRINT:PRINT:BEEP PRINT"What colour number? (1 to 8)" Z$="12345678":GOSUB 9800:CD(ID)=ZX INPUT"What symbol number? (1 to 15)"jCE(ID) IF CE(ID)DL THEN I=I-l:GOTO 5720 5730 Dl=10 5740 1=-9 5750 IF 10 THEN I=I+l:GOTO 5750 5760 D2=10 5770 IF D2/Dl>1000 THEN Dl=D2/1000 5780 DS=762:TY=BY+LOG(D2/D1)/MT*DS:LD=LOG(D2/Dl)/MT 5790 RETURN 6000 REM --- Drawdown scaling factor, log-lin. --6020I=1:C=.1 6030 IF DG/(VS(I)*C»(TY-BY)/10000 THEN I=I+l:IF 1>4 THEN C=C*10:I=1: GOTO 6030 ELSE GOTO 6030 6040 DS=VS(I)*C 6060 RETURN 6100 REM --- Time scaling factor, log scale --6110 1=9 6120 IF 10 THEN I=I-l:GOTO 6120 6125 T1=10 6130 1=-9 6140 IF 10"I2 THEN 7360 7340 NEXT I 7350 GOSUB 7370 7360 RETURN 7370 REM -- Continue or exit -7380 PRINT"Press C to continue, E to eXit":Z$="CcEe":GOSUB 9800 7390 RETURN 7750 REM === Load data from data statements === 7760 TP=1:TW=1:R=.1:I=1 7770 READ TI(I),DD(I):IF TI(I)-1 THEN I=I+1:GOTO 7770 7780 DP=I-1:0(1)=0 7790 FOR 1=2 TO DP 7800 IF TI(I)