Classwork 1 Introduction to programming in PASCAL

Size: px
Start display at page:

Download "Classwork 1 Introduction to programming in PASCAL"

Transcription

1 Classwork 1 Introduction to programming in PASCAL A computer code for computing basic hydraulic quantities for free surface flow in a rectangular cross section

2 Why classwork 1 In this classwork we propose students to make acquaintance with a programming tool that will reveal itself invaluable in the calculations of some problems of great cultural and technical relevance. To this purpose it is not always possible to use a spreadsheet and in some cases it seems more appropriate to write your own code. On the other hand, this effort has a great educative relevance because by implementing an algorithm students have the unique opportunity of understanding how a computer code is structured. This will give them a considerable insight also on the limitations and problems of commercial codes that they will used during their future activities. In this sense, the use of specific languages for numerical computation (eg, Matlab) appears here not fully suitable to our purposes. On the other hand, Matlab will be here extensively used for graphics production. We are aware that this goal is ambitious because of the unfamiliarity of most students with the basics of programming. We will attempt to get through a phased approach leading step by step to the implementation of simple routines that calculate geometric quantities and hydraulic fundamentals. It is believed that this effort will enrich the spirit of criticism of the future practitioner and will gratifies the future researcher with a tool that will prove an invaluable tool for your reserch and professional activities. The programming language that will be used is PASCAL. The choice has been done because of its extreme semplicity and clarity, because many students already had previous experiences with it and, finally, because it is suitable also for scientific computations without significative limitations. In addition, a freeware versione of Borland Pascal 7 is available in the web. This software, altough suitable only for non-graphical application, perfectly suits our needs. In order to import the lines of code contained in this practical work into the compiler, save this file as a text file and then read it into the compiler, following your instructor s indications. Final targets of Classwork 1 Learning to write an algorithm in a programming language Understanding how is possible to extend greatly our capabilities by joining the depth of theory to the potentials of numerical computation. Start writing a preliminary part of a larger code for free surface flow computations, so understanding that the latin motto divide et impera is a true also in the programming acticvity.

3 The content of classwork 1: First part Program: list of instructions given to a computer using a programming language. The instructions are written using and Editor. The Editor is also a Compiler that translates the programming language to a binary language that is understandable from the computer Each programming language has Reserved Words and a sintax; PROGRAM, USES, CONST, VAR, FUNCTION, PROCEDURE,, END are some examples of Reserved Words; in the following of this Classwork they will be written in blue. Sintax, Semantic and Run Time errors; The Compiler checks Sintax Errors only, In the following you find the basic structure of a program in PASCAL: in this example, for clarity s sake, reserved words ar written in upper cases whilst variables are written in lower cases. Mind: this is not a rule of this language that in itself is unsensitive to the type of cases! the text after // is a comment, and it is not seen by the compiler! also a word within braces, such as {commento} is a comment Name and libraries Declarations Functions and Procedures PROGRAM prova; {$APPTYPE CONSOLE} USES SysUtils; VAR // here we declare the variables used throughout the program x : REAL; FUNCTION f(x:real):real; // this is a function that works on x, that is a real number PROCEDURE do_something; // this is an example of a procedure Main // this is the main, that is the core of the code WRITELN('Hello'); READLN; END. This is the end of the main and of the code! Note the. at the end of END Now let us the Editor to insert our first code

4 run the editor, select FILE, NEW, OTHER CONSOLE APPLICATION Copy and paste this PROGRAM prova; {$APPTYPE CONSOLE} USES SysUtils; VAR // here we declare the variables used throughout the program x : REAL; FUNCTION f(x:real):real; // this is a function that works on x, that is a real number PROCEDURE do_something; // this is an example of a procedure // this is the main, that is the core of the code WRITELN('Hello'); READLN; END. create a directory on your computer such as D:\env_hydraulics\programs\ SAVE the program within it with the name First_program From now on you can retrieve this program using OPEN PROJECT First_program

5 Select: PROJECT COMPILE to test the correctness of the sintax then RUN it! Not a very useful program, but it works! Now let us grow in complexity. Let us add an integer variable I. We redefine the Function so that it computes the cube of x and the Procedure so that it writes hello ; Then we add in the main three different types of loops: FOR is used for a countable loop: to repeat a set of statements a pre-defined number of times; The WHILE statement is used for a loop that must be repeated as far as the condition (here i>0) is true. You go out from the loop when it is not anymore true. Finally,the REPEAT UNTIL statement is used for a loop that must be repeated as far as the condition (here i<0) is false. You go out from the loop as soon as the condition becomes true Name and libraries PROGRAM prova; {$APPTYPE CONSOLE}

6 USES SysUtils; Declarations Functions and Procedures VAR // here we declare the variables used throughout the program x : REAL; i : INTEGER; FUNCTION f(x:real):real; f := x*x*x; PROCEDURE do_something; WRITELN('Hello: now I compute the cube of i'); Main WRITELN('ciclo FOR'); FOR i := 1 TO 10 DO do_something; WRITELN(f(i)); WRITELN('ciclo WHILE'); WHILE i > 0 DO WRITELN('Hello again'); i := i -1; WRITELN('ciclo REPEAT UNTIL'); i := 5; REPEAT WRITELN('and again... '); i := i -1; UNTIL i < 0; READLN; END. Now let us make a step further. Now we ll write the outputs also on a file, that will be saved on disk. Three steps are needed when operating with files: a file variable must be declared; a specific name must be assigned to it; it must be opened; it must be closed Name and libraries PROGRAM prova; {$APPTYPE CONSOLE} USES

