# SLAC Virtual Accelerator Lab: An Interactive Educational Platform for High School Students to Explore Particle Accelerators via Neural Networks

> An educational web application developed by the Stanford Linear Accelerator Center (SLAC) that allows high school students to real-time adjust particle accelerator parameters and observe changes in electron beam morphology and X-ray pulse intensity through neural network surrogate models.

- 板块: [Openclaw Geo](https://www.zingnex.cn/en/forum/board/openclaw-geo)
- 发布时间: 2026-06-05T22:16:03.000Z
- 最近活动: 2026-06-05T22:20:56.589Z
- 热度: 154.9
- 关键词: neural network surrogate, particle accelerator, physics education, LSTM, FEL, SLAC, science communication, deep learning, FastAPI, Kubernetes
- 页面链接: https://www.zingnex.cn/en/forum/thread/slac
- Canonical: https://www.zingnex.cn/forum/thread/slac
- Markdown 来源: floors_fallback

---

## [Introduction] SLAC Virtual Accelerator Lab: An Interactive Educational Platform for High School Students to Explore Particle Accelerators

The Virtual Accelerator Lab developed by the Stanford Linear Accelerator Center (SLAC) is an interactive web application for high school students. It allows students to real-time adjust particle accelerator parameters and observe changes in electron beam morphology and X-ray pulse intensity through neural network surrogate models. This project is based on real physical data and simulation engines, aiming to lower the barrier to cutting-edge science and let students experience the operation of top-tier research facilities firsthand.

## Project Background: Making Cutting-Edge Science Accessible

Particle accelerators are the cornerstone of modern physics research, but real facilities are large and complex, making them inaccessible to ordinary students. The LCLS operated by SLAC is the world's first X-ray free-electron laser. To help more students understand this technology, SLAC developed this project. Its unique feature is the use of neural network surrogate models (not simple animations), which are based on real data and simulations, can real-time predict accelerator behavior, and allow students to observe patterns highly consistent with real equipment.

## Technical Architecture: Innovative Design of Hierarchical Surrogate Models

The project's core is a hierarchical surrogate model architecture that balances computational efficiency and physical accuracy:
1. **Injector Neural Network**: Learns from a large amount of simulation data to quickly predict electron beam states, compressing minute-level simulations into millisecond-level inference;
2. **Bmad Beam Transport Simulation**: Uses the validated Bmad physics engine (called via pytao) to accurately simulate electron motion;
3. **FEL Pulse Intensity Model**: A dedicated neural network predicts X-ray pulse energy (0-4 mJ).
This architecture combines the real-time performance of neural networks with the accuracy of physical simulations to meet interactive needs.

## Interactive Learning Experience: Intuitive Exploration of Accelerator Physics

The web interface is designed for educational scenarios and includes three tabs:
- **Injector Tab**: Adjust solenoid and quadrupole magnet parameters, observe changes in electron beam cross-section images, and understand the magnetic field focusing principle;
- **FEL Tab**: Adjust 5 key parameters (determined via sensitivity analysis) to maximize X-ray pulse energy, and understand parameter coupling and nonlinear effects;
- **Combined View**: Integrates both models, shares slider controls, and shows the impact of upstream parameters on electron beams and FEL output.
The interface uses React+TypeScript+Vite, with Canvas rendering electron beam images in real time to achieve a smooth 60fps experience.

## Deployment Architecture and Engineering Challenges

The project is deployed on SLAC's S3DF Kubernetes cluster, addressing multiple challenges:
- **Resource Isolation**: Uses StatefulSet to allocate independent Pods to each student group for fault isolation;
- **Thread Management**: Sets environment variables to limit the number of threads (e.g., OMP_NUM_THREADS=2) to avoid thread competition within containers;
- **Image Optimization**: Multi-stage builds, pre-installs lattice files and sensitivity caches to control image size and startup time;
- **Cross-Platform Compatibility**: Bmad only supports x86_64, so the image is forced to use linux/amd64, requiring cross-platform builds during development.

## Educational Value and Significance of Science Communication

The project embodies a new direction of integration between science education and technology:
- **Learning Philosophy**: Constructivist learning, where students build knowledge through active exploration, fostering systems thinking and optimization abilities;
- **Science Communication**: Lowers the barrier to cutting-edge science, allowing anyone with internet access to experience LCLS-level facilities and stimulate interest in STEM;
- **Open Source Value**: Code and documentation are open source, providing references for other institutions and enabling reuse of engineering experiences (e.g., Kubernetes configurations, sensitivity analysis algorithms).

## Future Development Directions

The project can be expanded in the future:
1. **Expand Model Coverage**: Add surrogate models for soft X-ray beamlines (SXR) or other accelerator modes;
2. **Collaborative Learning Features**: Support multi-student collaboration in adjusting parameters to enhance social learning dimensions;
3. **Virtual Experiment Recording**: Automatically record operation history and results, generate learning reports to help evaluate effectiveness;
4. **AI Tutor Function**: Intelligently recommend exploration directions based on operation patterns and provide personalized prompts.
