aboutsummaryrefslogtreecommitdiff
path: root/gas.py
diff options
context:
space:
mode:
authorAdrian Kummerlaender2020-03-25 22:05:08 +0100
committerAdrian Kummerlaender2020-03-25 22:05:08 +0100
commit2af16451f5119398c34ef9bd8626791e0498b9ab (patch)
tree097f3bef4e61748440e720e3f6f7108bc7502d08 /gas.py
parent3d0803e5e133a903a27ef5fb9cb102c955b34acd (diff)
downloadboltzgas-2af16451f5119398c34ef9bd8626791e0498b9ab.tar
boltzgas-2af16451f5119398c34ef9bd8626791e0498b9ab.tar.gz
boltzgas-2af16451f5119398c34ef9bd8626791e0498b9ab.tar.bz2
boltzgas-2af16451f5119398c34ef9bd8626791e0498b9ab.tar.lz
boltzgas-2af16451f5119398c34ef9bd8626791e0498b9ab.tar.xz
boltzgas-2af16451f5119398c34ef9bd8626791e0498b9ab.tar.zst
boltzgas-2af16451f5119398c34ef9bd8626791e0498b9ab.zip
Add example for random initial velocities
Diffstat (limited to 'gas.py')
-rw-r--r--gas.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/gas.py b/gas.py
deleted file mode 100644
index 135796a..0000000
--- a/gas.py
+++ /dev/null
@@ -1,25 +0,0 @@
-import boltzgas.visualizer
-
-from boltzgas import HardSphereSetup, HardSphereSimulation
-from boltzgas.initial_condition import grid_of_random_velocity_particles
-from boltzgas.visual import VelocityHistogram, ColoredBox
-
-grid_width = 40
-radius = 0.002
-char_u = 1120
-
-position, velocity = grid_of_random_velocity_particles(grid_width, radius, char_u)
-velocity[:,:] = 0
-velocity[0,0] = 10*char_u
-velocity[0,1] = 4*char_u
-
-config = HardSphereSetup(radius, char_u, position, velocity)
-gas = HardSphereSimulation(config, opengl = True, t_scale = 0.5)
-
-histogram = VelocityHistogram(gas, [1.1,0], [1,1])
-
-decorations = [ ColoredBox([0,0], [1,1], (0.2,0.2,0.2)) ]
-instruments = [ histogram ]
-windows = [ histogram ]
-
-boltzgas.visualizer.simulate(config, gas, instruments, decorations, windows)