Module - UWEC Computer Science Department

Download Report

Transcript Module - UWEC Computer Science Department

CS 170:
Computing for the Sciences and
Mathematics
Prof. Dan Ernst
Department of
Computer Science
Welcome to CS 170 !
 Instructor
 Dan Ernst
Office: P 139
 [email protected]

 Course Web Site:
 http://www.cs.uwec.edu/~ernstdj/courses/cs170/
 https://uwec.courses.wisconsin.edu

D2L - for grades
Introductions
 My background
 PhD Michigan, 2005,High-performance computer architecture
 Mentoring undergraduates
 Teach computer architecture and systems software
 Multiple collaborative research projects w/science and math
 Director, UWEC Center for Computational Science *
 Outside
 Workshops for the Supercomputing Education Program and
National Computational Science Institute
Your Turn
 What is your name?
 Where are you from?
 What year you are in your studies?
 What is your favorite use for computers?
Course Website
 http://www.cs.uwec.edu/~ernstdj/courses/cs170/
 The web site is an integral part of the course
 Website will provide
 Lab/assignment information and due dates
 Exam information, dates & times
 Lecture slides


be sure to take your own notes!
Samples from class
Getting Information
 Read your e-mail!
 Class e-mail group will be used by the instructor
 Membership mandatory

I assume you read everything sent to this list!
Getting Help:
When you have questions
 Regarding HELP with course materials and
assignments

Come to office hours – Phillips 139
Wednesday 1 – 3 pm
 Thursday 9:30 – 11:30 am
 OR by appointment (just e-mail or call my office)


Send me an e-mail: [email protected]
What is CS 170?
 An introduction to the application of computational
resources to solving problems in the sciences and
mathematics
 Goals:
 Knowledge:
Understand the modeling process
 Work with some standard modeling techniques


Skills:

Gain experience in working with computational tools (Vensim,
Maple, etc.)
What This Course is About
 This course is NOT about:


Programming general applications (take CS 163/145)
Making web pages – (take CS 318)
 Ingredients of designing and writing software



Computer programs
A programming language (C++)
Elementary programming concepts
Universal constructs
 Useful techniques


Producing (software) solutions to problems
How to think about problems
 How to articulate solution in a precise way
 How to understand what a program is doing

Textbooks
 Required:
 Shiflet and Shiflet

Introduction to Computational Science: Modeling and Simulation
for the Sciences.
Overall Course Grading
Final
: Exams (3): 40%
Grade
Weekly Assignments(10-12): 40%
Larger Projects(2): 20%
Assignment Deadlines
 Assignments
 On-Time: Always due by the beginning of class on the due
date specified
 No assignment will be accepted after the deadline, unless given
prior approval
 Exceptions granted only under the most extraordinary
circumstances

Advice: PLAN for things to go wrong!
CS 170 Academic Honesty
 All work is to be done individually unless otherwise
instructed

We will do significant group work in this course as well
 Discussing concepts is generally OK, exchanging or
copying files or written work is NEVER OK
 course materials provided by the instructor (textbook,
handouts, project write-ups, course web pages, etc.) may
be used freely in your work

downloading code you found with google is NOT ok
 Come see me for help if you have any uncertainty
Computer Accounts & Software
 Your UWEC account is all that is needed
 Major Software

Vensim PLE
Available to you (free) at all Windows lab computers on campus
 Free download - http://www.vensim.com/venple.html


Maple

Available to you (free) at all Windows lab computers on campus
 Supported Platforms: Windows

your programs must run with the campus installation to be graded
CS 170:
Computing for the Sciences and
Mathematics
Prof. Dan Ernst
Department of Computer Science
Science
 What is Science?




(A) A set of facts
(B) Something that professional scientists do
(C) The underlying Truth about the Universe
(D) None of the above
(A) A set of facts … and (C)
 We are constantly making new discoveries and
collecting new data
 Technology and experiments are changing
 Old Theories are replaced by new Theories
 Are any Theories not science?
 Even if they’re shown to be wrong later?
(B) Something Professional Scientists Do…
 What is a scientist?
 Do you need a PhD?
 Amateur Scientists play an important role in
discovery
 Being scientific DOES NOT require a Union Card
Hanny’s Voorwerp
 "Teacher finds new cosmic object", BBC, 5 August 2008
