1. A Little House Cleaning
- Posted by Senator Aug 31, 2018
- 1468 views
-- -- DiluteSolutions.e -- include std/console.e function DiluteSolution( atom C1=5.7, atom V2 = 16, atom C2 = 0.057, atom V1 = 0) --default is PureBright Beach diluted to the Sodium HypoChlorite content of Anasept "Wound Wash" if V1=0 then -- returns % volume of stock solution required to make V2 C2 return (C2 * V2)/C1 elsif C1=0 then return (C2 * V2)/V1 elsif V2=0 then return (C1*V1)/C2 elsif C2=0 then return (C1*V1)/V2 end if end function constant -- %Sodium Hypoclorite -------------------------------------------------------------------------- C = 8.25, -- Clorox P = 5.7, -- PureBright potency A = 0.057, -- Anasept spray (germicide wound cleaner) C2 = 6.5, -- Clorox Healthcare Bleach Germicidal Cleaner ---------------------------------------------------------------------------------------------------------- -- price/oz Pppu = 19.05/(128*6), -- raw price per unit for PureBright Cppu = 10.40/64, -- raw price per unit for Clorox Appu = 15.95/15, -- raw price per unit for Anasept C2ppu = 29.99/128, -- raw price per unit for Clorox Healthcare... ---------------------------------------------------------------------------------------------------------- PrpC = DiluteSolution(5.7, 1, 8.25, 0), -- 1.447368421 PrpA = DiluteSolution(5.7, 1, 0.057, 0), -- 0.01 PrpC2= DiluteSolution(5.7, 1, 6.5, 0), -- 1.140350877 PapC = PrpC*Pppu, -- PureBright adjusted price compared to Clorox PapC2 = PrpC2*Pppu, -- PureBright adjusted price compared to Clorox Healthcare .. PpC = P/C, -- PureBright Potency compared to Clorox PpC1 = P/C2, floz_tsp = 6 -- convert US fluid oz to US tsp atom a = DiluteSolution(), b=a*floz_tsp sequence c = sprintf("$%1.3f", a*Pppu) function PricePerUnit( sequence ProductLabel, atom price, integer units, sequence UnitLabel, atom p) sequence ppu = sprintf("%s %d %s @ $%2.2f = $%2.2f per %s: Sodium Hypochlorite = %0.3f", {ProductLabel, units, UnitLabel, price, price/units, UnitLabel, p}) return ppu&'%' end function display("\n\n[1] [2] [3] [4] [5] [6]",{PricePerUnit("PureBright Bleach ", 19.05, 128*6, "oz", P)}) -- $0.02/oz display("[1] [2] [3] [4] [5] [6]",{PricePerUnit("Clorox Bleach ", 10.40, 64, "oz", C)}) -- $0.16/oz display("[1] [2] [3] [4] [5] [6]",{PricePerUnit("Clorox Health Care", 29.99, 128, "oz", C2)}) -- $0.23/oz display("[1] [2] [3] [4] [5] [6]",{PricePerUnit("Anasept ", 15.95, 15, "oz", A)}) -- $1.06/oz printf(1, "\nPureBright has %g times the Sodium Hypoclorite content of Anasept\n", P/A) display("[1] fluid oz ([2] tsp) of PureBright makes a 16 fluid oz solution", {a,b}) display("with Sodium Hypochlorite content comparable to that of Anasept", {}) display("Antimicrobial Skin & Wound Cleaner which costs ~$16", {}) display("the cost of [1] tsp of PureBright = [2]", {b,c}) sequence tmp = sprintf("\nPureBright = %d%s of the Sodium Hypochlorite content of Clorox",{PpC*100, '%'}) display("[1][2]", {tmp}) tmp = sprintf("$%2.2f", {PapC}) display("PureBright adjusted price = [1] per oz (compared to Clorox)", {tmp}) tmp = sprintf("%d", {Cppu/PapC}) display("\nClorox cost [1] times as much as PureBright. But you must use", {tmp}) tmp = sprintf("%.2g%s more PureBright to match Sodium Hypochlorite Content of Clorox", {PrpC-1,'%'}) --{(1-(P/C))*100,'%'}) display("[1]\n\n", {tmp})
PureBright Bleach 768 oz @ $19.05 = $0.02 per oz: Sodium Hypochlorite = 5.700% Clorox Bleach 64 oz @ $10.40 = $0.16 per oz: Sodium Hypochlorite = 8.250% Clorox Health Care 128 oz @ $29.99 = $0.23 per oz: Sodium Hypochlorite = 6.500% Anasept 15 oz @ $15.95 = $1.06 per oz: Sodium Hypochlorite = 0.057% PureBright has 100 times the Sodium Hypoclorite content of Anasept 0.16 fluid oz (0.96 tsp) of PureBright makes a 16 fluid oz solution with Sodium Hypochlorite content comparable to that of Anasept Antimicrobial Skin & Wound Cleaner which costs ~$16 the cost of 0.96 tsp of PureBright = $0.004 PureBright = 69% of the Sodium Hypochlorite content of Clorox PureBright adjusted price = $0.04 per oz (compared to Clorox) Clorox cost 4 times as much as PureBright. But you must use 0.45% more PureBright to match Sodium Hypochlorite Content of Clorox
2. Re: A Little House Cleaning
- Posted by _tom (admin) Sep 06, 2018
- 1304 views
Nice little program.
After one year you get about a 20% loss in concentration by natural decomposition. So you need a fudge factor.
Concentration loss increases with dilution and with higher temperatures. The "ready to use" product probably has the worse shelf life.
_tom
3. Re: A Little House Cleaning
- Posted by Senator Sep 19, 2018
- 1254 views
- Last edited Sep 21, 2018
_tom said...
Nice little program.
After one year you get about a 20% loss in concentration by natural decomposition. So you need a fudge factor.
Concentration loss increases with dilution and with higher temperatures. The "ready to use" product probably has the worse shelf life.
_tom
----------------- -- edited 2018,9,1 ------------------ include std/datetime.e global function DaysBetweenDates(datetime dt1, datetime dt2) return floor(diff(dt1,dt2)/86400) -- 86400 = seconds in a day end function function adjust_C1(atom C1=6.00, datetime purchase_date={2018,9,1,0,0,0}, integer ffdays=0) -- adjust C1% due to 20% annual degradation -- ffdays = fudge factor days, perhaps an estimation of days on shelf prior to purchase atom degrade = 20/365.25, n=DaysBetweenDates(purchase_date, now()) + ffdays degrade *= n C1 = (100-degrade)/100*C1 return round(C1,100) end function -- ? adjust_C1() = 5.93
PureBright Bleach 768 oz @ $19.05 = $0.02 per oz: Sodium Hypochlorite = 6.000% Clorox Bleach 64 oz @ $10.40 = $0.16 per oz: Sodium Hypochlorite = 8.250% Cleaner Bleach 32 oz @ $1.80 = $0.06 per oz: Sodium Hypochlorite = 2.000% Anasept 15 oz @ $21.00 = $1.40 per oz: Sodium Hypochlorite = 0.057% PureBright Potency has degraded from 6.00% to 5.93% since {2018,9,1,0,0,0}. 10.79 oz ($0.27) of PureBright Bleach makes 32 oz of a solution = Cleaner Bleach($1.80) PureBright has 71% of the Sodium Hypochlorite content of Clorox. Therefore; 39% more PureBright is required to match the Sodium Hypochlorite Content of Clorox, hence the relative cost of PureBright compared to Clorox = $0.035/oz. Even so, ***Clorox cost = 4.71 times** the adjusted cost/oz of PureBright. PureBright has 104 times the Sodium Hypochlorite content of Anasept. 0.14 fluid oz (1.0 tsp) of PureBright costs only $0.004, yet makes a 15 fluid oz solution with Sodium Hypochlorite content comparable to that of Anasept Antimicrobial Skin & Wound Cleaner which costs ~$21.00. One Gallon of PureBright can make the equivalent of 888 15 oz bottles of Anasept, which would cost $18,643.08
Forked into: Dilute Solution yet again