A simple Windows GUI application to calculate Diesel Generator parameters:
- Electrical Output (kWe)
- Mechanical Input (kWm)
- Efficiency (%)
Built with Python Tkinter for educational and engineering purposes.
Option | Input | Output |
---|---|---|
Calculate kWe | Mechanical Input (kWm), Efficiency (%) | Electrical Output (kWe) |
Calculate kWm | Electrical Output (kWe), Efficiency (%) | Mechanical Input (kWm) |
Calculate Efficiency | Electrical Output (kWe), Mechanical Input (kWm) | Efficiency (%) |
No external dependencies needed beyond standard Python.
Tkinter is included in standard Python distributions.
python Alternator_Efficiency_kWm_to_kWe_GUI.py
Requires PyInstaller:
pip install pyinstaller
pyinstaller --noconfirm --windowed --onedir ^
--icon=black.ico ^
--version-file=version.txt ^
Alternator_Efficiency_kWm_to_kWe_GUI.py
The .exe
will appear in the dist/Alternator_Efficiency_kWm_to_kWe_GUI/
directory.
This method avoids antivirus false positives caused by temp file unpacking in --onefile
.
You can self-sign the executable to reduce security warnings using OpenSSL and osslsigncode
.
openssl req -new -newkey rsa:2048 -nodes -x509 -days 365 \
-keyout my_private.key -out my_cert.crt
openssl pkcs12 -export -out my_cert.p12 \
-inkey my_private.key -in my_cert.crt
osslsigncode sign \
-pkcs12 my_cert.p12 \
-pass your_password \
-n "Alternator Efficiency GUI" \
-i "https://daikai.com" \
-t http://timestamp.digicert.com \
-in dist/Alternator_Efficiency_kWm_to_kWe_GUI/Alternator_Efficiency_kWm_to_kWe_GUI.exe \
-out dist/Alternator_Efficiency_kWm_to_kWe_GUI/Alternator_Efficiency_kWm_to_kWe_signed.exe
osslsigncode verify dist/.../your_signed.exe
Get-AuthenticodeSignature .\your_signed.exe
If Status
shows UnknownError
, import the my_cert.crt
into the Windows Trusted Root Certification Authorities to trust the self-signed cert.
/your-folder/
├─ Alternator_Efficiency_kWm_to_kWe_GUI.py
├─ black.ico
├─ version.txt
├─ my_cert.crt
├─ my_cert.p12
├─ my_private.key
└─ README.md

✅ Simple & Lightweight
✅ GUI-based (No terminal needed)
✅ Engineering-friendly
✅ Includes version info, icon, and metadata
✅ Optionally signed .exe
for improved trustworthiness
Romel Mendoza
Created for learning and practical engineering tools.
Feel free to modify and distribute for educational or non-commercial use.