đĄ Best Practices
Q: How to organize large simulation projects?
Recommended directory structure:
my_fusion_project/
âââ models/ # Modelica models
â âââ package.mo
â âââ ...
âââ configs/ # Configuration files
â âââ baseline.json
â âââ sensitivity.json
â âââ ...
âââ scripts/ # Helper scripts
â âââ prepare_data.py
â âââ post_analysis.py
âââ data/ # Input data
â âââ external_data.csv
âââ results/ # Simulation results (auto-generated)
âââ reports/ # Final reports
Q: How to version control configuration files?
Use Git for version control:
Q: How to run distributed simulations on multiple machines?
Currently, TRICYS does not directly support distributed computing, but you can:
- Manually split tasks:
- Divide the parameter scan into multiple subsets
- Run different subsets on different machines
-
Manually merge the results
-
Use a cluster scheduler (like SLURM):
- Submit each parameter combination as a separate job
- Use a post-processing script to aggregate the results
Q: How to optimize model performance?
At the Modelica model level: 1. Simplify the model structure, avoid overly complex equations 2. Use appropriate numerical solver settings 3. Avoid algebraic loops and excessive events
At the TRICYS level: 1. Enable concurrent execution 2. Reduce the number of output variables 3. Use co-simulation to replace complex subsystems