Download Applications in Physics Diffusion, fluid flow, etc.

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Symmetry in quantum mechanics wikipedia , lookup

Mathematical formulation of the Standard Model wikipedia , lookup

Eigenstate thermalization hypothesis wikipedia , lookup

Double-slit experiment wikipedia , lookup

Lepton wikipedia , lookup

Grand Unified Theory wikipedia , lookup

Weakly-interacting massive particles wikipedia , lookup

Relativistic quantum mechanics wikipedia , lookup

ALICE experiment wikipedia , lookup

Theoretical and experimental justification for the Schrödinger equation wikipedia , lookup

Electron scattering wikipedia , lookup

Standard Model wikipedia , lookup

ATLAS experiment wikipedia , lookup

Compact Muon Solenoid wikipedia , lookup

Identical particles wikipedia , lookup

Elementary particle wikipedia , lookup

Transcript
Applications in
Physics
Diffusion, fluid flow, etc.
What Kind of Physics?

Let’s start with diffusion.

Examples




Cream disappears into coffee.
Scent of a rose diffuses through the atmosphere of a room.
Spilled cranberry juice seeps outwards through your aunt’s
white carpet.
And fluid flow.

Examples




Flowing water.
Flowing ice (glaciers).
Flowing lava.
Flowing grain out of a grain silo.
Goal: Simulate This Physics

Want to model and see the cream
disappearing into the coffee.

Want to model and watch water flowing
around obstacles.

Want to model and watch the flow of air
over an airplane wing.
Why use CA for Physics?

Answer: Their simplicity.

Easy to model.
 Many but simple components. And simply-interacting.



Reveals what simple underlying rules are important to derive
physical behavior.
Can then use the CA to predict future behavior.
If we use too many complex components then of course
we can “model” the real world.

Consider a video game.
 Looks like a model of jumping, running, crashing, falling, etc.
 But is it really explaining the underlying physics? Of course not!
 Does not predict anything. Good science is predictive.

There is no science being explained by the video game.
Diffusion Picture

Imagine a set of 1’s in the center of a 2-d grid.


Think of the 1’s as particles (and 0s as empty space).
The 1’s should randomly move outwards and “spread out”.
1
1
11
1 11 11 1
1 1 11111
1
1 1 11
Initial state.
1
11 1
1 11 1
11 1
1
1
1
1
1
1
1
After some time.
Curious to try it? Use the Diffusion rule on the Margolus lattice. Try with and without a running average of 15. Will explain shortly.
First (Misguided) Diffusion Attempt

So let’s make a rule that allows a 1 to randomly move to a neighbor.

For example, let’s have the cell copy a random neighbor.


Effectively, the neighbor has decided to randomly move into the cell’s position.
Try it!

Use Cellular Automaton Explorer.







Use rule “Copy Random Neighbor”
50 by 50 grid
Make empty, and then draw a small square of blocks.
Slow down the simulation!
Turn on percent Occupied Sites analysis.
What happens?
At first spreads out, but soon they all disappear!

Compare to the Diffusion rule – again, turn on the Percent Occupied Sites analysis.
What Went Wrong?

When our cell copies the neighbor, it
throws away its own value.

What if our cell’s value isn’t copied by a neighbor.


In that case, our cell’s value is forever lost.
So the number of 1’s changes.

That’s not realistic.
If I put cream in my coffee, I don’t expect the cream
molecules (particles) to go away.
 I expect the same number of molecules to be spread out.

How Correctly Use CA for Physics?

Must obey basic physical principles.
1.
Reversibility:

2.
Physical rules look the same forwards and backwards.
 E.g., Watch a lump of cream disappear into coffee
according to the physics of diffusion.
 If could magically reverse time, we’d watch the
cream un-diffuse back into a lump.
Conservation laws:



Certain quantities are conserved and never change.
E.g., mass, momentum, energy.
Depends on the problem being solved.
Reversible CA