7 SysUtils; Declarations Functions and Procedures the file is created the file is closed CONST // here we declare the contants used throughout the program. g = ; namefile = 'D:\env_hydraulics\programs\getta.via'; sayhello = FALSE; VAR // here we declare the variables used throughout the program x : REAL; i : INTEGER; arch : TEXT; FUNCTION f(x:real):real; VAR y : REAL; y := 2*x; f := y*y*y; PROCEDURE do_something; IF sayhello THEN WRITELN('Hello: now I compute the cube of i') ELSE WRITELN('Goodbye: now I compute the cube of i') PROCEDURE aprifile_in_scrittura; ASSIGN(arch,namefile); REWRITE(arch); PROCEDURE chiudifile; CLOSE(arch); Main here I write on the file aprifile_in_scrittura; WRITELN('ciclo FOR'); FOR i := 1 TO 10 DO do_something; WRITELN (arch,i:4, ' ',f(i):7:3); WRITELN (i:4, ' ',f(i):7:3); chiudifile; READLN;

8 END. As a final observation, Function and Procedure are sub units of the code that are introduced only for convenience and clarity s sake. A function returns a value (e.g, cubo receives a real value x and returns a real value) whilst a Procedure does not return a value; it simply accomplishes a task that is better to keep outside of the main. All the variables and constants declared within a Function or Procedure are seen only from that a Function or Procedure. The content of classwork 1: Second part We now wil write a code to compute and write onto disk the specific Energy, specific Force and discharge E(h), Σ(Y) for a rectagular cross-section, for a given value of Q. Then we plot the stage-discharge curve Q(Y) in uniform motion. To this purpose we write a code like the following one. In order to complete the code, the student is asked to write the functions to compute Area, wetted perimeter and hydraulic radius as a function of water depth Y: A(Y), P(Y), R(Y); Specific energy as a function of Y: E(Y) and specific discharge for constant E; Specific Force as a function of water depth Y: Σ(Y).; Chezy s equation: compute Q given h, ks, j, and the cross section base. Finally, by using the file written by the code, the student is asked to plot the E(Y), Σ(Y) and Q(Y) curves. Mind: the value of base in the const declaration is obtained as 8*(1+S/21), where S is the number corresponding to the initial of the student surname (e.g., Pilotti, S=14) By using the attached table, the code could be easily generalised to different geometries. Name and libraries Declarations PROGRAM prova; {$APPTYPE CONSOLE} USES SysUtils; CONST dest = 'D:\env_hydraulics\programs\; nameout = Stage_discharge.out'; base = alfa = 1.; beta = 1.; row = 1000; ks = 50; pendenza = 0.001; VAR arch i y,deltay,m,p,energia,spinta_totale,q : TEXT; : INTEGER; : REAL; Functions and Procedures FUNCTION pt(a,potenza:real):real; {calcola a elevato ad una potenza} IF a = 0 THEN pt := 0 ELSE

9 IF a > 0 THEN pt := exp(potenza*ln(a)) ELSE writeln('base negativa ed esponente reale'); FUNCTION Area(h,Base: REAL):REAL; {area per sezione rettangolare} FUNCTION Perimetro(h,Base: REAL):REAL; {perimetro idraulico per sezione rettangolare} FUNCTION R_idraulico(h,Base: REAL):REAL; {raggio idraulico per sezione rettangolare} FUNCTION E(h,Q,base:real):REAL; {calcolo di E(h) per sezioni rettangolare} FUNCTION SpintaM(h,Q,base:real):REAL; {calcolo di M(h) flusso di quantità di moto per sezioni rettangolare} FUNCTION SpintaP(h,Q,base:real):REAL; {calcolo di Π(h),risultante della forza di pressione, per sezioni rettangolare } FUNCTION SpintaTot(h,Q,base:real):REAL; FUNCTION Q_Chezy(h,ks,j,base:real):REAL; {calcolo della portata data Ks di Gauckler-Strickler, la pendenza j,la base e h}

10 Main ASSIGN (arch,dest+nameout); REWRITE (arch); WRITELN (arch,' [m] E [m] M[N] S_totale[N] Q[mc/s]'); WRITELN ('Scrittura dei dati su file :',dest+nameout); // first the E, M, P functions are plotted for this value of Q y := 0.0; deltay := 0.05; Q := 20; FOR i := 1 TO 100 DO y := y+deltay; energia := E(y,Q,base); M := SpintaM(y,Q,base); P := SpintaP(y,Q,base); spinta_totale := SpintaTot(y,Q,base): WRITELN(arch,y:5:2,' ',energia:7:2,' ',M:7:2,' ',P:7:2,' ',spinta_totale :7:2); // now we plot the stage-discharge curve WRITELN (arch,' [m] Q[mc/s]'); y := 0.0; FOR i := 1 TO 100 DO y := y+deltay; Q := Q_Chezy(y,ks,pendenza,base); WRITELN(arch,y:5:2, ' ',Q :7:2); CLOSE(arch); WRITELN('programma terminato: premere un tasto per uscire'); READLN; END.

11

12

13 (from Open Channel Hydraulics, T.Sturm. McGraw Hill)

Classwork 10. Solving Streeter-Phelps model for the Oglio River upstream of lake Iseo

Classwork 10. Solving Streeter-Phelps model for the Oglio River upstream of lake Iseo Classwork 10 Solving Streeter-Phelps model for the Oglio River upstream of lake Iseo The ValleCamonica watershed will be used as a geographical background for studying the Oxygen content when sewage is

More information

WESTMORELAND COUNTY PUBLIC SCHOOLS 2011 2012 Integrated Instructional Pacing Guide and Checklist Computer Math

