This site contains: mathematics courses and book; covers: image analysis, data analysis, and discrete modelling; provides: image analysis software. Created and run by Peter Saveliev.

# Zachary Ahlers

Jump to: navigation, search

The following pages will be used as my journal and will describe any progress made and describe in detail what has been accomplished. Each week I will have questions posted here and will put up the answers for future reference as I receive them.

## 1 Week 1

Screen shots from my current program:

QUESTIONS:

Q:I understand that the 2-cells can be thought of as rooms that hold heat, and 1-cells as the walls that transmit heat, but what physical purposes do the 0-cells (the corners of the rooms) have?

A: I don't believe there is any meaning or purpose...

Q:How did Julie calculate level curves last summer? It is unlikely that any cells will have a temperature of precisely T/4, so do you find cells that are above and below T/4 and interpolate the actual point? Or is there a threshold, an acceptable limit, i.e. using all points that fall between 1900 and 2100 as viable?

A: I think she used inequality rather equality, as you suggest. Also, you can find the boundary of {x:U(x)<=T/4}.

## 2 Quick Write-up for Current Program

Expanding on the work of Julia Lang (Modeling with discrete exterior calculus) from last summer, I've written up a simple program to study isotropic (and anisotropic) heat flow through a 2-D lattice, and describe here some interesting knowledge gleaned. Currently my program contains the capability to account for 3 different corrections (namely the distance between centroids, the shared side length, and the angle of the wall relative to its dual), and contains 4 different Lattices(Square, Rectangular, Triangular, and Rhomboidal). The corrections do nothing for the Square Lattice, or more accurately the corrections are all equal to 1. The Rectangular grid which produced anisotropic heat transfer before correction now correctly produced isotropic heat transfer after correcting for centroid distance and side length (angle correction was still zero). The corrections were not sufficient to produce isotropy in the triangular or rhomboidal graphs, though the triangular grid produced heat transfer that was significantly closer to circular.

No Corrections (Square, Rectangular, Triangular, and Rhomboidal)

With Corrections

So it would appear that some lattices are naturally capable of isotropic heat transfer, others can with a few corrections, but there also exist lattices that cannot be corrected for. As an interesting test, I inserted a hypothetical "correction" that decreased the amount of heat that could flow in the preferred direction, to see what correction would be necessary to produce isotropy. To make examining the exact shape easier, I added a white halo where the temperature was between 2 and 3 degrees (initial cell at 10000 degrees) after 2000 steps. From right to left they are: standard corrections, standard and a 25 percent decrease in k along major axis, standard and a 50% decrease, and standard and an 80% decrease. (k was originally 0.3)

So even with a massive decrease in heat flow on the two short legs of each cell, isotropy eludes us, and it would seem reasonable to conclude that the only correction which can provide the proper heat transfer is a correction of the space itself, most likely into one where the triangles become equilateral and the rhombuses become square, i.e. making the space euclidean.

## 3 Overview of Current Project

For the remaining 8 weeks of this program I will be working on a step-by-step program to develop and improve a lattice gas model, beginning with an extremely simple lattice gas simulation on a regular lattice (Square, Equilateral Triangle, or Hexagonal) and hopefully working up to a simulation that incorporates probabilistic aspects from the Boltzmann fluid flow model and thermodynamical attributes like temperature and heat capacity. I am currently in the stage of writing out how I want the classes of my program spread out, and how much encapsulation is needed, so as to be most useful in debugging while properly defining distinct portions of the code as having different functions. A simple test to estimate the accuracy of my model will be to place a small number of distinct particles in a single cell, surrounded by "air" particles, and check to see if the resulting spread is a reasonable solution to the diffusion equation (Read about it here):

$$\frac{∂u}{∂t} = k ∇^2 u + s.$$

The simulation incorporates many physical laws into discrete time and space, the most fundamental of which is conservation of mass and conservation of momentum, which have both been coded and accounted for as of 24-Jun-2012. One feature that distinguished this model from any other Lattice Gas I've seen is the ability to probabilistically account for any speed between 0 (not moving) and 1 (one unit length per time step). However, this allows for an infinite possible velocities, so conservation of momentum can result in a potentially infinite possible configurations after a multi-particle collision. Collisions conserve kinetic energy, a good approximation for large numbers of real-life particles, though the collision algorithm has been written to randomly test possible speeds, and so takes up more time than a more complex recursive algorithm that I do not have the know-how to write.

Current Simulation Pictures

In order to determine the validity of this model, I placed a number of green particles in the center of the lattice, then checked to see if their rate of diffusion matched that of reality, namely that the average of the square of the distances from the origin has a linear relationship with time. The first time I tested this my code was buggy, and not only did it fail when given non integer velocities, the graph was improperly generated.

It is not immediately apparent from the graphs shown, but under certain circumstances it becomes obvious that the particles spread outward in a shape that is not (as I had hoped) a circle, but a rhombus. I am reminded of the failure of the HPP lattice gas model (also on a square lattice), which suffered from an unacceptable anisotropy, and was improved upon in the FHP model, which used a hexagonal lattice. And considering the dismal failure of the addition of obstacles and walls into the model, it has become apparent that hexagons are necessary for proper fluid flow, possibly improved upon with more complex irregular lattices.

"The hexagonal grid does not suffer as large anisotropy troubles as those that plague the HPP square grid model, a fortunate fact that is not entirely obvious, and that prompted Frisch to remark that "the symmetry gods are benevolent"." - Wikipedia Article

There are many other features that should also be included into this model:

Hexagonal Lattice

Probabilistic particle collisions

Gravity

Eaters and Spawners

Obstacles

Fixed Temp. Cells

Vector Field Visualization