Simple!


Recall our discussion?
Second-order rules



Cell’s state depends on itself and its neighbors at t-1
And depends on itself at t-2.
Then just make the rules invertible
 i.e., every rule must also be accompanied by another rule
that is visually “upside down”.

Review Class Notes Part 7: Other Types of CA (Totalistic,
etc.).

And there are other reversible rules... Stay tuned!
Conservative CA

What’s being conserved?

You can choose the quantity.

Number of 1’s in the CA.



Information content.


Like “conservation of cream particles” (and hence mass!) in a
simulation of cream diffusing into coffee.
This is most common!
Recall Shannon’s entropy? Could insist that it never changes.
Any function f(xt+1) = f(xt) where xt is the state at time t.

Choose the function, and then insist that at every time step the value
remains the same.
 E.g., conserving the number of ones is just a summation function.
 E.g., conserving information is just a sum of (-p log(p)) where p is
the probability that a particular sequence occurs.
Ok, So Conserve Mass

Diffusion and fluid flow have
particles that move around.

The number of particles never
changes.

Call each 1 a particle.


Try rule 184.



Then want the number of 1’s to
be conserved.
Use a small grid and count the
cells at each time step.
Always the same.
Can you find other conservative
Wolfram rules?
See next slide. (Non-unique parent.)
Rule 184 Conserves Mass. But
Reversible?

Is rule 184 reversible? No.

Look at the checkerboard pattern. Has more than one
possible parent.
 010101010101 (possible parent 1)
 101010101010 (child)
 -- or --
 010100110101 (possible parent 2)
 101010101010 (child)

So for many physics problems, 184 will not be
useful.
Lattice Gasses: Another Attempt

Instead, lets try vector
“particles”.

Let each cell hold a vector
state like {1,0,0,1}.


Each 1 indicates a particle,
each 0 is the absence of a
particle.
Each position on the vector
indicates the particle’s
direction of travel.
 i.e., points to a
neighboring cell.

Neighbor 1
Neighbor 2
Neighbor 4
{1,0,0,1}
Neighbor 3
{1, 0, 0, 1}
Von Neumann neighborhood
A particle is pointing
at neighbor 1.
A particle is pointing
at neighbor 4.
Lattice Gas Neighborhoods

Could generalize to other lattices.
{0,1,0} for triangular.
 {0,1,1,0,1,0} for hexagonal.
 {1,0,0,1,0,0,0,1} for square with Moore
neighborhood.
 Etc.

Lattice Gas Updates

The rules for lattice
gasses...


Look at neighbors and
see what particles are
pointed your direction.
Translate those
particles into your site.
Time 1
Time 2
Is Lattice Gas Translation Rule
Reversible?

Reversible.


Just flip the arrows and can get back to where we
started.
Also conserves mass.

Same number of particles (1’s) at every time step.
Lattice Gas Other Rules

In addition to
translation, a lattice
gas can choose to reorient particles.

E.g., might re-orient
particles 180 degrees.

If done carefully is still
reversible.
Time 1
Time 2 after all particles
are re-oriented 180 degrees.
Lattice Gas Collision

One possible re-orientation is to specify collision
rules.

Each incoming particle collides with any other incoming
particles.

Collisions might make the particles bounce backwards.

Or might make the particles bounce in new directions.

How’s it happen in real life?
 Think about colliding billiard balls.
 But first, see next slide.
Lattice Gas for Diffusion and Fluid
Flow

Fluids that diffuse and flow conserve both mass
and momentum.

Momentum is r = mv.


 i.e., mass * velocity.
Assume each particle has identical mass of 1.
Then we just have r = v.

So we just have to conserve mass and “velocity” (ahem,
momentum) to get a fluid.

What’s velocity? It is a speed in a certain direction.

Represented as a vector.
 Length of vector is the speed. The direction of the vector
