DEV Community

Ayaan Dhalait
Ayaan Dhalait

Posted on

Introducing pyKp130

pyKp130, My Virtual Science Lab in Python

I built pyKp130, a virtual science and engineering lab you can run entirely in Python. Instead of using a physical lab, you write experiments as code, simulate them over time, and collect reproducible numerical data. It is designed to teach how experiments and simulations work while keeping results accurate and consistent.

What It Does

  1. Run simulations using model time
  2. Supports physics, biology, and other types of experiments
  3. Logs results automatically to CSV files
  4. Follows a clear workflow: setup, simulate, analyze, export
  5. Focuses on correct simulation and data structure rather than graphics
  6. Experiments Included
  7. Population Growth: a logistic population model that stabilizes over time
  8. Motion Simulation: tracks position and velocity under constant acceleration
  9. Neuron Signal: models neuron potential responding to a sine-wave stimulus

Getting Started

Requires Python 3.10 or higher. Clone the repo and run any experiment:

git clone https://github.com/AyaanDhalait/pyKp130.git
cd pyKp130
python kp130.py population
python kp130.py motion
python kp130.py neuron
Enter fullscreen mode Exit fullscreen mode

Results are saved in the data folder as CSV files. You can open them in Excel, Google Sheets, or use Python to plot graphs and analyze the data.

Why I Made This

I wanted a simple, reproducible way to explore scientific simulations and understand how experiments work from the inside out. This project is small but fully functional and easy to extend with new experiments or models.

Top comments (0)