WESTMORELAND COUNTY PUBLIC SCHOOLS 2011 2012 Integrated Instructional Pacing Guide and Checklist Computer Math Textbook Correlation WESTMORELAND COUNTY PUBLIC SCHOOLS 2011 2012 Integrated Instructional Pacing Guide and Checklist Computer Math Following Directions Unit FIRST QUARTER AND SECOND QUARTER Logic Unit

More information

LECTURE 9: Open channel flow: Uniform flow, best hydraulic sections, energy principles, Froude number

LECTURE 9: Open channel flow: Uniform flow, best hydraulic sections, energy principles, Froude number LECTURE 9: Open channel flow: Uniform flow, best hydraulic sections, energy principles, Froude number Open channel flow must have a free surface. Normally free water surface is subjected to atmospheric

More information

What is the most obvious difference between pipe flow and open channel flow????????????? (in terms of flow conditions and energy situation)

What is the most obvious difference between pipe flow and open channel flow????????????? (in terms of flow conditions and energy situation) OPEN CHANNEL FLOW 1 3 Question What is the most obvious difference between pipe flow and open channel flow????????????? (in terms of flow conditions and energy situation) Typical open channel shapes Figure

More information

Appendix 4-C. Open Channel Theory

Appendix 4-C. Open Channel Theory 4-C-1 Appendix 4-C Open Channel Theory 4-C-2 Appendix 4.C - Table of Contents 4.C.1 Open Channel Flow Theory 4-C-3 4.C.2 Concepts 4-C-3 4.C.2.1 Specific Energy 4-C-3 4.C.2.2 Velocity Distribution Coefficient

More information

Performing a Steady Flow Analysis

Performing a Steady Flow Analysis C H A P T E R 7 Performing a Steady Flow Analysis This chapter discusses how to calculate steady flow water surface profiles. The chapter is divided into two parts. The first part discusses how to enter

More information

CHAPTER 9 CHANNELS APPENDIX A. Hydraulic Design Equations for Open Channel Flow

CHAPTER 9 CHANNELS APPENDIX A. Hydraulic Design Equations for Open Channel Flow CHAPTER 9 CHANNELS APPENDIX A Hydraulic Design Equations for Open Channel Flow SEPTEMBER 2009 CHAPTER 9 APPENDIX A Hydraulic Design Equations for Open Channel Flow Introduction The Equations presented

More information

Floodplain Hydraulics! Hydrology and Floodplain Analysis Dr. Philip Bedient

Floodplain Hydraulics! Hydrology and Floodplain Analysis Dr. Philip Bedient Floodplain Hydraulics! Hydrology and Floodplain Analysis Dr. Philip Bedient Open Channel Flow 1. Uniform flow - Manning s Eqn in a prismatic channel - Q, V, y, A, P, B, S and roughness are all constant

More information

Hydraulics Laboratory Experiment Report

Hydraulics Laboratory Experiment Report Hydraulics Laboratory Experiment Report Name: Ahmed Essam Mansour Section: "1", Monday 2-5 pm Title: Flow in open channel Date: 13 November-2006 Objectives: Calculate the Chezy and Manning coefficients

More information

SECTION VI: FLOOD ROUTING. Consider the watershed with 6 sub-basins. Q 1 = Q A + Q B (Runoff from A & B)

SECTION VI: FLOOD ROUTING. Consider the watershed with 6 sub-basins. Q 1 = Q A + Q B (Runoff from A & B) SECTION VI: FLOOD ROUTING Consider the watershed with 6 sub-basins Q 1 = Q A + Q B (Runoff from A & B) 1 Q 2 = (Q A + Q B ) 2 + Q C + Q D (Routed runoff from Q 1 ) + (Direct runoff from C & D) What causes

More information

Topic 8: Open Channel Flow

Topic 8: Open Channel Flow 3.1 Course Number: CE 365K Course Title: Hydraulic Engineering Design Course Instructor: R.J. Charbeneau Subject: Open Channel Hydraulics Topics Covered: 8. Open Channel Flow and Manning Equation 9. Energy,

More information

Experiment (13): Flow channel

Experiment (13): Flow channel Introduction: An open channel is a duct in which the liquid flows with a free surface exposed to atmospheric pressure. Along the length of the duct, the pressure at the surface is therefore constant and

More information

OPEN-CHANNEL FLOW. Free surface. P atm

OPEN-CHANNEL FLOW. Free surface. P atm OPEN-CHANNEL FLOW Open-channel flow is a flow of liquid (basically water) in a conduit with a free surface. That is a surface on which pressure is equal to local atmospheric pressure. P atm Free surface

More information

Chapter 9. Steady Flow in Open channels

Chapter 9. Steady Flow in Open channels Chapter 9 Steady Flow in Open channels Objectives Be able to define uniform open channel flow Solve uniform open channel flow using the Manning Equation 9.1 Uniform Flow in Open Channel Open-channel flows

More information

Sources: On the Web: Slides will be available on:

Sources: On the Web: Slides will be available on: C programming Introduction The basics of algorithms Structure of a C code, compilation step Constant, variable type, variable scope Expression and operators: assignment, arithmetic operators, comparison,

More information

Informatica e Sistemi in Tempo Reale

Informatica e Sistemi in Tempo Reale Informatica e Sistemi in Tempo Reale Introduction to C programming Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 25, 2010 G. Lipari (Scuola Superiore Sant Anna)

More information

Course MS10975A Introduction to Programming. Length: 5 Days

