|
1 | | -# Running a example in NEXT |
| 1 | +# Running an Example in NEXT |
2 | 2 |
|
3 | | -To run a example in NEXT, you need to *cd* to an example path |
4 | | - |
5 | | -You also need a python interpeter |
6 | | - |
7 | | -For this, lets try the ColdCollapseGalaxy example |
| 3 | +To run an example in **NEXT**, first navigate to the example’s directory. |
| 4 | +You will also need a Python interpreter installed. |
8 | 5 |
|
| 6 | +As a demonstration, let’s try the **ColdCollapseGalaxy** example: |
9 | 7 | ```bash |
10 | | -cd examples |
11 | | -cd ColdCollapseGalaxy |
12 | | -python coldcollapse.py |
13 | | -../../next coldcollapse.txt 8 0.25 0.2 vtu |
| 8 | + cd examples |
| 9 | + cd ColdCollapseGalaxy |
| 10 | + python coldcollapse.py |
| 11 | + ../../next coldcollapse.txt 8 0.25 0.2 vtu |
14 | 12 | ``` |
| 13 | +### Explanation of the command |
15 | 14 |
|
16 | | -Explaining the flags: |
17 | | - |
18 | | -- ../../next = Go up 2 directories (into project root) and run executable |
19 | | - |
20 | | -- coldcollapse.txt = The name of the specified "scenario" / "initial condition" |
21 | | - |
22 | | -- 8 = Set openmp (CPU) threads to 8, if your cpu has more, you can change it |
23 | | - |
24 | | -- 0.25 = Timestep, how fast the simulation will run |
25 | | - |
26 | | -- 0.2 = Caching interval, how fast NEXT would plot caching |
27 | | - |
28 | | -- vtu = Caching format, there is currently vtk|vtu |
| 15 | +- `../../next` → Move up two directories (to the project root) and run the NEXT executable |
| 16 | +- `coldcollapse.txt` → The scenario / initial condition file |
| 17 | +- `8` → Number of OpenMP (CPU) threads; adjust based on your CPU |
| 18 | +- `0.25` → Timestep, controls how fast the simulation advances |
| 19 | +- `0.2` → Dump interval, controls how often NEXT writes output |
| 20 | +- `vtu` → Output format; options are `vtk` or `vtu` |
29 | 21 |
|
30 | | -Now, you can enjoy the simulation and exit with ctrl c / q |
| 22 | +Now you can enjoy the simulation. |
| 23 | +To exit, press **Ctrl+C** or type **q** (then Enter). |
0 commit comments