# AR Acid Calculator



## IGutYa (Apr 24, 2010)

Not exactly sure where to post this, so.....

As much as i have learned from this place i figured it wouldnt hurt to give a little back. i wrote a simple program to calculate the amount of Hcl & Hno3 acids required (based on Hoke's method with a 1:4 ratio). the Direct Link is: ( http://igutya.net78.net/Files/ARCalc.zip (case sensitive)). currently it only displays mL/L values & can handle grams & troy ounces.

if you like it let me know, any suggestions greatly appreciated.


----------



## Platinum (Apr 25, 2010)

Somebody let me know how that file turns out before i open it.  
No offense but your name is I got you.


----------



## IGutYa (Apr 25, 2010)

actually its i GUT ya. its my battlefield 2 gaming profile =) u can view my stats at the main page http://igutya.net78.net. i totally understand. im VERY cautious about dlin random crap.


----------



## Platinum (Apr 25, 2010)

IGutYa said:


> actually its i GUT ya. its my battlefield 2 gaming profile =) u can view my stats at the main page http://igutya.net78.net. i totally understand. im VERY cautious about dlin random crap.



I don't know whether to be concerned now or just very afraid. :twisted: 
Just kidding you. Thanks for the file. Anybody check it yet ? :shock:


----------



## 4metals (Apr 25, 2010)

Nice little program, I have found using 5:1 AR dissolves 7.5 ounces of karat. 4:1 uses more nitric and you have to take steps to remove it before dropping the gold. Very nice program, perhaps the option to choose a ratio would put this in a refiners toolbox.


----------



## IGutYa (Apr 25, 2010)

4metals said:


> Nice little program, I have found using 5:1 AR dissolves 7.5 ounces of karat. 4:1 uses more nitric and you have to take steps to remove it before dropping the gold. Very nice program, perhaps the option to choose a ratio would put this in a refiners toolbox.




ok, shoulda done it right the first time haha. re-wrote it now with a 1:1 - 1:10 slider bar to calculate the Hcl. the same link http://igutya.net78.net/Files/ARCalc.zip is where the update is at.

NOW, if there is anything else it could use??? =)

Thanks for any input.


----------



## Platinum (Apr 25, 2010)

That's mighty cool of you Gutya, Thanks.


----------



## 4metals (Apr 25, 2010)

Very nice thanks for the original and the changes, I can picture this helping a lot of refiners. Now I'm not one to look a gift horse in the mouth but if there are any jewelers out there they work in pennyweights (dwt) that option may be helpful to some. A pennyweight is 1/20th of a troy ounce.

Very nice neat looking simple to use program. (although probably not simple to generate) 

Thanks again


----------



## lazersteve (Apr 25, 2010)

I thought I posted a reply to this thread earlier today that's strange?

Is there another copy of this thread on the forum?

Found it! 

Somehow I posted it to the wrong thread?  

Steve


----------



## lazersteve (Apr 25, 2010)

IGutYa,

Welcome to the forum.

Some folks use sodium nitrate or potassium nitrate as opposed to nitric acid for their AR. It would be of great benefit to add a column for the required amount of sodium nitrate in the mix as opposed to 70% nitric acid required. 

In case you are not chemically proficient :

1L of 70% HNO3 contains 15.9 Moles of HNO3

15.9 Moles of NaNO3 is 15.9 m x 85 g/m = 1351.5 g of solid sodium nitrate.

for those using potassium nitrate the theoretical equivalent weight of KNO3 required to make 1L of 70% HNO3 is:

15.9 m x 101.1 g/m = 1607.49 g of solid KNO3

One last important aspect of using the nitrate salts is the solubility of the salt in water:

NaNO3 = 921 g / L @25 C : 1810 g/ L @ 100C

KNO3 = 360 g / L at 25C : 2470 g /L @ 100C 

I made a spreadsheet with all this data in it a few years back, but had a hard drive crash and lost it. In mine I included a selection list for the metal to be dissolved, the source of the nitrate (HNO3 or KNO3, or NaNO3) , and the amount of HCl required based upon initial percentage of gold present. The output was the required volumes and/or masses of the reagents and the resulting theoretical yield of refined gold.

