Skip to content

Commit

Permalink
Merge branch 'feature/update_install' of github.com:paulf81/hercules …
Browse files Browse the repository at this point in the history
…into feature/update_install
  • Loading branch information
paulf81 committed Feb 21, 2025
2 parents 8ec867b + 150949a commit 62d8266
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions docs/install_local.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,31 +107,39 @@ bash run_script.sh
## Running manually

To run locally without the included runscript using a standin for AMR-Wind, launch 3 separate
terminals. In each, `conda activate` your hercules environment (`conda
terminals. These three terminals will be used to execute one of each of the three main run command lines in the run_script.sh file.

In each, `conda activate` your hercules environment (`conda
activate hercules`).

In the first terminal, run
In the first terminal, run the helics launch command below, which does not change between runs:
```
helics_broker -f 2 --consoleloglevel=trace --loglevel=debug --local_port=$HELICS_PORT &
```
from any directory.

In the second and third terminals, navigate to
hercules/example_case_folders/example_sim_05 (you'll need to be on the
develop branch of hercules). Then, in one of these
terminals, run
In the second terminal, navigate to the run directory and run the Hercules launch command. This comand will be different based on which wind simulator you are using, but has the form:

```
python <Hercules emulator python launch script>.py <Hercules input file>.inp $HELICS_PORT >> outputs/<Hercules log file>.log 2>&1
```
An example of this is the following, which uses the floris standin model:
```
python hercules_runscript_CLcontrol.py hercules_input_000.yaml $HELICS_PORT >> outputs/loghercules_cl.log 2>&1 &
```

In the third terminal, navigate to the run directory and run the wind simulator launch command. This command will be different based on which wind simulator you are using, but has the form:

```
python hercules_runscript_dummy_amr.py amr_input.inp
python <wind simulator python launch script>.py <wind farm input file>.inp <wind input data file>.csv $HELICS_PORT >> outputs/<wind log file>.log 2>&1
```
and in the other, run
An example of this is the following, which uses the floris standin model:
```
python hercules_runscript.py hercules_input_000.yaml
python floris_runscript.py amr_input.inp floris_standin_data.csv $HELICS_PORT >> outputs/logfloris_cl.log 2>&1
```

The first of these launches the dummy stand-in for AMR-wind, and the second
launches the hercules emulator. These will connect to the helics_broker and
run the co-simulation. You should see printout from both the dummy AMR-wind
process and the hercules emulator printed to your screen.
These will connect to the helics_broker and
run the co-simulation. You should see printout from both the wind simulator and the hercules emulator printed to your screen.


However, if the simulation hangs, be sure to check if there are multiple processes running with
Expand Down

0 comments on commit 62d8266

Please sign in to comment.