Rule:HPP: Difference between revisions

From LifeWiki
Jump to navigation Jump to search
from https://github.com/gollygang/ruletablerepository
 
added missing @RULE and @TABLE
Line 25: Line 25:
# Golly (see e.g. Other-Rules/Margolus/BBM.rle) but this CA is neater.
# Golly (see e.g. Other-Rules/Margolus/BBM.rle) but this CA is neater.


@RULE HPP
@TABLE
n_states:34
n_states:34
neighborhood:vonNeumann
neighborhood:vonNeumann

Revision as of 08:24, 23 January 2020

  1. HPP Lattice gas
  2. J. Hardy, O. de Pazzis, and Y. Pomeau (1973) J. Math. Phys. 14, 470.
  3. The earliest lattice gas model. Later made obsolete by the FHP gas on
  4. a hexagonal lattice, which has better physical properties.
  5. States following http://pages.cs.wisc.edu/~wylie/doc/PhD_thesis.pdf
  6. Each cell can contain up to 4 particles, each moving in one of the four directions.
  7. Outgoing directions SENW map onto 4 bits, so W=0001=1, SEW=1101=13, etc.
  8. Next state is simply the collected inputs, in most cases.
  9. The exceptions are 5 (EW) and 10 (NS) which get swapped (bounce on collision).
  10. To make the gas useful in Golly's infinite area, I've added reflecting boundary
  11. states, 16-31. These work in the same way as gas particles (collecting inputs)
  12. but reverse their direction. Contact: Tim Hutton <tim.hutton@gmail.com>
  13. Sink boundary: (or you can vent to the outside but this way is neater)
  14. 32
  15. Source boundary: (haven't really worked out how to use this well yet)
  16. 33
  17. The HPP gas can also be run using the Margolus-neighborhood emulator in
  18. Golly (see e.g. Other-Rules/Margolus/BBM.rle) but this CA is neater.

@RULE HPP

@TABLE n_states:34 neighborhood:vonNeumann symmetries:none

  1. a = any of the gas states

var a={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}

  1. b = any of the reflecting boundary states

var b={16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31}

  1. s = has an outgoing south particle

var s={8,9,10,11,12,13,14,15,24,25,26,27,28,29,30,31,33}

  1. Ns = doesn't have an outgoing south particle

var Ns={0,1,2,3,4,5,6,7,16,17,18,19,20,21,22,23,32}

  1. e = has an outgoing east particle

var e={4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31,33}

  1. Ne = doesn't have an outgoing east particle

var Ne={0,1,2,3,8,9,10,11,16,17,18,19,24,25,26,27,32}

  1. n = has an outgoing north particle

var n={2,3,6,7,10,11,14,15,18,19,22,23,26,27,30,31,33}

  1. Nn = doesn't have an outgoing north particle

var Nn={0,1,4,5,8,9,12,13,16,17,20,21,24,25,28,29,32}

  1. w = has an outgoing west particle

var w={1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33}

  1. Nw = doesn't have an outgoing north particle

var Nw={0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32}

  1. straightforward transport (no interactions) except 5 and 10 which are swapped

a,Ns,Nw,Nn,Ne,0 a,Ns,w,Nn,Ne,1 a,Ns,Nw,n,Ne,2 a,Ns,w,n,Ne,3 a,Ns,Nw,Nn,e,4 a,Ns,w,Nn,e,10 a,Ns,Nw,n,e,6 a,Ns,w,n,e,7 a,s,Nw,Nn,Ne,8 a,s,w,Nn,Ne,9 a,s,Nw,n,Ne,5 a,s,w,n,Ne,11 a,s,Nw,Nn,e,12 a,s,w,Nn,e,13 a,s,Nw,n,e,14 a,s,w,n,e,15

  1. reflecting boundaries:

b,Ns,Nw,Nn,Ne,16 b,Ns,Nw,Nn,e,17 b,s,Nw,Nn,Ne,18 b,s,Nw,Nn,e,19 b,Ns,w,Nn,Ne,20 b,Ns,w,Nn,e,21 b,s,w,Nn,Ne,22 b,s,w,Nn,e,23 b,Ns,Nw,n,Ne,24 b,Ns,Nw,n,e,25 b,s,Nw,n,Ne,26 b,s,Nw,n,e,27 b,Ns,w,n,Ne,28 b,Ns,w,n,e,29 b,s,w,n,Ne,30 b,s,w,n,e,31