Steve


----------



## IGutYa (Apr 25, 2010)

4metals said:


> Very nice thanks for the original and the changes, I can picture this helping a lot of refiners. Now I'm not one to look a gift horse in the mouth but if there are any jewelers out there they work in pennyweights (dwt) that option may be helpful to some. A pennyweight is 1/20th of a troy ounce.
> 
> Very nice neat looking simple to use program. (although probably not simple to generate)
> 
> Thanks again




Thank you very much for the input, ill toss it in there this evening. i knew there was another weight i was missing.

the code is rather simple, i can post it if you would like. took a total of about 30 minutes to make from start to finish. thats including bug testing & the updates thus far.


----------



## IGutYa (Apr 25, 2010)

lazersteve said:


> IGutYa,
> In case you are not chemically proficient....




Yea that would be my biggest downfall, i come up short on chemistry knowledge. however, if you post (like you did) all the required math i can easily throw it together into the program & post an update.

as that was how i made the original...

again thanks everyone for your suggestions, as i myself am now starting into the gold recovery/refining adventure & I Hate doing math by hand. haha.

oh and does anyone have the math for how much sulfuric acid to kno3 it takes to make hno3?? (for distillation). just another one i myself would like to add in.


----------



## lazersteve (Apr 25, 2010)

I don't like making exe's for distribution, unless it's absolutely necessary. 

For this reason when I remake my calculator it will be all web based. 

Steve


----------



## IGutYa (Apr 25, 2010)

lazersteve said:


> I don't like making exe's for distribution, unless it's absolutely necessary.
> 
> For this reason when I remake my calculator it will be all web based.
> 
> Steve




i suck at html & spreadsheets. u want a copy of the source? its small enough to put in a post if you would like?


----------



## lazersteve (Apr 25, 2010)

That all right, I own a licensed copy of VS2K8, and your form design is very straight forward.

I'll write my new version in php or .NET. I've grown used to designing web apps now days. I guess I'm hooked on their portability and cross platform functionality.

Ultimately, I want a calculator that allows me to put in the type of starting metal(s) , it's mass, and the reagents being used, then output the required reagent volumes, required solvent volume, and masses for the reaction along with resulting products.

Thanks anyway,

Steve


----------



## IGutYa (May 4, 2010)

Ok, spent about 10 hours on it last night & made the update. Now it has the AR Calc, a molar HNO3 calc (from NaNO3 or KNO3 + H2SO4), added in live gold spot prices (for future costs calculation), a Karat calculator (of any weight), and started working on some Wastes calculations, which are not balanced & needs work.

the wastes tab is the only non-100% working section. for some reason i cant get the grams --> dwt --> grams conversion working. which is strange because it is no different than the troy ounces --> grams --> troy ounces math. ( myGrams * TroyGrams works, but not myGrams * dwt ) weird. So i was forced to leave Pennyweight out. Sorry.

but here it is. i too have plans on making it calculate everything, including every cost & every reaction. Until then, enjoy the basic version (and Src code) found on my web page ( http://igutya.net78.net/ ). Direct Link: http://igutya.net78.net/Files/Refiner%27s%20Toolbox.zip


----------



## aflacglobal (May 7, 2010)

Is it just me or is something wrong with the links?


----------



## kalay (May 8, 2010)

Yeh they all redirect,including the original link.


----------



## Noxx (May 9, 2010)

IGutYa, I can host it on the forums' server if you want...


----------



## IGutYa (May 9, 2010)

Noxx said:


> IGutYa, I can host it on the forums' server if you want...



seems my webserver didnt like me hosting an archive copy of teamspeak 2 on it. as you cannot get it from teamspeak.com anymore & 3 dont work on a 2 server.... blah.

id be glad to email a copy to you. i think im going to remove the waste tab for now as it is incorrect & have an update for the hno3 calc & have fixed the dwt problem.

ive been rather busy on the formal copy of it, which currently obtains spot prices from kitco.com/market (done), calculates all costs including profit (based on live spot prices) and chemicals. (partially done), wastes & byproducts including disposal methods (waiting for flinn), plus everything in the copy im giving away.

im using "Flinn: Chemical & Biological Catalog Reference Manual 2001" for all the wastes & disposal. im also digesting "Illustrated Guide to Home Chemistry Experiments: All Lab, No Lecture", as i have no formal training, yet, and would like things to be "correct" =) im considering throwing in the ability to do custom equations as i have a nice db of the periodic table with density, melt & boil, etc. that i would love to incorporate. just depends on how much extra work it turns out to being. as a minimum an equation balance r would be in order.