Course MS10975A Introduction to Programming. Length: 5 Days 3 Riverchase Office Plaza Hoover, Alabama 35244 Phone: 205.989.4944 Fax: 855.317.2187 E-Mail: [email protected] Web: www.discoveritt.com Course MS10975A Introduction to Programming Length: 5 Days

More information

CE 504 Computational Hydrology Computational Environments and Tools Fritz R. Fiedler

CE 504 Computational Hydrology Computational Environments and Tools Fritz R. Fiedler CE 504 Computational Hydrology Computational Environments and Tools Fritz R. Fiedler 1) Operating systems a) Windows b) Unix and Linux c) Macintosh 2) Data manipulation tools a) Text Editors b) Spreadsheets

More information

Available in Base or Survey Standard or Survey Professional series with different modules add-ons to suit your technical requirement and budget.

Available in Base or Survey Standard or Survey Professional series with different modules add-ons to suit your technical requirement and budget. World First Leading the Surveying and Civil Engineering software application, civilcad 6 is the world first application of its kind to run in the Plug and Go concept. Delivered pre-installed on a customised

More information

14:440:127 Introduction to Computers for Engineers. Notes for Lecture 06

14:440:127 Introduction to Computers for Engineers. Notes for Lecture 06 14:440:127 Introduction to Computers for Engineers Notes for Lecture 06 Rutgers University, Spring 2010 Instructor- Blase E. Ur 1 Loop Examples 1.1 Example- Sum Primes Let s say we wanted to sum all 1,

More information

Open channel flow Basic principle

Open channel flow Basic principle Open channel flow Basic principle INTRODUCTION Flow in rivers, irrigation canals, drainage ditches and aqueducts are some examples for open channel flow. These flows occur with a free surface and the pressure

More information

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science updated 03/08/2012 Unit 1: JKarel 8 weeks http://www.fcps.edu/is/pos/documents/hs/compsci.htm

More information

Math 0980 Chapter Objectives. Chapter 1: Introduction to Algebra: The Integers.

Math 0980 Chapter Objectives. Chapter 1: Introduction to Algebra: The Integers. Math 0980 Chapter Objectives Chapter 1: Introduction to Algebra: The Integers. 1. Identify the place value of a digit. 2. Write a number in words or digits. 3. Write positive and negative numbers used

More information

Custom Javascript In Planning

Custom Javascript In Planning A Hyperion White Paper Custom Javascript In Planning Creative ways to provide custom Web forms This paper describes several of the methods that can be used to tailor Hyperion Planning Web forms. Hyperion

More information

Compiler Construction

Compiler Construction Compiler Construction Lecture 1 - An Overview 2003 Robert M. Siegfried All rights reserved A few basic definitions Translate - v, a.to turn into one s own language or another. b. to transform or turn from

More information

CHAPTER 5 OPEN CHANNEL HYDROLOGY

CHAPTER 5 OPEN CHANNEL HYDROLOGY 5.4 Uniform Flow Calculations 5.4.1 Design Charts CHAPTER 5 OPEN CHANNEL HYDROLOGY Following is a discussion of the equations that can be used for the design and analysis of open channel flow. The Federal

More information

Common Core Unit Summary Grades 6 to 8

Common Core Unit Summary Grades 6 to 8 Common Core Unit Summary Grades 6 to 8 Grade 8: Unit 1: Congruence and Similarity- 8G1-8G5 rotations reflections and translations,( RRT=congruence) understand congruence of 2 d figures after RRT Dilations

More information

JMulTi/JStatCom - A Data Analysis Toolkit for End-users and Developers

JMulTi/JStatCom - A Data Analysis Toolkit for End-users and Developers JMulTi/JStatCom - A Data Analysis Toolkit for End-users and Developers Technology White Paper JStatCom Engineering, www.jstatcom.com by Markus Krätzig, June 4, 2007 Abstract JStatCom is a software framework

More information

Programming Languages & Tools