is the velocity direction.
Same speed, but opposite
direction. So different velocities.
Momentum is Conserved in
Collisions

Consider two colliding rams (sheep).

Each has the exact opposite velocity.
 Same speed.
 But opposite direction!

After their collision, they are both at a complete
standstill.

But the total momentum is the same!
 Zero beforehand.
 Zero afterwards.
The sum of these is zero.
Momentum Collisions (cont.)

Consider two pool balls.
When one hits the other, they bounce off in new
directions.
 The total velocity must remain the same before
and afterwards.

 (I’m assuming that the mass of the balls is identical.)
Green and black pool
balls afterwards.
Green and black pool
balls beforehand.
Can you show me the
total velocity before and
afterwards?
Conserving CA Momentum

If two vectors come into a cell, their total velocity is the sum of the
vectors.
Sum of the two black vectors.

If three vectors come into a cell, the total velocity is the sum of the
vectors.
Sum of the black vectors is zero!
Sum of the black vectors is the same
as the initial downward vector!
Lattice Gas Collision Rules

So a lattice gas
1.
2.
translates
then collides.


Handles collisions by re-orienting the particles to conserve
momentum.
Consider a hexagonal lattice.

6 possible particle directions.

One for each neighbor.

So there are only a fixed number of possible re-orientations
that conserve momentum.

Wait, why hexagonal and not square? Stay tuned!
Hexagonal Lattice Gas Collisions

Two particle collisions.
becomes

or
Three particle collisions.
becomes
And include obvious rotations.
More Particle Collisions
becomes
becomes
or
And include obvious rotations.
One More Collision: Walls

We also add walls by including an extra bit on
the vector.



{0,1,0,1,1,0,1}
The last bit is a wall when 1, and not a wall when 0.
Any particle that comes into a wall is bounced
back.


The wall is assumed to have infinite mass and zero velocity.
To conserve momentum, the particle must “bounce back” (off
of the wall) in exactly the direction from which it came.
Try the Lattice Gas

Use the Cellular Automaton Explorer.

Hexagonal lattice, lattice gas rule.
Create 25 by 25 grid.
Start empty.
Set running average to 1.

Turn off gravity!



 Go to the “More Properties” button on the Properties Panel.
 Set the “Force magnitude” to 0.0.

Slow down the simulation.

Draw some random particles (left click on the grid).
 Start the simulation (slowly!).
 Confirm the translation and collision behavior is correct.

Draw a wall (right click) and some particles.
 Confirm particles bounce off wall as expected.
Try Diffusion

Create a 25 by 25 grid.

Now try drawing a “ball” of random particles about 10 by 10.
 Can set the initial state as a filled ellipse with radius 5.

Turn off external forces!
 It’s the “Force magnitude” under the “More Properties” button.

Start the simulation.

Confirm that the particles diffuse away from the ball.
Confirm that after several hundred time steps, the particles are
essentially random, filling all the available space, and looking
nothing like the initial ball.


Try averaging over time (say 15 time steps).

This gives an improved sense of the space-filling diffusion process.
Time and Space Averages

What are we doing when taking a space average?

It’s like we are stepping back...




Can’t see the individual particles anymore.
Just see their aggregate behavior.
This is more like the way we see a real fluid. We don’t see the
individual water molecules. Just large collections of molecules.
What are we doing when taking a time average?


We are getting the time averaged behavior at a spot.
If we have enough particles, we are taking the average of all
possible vectors at a given location.


If a lattice position always has a rightward velocity, then the average
will point right.
If a position usually has a rightward velocity, but sometimes points
downwards, then the average will point right and just a little bit down.
Ensemble Average

Statistical Mechanics is concerned with the behavior of
many, many particles.




Looks at their statistical average behavior.
Called the “ensemble average”.
It is the probabilistically expected behavior (on average) of the
particles.
When we time-average our particles, we get the ensemble
average.