i still have a lot of work cut out for me on that one. but that is what i do.

Sorry for the issues with my webserver. PM me your email and ill get it to ya.

Thanks,

~Zack


----------



## butcher (May 9, 2010)

wow sounds like alot of work to make that tool work :shock:


----------



## IGutYa (May 9, 2010)

butcher said:


> wow sounds like alot of work to make that tool work :shock:



:shock: :evil: :lol: :evil:  :twisted: :mrgreen: is normal.

just to do the small one ive spent over 15 hours on it. quite frankly, 70% of the work has been done for the formal one already. i will be making it no matter what, as i hate doing math on paper. i estimate about 100 hr give or take to make it work bug free, so i should have it done by the end of the month. or at least in beta-testing. just waiting on the 2 books now. should have them next few days + about 3 days study time = plenty of time to get it done. 

its really not that bad, using VB6, being that its math oriented makes it very simple. the hardest part is the ADO programming, which ive never used before & is were i am at now.

ADHD + ability to focus = A beautiful thing. :wink:


----------



## aflacglobal (May 9, 2010)

I must say i don't know what in the hell he is talking about, but i like having this guy around.


----------



## butcher (May 9, 2010)

the computer stuff excapes me also, but I can understand some of what he is trying to get done, and I know how hard it can be working the bugs out of something your building.


----------



## IGutYa (May 10, 2010)

butcher said:


> the computer stuff excapes me also, but I can understand some of what he is trying to get done, and I know how hard it can be working the bugs out of something your building.




you aint kiddin. my biggest bug right now is converting dwt to grams and i know it is simple. 1g = 0.643014931 dwt, 1dwt = 1.55517384 grams & 20 dwt = 1 troy oz. but for some reason im just not getting it right. i think im just going to re-write that entire codeblock. grams & troy oz works great, and when i throw in the dwt, only it is wrong.

i should have it to Noxx sometime tomorrow in the afternoon.


----------



## Harold_V (May 10, 2010)

IGutYa said:


> butcher said:
> 
> 
> > the computer stuff excapes me also, but I can understand some of what he is trying to get done, and I know how hard it can be working the bugs out of something your building.
> ...



24 grains = 1 dwt
15.432 grains = 1 g
troy ounce = 480 grains
troy pound = 12 troy ounces
troy pound consists of 5,760 grains
avordupois pound = 7,000 grains
avoirdupois ounce = 437.5 grains
31.10348 grams = 1 troy ounce

I refined for many years. I would have been lost without the use of grains. I had no interest, then, in grams, just as I have no interest, now, in grams. Historically, precious metals have been weighed in troy ounces. 

Harold


----------



## lazersteve (May 10, 2010)

I've been using ADO professionally for going on 10 years what do you need help with? My day job is a programmer for the local government.

Steve


----------



## IGutYa (May 10, 2010)

lazersteve said:


> I've been using ADO professionally for going on 10 years what do you need help with? My day job is a programmer for the local government.
> 
> Steve



well to say the least, ive never used it before.

keeping everything inside the program is making the code bulky & hard to work with. ive used collections in the past, but they too can be a pain. plus all the info that will be created by the program that i would like to be able to store in an orderly manner.

every example of how to use it is different. i should probably watch a few utube vids on ADO too. just dont understand it and i'm trying to avoid using dependency files too.


----------



## IGutYa (May 10, 2010)

Harold_V said:


> I refined for many years. I would have been lost without the use of grains. I had no interest, then, in grams, just as I have no interest, now, in grams. Historically, precious metals have been weighed in troy ounces.
> 
> Harold




Thanks for the info, i would have never knew. i wet with grams as i was familiar with them, but kinda jacked things up. half the math is in gram, half in troy oz. i really think that is where my problem is stemming from. ill convert over to the gran standard & that should fix things up.


