|
| 1 | +# Usage |
| 2 | + |
| 3 | +### PowerSAS |
| 4 | +Current version only provides AC power flow. Assume the executable is gensas.out, then the power flow computation can be called as follows. |
| 5 | + |
| 6 | +```bash |
| 7 | +gensas.out -p |
| 8 | + -f/--file <input-file-name> |
| 9 | + -o/--output <output-file-name> |
| 10 | + [-l/--level <sas-order>] |
| 11 | + [-s/--segment <segment-length>] |
| 12 | + [-a/--alphatol <alpha-tolerance>] |
| 13 | + [-d/--difftol <error-tolerance>] |
| 14 | +``` |
| 15 | + |
| 16 | +Explanations: |
| 17 | +* The first argument `-p` (mandatory, and must be the first argument) means GenSAS runs under PowerSAS mode. For the rest of the arguments, the order does not matter. |
| 18 | +* `-f/--file <input-file-name>` (mandatory) specifies the input data. Currently the input file needs to be .mat file containing PSAT data structure. See `resources/psat_mat/d_014_syn_ind_zip_export.mat` for example. |
| 19 | +* `-o/--output <output-file-name>` (mandatory) specifies the output curve data. Currently the output is a .mat file containing the power flow solution as a vector. |
| 20 | +* `-l/--level <sas-order>` (optional) specifies the order of SAS. If not specified, the order of SAS is 15. |
| 21 | +* `-s/--segment <segment-length>` (optional) specfies the length of a segment of SAS computation. If not specified, the the segment length is 1.0. |
| 22 | +* `-a/--alphatol <alpha-tolerance>` (optional) specifies the tolerance of embedding variable in SAS. If not specified, the tolerance is set as 1e-4. |
| 23 | +* `-d/--difftol <error-tolerance>` (optional) specifies the error tolerance of the equations. If not specified, the error tolerance is set as 1e-6. |
| 24 | + |
| 25 | +Example: |
| 26 | +Try running power flow of the modified synthetic eastern-interconnection (EI) 70,000-bus system: |
| 27 | +```bash |
| 28 | +./gensas.out -p -f resources/psat_mat/d_70k_070.mat -s 0.5 -l 28 -d 1e-5 -o res.mat |
| 29 | +``` |
| 30 | + |
| 31 | +### ModelicaSAS |
| 32 | +Currently, ModelicaSAS supports simulation of a single Modelica .mo model without discrete events. The simulation can be called as follows: |
| 33 | + |
| 34 | +```bash |
| 35 | +gensas.out -g |
| 36 | + -m/--mode file/string |
| 37 | + -i/--input <input> |
| 38 | + -o/--output <output-file-name> |
| 39 | + [-j/--json <json-output-file-name>] |
| 40 | + [-l/--level <sas-order>] |
| 41 | + [-s/--segment <segment-length>] |
| 42 | + [-a/--aTol <alpha-tolerance>] |
| 43 | + [-e/--eTol <error-tolerance>] |
| 44 | + [-t/--outStep <output-step>] |
| 45 | + [-v/--verbose] |
| 46 | +``` |
| 47 | + |
| 48 | +Explanations: |
| 49 | +* The first argument `-g` (mandatory, and must be the first argument) means GenSAS runs under ModelicaSAS mode. For the rest of the arguments, the order does not matter. |
| 50 | +* `-m/--mode file/string` (mandatory) specifies the format of input. If `-m file`, then expect the input file name after `-i`; and if `-m string`, then expect the Modelica model content after `-i`. |
| 51 | +* `-i/--input <input>` (mandatory) specifies the input data. The `<input>` depends on the mode specified after `-m`. |
| 52 | +* `-o/--output <output-file-name>` (mandatory) specifies the output curve data file name. Currently the output is a .mat file containing the output as a matrix. |
| 53 | +* `-j/--json <json-output-file-name>` (optional) specifies the name of the .json file containing output curve. |
| 54 | +* `-l/--level <sas-order>` (optional) specifies the order of SAS. If not specified, the order of SAS is 15. |
| 55 | +* `-t/--time <max-time>` (optional) specifies the maximum time of simulated process. If not specified, the time is set as 10.0. |
| 56 | +* `-s/--segment <segment-length>` (optional) specfies the length of a segment of SAS computation. If not specified, the the segment length is 1.0. |
| 57 | +* `-a/--atol <alpha-tolerance>` (optional) specifies the tolerance of embedding variable in SAS. If not specified, the tolerance is set as 1e-3. |
| 58 | +* `-e/--etol <error-tolerance>` (optional) specifies the error tolerance of the equations. If not specified, the error tolerance is set as 1e-5. |
| 59 | +* `-k/--step <output-step>` (optional) specifies the time step of the output curves. If not specified, the time step is set as 0.01. |
| 60 | +* `-v/--verbose` (optional) if used, will print intermediate result in SAS computation. |
| 61 | + |
| 62 | +Example: |
| 63 | +Try running simulation of the model in `resources/mofile/test_solve_ode.mo`. |
| 64 | + |
| 65 | +```bash |
| 66 | + ./gensas.out -g |
| 67 | + -m file -i resources/mofile/test_solve_ode.mo |
| 68 | + -o resources/mofile/test_solve_ode.mat |
| 69 | + -t 15 |
| 70 | +``` |
0 commit comments