Skip to content

Commit c0cc498

Browse files
Add two_galaxies.py for galaxy particle simulation
1 parent 52f3088 commit c0cc498

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import os, sys
2+
3+
root = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
4+
if root not in sys.path:
5+
sys.path.insert(0, root)
6+
7+
from tools.icbuilder import two_galaxies, save
8+
9+
particles = two_galaxies(
10+
N1=5000, R1=5.0, M1=1.0, scale1=1.0,
11+
N2=4000, R2=4.0, M2=0.8, scale2=1.0,
12+
angle_deg=45.0,
13+
v_rel=0.5
14+
)
15+
16+
save("two_galaxies.txt", particles)

0 commit comments

Comments
 (0)