----------



## lazersteve (May 10, 2010)

IGutYa said:


> keeping everything inside the program is making the code bulky & hard to work with. ive used collections in the past, but they too can be a pain. plus all the info that will be created by the program that i would like to be able to store in an orderly manner.
> 
> every example of how to use it is different. i should probably watch a few utube vids on ADO too. just dont understand it and i'm trying to avoid using dependency files too.



The key components you will need are a back end database and a few parametrized stored procedures, on the front end you'll need a connection string stored and a few record sets bound to your form controls for selecting the various values.

Steve


----------



## IGutYa (May 10, 2010)

lazersteve said:


> IGutYa said:
> 
> 
> > keeping everything inside the program is making the code bulky & hard to work with. ive used collections in the past, but they too can be a pain. plus all the info that will be created by the program that i would like to be able to store in an orderly manner.
> ...




really i think i just need some good database programing skills. after looking into it ado is more of a network type database, i just need a local db. something to store program info & calculations in an orderly fashion.


----------



## lazersteve (May 10, 2010)

IGutYa said:


> really i think i just need some good database programing skills. after looking into it ado is more of a network type database, i just need a local db. something to store program info & calculations in an orderly fashion.



Then you'll need to dynamically create the tables and fill them using arrays of your data variables. The only other way to do this and keep everything contained in the exe is to setup a local (ie SQL express) database as part of the setup process of the software. Then the software in the exe connects to the local express instance and pulls the data/calculations you want. With this method updates will become a real problem as well as platform specific issues and local machine hardware variations.

Now you are beginning to understand why one centralized web page with a back end web tied database is much more versatile and geared towards distribution to the various platforms out there (MAC, handhelds, Unix flavors, Microsoft, etc.). This way you can do all of your future maintenance on the software or database and your users are none the wiser. They don't even have to keep installing your new versions, they just return to the same site and they will get the updates upon returning. The flexibility of web based apps is the cats meow for this type of project. This also provides you a centralized database for all of the data to drive the app.

Part of my programming job entails administering and maintaining 2 separate 2005 SQL Enterprise clusters serving data to thousands of users and nearly a hundred different apps via both local and web platforms.

Does your hosting service provide IIS services and a SQL db?

If you need detailed help then we should talk via email:

[email protected]

Steve


----------



## IGutYa (May 11, 2010)

Deleted duplicate post, please read post below.


----------



## lazersteve (May 11, 2010)

Zack,

This is a double post, I've been deleting the second one to keep the forum from becoming any more jumbled. If you want put a link to the first post of the same material here to redirect the users to the proper thread.

Thanks,

Steve


----------



## IGutYa (May 11, 2010)

lazersteve said:


> Zack,
> 
> This is a double post, I've been deleting the second one to keep the forum from becoming any more jumbled. If you want put a link to the first post of the same material here to redirect the users to the proper thread.
> 
> ...




oh crap haha. sorry. i thought it didnt post for a moment. well here is the link to the other post in Data: http://goldrefiningforum.com/phpBB3/viewtopic.php?f=33&t=7012


----------



## Anonymous (Jun 3, 2010)

NO SPAM!


----------



## goldenchild (Jun 3, 2010)

Is this figured out yet? Like Steve I too am a software engineer for the US government. Is there another language you could use to make this app? I could help you if you were to use ColdFusion .NET or javascript. Mind sending me the block that is doing your calculations? You got me wanting to create a little app now :lol:


----------



## IGutYa (Jun 9, 2010)

goldenchild said:


> Is this figured out yet? Like Steve I too am a software engineer for the US government. Is there another language you could use to make this app? I could help you if you were to use ColdFusion .NET or javascript. Mind sending me the block that is doing your calculations? You got me wanting to create a little app now :lol:




here is a link to the SRC code: http://www.mediafire.com/?nvojzcnhwgj

Enjoy!


----------



## goldenchild (Jun 9, 2010)

> here is a link to the SRC code: http://www.mediafire.com/?nvojzcnhwgj
> 
> Enjoy!


didnt let me download anything. said cookies needed to be enabled but i'm not blocking cookies


----------

