Feeds:
Posts
Comments

Archive for the ‘Physics’ Category

A particle of mass m is confined to a one-dimensional region 0≤x≤a.  At the beginning, the normalized wave function is

Ψ(x,t=0) = √(8/5a)  [ 1 + cos(πx/a)] sin(πx/a).

a) What is the wave function at a later time t=t0?.

b)  What is the average energy of the system at t=0 and t=t0?

c)  Find the probability that the particle is found in the left half of the box (0≤x≤a/2) at t=t0.

Solutions

Read Full Post »

Ψ(x,t) is a solution of the Schrödinger equation for a free particle of mass m in one dimensional and Ψ(x,0) =  A exp(-x^2/a^2)

a)  Find the probability amplitude in the momentum space at time t=0.

b)  Find Ψ(x,t).

Solution

Read Full Post »

Energy of earthquakes

The expression Richter magnitude scale refers to a  ways to assign a single number to quantify the energy contained in an earthquake. In this system invented by Charles Richter in 1935, one magnitude more is roughly equal to a factor 32 more energy. That means an earthquake of magnitude 6.0 has 32 times more energy than an earthquake of magnitude 5.0. The below plot shows the amount of released energy in earthquakes with different magnitudes.

In the above image, the energy is expressed in Joule [left axis] and equivalent to ton TNT [right axis]. The black horizontal line shows the estimated energy of the first nuclear bomb dropped on Hiroshima. It roughly weights as a six Richter earthquake. Note that a large fraction of the energy of earthquakes is absorbed in the deep layers of the earth.

Read Full Post »

Consider a one dimensional time-independent Schrödinger equation for some arbitrary potential V(x). Prove that if a solution Ψ(x) has the property that Ψ(x) →0 as x→±∞, then the solution must be nondegenerate and therefore real, apart from a possible overall phase factor.

Solution

Read Full Post »

Solar battery chargers

Recently, there are quite a lot of solar battery chargers. Such instruments like the one in the following image are able, in theory, to recharge mobile devices, ipods, etc when they are charged, and charge themselves using the sun light.

In this particular example, the company provides the following specifications for the instrument: it has a charge capacity of 3.5 Ah (Ampere  hour) at a potential difference of 3.7 Volts. That means it contains 12.95 Watt h energy when it is fully charged. Just for comparison, a small auto battery has like 40 A.h at a potential difference of 12 V.  That means the energy stored in the device is like 2% of the energy stored in an auto battery, so it is quite a bit actually.

Needless to say, you can charge it via AC adapter or USB cable of your laptop and use it to charge your mobile phone when required. The life cycle according to the webpage is 500. Indeed, the typical Lithium-ion polymer batteries have a life cycle of 1000 or more. Perhaps due to irregular solar charging rather than the standard net charging, the life cycle will be shorter as expressed in the webpage.

Can it really charge itself via solar radiation? I try to simply evaluate how much solar energy it can absorb, according to the data given in the webpage. The solar constant, the energy that the unit area on the top of the earth atmosphere receives in a second is about S = 1400 Watt per square meter. On tropical latitudes, the received energy on the ground is larger than 1000 W/m2. On middle latitudes like central Europe, and in a summer day, S = 800 W/m2. In winter, it is usually about 500 to 600 W/m2 in a sunny day. When it is overcast and very dark, it drops to values comparable to 1W/m2.

Now let us calculate how long it takes to collect 12.95 Wh energy from the received solar radiation on an average day. The collecting area, according to webpage, is 11.5 x 6.0 cm2 , and the efficiency is 17%. If I take S = 300 W/m2 for a relatively bright day, then the rate of collecting energy is

Area  x  Solar constant  x  efficiency = 69 cm2 x 300 W/m2 x 0.17 = 0.35 Watt.

Therefore to collect 12.95 Wh, i.e. to recharge the battery via sun light,  one has to keep the instrument in sunshine for 37 hours. In tropical regions, this time can be a factor 2 or 3 shorter.

This simple calculation shows that if you have such an instrument, you should be patient to get it charged using its own solar panel. In practice, the charging time can be longer because of the cloudy sky, and a decline of the efficiency with aging. 

Do you save money if you buy it?

Perhaps not, specially if you live in high latitudes. The instrument can, in theory, work for 500 cycles of 12.95 Wh. That amounts to 6.5 kWh during its lifetime. The electricity price in expensive cases is like half a dollar per kWh. That means you collect in total like 3.2 US dollar while the instrument costs like 40+ dollars. This particular device is more a (big) spare battery than a solar charger.

There are better options. Consider a similar instrument with an area of 2-3 times larger. That efficiently reduce the recharging time. In addition, I guess the systems with rechargeable AA batteries have the ability to live longer: you can exchange those batteries when they are dead. The solar panels usually work much longer (like 10+ years).

