A user level multi-threaded Particle simulator Supervisor: Joe Cordina Observer: Kurt Debattista.

Slides:



Advertisements
Similar presentations
Kinetic Molecular Theory
Advertisements

P2 Additional Physics.
Dalton’s Law of Partial Pressure In mixtures of gases each component gas behaves independently of the other(s). John Dalton (remember him from.
The Theory of Special Relativity. Learning Objectives  Relativistic momentum: Why p ≠ mv as in Newtonian physics. Instead,  Energy of an object: Total.
Effusion and Real Gases. Review: Kinetic Molecular Theory of Gases Which of the following is true? The average speed of gas molecules decreases with decreasing.
Motion Physics 8 th Grade Science. Frame of Reference An object is in motion when its distance from another object is changing. Whether an object is moving.
Prentice Hall ©2004 Ppt17b Ppt 18b, Continuation of Gases 1. Kinetic Molecular Theory (continued) Postulates / Model How KMT explains Gas Behavior (Gas.
In your NOTEBOOK: Write down the question and answer.
Development of a Ray Casting Application for the Cell Broadband Engine Architecture Shuo Wang University of Minnesota Twin Cities Matthew Broten Institute.
Frank L. H. WolfsDepartment of Physics and Astronomy, University of Rochester Physics 121. Tuesday, March 4, 2008.
Explanation Gas pressure is caused by collisions of gas molecules on the wall of the container. The molecule collide with one other , with the walls of.
Physical Chemistry I (TKK-2246) 13/14 Semester 2 Instructor: Rama Oktavian Office Hr.: M.13-15, Tu , W , Th.
Momentum and Collisions Review
User-level Memory Management Supervisor: Joe Cordina Co-Supervisor: Kurt Debattista Observer: Kevin Vella.
Real-time Generation of Random Tracks for 3D Racing Games Supervisor: Kurt Debattista Observer: Joe Cordina.
Results from kinetic theory, 1 1. Pressure is associated with collisions of gas particles with the walls. Dividing the total average force from all the.
Lecture 4: More kinematics. Displacement and change in displacement Position vector points from the origin to a location. The displacement vector points.
A Spring 2005 CS 426 Senior Project By Group 15 John Studebaker, Justin Gerthoffer, David Colborne CSE Dept., University of Nevada, Reno Advisors (CSE.
Physics Chapter 11 Energy.
Physics Momentum: Collisions
© 2005 Pearson Prentice Hall This work is protected by United States copyright laws and is provided solely for the use of instructors in teaching their.
Kinetic Molecular Theory. © 2009, Prentice-Hall, Inc. Kinetic-Molecular Theory This is a model that aids in our understanding of what happens to gas particles.
The Theory of Special Relativity. Learning Objectives  Relativistic momentum: Why p ≠ mv as in Newtonian physics. Instead,  Energy of an object: Total.
Prentice Hall © 2003Chapter 10. Prentice Hall © 2003Chapter 10 Look here tomorrow after Period 5 for a link for your class work from the Gas Laws Packet.
WXGE 6103 Digital Image Processing Semester 2, Session 2013/2014.
Chapter 6 Energy and Energy Transfer. Introduction to Energy The concept of energy is one of the most important topics in science Every physical process.
Impulse During any collision some momentum is transferred from one object to another. So… momentum of one object decreases by  p and momentum of the other.
Interactive 3D Visualisation of Meteorological Data Supervisor: Kurt Debattista Co-Supervisor: Joe Cordina Observer: Kevin Vella.
Kinetic Molecular Theory & Gas Laws It’s all about the particles.
 Heat is measured in Joules or calories.  1 cal = J  Food energy in measured in Calories (with an upper case C)  1 Cal = 1000 cal.
Chapter 9 - Collisions Momentum and force Conservation of momentum
Slide 5-1 © 2015 Pearson Education, Inc. First exam Solution keys posted on Mastering Physics:
Gas Laws AP Physics B. The Periodic Table All of the elements on the periodic table are referred to in terms of their atomic mass. The symbol u is denoted.
Chapter 10 Motion Notes. Definition of position An object’s location.
Tuesday, June 19, 2007PHYS , Summer 2007 Dr. Jaehoon Yu 1 PHYS 1443 – Section 001 Lecture #11 Tuesday, June 19, 2007 Dr. Jaehoon Yu Conservation.
Momentum and Collisions Linear Momentum The linear momentum of a particle or an object that can be modeled as a particle of mass m moving with a velocity.
Particle motion in gases Animations help us understand how particles interact.
Abelardo M. Zerda III Michael O. Suarez Jm Dawn C. Rivas Leslie Kate Diane Berte.
Momentum.
Ludwid Boltzmann 1844 – 1906 Contributions to Kinetic theory of gases Electromagnetism Thermodynamics Work in kinetic theory led to the branch of.
MSE Presentation 1 Lakshmikanth Ganti
Ch 8 : Conservation of Linear Momentum 1.Linear momentum and conservation 2.Kinetic Energy 3.Collision 1 dim inelastic and elastic nut for 2 dim only inellastic.
Recoil and Collisions 8.01 W07D1 Associated Reading Assignment: Young and Freedman:
Jumpin’ Jack Flash It’s a gas gas gas! Solids, Liquids and Gases and Gas Laws Chapter 7.
Momentum (p) equals mass (m) times velocity (v). p=mv * The symbol for “p” came from the word progress which is defined as “the quantity of motion with.
Thermodynamics Kinetic Theory of Gases (Section 10.6)
Kinetic Theory of Gas Da Procida: Lesson 2.  Kinetic Theory tells us that matter is made up of atoms that are continually moving.  Today, we are going.
Chapter 8 Momentum Definition of Total Momentum The total momentum P of any number particles is equal to the vector sum of the momenta of the individual.
Kinetic Molecular Theory. Gases are made up of particles that have (relatively) large amounts of energy. No definite shape or volume, takes shape of its.
Investigation 5 - Energy Transfer 8th Grade Chemical Interactions
“One does not meet oneself until one catches the reflection from an eye other than human.” - Loren Eiseley -
The Theory of Special Relativity
1 PHYSICS TOPICS Index © DIRECT-SCIENCE : WORK-(KINETIC) ENERGY THEOREM With every click information will appear on the screen.
Week 5 Lesson 3 Gas Pressure and Kinetic theory Model of Matter.
One Dimension: Conservation of Linear Momentum Misaki, Christine, and Bonny.
PHY 151: Lecture 7A 7.1 System and Environments 7.2 Work Done by a Constant Force 7.3 Scalar Product of Two Vectors 7.4 Work Done by a Varying Force 7.5.
Vocabulary A force that opposes motion of two touching objects Answer: What is friction The amount of force or energy an object has when it is moving Answer:
Physics 1A, Section 2 November 8, Quiz #3  was due 3 hours ago.
The kinetic model of a gas Unit 4: Module 3 – Kinetic Theory There are two ways of describing a gas: macroscopic and microscopic. Macroscopic: Considers.
Kinetic theory model This model demos how the pressure and volume of a gas are directly linked to the velocity and therefore temperature of a gas. They.
Chapter 6. When objects collide their motion changes and this is the result of a concept called momentum. Momentum = mass x velocity p = mv kgm/s or Ns.
Objectives Describe and define Work Energy Power Efficiency Discuss conservation of energy and conservative forces Carry out calculations to demonstrate.
Graphical Display of a Physics Simulation
Mechanics: Motion in One Dimension x dx Notes by: Ted Vittitoe
General Physics 101 PHYS Dr. Zyad Ahmed Tawfik
Let’s Play! Please listen carefully and think before answering.
Unit 1: Reaction Kinetics
KMT Review.
Ch 8.3, Ch 8.4 by Yoshinari, Daniel.
OBJECTIVE QUESTIONS FOR NEET AIIMS JIPMER
Presentation transcript:

A user level multi-threaded Particle simulator Supervisor: Joe Cordina Observer: Kurt Debattista

Joe CordinaUser Level Multi-threaded Particle simulator2 APT Advanced practical task serve the purpose of allowing students to design, implement and document a medium to large project Student initiative Understand task + design Research into possible solutions Work alone under supervisor’s guidance

Joe CordinaUser Level Multi-threaded Particle simulator3 Overview Designing and implementing a user- level multi-threaded particle-in-a-box simulator.

Joe CordinaUser Level Multi-threaded Particle simulator4 Literature Operating Systems II and Concurrent and Distributed Systems Slides Any basic mathematics textbook Any basic physics textbook

Joe CordinaUser Level Multi-threaded Particle simulator5 Assessment 50% Design/Implementation 30% Documentation/Inception Report 20% Presentation/Interview

Joe CordinaUser Level Multi-threaded Particle simulator6 Main issues of APT Implementation Learn how to use Mesh Provide a multi-threaded particle simulator 2D view of particles Provide example scenarios Calculate basic physics constants Benchmark your algorithms

Joe CordinaUser Level Multi-threaded Particle simulator7 Mesh Mesh is an advanced very fast user- level multi-threaded library written in C for CERN (Linux). It is user-level and thus we will try not to make use of system calls as much as possible. Memory requirements concerns will be of major focus.

Joe CordinaUser Level Multi-threaded Particle simulator8 Mesh (cont.) Your main header files are Mesh.h and Scheduler.h Main function provided by void Main(Thread* p, int argc, char** argv); void Exit(int code); A large selection of function calls are available to allow thread manipulation Note that threads can also have a priority

Joe CordinaUser Level Multi-threaded Particle simulator9 Mesh (cont.) #define Thread_Constructor(F,X...) Scheduler_ThreadConstructor((ThreadMain)(F),X) void Thread_Destructor(Thread*); void Thread_Stop(void); void Thread_Exit(void); void Thread_NewPriority(int priority); void Thread_SetPriority(Thread* p,int priority); int Thread_GetPriority(void); void Thread_Yield(void); void Thread_Preempt(void); void Thread_Join(Thread* process,...); void Thread_Spawn(Thread*,int priority); void Thread_Run(Thread*); void Thread_Runs(Thread* process,...); void Thread_Par(Thread* process,...); void Thread_PriPar(Thread* process,int priority,...); void Thread_SleepUntil(RealTime t); void Thread_Sleep(RealTime t); Thread* Scheduler_ThreadConstructor(ThreadMain main,int stack_size,int narguments,...);

Joe CordinaUser Level Multi-threaded Particle simulator10 Particle Simulator Using the threads package you will simulate the behavior of physical particles in a box. Threads are ideal where each thread performs small amounts of calculation Thus define box dimensions and let the particles loose in it starting from a random position.

Joe CordinaUser Level Multi-threaded Particle simulator11 Particle Simulator (cont.) Particles in physics have a well defined behavior Assume that all particles are point particles When they collide with a wall their angle of reflection equals angle of incidence. Each particle has a mass and a velocity (speed with direction)

Joe CordinaUser Level Multi-threaded Particle simulator12 Particle Simulator (cont.) Motion is governed by s x = x + v * t * cos a s y = y + v * t * sin a where sx is distance in x direction sy is distance in y direction v is velocity t is time a is the direction angle

Joe CordinaUser Level Multi-threaded Particle simulator13 Particle Simulator (cont.) Particles can also collide with each other Yet particles have also momentum and physics say that initial momentum should equal final momentum in a collision. Equations given with handouts Be careful when calculating theta to get final angle One of the main task is an efficient collision detection between the particles

Joe CordinaUser Level Multi-threaded Particle simulator14 2D view of particles You will be using the svgalib man svgalib will tell you all Compile using gcc –lvga vga_init(); vga_setmode(G640x480x256); Then you can use int vga_drawpixel(int x, int y);

Joe CordinaUser Level Multi-threaded Particle simulator15 2D view of particles The display should be synchronized to 60 frames a second (Bonus). Make your program decrease the frames per second depending on the load in the computer. For timing you can use the RealTime Library.

Joe CordinaUser Level Multi-threaded Particle simulator16 Basic Physics constants You can calculate the average speed of the particles, the speed distribution and the velocity distribution. You can calculate the temperature visible produced by your particles in real-time and you can compare it to the ideal one. The mean Kinetic Energy has to remain constant in a closed box When numbers are very large =  (mv x 2 ) / N

Joe CordinaUser Level Multi-threaded Particle simulator17 Bonus Material Construct multiple scenarios Multiple boxes next to each other where each border can store part of the energy of one collision and then pass it on to the next particle that hits it A leaky box, where if a particle has energy above a certain value, it will escape away 3D equations and visualization of the system Hot walls which transfer constant energy to the particles but particles which have larger energy will still escape Dampening effect in the box Others you might think of or discussed with me Optimisation techniques on the algorithms Producing graphs of physics constants with time

Joe CordinaUser Level Multi-threaded Particle simulator18 Benchmarking Use the RealTime library to be able to benchmark the efficiency of your algorithms. This will give you time delays in the order of  s.

Joe CordinaUser Level Multi-threaded Particle simulator19 Documentation Inception report (Friday 1 st March) Analysis/Design Work plan Report Detailed analysis of problem Discussion of solution (+ others considered) Detailed description of data structures and algorithms used

Joe CordinaUser Level Multi-threaded Particle simulator20 Presentation 15 minute presentation Material Content Knowledge of subject Clarity Interview Answer questions related to APT

Joe CordinaUser Level Multi-threaded Particle simulator21 Interaction Expect to report to supervisor every other week: Friday Who cannot attend must mail in progress report + work in progress demo First meeting Friday 1 st March

Joe CordinaUser Level Multi-threaded Particle simulator22 The end All the best! Good luck! Work hard!