Programming Languages & Tools 4 Programming Languages & Tools Almost any programming language one is familiar with can be used for computational work (despite the fact that some people believe strongly that their own favorite programming

More information

CATIA V5 Tutorials. Mechanism Design & Animation. Release 18. Nader G. Zamani. University of Windsor. Jonathan M. Weaver. University of Detroit Mercy

CATIA V5 Tutorials. Mechanism Design & Animation. Release 18. Nader G. Zamani. University of Windsor. Jonathan M. Weaver. University of Detroit Mercy CATIA V5 Tutorials Mechanism Design & Animation Release 18 Nader G. Zamani University of Windsor Jonathan M. Weaver University of Detroit Mercy SDC PUBLICATIONS Schroff Development Corporation www.schroff.com

More information

Chapter 10. Open- Channel Flow

Chapter 10. Open- Channel Flow Updated: Sept 3 2013 Created by Dr. İsmail HALTAŞ Created: Sept 3 2013 Chapter 10 Open- Channel Flow based on Fundamentals of Fluid Mechanics 6th EdiAon By Munson 2009* *some of the Figures and Tables

More information

Edmund Li. Where is defined as the mutual inductance between and and has the SI units of Henries (H).

Edmund Li. Where is defined as the mutual inductance between and and has the SI units of Henries (H). INDUCTANCE MUTUAL INDUCTANCE If we consider two neighbouring closed loops and with bounding surfaces respectively then a current through will create a magnetic field which will link with as the flux passes

More information

Everyday Mathematics. Grade 4 Grade-Level Goals CCSS EDITION. Content Strand: Number and Numeration. Program Goal Content Thread Grade-Level Goal

Everyday Mathematics. Grade 4 Grade-Level Goals CCSS EDITION. Content Strand: Number and Numeration. Program Goal Content Thread Grade-Level Goal Content Strand: Number and Numeration Understand the Meanings, Uses, and Representations of Numbers Understand Equivalent Names for Numbers Understand Common Numerical Relations Place value and notation

More information

Tutorial for Assignment #2 Gantry Crane Analysis By ANSYS (Mechanical APDL) V.13.0

Tutorial for Assignment #2 Gantry Crane Analysis By ANSYS (Mechanical APDL) V.13.0 Tutorial for Assignment #2 Gantry Crane Analysis By ANSYS (Mechanical APDL) V.13.0 1 Problem Description Design a gantry crane meeting the geometry presented in Figure 1 on page #325 of the course textbook

More information

Explain the relationship between a class and an object. Which is general and which is specific?

Explain the relationship between a class and an object. Which is general and which is specific? A.1.1 What is the Java Virtual Machine? Is it hardware or software? How does its role differ from that of the Java compiler? The Java Virtual Machine (JVM) is software that simulates the execution of a

More information

Exercise (4): Open Channel Flow - Gradually Varied Flow

Exercise (4): Open Channel Flow - Gradually Varied Flow Exercise 4: Open Channel Flow - Gradually Varied Flow 1 A wide channel consists of three long reaches and has two gates located midway of the first and last reaches. The bed slopes for the three reaches

More information

How To Solve Factoring Problems

How To Solve Factoring Problems 05-W4801-AM1.qxd 8/19/08 8:45 PM Page 241 Factoring, Solving Equations, and Problem Solving 5 5.1 Factoring by Using the Distributive Property 5.2 Factoring the Difference of Two Squares 5.3 Factoring

More information

Everyday Mathematics. Grade 4 Grade-Level Goals. 3rd Edition. Content Strand: Number and Numeration. Program Goal Content Thread Grade-Level Goals

Everyday Mathematics. Grade 4 Grade-Level Goals. 3rd Edition. Content Strand: Number and Numeration. Program Goal Content Thread Grade-Level Goals Content Strand: Number and Numeration Understand the Meanings, Uses, and Representations of Numbers Understand Equivalent Names for Numbers Understand Common Numerical Relations Place value and notation

More information

GRADES 7, 8, AND 9 BIG IDEAS

GRADES 7, 8, AND 9 BIG IDEAS Table 1: Strand A: BIG IDEAS: MATH: NUMBER Introduce perfect squares, square roots, and all applications Introduce rational numbers (positive and negative) Introduce the meaning of negative exponents for

More information

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives Introduction to Programming and Algorithms Module 1 CS 146 Sam Houston State University Dr. Tim McGuire Module Objectives To understand: the necessity of programming, differences between hardware and software,

More information

CGN 3421 - Computer Methods

CGN 3421 - Computer Methods CGN 3421 - Computer Methods Class web site: www.ce.ufl.edu/~kgurl Class text books: Recommended as a reference Numerical Methods for Engineers, Chapra and Canale Fourth Edition, McGraw-Hill Class software:

More information

Modeling with Python

Modeling with Python H Modeling with Python In this appendix a brief description of the Python programming language will be given plus a brief introduction to the Antimony reaction network format and libroadrunner. Python

More information

EXAMPLES (OPEN-CHANNEL FLOW) AUTUMN 2015

EXAMPLES (OPEN-CHANNEL FLOW) AUTUMN 2015 EXAMPLES (OPEN-CHANNEL FLOW) AUTUMN 2015 Normal and Critical Depths Q1. If the discharge in a channel of width 5 m is 20 m 3 s 1 and Manning s n is 0.02 m 1/3 s, find: (a) the normal depth and Froude number

More information

EKT150 Introduction to Computer Programming. Wk1-Introduction to Computer and Computer Program

EKT150 Introduction to Computer Programming. Wk1-Introduction to Computer and Computer Program EKT150 Introduction to Computer Programming Wk1-Introduction to Computer and Computer Program A Brief Look At Computer Computer is a device that receives input, stores and processes data, and provides

More information

Forecasting in STATA: Tools and Tricks

Forecasting in STATA: Tools and Tricks Forecasting in STATA: Tools and Tricks Introduction This manual is intended to be a reference guide for time series forecasting in STATA. It will be updated periodically during the semester, and will be

More information

MATH 095, College Prep Mathematics: Unit Coverage Pre-algebra topics (arithmetic skills) offered through BSE (Basic Skills Education)

MATH 095, College Prep Mathematics: Unit Coverage Pre-algebra topics (arithmetic skills) offered through BSE (Basic Skills Education) MATH 095, College Prep Mathematics: Unit Coverage Pre-algebra topics (arithmetic skills) offered through BSE (Basic Skills Education) Accurately add, subtract, multiply, and divide whole numbers, integers,

More information

L r = L m /L p. L r = L p /L m

L r = L m /L p. L r = L p /L m NOTE: In the set of lectures 19/20 I defined the length ratio as L r = L m /L p The textbook by Finnermore & Franzini defines it as L r = L p /L m To avoid confusion let's keep the textbook definition,

More information

The Elective Part of the NSS ICT Curriculum D. Software Development

The Elective Part of the NSS ICT Curriculum D. Software Development of the NSS ICT Curriculum D. Software Development Mr. CHEUNG Wah-sang / Mr. WONG Wing-hong, Robert Member of CDC HKEAA Committee on ICT (Senior Secondary) 1 D. Software Development The concepts / skills

More information

Data Storage. Chapter 3. Objectives. 3-1 Data Types. Data Inside the Computer. After studying this chapter, students should be able to:

Data Storage. Chapter 3. Objectives. 3-1 Data Types. Data Inside the Computer. After studying this chapter, students should be able to: Chapter 3 Data Storage Objectives After studying this chapter, students should be able to: List five different data types used in a computer. Describe how integers are stored in a computer. Describe how

More information

Computer Networks/DV2 Lab

Computer Networks/DV2 Lab Computer Networks/DV2 Lab Room: BB 219 Additional Information: http://ti.uni-due.de/ti/en/education/teaching/ss13/netlab Equipment for each group: - 1 Server computer (OS: Windows Server 2008 Standard)

More information

Hydrogeological Data Visualization

Hydrogeological Data Visualization Conference of Junior Researchers in Civil Engineering 209 Hydrogeological Data Visualization Boglárka Sárközi BME Department of Photogrammetry and Geoinformatics, e-mail: [email protected] Abstract

More information

Data Storage 3.1. Foundations of Computer Science Cengage Learning

Data Storage 3.1. Foundations of Computer Science Cengage Learning 3 Data Storage 3.1 Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: List five different data types used in a computer. Describe how

More information

Using GIS Data With HEC-RAS

Using GIS Data With HEC-RAS C H A P T E R 14 Using GIS Data With HEC-RAS HEC-RAS has the ability to import three-dimensional (3D) river schematic and cross section data created in a GIS or CADD system. While the HEC- RAS software

More information

Introduction to Programming (in C++) Loops. Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC

Introduction to Programming (in C++) Loops. Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC Introduction to Programming (in C++) Loops Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC Example Assume the following specification: Input: read a number N > 0 Output:

More information

Example. Introduction to Programming (in C++) Loops. The while statement. Write the numbers 1 N. Assume the following specification:

Example. Introduction to Programming (in C++) Loops. The while statement. Write the numbers 1 N. Assume the following specification: Example Introduction to Programming (in C++) Loops Assume the following specification: Input: read a number N > 0 Output: write the sequence 1 2 3 N (one number per line) Jordi Cortadella, Ricard Gavaldà,

More information

TML. User's Guide and Reference Manual. for the APPLE IIGS. APW Version

TML. User's Guide and Reference Manual. for the APPLE IIGS. APW Version I. TML for the APPLE IIGS User's Guide and Reference Manual APW Version IlfNlfL fp@@@@o ll@ff arm@ #J[fJ[fJO@ OO@~ User's Guide and Reference Manual Version 1.0, March 1987 COPYRIGHT 1987 by TML Systems,

More information

Visualization of Output Data from Particle Transport Codes

Visualization of Output Data from Particle Transport Codes Visualization of Output Data from Particle Transport Codes Phase 1 Final Report Instrument No: DE-FG02-07ER84735 June 20, 2007 through March 19, 2008 Recipient: Randolph Schwarz, Visual Editor Consultants

More information

CHAPTER 3 STORM DRAINAGE SYSTEMS

CHAPTER 3 STORM DRAINAGE SYSTEMS CHAPTER 3 STORM DRAINAGE SYSTEMS 3.7 Storm Drains 3.7.1 Introduction After the tentative locations of inlets, drain pipes, and outfalls with tail-waters have been determined and the inlets sized, the next

More information

Introduction to Python

Introduction to Python Introduction to Python Sophia Bethany Coban Problem Solving By Computer March 26, 2014 Introduction to Python Python is a general-purpose, high-level programming language. It offers readable codes, and

More information

Element Property Definition for the Space Satellite

Element Property Definition for the Space Satellite LESSON 5 Element Property Definition for the Space Satellite Z Y X Objectives: Define shell, bar, and point mass element properties for the Space Satellite. Create and apply a Field to describe a spatially

More information

Computational Mathematics with Python

Computational Mathematics with Python Boolean Arrays Classes Computational Mathematics with Python Basics Olivier Verdier and Claus Führer 2009-03-24 Olivier Verdier and Claus Führer Computational Mathematics with Python 2009-03-24 1 / 40

More information

Lecture 5 Hemodynamics. Description of fluid flow. The equation of continuity

Lecture 5 Hemodynamics. Description of fluid flow. The equation of continuity 1 Lecture 5 Hemodynamics Description of fluid flow Hydrodynamics is the part of physics, which studies the motion of fluids. It is based on the laws of mechanics. Hemodynamics studies the motion of blood

More information

Volumes of Revolution

Volumes of Revolution Mathematics Volumes of Revolution About this Lesson This lesson provides students with a physical method to visualize -dimensional solids and a specific procedure to sketch a solid of revolution. Students

More information

Delphi Developer Certification Exam Study Guide

Delphi Developer Certification Exam Study Guide Delphi Developer Certification Exam Study Guide Embarcadero Technologies Americas Headquarters EMEA Headquarters Asia-Pacific Headquarters 100 California Street, 12th Floor San Francisco, California 94111

More information

EasyC. Programming Tips

EasyC. Programming Tips EasyC Programming Tips PART 1: EASYC PROGRAMMING ENVIRONMENT The EasyC package is an integrated development environment for creating C Programs and loading them to run on the Vex Control System. Its Opening

More information

Backwater Rise and Drag Characteristics of Bridge Piers under Subcritical

Backwater Rise and Drag Characteristics of Bridge Piers under Subcritical European Water 36: 7-35, 11. 11 E.W. Publications Backwater Rise and Drag Characteristics of Bridge Piers under Subcritical Flow Conditions C.R. Suribabu *, R.M. Sabarish, R. Narasimhan and A.R. Chandhru

More information

STATE OF FLORIDA DEPARTMENT OF TRANSPORTATION DRAINAGE HANDBOOK OPEN CHANNEL. OFFICE OF DESIGN, DRAINAGE SECTION November 2009 TALLAHASSEE, FLORIDA

STATE OF FLORIDA DEPARTMENT OF TRANSPORTATION DRAINAGE HANDBOOK OPEN CHANNEL. OFFICE OF DESIGN, DRAINAGE SECTION November 2009 TALLAHASSEE, FLORIDA STATE OF FLORIDA DEPARTMENT OF TRANSPORTATION DRAINAGE HANDBOOK OPEN CHANNEL OFFICE OF DESIGN, DRAINAGE SECTION TALLAHASSEE, FLORIDA Table of Contents Open Channel Handbook Chapter 1 Introduction... 1

More information

Animated Lighting Software Overview

Animated Lighting Software Overview Animated Lighting Software Revision 1.0 August 29, 2003 Table of Contents SOFTWARE OVERVIEW 1) Dasher Pro and Animation Director overviews 2) Installing the software 3) Help 4) Configuring the software

