A modular Python-based Electric Vehicle (EV) simulation framework designed for evaluate vehicle longitudinal dynamics, powertrain efficiency, and battery thermal behavior across various drive cycles.
- Longitudinal Dynamics: Models rolling resistance, aerodynamic drag (with headwind), grade resistance (elevation), and acceleration forces.
- Motor Model: Efficient torque-speed mapping with custom efficiency curves.
- Battery System:
- Equivalent circuit model for voltage and SOC estimation.
- Thermal model tracking battery temperature changes.
- State of Health (SOH): Cycle-life degradation estimation based on throughput and thermal stress.
- Chemistry Support: Presets for NMC, LFP, and Solid-State chemistries.
- Auxiliary Loads: HVAC and baseline electronics power demand modeling.
- Analysis Suite:
- Sensitivity Analysis: 2D parametric sweeps with contour and surface plot generation.
- Interactive Dashboard: Streamlit interface for real-time parameter tuning and benchmarking.
- Industry Benchmarking: Compare custom designs against production platforms like the Tesla Model 3 and Chevrolet Bolt.
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
Launch the Streamlit interface for a visual R-D experience:
streamlit run app.pyRun a specific drive cycle or a directory of cycles:
python main.py --drivecycle Data/HWFET.xlsx --outdir outputsPerform a parameter sweep (e.g., Mass vs. Drag) on a drive cycle:
python run_sweep.py --drivecycle Data/US06.xlsx --outdir outputs/sweepmodules/: Core physics and simulation modules (Battery, Motor, Vehicle, etc.)drivecycles/: Data loading and processing utilities.config/: YAML configurations for vehicle parameters.app.py: Streamlit dashboard entry point.main.py: Batch simulation CLI.run_sweep.py: Parametric optimization tool.
- Python 3.8+
- pandas
- numpy
- scipy
- matplotlib
- plotly
- pyyaml
- streamlit