May 2016 Archives

Thu May 26 07:24:59 PDT 2016

The Tough Molecule that Killed Prince

The molecule above is oxycodone, the molecule that very likely
killed Prince.

The shape and chemistry of oxycodone are very similar to
morphine and
heroin.

Although oxycodone blocks pain and produces euphoria it is very
addictive. It is hard to stop taking oxycodone because of the
painful withdrawal symptoms that lack of the drug produces.

Like morphine and heroin, oxycodone binds to receptors which are
normally the home of peptide hormones. The peptide hormones are the
neurotransmitters which make humans feel good, scared, hungry, or
satisfied. Such receptors have a hard time dealing with generally
rigid molecules like oxycodone. Such molecules are not broken down
like flexible peptide neurotransmitters and exert their influence
on the receptor for extended periods of time.

Wed May 25 17:04:37 PDT 2016

How Galaxy Simulations Work

Galaxy simulation schematic.

The image on the left shows the details of a galaxy simulation
of the style described by Schulman and Seiden.

The galaxy is composed of rings divided into cells with equal
areas. Initially a random selection of galaxy cells are made
active. Active galaxy cells are shown as being occupied by a black
circle. After a galaxy cell has been active for a time step it is
no longer considered active but a steadily diminishing circle is
drawn in that cell to show that it was recently active.

With each simulation step, the cells in the vicinity of active
cells are examined. These neighboring cells are made active
themselves with a probability of 0.18. As there are 6 nearest
neighbor cells for each active cell, this gives a slight bias in
favor of more active galaxy regions with each timestep
(6*0.18=1.08), which is counterbalanced by the fact that sometimes
a given cell may be triggered by two neighboring active cells. Each
cell is only active for one time step.

The rings of the galaxy rotate around the galaxy center. The
speed of each rings rotation is set so that the rings rotate withe
a constant velocity, not a constant angular velocity. So the outer
rings perform fewer rotations per unit time than the inner
rings.

The basic model is then one that assumes that the interstellar
medium rotates at a constant velocity and that star formation is
triggered by supernovae. Each supernova explosion can set off star
formation in adjacent regions of the galaxy with a probability of
0.18. This is because the entire galaxy is composed of a dilute
collection of hydrogen atoms. Given a suitable trigger, such as a
nearby supernova, enough hydrogen can be compressed by the
shockwave to trigger the gravitational build up of larger amounts
of hydrogen leading to the formation of a star.

This simple model, constant rotational velocity, and adjacent
star formation with a defined probability, leads to spiral galaxy
formation. That might be a coincidence or it might indicate that
the basic physics of galaxy formation is captured by this nearest
neighbor model!

The toggle function uses the supplied image file name to
determine if it should display the 'full' image or the scaled down
image (which I call lysozyme_scale.gif in this case). Here is the
javascript:

...and the javascript file which contains this function has been
added to the head section of every page which needs to display
images.

<script type="text/javascript" src="./styles/scripts.js"></script>

To insure that each image provides information to the user about
clickability - I put each image element into <a href="#">
</a> pair.

Overall this gives clickable images which expand to provide the
user with additional visual information. This is convenient and the
necessary modifications are small. One simply needs to follow the
naming convention of filename_scale.png for the smaller image. So
this seems to be both useful for users and convenient for the
website maintainer.

I found the original source code from here
... which comes from this compendium of code here from the
book by Harvey Gould and Jan Tobochnik, 'Introduction to Computer
Simulation Methods'. I have the first edition of this book (it has
two volumes) and it is a really fantastic resource for those of us
that did not pay enough attention in school but are interested in
learning how physics operates.

Tue May 17 12:31:26 PDT 2016

An Updated Galaxy Simulation

I found a small problem with the original galaxy simulation. The
program had the ability to set the simulation time to '15' under
certain circumstances. The effect of that problem was to randomize
the star clusters. I will post a link to the updated program in due
course. The corrected animation is pasted above.

Sat May 14 21:51:14 PDT 2016

Galaxy Formation Simulation

The movie above is a simulation of the formation of a spiral
galaxy, based on a program described by Gould, Tobochnik, and
Christian in their book 'An Introduction to Computer Simulation
Methods'. Each of the cells in the simulation (which roughly
correspond to the individual blobs that you can see in the movie)
is a cluster of stars and each cluster is about 300 light years
across. So this is a large simulation! This entire galaxy is about
30,000 light years in diameter which is not particularly large for
a spiral galaxy, but it is quite a large system to simulate in a
few seconds on a laptop - the complete simulation took about 100
seconds. (Making the movie took a bit longer...)

The basis for the calculation is the fact that an exploding star
has a good chance of setting up the conditions for star formation
in its vicinity, through the explosive shockwave that it sends out
into space. This is coupled with the notion that the constituent
rings of the galaxy move at constant velocity. With these
assumptions the sprial and globular form of the galaxy emerges and
evolves with time. (Like the distances, the time scales are vast,
each timestep in the simulation is 107 years.)

You can perform very much more detailed simulations of galaxy
formation, should the fancy strike you. But even this relatively
simple model allows you to test the key facts and forces which are
sufficient to explain the shape of spiral galaxies. Armed with the
model, and its parameters, you can set about clarifying the key
features which determine the different shapes of real galaxies, and
even, if you are ambitious, the chances of the galaxy calming down
and ceasing to produce new stars.

It turns out that the long range structure of the galaxy can be
explained with only nearest neighbor interactions (if by nearest
neighbor you mean cells about 300 light years across).