Read Full Post »

The diffusion  equations:

Assuming a constant diffusion coefficient, D, we use the Crank-Nicolson methos (second order accurate in time and space):

u[n+1,j]-u[n,j] = 0.5 a {(u[n+1,j+1] – 2u[n+1,j] + u[n+1,j-1])+(u[n,j+1] – 2u[n,j] + u[n,j-1])}

A linear system of equations, A.U[n+1] = B.U[n], should be solved in each time setp.

As an example, we take a Gaussian pulse and study variation of density with time. Such example can occur in several fields of physics, e.g., quantum mechanics.

As stated above, we have two arrays: A and B. We form them once, and then calculate inverse(A).B:

#———————————————–
# populate the coefficient arrays
#———————————————-
from scipy.linalg import svd
from scipy.linalg import inv

for j in arange(0, nx_step):
    coefa[j, (j-1)%nx_step] = – lamb
    coefa[j, (j)%nx_step] = 2*lamb + 2.
    coefa[j, (j+1)%nx_step] = – lamb
#———————————————–
lamb = – lamb
for j in arange(0, nx_step):
    coefb[j, (j-1)%nx_step] = – lamb
    coefb[j, (j)%nx_step] = 2*lamb + 2.
    coefb[j, (j+1)%nx_step] = – lamb
#———————————————–
coefa = scipy.linalg.inv(coefa)         # inverse of A
coef = numpy.dot(coefa, coefb)  
coef = scipy.linalg.inv(coef)

for i in arange(1,nt_step):        #———– main loop ———

    ans = scipy.linalg.solve(coef, uo)
    uo = ans
    plot(uoz,’k’, ans,’r’)
        draw()
    t[i] = t[i-1] + dt
    print dt*nt_step – t[i], ‘      ‘, ans.sum()
    rho[:,i] = ans

The result is shown in the following figure: as expected, the peak of the density profile falls down. If one continues the simulation for a longer time, the density distribution will be completely uniform.

Read Full Post »

Importance sampling is choosing a good distribution from which to simulate one’s random variables. It involves multiplying the integrand by 1 (usually dressed up in a “tricky fashion”) to yield an expectation of a quantity that varies less than the original integrand over the region of integration.

We now return to it in a slightly more formal way. Suppose that an integrand f can be written as the product of a function h that is almost constant times another, positive, function g. Then its integral over a multidimensional volume V is

f dV =(f /g) gdV =h gdV

Here, we interpreted this equation as suggesting a change of variable to G, the indefinite integral of g. That made gdV a perfect differential. We then proceeded to use the basic theorem of Monte Carlo integration. A more general interpretation of the above equation is that we can integrate f  by instead sampling h — not, however, with uniform probability density dV , but rather with nonuniform density gdV . In this second interpretation, the first interpretation follows as the special case.

In this case, random points are chosen from a uniform distribution in the domain A < y < B.  The new integrand, f/g, is close to unity and so the variance (i.e. the value of  sigma) for this function is much smaller than that obtained when evaluating the function  by sampling from a uniform distribution. Sampling from a non-uniform distribution for this function should therefore be more efficient than doing a crude Monte Carlo calculation without importance sampling.

Numerical example

We want to evaluate the integral of y=x^2 in the range between zero and one. We take g(x)=x. It samples larger values more often. The inverse function of g is √(2x).

Recipes: 1) take N uniform samples between zero and one, 2) build a set of non-uniform sample such that dU=gdV is uniformly sampled. To this end, one has to use the inverse of g(x). In other words, if p(x) is the uniform distribution of x, then q(u)= g-1(x)  will be a uniform distribution for U. 3) evaluate the average of h=f/g for the new sample.

The distribution of the new variable, dU=gdV, is like this:

Now, we have to perform a normal Monte Carlo integration of the function h in U domain. The results are shown in the next plot. For comparison, result of a Monte Carlo integration with uniform sample and the Simpson’s rule were also shown.

Here, each point shows the average of absolute errors after a hundred iterations (except for the Simpson’s method). Results of importance sampling have systematically smaller variance compared to the ones with uniform samples. Hence, the practical trick is to find the best g function.

g MUST be a good approximation for f

In the following two examples, I show a similar plot as above but for two other functions. In the first case, y=√x, the importance sampling does not help. The variance is comparable to the Monte Carlo method with uniformly distributed samples.

The next example shows that selecting a wrong  g function can make the situation even worse. We use the similar function, g(x)=x, for integration of the unit circle (see the previous post). In other words, we sample regions around one more often than regions about zero while the value of function close to zero is larger than those about one. So, we get a worse variance compared to a completely uniform sample.

Read Full Post »

Older Posts »