PDA

View Full Version : Suggestion - Calculator pages...



ShelGame
02-12-2008, 11:46 AM
I don't know how hard it would be to set up here on TM.com, but it would be nice to have calculator pages right here. I know Frank has the nice turbo calc over at Squirrelpf.com, but why not have it here, too?

I have a couple that I'd like to re-create in web-format like that, too. What did you use to build that, anyway, Frank?

Frank
02-12-2008, 12:12 PM
I used a combination of PHP and Javascript. This may be a nice thing to add, however I will just link to the one I have on SQPF. I will probably move my gearing calc to hear and remove it from SQPF. We could talk more about it next week.

ShelGame
02-12-2008, 12:25 PM
I asked because I just updated my overall engine calculator (in Excel, displacement, avg piston speed, CR, rod ratio, etc. ) and was thinking it would be nice to build it for the web and publish it here (just like turbo calc on squirrelpf). I've seen a lot of people ask about some of the calcs and how to do them.

I could probably build the page, if I had an example to go by - hint hint...

Maybe add a section to the KC for the calculators?

Frank
02-12-2008, 12:35 PM
Alrighty. We can hit it next week or about them. We are going to be moving servers probably at the end of the week, so I have a lot on my plate.

ShelGame
02-12-2008, 12:48 PM
Gotcha...

Frank
02-16-2008, 05:41 PM
Ok, shoot me formulas and such when you get time. The gearing calculator will be moving here shortly!

ShelGame
02-16-2008, 07:11 PM
I'll zip up my Excel sheet later tonight and attach it here...

BadAssPerformance
02-16-2008, 07:29 PM
Sweet, TM calculators :thumb:

cordes
02-16-2008, 11:20 PM
I am glad to hear that we will be getting some more calculators over here. The turbo calculator really is the best one out there. Also, if I could put in a request, I would like to see the graph in the new gearing calc like the old excel one had. I really liked to be able to see where I would be at given RPMS for certain gears.

ShelGame
02-17-2008, 08:37 AM
OK, Frank, here's my Excel file for calculating displacement, CR, Bore/Stroke, rod ratio, avg piston speed, etc.

ShelGame
02-17-2008, 09:20 PM
Any interest in converting my fuel calculator? The calcs are now integrated into CHeM2, but might be of use to someone for D-Cal...

Frank
02-17-2008, 10:41 PM
Yep. I will mess with them over the next week.

ShelGame
05-16-2008, 09:58 AM
What ever happened with this Frank? Anything I could help with?

Frank
05-16-2008, 10:05 AM
I will have time while I am on travel over the next two weeks to work on it. I stalled on it because I was pissed with how I cobble the current pages together. I need to start over.

ShelGame
05-16-2008, 10:12 AM
I totally understand the code frustration thing....

Let me know if there's anything I can do to help.

Frank
05-16-2008, 10:25 AM
Actually there is. :)

I need to basically write all the formulas as equations in java and then setup form fields as inputs and outputs. So basically going from excel to that is a pain.

Could you in notepad, writeout all the equations using descriptive variable names in a high level fashion? That way I can easily convert them to javascript and see the associations? It will allow me to cut the programming down to a fraction of the time.

Thanks!

BadAssPerformance
05-16-2008, 10:41 AM
More calcs... simple tire size calc... there was another one that did width too?

old
http://www.miata.net/garage/tirecalcold.html

new
http://www.miata.net/garage/tirecalc.html

ShelGame
05-16-2008, 11:18 AM
How's this?


Displacement[cc] = ((Bore[mm]/2)^2 * Pi * Stroke[mm] * NoCyls)) / 10^3
DeckCL[mm] = (DeckHt[mm] - (Stroke[mm]/2 + RodLength[mm])) - PistonComprHt[mm]
RodRatio = RodLength[mm] / Stroke [mm]
MeanPistSpd[ft/sec] = (MaxRpm/25.4 * Stroke[mm]) / 360
BoreStrokeRatio = Bore[mm] / Stroke[mm]
ComprRatio = (((Bore[mm]/2)^2 * Pi * Stroke[mm]) + PistonDish[cc] * 10^3 + ((Bore[mm]/2)^2 * Pi * DeckCL[mm]) + ((HeadGasketRingDia[mm]/2)^2 * Pi * HeadGasketThk[mm])+((Bore[mm]-PistonToWall[mm]) * Pi * PistonToWall[mm] * TopRingToCrown[mm]) + CombChambVol[cc] * 10^3) / (PistonDish[cc] *10^3 + ((Bore[mm]/2)^2 * Pi * DeckCL[mm]) + ((HeadGasketRingDia[mm]/2)^2 * Pi * HeadGasketThk[mm]) + ((Bore[mm] - PistonToWall[mm]) * Pi * PistonToWall[mm] * TopRingToCrown[mm]) + CombChambVol[cc] * 10^3)


The parenthesis are used mathematically as you would expect, I use the [brackets] to only show the units I used. Obviously, if you use inches instead, some of the constants would need to change. I did all the calcs in metric, and then converted the result to inches when necessary.

In the CR calculation, I reference the DeckCL calculated value. I'm not sure if you can do that in JS or not.

Frank
05-16-2008, 12:31 PM
That is exactly what I was looking for! I can reference other values. Thanks!