More information

Open Channel Flow. M. Siavashi. School of Mechanical Engineering Iran University of Science and Technology

Open Channel Flow. M. Siavashi. School of Mechanical Engineering Iran University of Science and Technology M. Siavashi School of Mechanical Engineering Iran University of Science and Technology W ebpage: webpages.iust.ac.ir/msiavashi Email: [email protected] Landline: +98 21 77240391 Fall 2013 Introduction

More information

M6a: Open Channel Flow (Manning s Equation, Partially Flowing Pipes, and Specific Energy)

M6a: Open Channel Flow (Manning s Equation, Partially Flowing Pipes, and Specific Energy) M6a: Open Channel Flow (, Partially Flowing Pipes, and Specific Energy) Steady Non-Uniform Flow in an Open Channel Robert Pitt University of Alabama and Shirley Clark Penn State - Harrisburg Continuity

More information

Origins of Operating Systems OS/360. Martin Grund HPI

Origins of Operating Systems OS/360. Martin Grund HPI Origins of Operating Systems OS/360 HPI Table of Contents IBM System 360 Functional Structure of OS/360 Virtual Machine Time Sharing 2 Welcome to Big Blue 3 IBM System 360 In 1964 IBM announced the IBM-360

More information

Chapter 13 OPEN-CHANNEL FLOW