Think of a vertical stack of simulations all running simultaneously.
Each simulation starts with different random initial conditions.
Each simulation is one possible outcome for the diffusion (or fluid flow).
Now draw a vertical line through the stack and take the average!


That’s the ensemble average.
Really get a distribution of possible vectors. There will be a well-defined
peak on the distribution.
Ensemble Picture
A slice through the stack. Take
the average value on that
slice.

For more details, read an intro to Statistical
Mechanics.

Need semester to adequately derive that theory.
Fluid Flow and Forces

Ok, now let’s turn back on forces in our simulation.






How’s that work?
It’s like gravity acting on the particles.
Force = mass * acceleration.
And acceleration is a change in velocity.
So gravity is just changing the velocity of the lattice gas particles in
a certain direction.
Implementing a force (like gravity).



Randomly select particles with some low probability.
Then re-orient the particles to point in the direction of the force.
The end.

That changes the velocity (i.e., accelerates).
Fluid Flow Experiment

Use Cellular Automaton Explorer.
25 by 25 hexagonal lattice with lattice gas rule.
 Create a 50% random population.
 Create a time average (ensemble average!) of 15.
 Draw some random walls.
 Start the simulation.


The force due to gravity is set (by default) to point
to the right. Can change its direction and strength
in “More Properties”.
 Do not have to restart to change these.
Try Fluid Flow in Pipe

Try drawing walls across the top and bottom.


You’ve created a long narrow pipe.
Observations show that in pipes, the fluid flows fastest in the
middle and slowest at the walls.
 The fluid velocity is a parabola with 0 at the wall and a
peak in the center.


Does your simulation give that parabola?

Don’t forget to have the force pointing right.
Show me something cool!

E.g., Can you do fluid flow simulations around an airplane
wing?
Fluid Flow Difficult To Model?

With CA it is easy.

With other techniques can be very difficult to set
up complicated wall shapes.

Can prove(!) that this lattice gas gives the
Navier-Stokes equations


These are the equations of fluid flow.
Too little time to do this in class, but see references such as

U. Frisch, B. Hasslacher & Y. Pomeau, Lattice-gas automata
for the Navier-Stokes equation, Phys. Rev. Lett. 56 (1986), pp.
1505-1508.
Why Hexagonal Lattice?

Other lattices conserve too little or too much!

E.g., might conserve mass, momentum, and quantities that have
nothing to do with real diffusion or fluid flow.

Cells on the
sites will all
swap onto
sites. Then
alternate back to
,
etc. So never mix!

E.g., a square lattice with 4 neighbors will conserve y-momentum
separately in each column, and x-momentum is conserved separately
in each row. Not enough directions to properly “mix up”. If think of as a
checkerboard, the particles on white and black squares will never
interact.
E.g., the 8 neighbor square lattice has trouble conserving momentum.
Why? Because moving one cell per time step has a velocity of either 1
(in N, E, S, W directions) or the square root of 2 (in diagonal directions).

The hexagonal lattice gas does not conserve spurious quantities.

For more details there is a rich literature. The classic is

U. Frisch, B. Hasslacher & Y. Pomeau, Lattice-gas automata for the
Navier-Stokes equation, Phys. Rev. Lett. 56 (1986), pp. 1505-1508.
What Have We Learned?

To model most physical processes...
Must create rules that obey reversibility.
 Must create rules that obey conservation
principles.


Lattice gasses are a good start.

But may want to hunt and peck for your own rule.
 Always strive for the simplest possible rule.
Caveat

Not all physical processes need to be reversible
or obey conservation.



Conservation of mass (etc.) can never be violated.
But may not be relevant to what is being studied
Example: phase transitions.


Model liquid as 0’s, solid as 1’s.
Have rules that depend on a temperature.
 Similar to the force in fluid flow.

As temperature drops, the number of 1’s will dominate.
Not trying to conserve 1’s.

More on phase transitions in the next lecture.
