MATHEMATICA – Computer Simulation
1 / 24

MATHEMATICA – Computer Simulation R.C. Verma Physics Department Punjabi University - PowerPoint PPT Presentation

  • Uploaded on

MATHEMATICA – Computer Simulation R.C. Verma Physics Department Punjabi University Patiala – 147 002 PART IX- Computer Simulation Mechanics. INTRODUCTION. Traditionally physics teaching comprises of theory lectures based on analytical techniques and conventional laboratory experiments.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about ' MATHEMATICA – Computer Simulation R.C. Verma Physics Department Punjabi University' - dean-holt

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

MATHEMATICA – Computer Simulation

R.C. Verma

Physics Department

Punjabi University

Patiala – 147 002

PART IX- Computer Simulation



  • Traditionally physics teaching comprises of theory lectures based on analytical techniques and conventional laboratory experiments.

  • Despite the importance of computational physics, it has been largely neglected in the conventional physics curricula.

  • Now with the availability of personal computers, it has become possible to introduce this important branch in the physics curricula.

What pc can do
What PC can do?

  • PC offers new opportunities for innovative learning.

  • It provides highly interactive, individual and creative learning.

  • It can help to approach wide variety of problems and phenomena than is possible with only analytic tools.

  • It can also be used to develop physical intuition and ability to estimate physical quantities involved in a phenomena.

  • NMEICT (MHRD, Govt. of India)- Rs. 4,612 crores Mission


For practical purposes of PC into physics we need to answer:-

  • How to use PC to improve physics teaching?

  • What other changes will come after we introduce PC to the physics curricula?

  • Could advances of research into physics learning be incorporated into new Curricula?

  • Can the new curricula reflect contemporary physics?

Objectives of physics teaching

i) Number awareness

ii) Experimental skills

iii) Analytic skills

iv) Scales and estimations

v) Approximations skills

vi) Numerical skills

vii) Intuition & large problem skills

Applications of computer for physics
Applications of Computer for Physics?

  • Problem Solving

  • Demonstrations and Tutorials (CAI)

  • Data analysis using Spreadsheets

  • Simulation of Physics Problems

  • Graphics and Animation

  • Magnification of Instruction

Problem solving
Problem Solving:

  • PC can be used easily and interactively through a variety of high-level languages,

  • They offer numerical power sufficient for even initiating research-level problems.

  • Many numerical programming languages are already with us: BASIC, FORTRAN, and C

  • Recently, Symbolic Computational languages: Mathematica, MatLab, MathCad, Macsyma

  • capable of dealing with algebra, differential and integral calculus, and powerful graphics tools.

  • This obviously enhances the scope of physics problems to be handled on a PC.

Simulation of physics problems
Simulation of Physics Problems:

  • The corner stone of computing is building a model of an idea through simulation.

  • It can deliver real time sequence on the screen.

  • We can simulate real world phenomena that are prevented from studying in the laboratory due to constraints of time, expense, danger and feasibility.

  • E.g. Planetary Motion, Nuclear Reactor, Interior of Sun

  • We can try models that don't occur in real world to seewhat the implication would be.

  • E.g. What would happen if we change the gravitational force law a little?

Present status in physics curricula
Present Status in Physics Curricula

  • Computational physics has largely been neglected in the standard physics curricula.

  • Main factors : 1. Lack of computing hardware 2. Lack of teaching-material besides 3. Lack of trained human resource.

  • Situation is slowly improving.

Computer simulation of problems methodology

Physics → Algorithm → Program → Results

  • Computer Hardware and Software

  • Numerical analysis

  • Development of algorithms for problems

  • Developments of programs for simulation

  • Results and Error analysis.

Steps to solving physics problem

Identify the input variables:-like parameters of a physical system initial conditions of the`system and time interval step size of time evolution.

Identify the output variables:-solution of the problem.

Construct the equations to connect the input variables to the output variables.

Re-express the equations using numerical techniques.

Write algorithm/flowchart to solve the problem.

Develop Programs (I/O, common arithmetic operations and logical structures: Sequential, Repetitive and Selective).

Execute the program on a computer.

Steps to solving Physics Problem

Performing computer experiments
Performing Computer Experiments

Run computer experiments to study effects of:

  • change of step size used in discretization of continuous independent variable;

  • change of initial conditions of the physical system;

  • change of physical parameters of the system.

  • changes due to errors,

  • stability and limitations of the numerical tools.

One dimensional motion
One Dimensional Motion

  • A spherical body falling in viscous medium

Damped oscillator
Damped Oscillator

  • Equation of motion is


(* Find Analytic solution *)

k = 3.0; (* spring constant *)

m = 1.0; (* mass attached to the spring *)

w0 = Sqrt[k/m];

c = 0.5;

damp = c/m;

x0=1.0; v0 = 1.0; (* initial conditions *)

tmin = 0;tmax = 5;

ndsol=DSolve[ {x''[t]+damp*x'[t]+w0^2 x[t]==0,

x[0]==x0, x'[0]==v0}, x[t], t]//Chop//Flatten

(* Plot the solution for a given time interval *)p1= Plot[ x[t]/.ndsol, {t,tmin, tmax}, AxesLabel->{"t->", "x"}, PlotLabel->"Harmonic Motion"]

V t d x t ndsol t p2 plot v t t tmin tmax axeslabel t v plotlabel velocity plotstyle dashing 0 02
v[t_]= D[x[t]/.ndsol, t]p2 =Plot[ v[t], {t,tmin, tmax}, AxesLabel->{"t->", "v"}, PlotLabel->"velocity", PlotStyle-> Dashing[{0.02} ]]

A t d v t t p3 plot a t t tmin tmax axeslabel t a plotlabel acceleration plotstyle dashing 0 05
a[t_]= D[v[t], t]p3=Plot[ a[t], {t,tmin, tmax}, AxesLabel->{"t->", "a"}, PlotLabel->"acceleration", PlotStyle-> Dashing[{0.05} ]]

Parametricplot x t ndsol v t t tmin tmax axeslabel x v plotlabel phase space trajectory
ParametricPlot[ {x[t]/.ndsol, v[t]} , {t,tmin, tmax} , AxesLabel->{"x", "v"}, PlotLabel->"phase_space_trajectory"]