Chapter 13 OPEN-CHANNEL FLOW Fluid Mechanics: Fundamentals and Applications, 2nd Edition Yunus A. Cengel, John M. Cimbala McGraw-Hill, 2010 Lecture slides by Mehmet Kanoglu Copyright The McGraw-Hill Companies, Inc. Permission required

More information

Thnkwell s Homeschool Precalculus Course Lesson Plan: 36 weeks

Thnkwell s Homeschool Precalculus Course Lesson Plan: 36 weeks Thnkwell s Homeschool Precalculus Course Lesson Plan: 36 weeks Welcome to Thinkwell s Homeschool Precalculus! We re thrilled that you ve decided to make us part of your homeschool curriculum. This lesson

More information

Lecture 25 Design Example for a Channel Transition. I. Introduction

Lecture 25 Design Example for a Channel Transition. I. Introduction Lecture 5 Design Example for a Channel Transition I. Introduction This example will be for a transition from a trapezoidal canal section to a rectangular flume section The objective of the transition design

More information

PGR Computing Programming Skills

PGR Computing Programming Skills PGR Computing Programming Skills Dr. I. Hawke 2008 1 Introduction The purpose of computing is to do something faster, more efficiently and more reliably than you could as a human do it. One obvious point

More information

T O B C A T C A S E G E O V I S A T DETECTIE E N B L U R R I N G V A N P E R S O N E N IN P A N O R A MISCHE BEELDEN

T O B C A T C A S E G E O V I S A T DETECTIE E N B L U R R I N G V A N P E R S O N E N IN P A N O R A MISCHE BEELDEN T O B C A T C A S E G E O V I S A T DETECTIE E N B L U R R I N G V A N P E R S O N E N IN P A N O R A MISCHE BEELDEN Goal is to process 360 degree images and detect two object categories 1. Pedestrians,

More information

From Civil 3D, with Love

From Civil 3D, with Love From Civil 3D, with Love Download the zip file containing the files needed for the exercise. Extract the files to a convenient location on your hard drive before you begin. The files associated with this

More information

For example, estimate the population of the United States as 3 times 10⁸ and the

For example, estimate the population of the United States as 3 times 10⁸ and the CCSS: Mathematics The Number System CCSS: Grade 8 8.NS.A. Know that there are numbers that are not rational, and approximate them by rational numbers. 8.NS.A.1. Understand informally that every number

More information

Physics 210 Q1 2012 ( PHYSICS210BRIDGE ) My Courses Course Settings

Physics 210 Q1 2012 ( PHYSICS210BRIDGE ) My Courses Course Settings 1 of 11 9/7/2012 1:06 PM Logged in as Julie Alexander, Instructor Help Log Out Physics 210 Q1 2012 ( PHYSICS210BRIDGE ) My Courses Course Settings Course Home Assignments Roster Gradebook Item Library

More information

Cross-platform event logging in Object Pascal

Cross-platform event logging in Object Pascal Cross-platform event logging in Object Pascal Micha el Van Canneyt June 24, 2007 1 Introduction Often, a program which works in the background or sits in the windows system tray needs to write some diagnostic

More information

Developing an Inventory Management System for Second Life

Developing an Inventory Management System for Second Life Developing an Inventory Management System for Second Life Abstract Anthony Rosequist Workflow For the progress report a month ago, I set the goal to have a basic, functional inventory management system

