Showcase
attractive_gas(n_bubbles=125, n_species=5, size=(5, 5, 5), vel=1.0, charge=1.0)
Generate a gas of attractive bubbles
Keyword arguments
Argument | Description | Default |
---|---|---|
n_bubbles | number of bubbles in box | 125 |
size | size of simulation box | (-6,-6,-6) |
n_species | number of different bubbles/masses/colors | 5 |
vel | standard deviation in velocities | 0.0 |
charge | scaling of repulsion | 1.0 |
Source code in bubblebox/showcase.py
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
|
classical_hydrogen(n_bubbles=125, size=(-10, -10, -10), vel_proton=np.array([0.0, 0.0, 0.0]), vel_electron=np.array([0.0, 1.0, 0.0]), pos_proton=np.array([0.0, 0.0, 0.0]), pos_electron=np.array([1.0, 0.0, 0.0]), charge=1.0, proton_fixed=False)
classical_hydrogen
Generate a classical Hydrogen system (proton and electron)
Keyword arguments:
Argument | Description | Default |
---|---|---|
n_bubbles | Number of bubbles | 125 |
size | size of simulation box | (-10,-10,-10) |
vel_proton | velocity of proton | (0,0,0) |
pos_proton | position of proton | (0,0,0) |
vel_proton | velocity of electron | (0,1,0) |
vel_proton | position of electron | (1,0,0) |
charge | charge of particles | 1 (-1) |
proton_fixed | clamped nucleus | False |
Source code in bubblebox/showcase.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
|
closed_system_membrane_2d(size=(-20, -20), n_bubbles=30, r=6.5, isolated=False)
A system exchaning volume and energy (but not bubbles) with it's surroundings
Source code in bubblebox/showcase.py
686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 |
|
double_harmonic_chain(n_bubbles=200, size=(10, 10, 10), charge=20.0, force_params=np.array([4.0, 1.0]))
Harmonic Chain
Generates a double-layered structure of n_bubbles connected to their neighbors with harmonic potentials, and repelling all others with a coulomb potential Auhor: Audun Skau Hansen 2022
Keyword arguuments
Argument | Description | Default |
---|---|---|
n_bubbles | number of bubbles | 120 |
size | size of simulation box | (10,10,10) |
charge | repulsive charge | 20.0 |
Source code in bubblebox/showcase.py
646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 |
|
fcc_custom(size=(3, 3, 3), lattice_parameter=2.0)
fcc_custom
Set up a face-centered cubic system of varying size for each dimension ( see https://en.wikipedia.org/wiki/Close-packing_of_equal_spheres ) for relaxed geometry at the onset of the simulation
Keyword arguments
Argument | Description | Default |
---|---|---|
lattice_parameter | the length of each cell | 2.0 |
size | number of cells | 3 (total number of bubbles is 4size*3) |
Source code in bubblebox/showcase.py
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 |
|
fcc_system(size=3, lattice_parameter=2.0, vel=0.0)
fcc_system(...)
Set up a face-centered cubic system ( see https://en.wikipedia.org/wiki/Close-packing_of_equal_spheres ) for relaxed geometry at the onset of the simulation
Keyword arguments:
Argument | Description | Default |
---|---|---|
lattice_parameter | the length of each cell | 2.0 |
size | number of cells | 3 (total number of bubbles is 4size*3) |
n_species | number of different bubbles/masses/colors | 3 |
vel | standard deviation in velocities | 0.0 |
Source code in bubblebox/showcase.py
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
|
flow_system()
A pipe with bubbles flowing through
Source code in bubblebox/showcase.py
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
|
hard_sphere_gas(vel=1, n_bubbles=216, size=(5, 5, 5), n_species=3)
hard_sphere_gas
Set up an hard sphere gas [1].
This is one of the first systems studied using Monte Carlo integration.
[1] Alder, B. J., Frankel, S. P., & Lewinson, V. A. (1955). Radial Distribution Function Calculated by the Monte‐Carlo Method for a Hard Sphere Fluid. The Journal of Chemical Physics, 23(3), 417-419.
Keyword arguments:
Argument | Description | Default |
---|---|---|
n_bubbles | Number of bubbles | 216 |
size | size of simulation box | (5,5,5) |
n_species | number of different bubbles/masses/colors | 3 |
vel | standard deviation in velocities | 1.0 |
Source code in bubblebox/showcase.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
|
harmonic_chain(n_bubbles=120, size=(10, 10, 10), charge=20, force_params=np.array([4.0, 1.0]))
Harmonic Chain
Generates a structure of n_bubbles connected to their neighbors with harmonic potentials, and repelling all others with a coulomb potential Auhor: Audun Skau Hansen 2022
Keyword arguuments
Argument | Description | Default |
---|---|---|
n_bubbles | number of bubbles | 120 |
size | size of simulation box | (10,10,10) |
charge | repulsive charge | 20.0 |
Source code in bubblebox/showcase.py
609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 |
|
ideal_gas(vel=1, n_bubbles=216, size=(5, 5, 5), n_species=3)
ideal_gas
Set up an ideal gas with no interactions
Keyword arguments:
Argument | Description | Default |
---|---|---|
n_bubbles | Number of bubbles | 216 |
size | size of simulation box | (5,5,5) |
n_species | number of different bubbles/masses/colors | 3 |
vel | standard deviation in velocities | 1.0 |
Source code in bubblebox/showcase.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
|
isolated_chambers(temperature_factor_left=1.0, temperature_factor_right=8.0, lattice_parameter=2.0)
isolated_chambers
Two isolated chambers with gases/liquids of varying temperature Auhors: Audun Skau Hansen and Hanan Gharayba, 2022
Keyword arguuments
Argument | Description | Default |
---|---|---|
lattice_parameter | adjusts the distance between the particles | 3.0 |
temperature_factor_right | scale temperatures in right chamber | 8.0 |
temperature_factor_left | scale temperatures in left chamber | 2.0 |
Source code in bubblebox/showcase.py
555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 |
|
mixing_lattice()
short explanation of model here
Source code in bubblebox/showcase.py
532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 |
|
open_system_membrane_2d()
A system exchanging volume, energy and particles with the surroundings (semi-permeable?)
Source code in bubblebox/showcase.py
714 715 716 717 718 719 |
|
repulsive_gas(n_bubbles=125, n_species=5, size=(5, 5, 5), vel=1.0, charge=10.0)
Generate a gas of repulsive bubbles
Keyword arguments:
Argument | Description | Default |
---|---|---|
n_bubbles | number of bubbles in box | 125 |
size | size of simulation box | (-6,-6,-6) |
n_species | number of different bubbles/masses/colors | 5 |
vel | standard deviation in velocities | 0.0 |
charge | scaling of repulsion | 10.0 |
Source code in bubblebox/showcase.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
|
spring_system(n_bubbles=3, n_species=1, force_params=np.array([1.0, 1.0]), vel=0)
A system of particles interacting with spring interactions
Keyword arguments
Argument | Description | Default |
---|---|---|
n_bubbles | number of bubbles in box | 3 |
size | size of simulation box | (-6,-6,-6) |
n_species | number of different bubbles/masses/colors | 1 |
vel | standard deviation in velocities | 0.0 |
force_params | np.array([a,b]) where potential is -a(x1-x2+b)*-1 | np.array([1.0, 1.0]) |
Source code in bubblebox/showcase.py
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
|
throttle_2d()
Bubbles moving through a throttle, prototype
Source code in bubblebox/showcase.py
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 |
|
throttle_3d_membrane(membrane_width=1.0, lattice_parameter=4.0, inflow_velocity=6.0)
throttle_3d_membrane
Source code in bubblebox/showcase.py
404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 |
|
throttle_expansion(membrane_width=1.0, lattice_parameter=3.0, inflow_velocity=6.0, wall_1_velocity=0.001, wall_2_velocity=0.0011)
throttle_3d_membrane
This system will simulate throttling through a membrane, with walls pushing the bubbles through the membrane
Keyword arguments
Argument | Description | Default |
---|---|---|
membrane_width | the width of the membrane in the middle | 1.0 |
lattice_parameter | adjusts the distance between the particles | 3.0 |
wall_1_velocity | the velocity of the left wall pushing | 0.001 |
wall_2_velocity | the velocity of the right wall expanding | 0.0011 |
Source code in bubblebox/showcase.py
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 |
|