diff options
author | Adrian Kummerlaender | 2020-03-27 22:04:16 +0100 |
---|---|---|
committer | Adrian Kummerlaender | 2020-03-27 22:04:16 +0100 |
commit | 5e99925cd258ff68f1da7ce0bdb823efe785d8de (patch) | |
tree | 1794eec3f8980fc036a01f9bf856c089bf7dc344 /random_velocities.py | |
parent | 1d0639e33296f4cdc6f635732202ef05c2c6f81a (diff) | |
download | boltzgas-5e99925cd258ff68f1da7ce0bdb823efe785d8de.tar boltzgas-5e99925cd258ff68f1da7ce0bdb823efe785d8de.tar.gz boltzgas-5e99925cd258ff68f1da7ce0bdb823efe785d8de.tar.bz2 boltzgas-5e99925cd258ff68f1da7ce0bdb823efe785d8de.tar.lz boltzgas-5e99925cd258ff68f1da7ce0bdb823efe785d8de.tar.xz boltzgas-5e99925cd258ff68f1da7ce0bdb823efe785d8de.tar.zst boltzgas-5e99925cd258ff68f1da7ce0bdb823efe785d8de.zip |
Reenable 2D support
Diffstat (limited to 'random_velocities.py')
-rw-r--r-- | random_velocities.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/random_velocities.py b/random_velocities.py index cf18e6b..2f62267 100644 --- a/random_velocities.py +++ b/random_velocities.py @@ -4,18 +4,18 @@ from boltzgas import HardSphereSetup, HardSphereSimulation from boltzgas.initial_condition import grid_of_random_velocity_particles from boltzgas.visual import VelocityHistogram, WireBox, Tracer +dimension = 3 grid_width = 10 radius = 0.005 char_u = 1120 -position, velocity = grid_of_random_velocity_particles(grid_width, radius, char_u) +position, velocity = grid_of_random_velocity_particles(dimension, grid_width, radius, char_u) config = HardSphereSetup(radius, char_u, position, velocity) gas = HardSphereSimulation(config, opengl = True, t_scale=0.5) -#tracer = Tracer(gas, int((grid_width**2)/2+grid_width/2)) histogram = VelocityHistogram(gas, [1.1,0], [1,1]) -instruments = [ WireBox(0,1,0,1,0,1), histogram ] +instruments = [ WireBox(0,1,0,1,0,dimension == 3 if 1 else 0), histogram ] boltzgas.visualizer.simulate(config, gas, instruments) |