What is the Scientific Method?
 What are the steps in the scientic method? Take two
minutes to write down the steps we use in science.
Steps in Scientific Method
 Characterization of existing data
 Current Theories
 Formulation of a hypothesis
 Deduction - formulation of a predictive test
 Experimental testing
 Error elimination and characterization
 Validate or revise hypothesis
 New Theories!
Science – Old School
Science – Newer Picture
Why Simulate?
Experimental Investigation
 Record observations and make predictions
 Example: Tycho Brahe (1546-1601)



Observed and recorded the motions and positions of the
sun, moon, and Mars over a period of 20 years
Invented the sextant, mural quadrant, and portable ring
armillary
Based on his records, he could predict future planetary
positions
Theoretical Investigation
 Theory: logical, self-consistent model
for explaining a natural or social
behavior

Attempts to explain why things happen as
they do using the language of mathematics

Examples:


Isaac Newton's (1643 – 1727) law of gravitational
attraction: "The gravitation attraction force
between two point masses is directly
proportional to the product of their masses and
inversely proportional to the square of their
separation distance."
Einstein's theory of relativity: energy and mass
are equivalent and transmutable
e = mc2
Computational Investigation
 Uses experimental and theoretical knowledge to create
computational models of aspects of nature, then uses
these models to simulate natural behavior and make
predictions
 Example: Johannes Kepler (1571 – 1630)
 Worked with Tycho Brahe's data
 Attempted to find patterns behind the data of planetary motion
that could be expressed mathematically
Modeling
“Application of methods to analyze complex, realworld problems in order to predict what might
happen with some course of action”
Notes:
 No mention of “Computers” or “Computation”
 No mention of “Science”!
 Modeling is about mathematics
Steps of Modeling Process
 Analyze problem
 Formulate a model
 Solve model
 Verify and interpret model's solution
 Report results
 Maintain/revise model
Computational Investigation Approach:
1.
Identify the problem

2.
Pose the problem in terms of a mathematical model


3.
Kepler started by assuming circular orbits, but that the sun was NOT at the center
He then guessed at different equations using trial and error
Test the model using a computational method

4.
Copernicus's theory of circular planetary orbits didn't fit the data
He did the calculations by hand and it took him 5 years…
Assess the results


Does the solution make theoretical sense?
Does the solution fit the data within a tolerable degree of error?
Kepler's Findings:
1.
Planetary motion is an ellipse with one focus at the
sun
Kepler's Findings:
2. The line between a planet and the sun sweeps out
equal areas in equal times
Kepler's Findings:
3. The square of a planet's orbital period is
proportional to the cube of its average distance
from the sun:
T2 = cr3
Computational Investigation Approaches
 Do the calculations by hand
 Time-consuming, error-prone
 Use a digital computer
 Fast
 But only as good as the underlying model, method, and
implementation!
"If you put tomfoolery into a computer, nothing comes out but tomfoolery. But this
tomfoolery, having passed through a very expensive machine, is somehow ennobled
and no one dares criticize it." - Pierre Gallois
Computational Science
Classes of Models
 Static Model
 Does not take time into account
 Dynamic Model
 Models changes over time
Classes of Models
 Stochastic Model
 Some element of probability/chance involved
http://www.sfgate.com/cgibin/blogs/ybenjamin/detail?entry_id=71442
 Need to run model many times with different random values
 Deterministic Model
 No probability/chance involved
 Run once
Steps of Modeling Process
 Analyze problem
 Be precise!
 Formulate a model
 Gather data
 Make simplifying assumptions and document them
 Determine variables and units
 Establish relationships among variables and submodels
 Determine equations and functions
Steps of Modeling Process
 Solve model
 Verify and interpret model's solution
 verification determines if solution works correctly
 validation establishes if system satisfies problem's
requirements
Steps of Modeling Process
 Report on model
 Analysis of problem
 Model design
 Model solution
 Results and conclusions
 Maintain model
HOMEWORK!
 READ pages 3-10 in the textbook
 Perform the modeling process described there
 With a partner
 Problem:
 For a group of n people, how many pizzas do I need?
 Factors to consider…
 Size of pizzas (radius), # of slices, shape of slices, crust style…
 Toppings, appetite, size of participants…
 Steps you can mostly skip: 4 (mostly), 6
 Report on each step!
 graph pizza vs. n for various parameters in step 3, etc.