More information

FOREWORD. Executive Secretary

FOREWORD. Executive Secretary FOREWORD The Botswana Examinations Council is pleased to authorise the publication of the revised assessment procedures for the Junior Certificate Examination programme. According to the Revised National

More information

Automated parameter conversion from HICUM/L2 to HICUM/L0

Automated parameter conversion from HICUM/L2 to HICUM/L0 Automated parameter conversion from HICUM/L2 to HICUM/L Automated parameter conversion from HICUM/L2 to HICUM/L A. Pawlak 1, M. Schröter 1,2, A. Mukherjee 1, S. Lehmann 1 1 Chair for Electron Devices and

More information

ABAQUS/CAE Tutorial: Analysis of an Aluminum Bracket

ABAQUS/CAE Tutorial: Analysis of an Aluminum Bracket H. Kim FEA Tutorial 1 ABAQUS/CAE Tutorial: Analysis of an Aluminum Bracket Hyonny Kim last updated: August 2004 In this tutorial, you ll learn how to: 1. Sketch 2D geometry & define part. 2. Define material

More information

Moving from CS 61A Scheme to CS 61B Java

Moving from CS 61A Scheme to CS 61B Java Moving from CS 61A Scheme to CS 61B Java Introduction Java is an object-oriented language. This document describes some of the differences between object-oriented programming in Scheme (which we hope you

More information

Factoring Trinomials: The ac Method

Factoring Trinomials: The ac Method 6.7 Factoring Trinomials: The ac Method 6.7 OBJECTIVES 1. Use the ac test to determine whether a trinomial is factorable over the integers 2. Use the results of the ac test to factor a trinomial 3. For

More information

Broad Crested Weirs. I. Introduction

Broad Crested Weirs. I. Introduction Lecture 9 Broad Crested Weirs I. Introduction The broad-crested weir is an open-channel flow measurement device which combines hydraulic characteristics of both weirs and flumes Sometimes the name ramp

More information

Environmental Data Management Programs

Environmental Data Management Programs Hydrologic Engineering Centre (HEC) Software CD Collection of programs, developed by the U.S. Army Corps of Engineers Environmental Data Management Programs Name: HEC-DSS Package Purpose: Data Storage

More information

A n. P w Figure 1: Schematic of the hydraulic radius

A n. P w Figure 1: Schematic of the hydraulic radius BEE 473 Watershed Engineering Fall 2004 OPEN CHANNELS The following provide the basic equations and relationships used in open channel design. Although a variety of flow conditions can exist in a channel

More information

21. Channel flow III (8.10 8.11)

21. Channel flow III (8.10 8.11) 21. Channel flow III (8.10 8.11) 1. Hydraulic jump 2. Non-uniform flow section types 3. Step calculation of water surface 4. Flow measuring in channels 5. Examples E22, E24, and E25 1. Hydraulic jump Occurs

More information

Assignment 2: Option Pricing and the Black-Scholes formula The University of British Columbia Science One CS 2015-2016 Instructor: Michael Gelbart

Assignment 2: Option Pricing and the Black-Scholes formula The University of British Columbia Science One CS 2015-2016 Instructor: Michael Gelbart Assignment 2: Option Pricing and the Black-Scholes formula The University of British Columbia Science One CS 2015-2016 Instructor: Michael Gelbart Overview Due Thursday, November 12th at 11:59pm Last updated

More information

2 SYSTEM DESCRIPTION TECHNIQUES

2 SYSTEM DESCRIPTION TECHNIQUES 2 SYSTEM DESCRIPTION TECHNIQUES 2.1 INTRODUCTION Graphical representation of any process is always better and more meaningful than its representation in words. Moreover, it is very difficult to arrange

More information

Activity 1: Using base ten blocks to model operations on decimals

Activity 1: Using base ten blocks to model operations on decimals Rational Numbers 9: Decimal Form of Rational Numbers Objectives To use base ten blocks to model operations on decimal numbers To review the algorithms for addition, subtraction, multiplication and division

More information

Introduction to Quadratic Functions

Introduction to Quadratic Functions Introduction to Quadratic Functions The St. Louis Gateway Arch was constructed from 1963 to 1965. It cost 13 million dollars to build..1 Up and Down or Down and Up Exploring Quadratic Functions...617.2

More information

Zhenping Liu *, Yao Liang * Virginia Polytechnic Institute and State University. Xu Liang ** University of California, Berkeley

Zhenping Liu *, Yao Liang * Virginia Polytechnic Institute and State University. Xu Liang ** University of California, Berkeley P1.1 AN INTEGRATED DATA MANAGEMENT, RETRIEVAL AND VISUALIZATION SYSTEM FOR EARTH SCIENCE DATASETS Zhenping Liu *, Yao Liang * Virginia Polytechnic Institute and State University Xu Liang ** University

More information

Translating to Java. Translation. Input. Many Level Translations. read, get, input, ask, request. Requirements Design Algorithm Java Machine Language

Translating to Java. Translation. Input. Many Level Translations. read, get, input, ask, request. Requirements Design Algorithm Java Machine Language Translation Translating to Java Introduction to Computer Programming The job of a programmer is to translate a problem description into a computer language. You need to be able to convert a problem description

More information

10.1. Solving Quadratic Equations. Investigation: Rocket Science CONDENSED

10.1. Solving Quadratic Equations. Investigation: Rocket Science CONDENSED CONDENSED L E S S O N 10.1 Solving Quadratic Equations In this lesson you will look at quadratic functions that model projectile motion use tables and graphs to approimate solutions to quadratic equations

More information