第一轮分析工作暂存
This commit is contained in:
@@ -1,8 +1,18 @@
|
||||
# DynamisLab
|
||||
|
||||
**Machine Learning for Computational Fluid Dynamics**
|
||||
**Machine Learning meets Numerical Simulation**
|
||||
|
||||
DynamisLab is a research framework for applying reinforcement learning and machine learning techniques to computational fluid dynamics problems. Built on top of [CelerisLab](https://github.com/frank14f/CelerisLab), it provides standardized environments and training pipelines for active flow control tasks.
|
||||
DynamisLab is a research framework for combining machine learning techniques with numerical simulations. Built on top of [CelerisLab](https://github.com/frank14f/CelerisLab), it provides standardized environments and training pipelines for various ML + CFD/Physics projects.
|
||||
|
||||
## Current Projects
|
||||
|
||||
### 🎯 FlowStealth
|
||||
|
||||
Deep Reinforcement Learning for Active Flow Control, focusing on:
|
||||
- **Flow Stealth**: Drag reduction and flow signature minimization
|
||||
- **Flow Illusion**: Manipulating flow patterns for deception and control
|
||||
- **Methods**: DRL (PPO) + CFD (Lattice Boltzmann Method)
|
||||
- **Location**: `src/flow_stealth/`
|
||||
|
||||
## Features
|
||||
|
||||
@@ -10,25 +20,27 @@ DynamisLab is a research framework for applying reinforcement learning and machi
|
||||
- 🤖 **RL Integration**: Ready-to-use with Stable-Baselines3 and other RL libraries
|
||||
- 🚀 **GPU Acceleration**: Leverages CelerisLab's CUDA-accelerated LBM solver
|
||||
- 📊 **Experiment Tracking**: Built-in TensorBoard integration
|
||||
- 🔧 **Modular Design**: Clean separation of environments, configs, and training scripts
|
||||
- 📦 **Standard Structure**: Follows Python packaging best practices (src layout)
|
||||
- 🔧 **Modular Design**: Organized by research projects
|
||||
- 📦 **Standard Structure**: Follows Python packaging best practices
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
DynamisLabNew/
|
||||
├── src/ # Source code (src layout)
|
||||
│ ├── __init__.py
|
||||
│ ├── config.py # Configuration management
|
||||
│ └── environments/ # Gymnasium environments
|
||||
DynamisLab/
|
||||
├── src/ # Source code (organized by project)
|
||||
│ └── flow_stealth/ # FlowStealth: DRL + CFD Active Control
|
||||
│ ├── __init__.py
|
||||
│ └── cfd_env.py # CFD flow control environment
|
||||
│ ├── config.py # Configuration management
|
||||
│ └── environments/ # Gymnasium environments
|
||||
│ ├── __init__.py
|
||||
│ └── cfd_env.py # CFD flow control environment
|
||||
├── scripts/ # Training and evaluation scripts
|
||||
│ └── train_ppo.py # PPO training script
|
||||
│ └── train_ppo.py # PPO training script for FlowStealth
|
||||
├── configs/ # Configuration files
|
||||
│ ├── config_cuda.json # CUDA settings
|
||||
│ ├── config_flowfield.json # Flow field parameters
|
||||
│ └── config_gym.json # Environment settings
|
||||
├── CelerisLab/ # CelerisLab submodule (GPU-accelerated CFD)
|
||||
├── models/ # Trained model checkpoints (gitignored)
|
||||
├── output/ # Training data and results (gitignored)
|
||||
├── tensorboard/ # TensorBoard logs (gitignored)
|
||||
@@ -117,8 +129,8 @@ Then open http://localhost:6006 in your browser.
|
||||
### Using the Environment Programmatically
|
||||
|
||||
```python
|
||||
from environments import CFDFlowControlEnv
|
||||
from config import load_celeris_configs
|
||||
from flow_stealth.environments import CFDFlowControlEnv
|
||||
from flow_stealth.config import load_celeris_configs
|
||||
|
||||
# Load configurations
|
||||
config_cuda, config_field = load_celeris_configs()
|
||||
@@ -231,15 +243,22 @@ The main environment for active flow control around a cylinder.
|
||||
- Follow PEP 8 style guide
|
||||
- Use type hints for function signatures
|
||||
- Document classes and functions with docstrings
|
||||
- Keep environments in `src/dynamis/environments/`
|
||||
- Organize projects under `src/` (e.g., `src/flow_stealth/`)
|
||||
- Keep training scripts in `scripts/`
|
||||
- Use `config.py` for all path and configuration management
|
||||
|
||||
### Adding a New Environment
|
||||
### Adding a New Project
|
||||
|
||||
1. Create new environment class in `src/dynamis/environments/`
|
||||
1. Create new project directory in `src/` (e.g., `src/my_new_project/`)
|
||||
2. Add `__init__.py`, `config.py`, and project-specific modules
|
||||
3. Create environments in `src/my_new_project/environments/`
|
||||
4. Create corresponding training scripts in `scripts/`
|
||||
|
||||
### Adding a New Environment to FlowStealth
|
||||
|
||||
1. Create new environment class in `src/flow_stealth/environments/`
|
||||
2. Inherit from `gym.Env`
|
||||
3. Register in `src/dynamis/environments/__init__.py`
|
||||
3. Register in `src/flow_stealth/environments/__init__.py`
|
||||
4. Create corresponding training script in `scripts/`
|
||||
|
||||
### Running Tests
|
||||
|
||||
Reference in New Issue
Block a user