|
| 1 | +# A Guide to add a Benchmark Problem |
| 2 | + |
| 3 | +The platform uses a hierarchical workflow system that incorporates: |
| 4 | + |
| 5 | +- Multiple simulation tools (e.g., FEniCS, Kratos) for solving a problem. |
| 6 | +- Standardized I/O streams to the simulation tools. |
| 7 | +- Multiple parameter configurations per benchmark. |
| 8 | +- Automated mesh generation. |
| 9 | +<!-- Provenance tracking and metadata collection --> |
| 10 | + |
| 11 | +This guide outlines the algorithm needed to add a benchmark problem. |
| 12 | + |
| 13 | +1. **Create a folder for the problem** |
| 14 | + |
| 15 | + Inside the `benchmarks` directory, create a folder for the problem e.g. `benchmarks/problem_name`. |
| 16 | + |
| 17 | +2. **Add the simulation tool** |
| 18 | + - For each simulation tool used to solve the problem, create a corresponding subfolder inside the problem directory, e.g. |
| 19 | + |
| 20 | + ``` |
| 21 | + benchmarks/problem_name/ |
| 22 | + ├── tool_A |
| 23 | + ├── tool_B |
| 24 | + ``` |
| 25 | +
|
| 26 | + - Inside each tool’s folder (e.g. tool_A/): |
| 27 | + - Write a script for running the simulation. |
| 28 | + - Write the I/O interface scripts needed to ensure a common I/O interface across the tools. |
| 29 | + - Create an environment.yml file listing out all the tool-specific software dependencies. |
| 30 | + - Develop a workflow script connecting the I/O scripts, simulation code and environment.yml files. |
| 31 | +
|
| 32 | +3. **Create the mesh generation script** |
| 33 | + - Write `create_mesh.py` inside `benchmarks/problem_name/` to define the domain geometry. |
| 34 | + - Provide user-modifiable inputs via a JSON input interface, cf. `benchmarks/linear-elastic-plate-with-hole/create_mesh.py`. |
| 35 | + - If required, include an environment file for the mesh generation script in the same directory. |
| 36 | +
|
| 37 | +4. **Define parameter configurations** |
| 38 | + |
| 39 | + For each parameter configuration run using simulation tools, create a JSON file in `benchmarks/problem/` specifying parameters related to the domain geometry, mesh information, and constitutive model parameters, cf. `benchmarks/linear-elastic-plate-with-hole/parameters_*.json`. |
| 40 | +
|
| 41 | +5. **Create a script for discovering the configurations** |
| 42 | + - Create the script `generate_config.py` in `benchmarks/problem/`. |
| 43 | + - The script should: |
| 44 | + - Discover all the configuration JSON files. |
| 45 | + - Extract configurations. |
| 46 | + - List the simulation tools for each configuration, cf. `benchmarks/linear-elastic-plate-with-hole/generate_config.py`. |
| 47 | + |
| 48 | + **Note:** The simulation-tool-specific keywords are used by the main workflow to call the corresponding sub-workflows. |
| 49 | +
|
| 50 | +6. **Develop the main workflow** |
| 51 | + - Place the main workflow in `benchmarks/problem/`. |
| 52 | + - Include rules for: |
| 53 | + - Running `create_mesh.py`. |
| 54 | + - Calling the simulation-tool-specific sub-workflows. |
| 55 | + - Additional rules can be added depending on the requirements, cf. `benchmarks/linear-elastic-plate-with-hole/Snakefile`. |
0 commit comments