Skip to content

Commit

Permalink
Fix bugs and usability issues with run_simulation_main.py
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 629707451
  • Loading branch information
araju authored and Torax team committed May 1, 2024
1 parent 5befd7f commit 30d6fa5
Show file tree
Hide file tree
Showing 3 changed files with 203 additions and 105 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,21 +147,21 @@ The following command will run TORAX using the default configuration file

```shell
python3 run_simulation_main.py \
--python_config='torax.examples.basic_config' --log_progress
--config='torax.examples.basic_config' --log_progress
```

To run more involved, ITER-inspired simulations, run:

```shell
python3 run_simulation_main.py \
--python_config='torax.examples.iterhybrid_rampup' --log_progress
--config='torax.examples.iterhybrid_rampup' --log_progress
```

and

```shell
python3 run_simulation_main.py \
--python_config='torax.examples.iterhybrid_predictor_corrector' --log_progress
--config='torax.examples.iterhybrid_predictor_corrector' --log_progress
```

Additional configuration is provided through flags which append the above run command, and environment variables:
Expand Down Expand Up @@ -198,23 +198,23 @@ Output simulation time, dt, and number of stepper iterations (dt backtracking wi

```shell
python3 run_simulation_main.py \
--python_config='torax.examples.iterhybrid_predictor_corrector' \
--config='torax.examples.iterhybrid_predictor_corrector' \
--log_progress
```

Live plotting of simulation state and derived quantities.

```shell
python3 run_simulation_main.py \
--python_config='torax.examples.iterhybrid_predictor_corrector' \
--config='torax.examples.iterhybrid_predictor_corrector' \
--plot_progress
```

Combination of the above.

```shell
python3 run_simulation_main.py \
--python_config='torax.examples.iterhybrid_predictor_corrector' \
--config='torax.examples.iterhybrid_predictor_corrector' \
--log_progress --plot_progress
```

Expand Down
8 changes: 4 additions & 4 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ of all input configuration fields.
.. code-block:: console
python3 run_simulation_main.py \
--python_config='torax.examples.basic_config' --log_progress
--config='torax.examples.basic_config' --log_progress
More involved examples in ``torax/examples`` include non-rigorous mockups of the ITER hybrid scenario:

Expand Down Expand Up @@ -72,7 +72,7 @@ For nonlinear solvers, the stepper iterations can be more than 1 due to dt backt
.. code-block:: console
python3 run_simulation_main.py \
--python_config='torax.examples.basic_config' \
--config='torax.examples.basic_config' \
--log_progress
plot_progress
Expand All @@ -82,15 +82,15 @@ Live plotting of simulation state and derived quantities as the simulation progr
.. code-block:: console
python3 run_simulation_main.py \
--python_config='torax.examples.basic_config' \
--config='torax.examples.basic_config' \
--plot_progress
For a combination of the above:

.. code-block:: console
python3 run_simulation_main.py \
--python_config='torax.examples.basic_config' \
--config='torax.examples.basic_config' \
--log_progress --plot_progress
Post-simulation
Expand Down
Loading

0 comments on commit 30d6fa5

Please sign in to comment.