First Major Commit - Notes

Just a Notes/Information Gathering stage for now, as well as adding some files for organization later.

* Updated Readme to have some more information on the project - This will be updated frequently
* Products.py - adding sample code from AI; this will not be used in the final product
* Config.py - No code, only some notes
* Main.py - sample code to see if QT is working or not. That code will be removed, and the Main.py file will become the program launcher/glue for the application
* Formulas.md - lots of notes. This will also be updated regularly and referenced frequently until the project is finished.

As a note, I will be trying to keep up with comments in the code so I don't lose my own place. ADHD is a bitch.
main
Nexan 2026-07-16 21:28:49 -05:00
parent a2b3553893
commit 6d374b5fb3
Signed by: nexan
GPG Key ID: B5D0D20AF8B8F12E
5 changed files with 76 additions and 1 deletions

View File

@ -1,3 +1,8 @@
# Pool-Calculator # Pool-Calculator
Simple calculator for balancing pool chemistry using various products and the ability to select multiple chlorine options Simple calculator for balancing pool chemistry using various products and the ability to select multiple chlorine options.
## NOTES
- "Calculations" or "Math" folder of some kind that has three main files: Base, Pool, and Spa. Base has all the base formulas for pools and spas, scaling to the actual pool volume, and converting granular to liquid or vice-versa; The Pool File handles chlorine demand calcs, does "granular landing zones" (if using granular or a mix to defeat ammonia), and tracks "cya lockout" risk levels; The Spa file simply scales the math down to spa-size, has bromine-conversion multipliers, and would trigger warnings for high bather load risks or high-temp off-gassing
-

9
config.py 100644
View File

@ -0,0 +1,9 @@
This is where you store hardcoded industry numbers. If a manufacturer changes a formula or you want to adjust your store's default targets, you only edit this one file.
What it holds:
Liquid chlorine concentration factor (e.g., LIQUID_REDUCTION_FACTOR = 0.75 for your 12.5% logic).
Standard target landing zone (e.g., TARGET_LANDING_FC = 3.0).
Volume baselines (POOL_BASE_VOLUME = 10000, SPA_BASE_VOLUME = 100).

28
formulas.md 100644
View File

@ -0,0 +1,28 @@
## Stabilizer
CYA Increase (ppm) = [Pounds of Stabilizer X 12] / (Pool Gallons / 10,000)
## Adding Stabilizer
Target CYA = Current FC / 0.075
## For Salt Pools
Target CYG (saltwater) = Current FC / 0.05
## Dry Acid to Muriatic
1 pound of Dry Acid = 26 fl oz of 31.45% Muriatic
1.25 pounds of Dry Acid = 1 quart (32oz) of Muriatic
5 pounds of Dry Acid = 1 Gallon of Muriatic
## Alkalinity Raising
Pounds of Sodium Bicarbonate (BP100) = [Desired TA Increase (ppm) * 1.4] / (Pool Gallons / 10,000)
## TA Lowering
## Total Alkalinity and Adjusted Alkalinity
Total Alkalinity is water's ability to resist pH changes. TA is the sum of all the concentrations of chemical ion species in your pool water that can react with (or consume) a hydrogen ion (H+).
Adjusted Alkalinity is the Total Alkalinity minus the CYA multiplied by Correction Factor, which is based on the pH.
However, since pools are usually between 7.2 and 8.2 pH, just use the following to get Adjusted Alkalinity:
AA = TA - (CYA * 0.33)
Basically, keep TA at around 80-120 during the winter, and 60-90 during the season

16
main.py 100644
View File

@ -0,0 +1,16 @@
from PySide6.QtWidgets import QApplication, QMainWindow, QPushButton
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("Hello, World!")
button = QPushButton("Exit")
button.pressed.connect(self.close)
self.setCentralWidget(button)
self.show()
app = QApplication([])
window = MainWindow()
app.exec()

17
products.py 100644
View File

@ -0,0 +1,17 @@
Possible Structure of Code in this File
class BioGuardProduct:
def __init__(self, name, active_ingredient, fc_factor, cya_factor, ch_factor, weight_unit="lb"):
self.name = name
self.active_ingredient = active_ingredient
self.fc_factor = fc_factor # ppm change per unit in 10k gal
self.cya_factor = cya_factor # ppm change per unit in 10k gal
self.ch_factor = ch_factor # ppm change per unit in 10k gal
self.weight_unit = weight_unit
# Instantiated store inventory:
INVENTORY = {
"burn_out_73": BioGuardProduct("Burn Out 73", "Cal-Hypo", fc_factor=8.7, cya_factor=0, ch_factor=6.1),
"super_soluble": BioGuardProduct("Super Soluble", "Dichlor", fc_factor=6.7, cya_factor=6.0, ch_factor=0),
# Add Low 'N Slow, Stabilizer 100, etc.
}