giovedì 29 maggio 2014

Checking Relativistic Electrodynamics calculations: D'alembertian in Mathematica

How to define the D'alembert Operator, as a function of 4 other functions in 4 variables; the speed of light c is made =1 in this notebook. 
Note how a component of the 4-Vector Potential A, defined in terms of r (=sqrt( x^2 + y^2 ) ), produces a steady value of one component of J, the 4-current vector.

Google Drive folder with downloadable file:
Filename: Dalembertian.nb

View Contravariant and Covariant components of a 3-vector with Mathematica

In the following notebook I will show two transformations of some vector V (RED; you control its coordinates with the x,y,z sliders) which is acted upon by some matrix (it is defined with 3 free parameters to be set by the sliders). Suppose that we apply the matrix to the canonical 3 base vectors (BLACK), obtaining a transformed reference system (PURPLE). What kind of "vector" do we want to deal with?
We have two cases. 
1.The vector is contravariant. Its components in the new reference system are equal to those of a vector obtained by taking the product of the Inverse matrix with V .

2. The vector is covariant, which is, its component get transformed in the new reference system by taking the product of the matrix and V.

So contravariant vectors transform with the inverse of the base changing matrix; they are observer-dependent vectors. (ORANGE vector) Example: position.
Covariant vectors transform as the base changing matrix; they are observer-independent vectors. (BLUE vector) Example: gradient.
 In the notebook the sliders are referred to: V=(x,y,z), M=(((a)(0)(0)) , ((0)(b)(0)) , ((0)(0)(c))) and l is a scaling factor. 
Feel free to experiment by modifying the matrix! Example:
M=(((a)(a+c)(0)) , ((0)(b-c)(b+c)) , ((0)(0)(c))

Google Drive folder with downloadable file: covar_contra.nb

N.B. Always evaluate before using.

Practical Particle Data exploiting just Mathematica 9

Mathematica 9 has built-in data catalogues about various scientifical topics. In the following Mathematica notebook file I will show you a simple and yet very extendable tool for quick gathering of the values of various physical quantities of every particle discovered to the present day. 
The particle selection tree comprises the particle "class", and the particle name, followed by the standard symbol of that particle; I have chosen to print just the quark content, the values of the various symmetries' operators, the isospin, the 3rd component of the isospin so that I can speed up doing some exercises about the ratio of two or more decays (future post). Once you have selected your particle, you have to execute the last block of code to get the output.
You can just copy and paste the command to obtain some particular data (like i.e. mass): get the complete list of data available by right-clicking in the half of the command "ParticleData" in the notebook and then click "Get Help" , then "Details". 
Very handy for exercises! Replaces adequately the Particle Data Book (PDG) by CERN particle data group.

Google Drive folder with downloadable file: Particle data.nb