Professional Documents
Culture Documents
Interactive Science Simulation Documentation
Interactive Science Simulation Documentation
Interactive Science Simulation Documentation
A Mid-term Project Report Submitted in partial fulfillment of the requirements for the Degree of Bachelor of Engineering Under Berhampur University
by
NATIONAL INSTITUTE OF SCIENCE & TECHNOLOGY Palur Hills, Berhampur, Orissa - 761 008, India
ABSTRACT
The project titled Interactive Science Simulation using Java provides an in-depth description about simulation web-based application. The whole project revolves around the extensive application of simulation in the field of scientific study. In computer science, simulation has some specialized meanings: Alan Turing used the term "simulation" to refer to what happens when a universal machine that executes a state transition table (in modern terminology, a computer runs a program) that describes the state transitions, inputs and outputs of a subject discrete-state machine. In general we can say that, with the help of computers we can design and code such programs that simulate the real-world phenomena in a virtual environment. Simulation helps us in understanding the concepts. It involves creating a virtual environment for the process and helps us realize the entire procedure imitating the real conditions. Simulation not only shows the effect but also checks the understanding of the concept through a similar kind of questions on the concept. It can be applied in the field of education and training ushering a new era of teaching methodology.
ii
ACKNOWLEDGEMENT
We express our deep sense of gratitude to Mr. Debanand Kanhar, Advisor cum B.Tech. Project Coordinator for his valuable guidance and constant unfailing encouragement for completing this project report. We thank our examiners and for their suggestions and guidelines to make some improvements in the project. Finally we thank Mr. Sangram Mudali, for his continued drive for better quality in everything that happens at NIST. This report is a small contribution towards the greater goal.
ii
TABLE OF CONTENTS
ii
LIST OF FIGURES
ii
1. INTRODUCTION
A computer simulation (or "sim") is an attempt to model a real-life or hypothetical situation on a computer so that it can be studied to see how the system works. By changing variables, predictions may be made about the behavior of the system. Computer simulation has become a useful part of modeling many natural systems in physics, chemistry and biology, and human systems in economics and social science (the computational sociology) as well as in engineering to gain insight into the operation of those systems. A good example of the usefulness of using computers to simulate can be found in the field of network traffic simulation. In such simulations, the model behavior will change each simulation according to the set of initial parameters assumed for the environment. Traditionally, the formal modeling of systems has been via a mathematical model, which attempts to find analytical solutions enabling the prediction of the behavior of the system from a set of parameters and initial conditions. In computer science, simulation has some specialized meanings: Alan Turing used the term "simulation" to refer to what happens when a universal machine executes a state transition table (in modern terminology, a computer runs a program) that describes the state transitions, inputs and outputs of a subject discrete-state machine. The computer simulates the subject machine. Accordingly, in theoretical computer science the term simulation is a relation between state transition systems, useful in the study of operational semantics.
ii
The simulation project that is designed is an interactive one, in which the users can change the environment variables effecting changes in the process. With the help of the virtual reality enabled with the help of simulation we can control all the environment variables related to the particular phenomenon and change the variables as we wish to study the effects on the present condition. The various phenomena those are going to be simulated are Wave functions, transverse and longitudinal waves, Dopplers effect, Alpha decay, Nuclear fission, Projectile motion, Ohms law, Faradays law of electromagnetism etc. This project can be actively used by educational institutions for example to help students a better control to grasp and make connections between real-life phenomena and the underlying science, deepening their understanding and appreciation of the physical world. The students using this simulation can actually vary and control various controlling environment variables and see the consequent changes to deepening their grasp on the concepts involved.
ii
The User is expected to be Internet as well as application literate. The main screen of the applet contains the links to the other modules and containers associated with the various scientific phenomena. The User is expected to be Windows literate and to be able to use button, pull-down menus, and similar tools.
1.4. Constraints:
Detail and Boundary Constraint Windows XP and above, IE 6.0 and above, Java 2 Platform Standard Edition(J2SE) JDK 5.0 later P-IV, 512 MB RAM, 40 GB HDD Client-Server, Internet
The next section, the Functional Description section, of this document gives an overview of the functionality of the product and various aspects of the modules in it. It describes the functional requirements and is used to establish a context for the technical specification.
ii
2. FUNCTIONAL DESCRIPTION
2.1. Dopplers Effect Simulation:
The Doppler effect (or Doppler shift), named after Austrian physicist Christian Doppler who proposed it in 1842, is the change in frequency of a wave for an observer moving relative to the source of the wave. It is commonly heard when a vehicle sounding a siren or horn approaches, passes, and recedes from an observer. The received frequency is higher (compared to the emitted frequency) during the approach, it is identical at the instant of passing by, and it is lower during the recession. For waves that propagate in a medium, such as sound waves, the velocity of the observer and of the source is relative to the medium in which the waves are transmitted. The total Doppler Effect may therefore result from motion of the source, motion of the observer, or motion of the medium. In classical physics, where the speeds of source and the receiver relative to the medium are lower than the velocity of waves in the medium, the relationship between observed frequency f and emitted frequency f0 is given by:
Where Is the velocity of waves in the medium Is the velocity of the receiver relative to the medium; positive if the receiver is moving towards the source. Is the velocity of the source relative to the medium; positive if the source is moving away from the receiver. The frequency is decreased if either is moving away from the other.
ii
ii
ii
Interactive Science Simulator. Users. This module simulates the Dopplers Effect with all its simulation controlling parameters. User should set the respective parameters to simulate. Primary.
Typical Course of Action Scenario #1.1(normal) START Use Case #1DOPPLER_EFFECT Actor Action Click on the Start button System Response The simulator will simulate the Object moving at the set speed and the effect on Sound Waves. Alternate course of action: If the speed characteristics are not set then there will be no simulation .
Scenario #1.2(normal)
The
any
Scenario #1.3(normal)
1 3
Actor Action The user clicks on the Step foreword button. Click on the Start button
2 4
System Response The mic moves closer towards the moving object. The simulator will simulate
resulting sound waves. Alternate course of action: If the moving objects initial speed is not set then there will be no simulation.
Scenario #1.4(normal)
1 3
Actor Action The user clicks on the Step back button. Click on the Start button
2 4
System Response It moves the mic away from the moving objects initial position. The simulator will simulate the resulting simulation.
Alternate course of action: If the moving objects initial speed is not set then there will be no simulation.
Scenario #1.5(normal)
pending simulation.
Scenario #1.6(normal)
1 2
Actor Action The user drags the scroll bar to a position. Click on the Start button 3
System Response
The simulator will simulate waves at the set speed in the scroll bar.
of a specified type. The argument and the value may be real numbers, but they can also be elements from any given sets: the domain and the co-domain of the function. An example of a function with the real numbers as both its domain and co-domain is the function f(x) = 2x, which assigns to every real number the real number with twice its value. In this case, it is written that f(5) = 10. In mathematics, the sine function is a function of an angle. In a right triangle, sine gives the ratio of the length of the side opposite an angle to the length of the hypotenuse. Sine is usually listed first amongst the trigonometric functions. The sine function is commonly used to model periodic function phenomena such as sound and light waves, the position and velocity of harmonic oscillators, sunlight intensity and day length, and average temperature variations through the year.
ii
Module #/Name
INTERACTIVE SCIENCE SIMULATION USING JAVA Actors Users. Purpose This module simulates Overview Type
mathematical model. User should set the respective parameters to simulate. Primary.
Typical Course of Action Scenario #2.1(normal) START Use Case #2WAVE FUNCTIONS Actor Action The user starts the applet. System Response The simulator will simulate the Sine wave with default frequency parameters. Alternate course of action: If frequency is not set on the slider there will be no simulation.
Scenario #2.2(normal)
System Response The simulator will simulate the Sine wave with the changed frequency parameters.
ii
ii
ii
3. FUTURE WORK
ii
The entire simulation web-application package consists of the several modules simulating various general, physical and chemical phenomena. They include as transverse and longitudinal waves, Dopplers effect, Alpha decay, Nuclear fission, Projectile motion, Ohms law, Faradays law of electromagnetism etc. All this modules have their individual simulation applets extending the simulation functionalities. To incorporate all this into one single package a central module will be develop which will provide the user with access to all the simulations in the whole application at once. The user will be able to run any applet simulation as per the requirement from the main module. The application is to be designed so as to be ready to be hosted on a web-server. In order to be able to do that the applets combined into a single module have to be server ready for instant hosting.
4. GLOSSARY
Term ii Definition
Applet
An applet is any small application that performs one specific task, sometimes running within the context of a larger program. Application or an app, is computer software designed to help the user to perform singular or multiple related specific tasks. Semantics typically focuses on the relation between signifiers, such as words, phrases, signs and symbols, and what they stand for, their denotata. A document that completely describes all of the functions of a proposed system and the constraints under which it must operate. For example, this document. The end-person who will use the application. A use case in software engineering and systems engineering is a description of a systems behaviour as it responds to a request that originates from outside of that system
Application
Semantics
Use Case
REFERENCES
[1] Pilone, Dan and Pitman, Neil: UML in a Nutshell: OReilly Media Publications: June 2004.a
ii
[2] [3]
Geary David M. : Java 2: Mastering the JFC : Swing, Volume 2 (Sun Microsystems Press Java Series), 3rd Edition , 1999. Verma H.C : Concepts of Physics: Part I, Part II: Bharti Bhawan Pulications,2007.
ii