Browse Source

Main Menu Screen Added for Read-me

formula
Scott Mobley 11 years ago
parent
commit
59532c039f
  1. 44
      Audio/Audio Sources.txt
  2. BIN
      Main-Screen-MockupV11-24.png
  3. BIN
      Price List.xlsx
  4. 67
      js/CookingFormula.js

44
Audio/Audio Sources.txt

@ -2,9 +2,8 @@ Unless Otherwise noted, all sounds and music are in the public Domain.
--------------------------- ---------------------------
<Turkey in the Straw> Main Menu Music
turkey_in_the_straw.mp3
turkey_in_the_straw
Composition Licence: Traditional, arr. first published between 1829 and 1834. This MP3 (or other media file) is in the public domain because its copyright has expired. This applies to the United States, where Works published prior to 1978 were copyright protected for a maximum of 75 years. See Circular 1 "COPYRIGHT BASICS" from the U.S. Copyright Office. Works published before 1924 are now in the public domain. Composition Licence: Traditional, arr. first published between 1829 and 1834. This MP3 (or other media file) is in the public domain because its copyright has expired. This applies to the United States, where Works published prior to 1978 were copyright protected for a maximum of 75 years. See Circular 1 "COPYRIGHT BASICS" from the U.S. Copyright Office. Works published before 1924 are now in the public domain.
@ -17,14 +16,45 @@ Information presented on the United States Air Force Band site is considered pub
UPLOADED by Sookietex UPLOADED by Sookietex
--------------------------- ---------------------------
<Clicks>
Freesound.org freesound.org
file name references the author name and file number. Listed as file number, author, and title
32371__walter-odington__frying-pan-chicken-and-onion
36328__unclesigmund__coinbank - Crank Sound
63531__florian-reinke__click1
63532__florian-reinke__click2
72565__wrinex__supermarkt-ms
73261__jakobhandersen__click
87564__sgak__fire
142895__ceremonialchapstick__winchester-30-30-lever-action-eject-1
155441__wakey__buzz1
175678__saundklyp__tongue-click
184438__capslok__cash-register-fake
--------------------------- ---------------------------
Store Background Music:
Title: Waterford
Artist: Kevin MacLeod
Genre: World
Length: 1:54
Bitrate: 286 kbps
Size: 3.88MB
Simple folk-inspired ditty. Source: Kevin MacLeod
---------------------------
Unused Music (Don't Cite this...yet)
-----------------------------------------------------------------------------------------------------------
Title: Improved Ice Cream Truck Title: Improved Ice Cream Truck
Artist: Kevin MacLeod Artist: Kevin MacLeod
Genre: Folk Genre: Folk
@ -33,3 +63,5 @@ Bitrate: 320 kbps
Size: 1.93MB Size: 1.93MB
An improved version of a traditional Ice Cream Truck melody… whose actual title I forget. An improved version of a traditional Ice Cream Truck melody… whose actual title I forget.
---------------------------

BIN
Main-Screen-MockupV11-24.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 617 KiB

BIN
Price List.xlsx

Binary file not shown.

67
js/CookingFormula.js

@ -8,8 +8,8 @@
//Global Variables for Turkey //Global Variables for Turkey
density = 1050; // kg/m3 Assuming Density of Water 1000 kg/m3 density = 1050; // kg/m3 Assuming Density of Water 1000 kg/m3
cp = 4300 // 2810 J/kg K for Turkey cp = 2000 // 2810 J/kg K for Turkey. Extra is to semi-account for water evaporation energy
heatConvection = 5; // W/m2 K Some Reasonable estimate for natural Convection. Change as needed. 5-25 heatConvection = 9; // W/m2 K Some Reasonable estimate for natural Convection. Change as needed. 5-25
thermalConduct = 0.412 // W/m K // Chicken thermalConduct = 0.412 // W/m K // Chicken
globalTime = 0; globalTime = 0;
@ -38,7 +38,7 @@ depth = 1/(ratioLvG /length);
height = 1/(ratioLvH /length); height = 1/(ratioLvH /length);
simpleRadius = length/2; //Doesn't take into account equal Volume simpleRadius = length/2; //Doesn't take into account equal Volume
rectangleVolume = depth*height*length*(1/4); //m^3 Multiple by 1/3 to account for triangular shape and empty Space rectangleVolume = depth*height*length; //m^3 Multiple by 1/3 to account for triangular shape and empty Space
complexRadius = Math.pow(rectangleVolume/((4/3)*Math.PI), 1/3); //Volume of 3D Box = 3D Sphere complexRadius = Math.pow(rectangleVolume/((4/3)*Math.PI), 1/3); //Volume of 3D Box = 3D Sphere
console.log("Simple Radius " + simpleRadius + " Meters") console.log("Simple Radius " + simpleRadius + " Meters")
@ -65,13 +65,6 @@ var storage = [];
return(storage) return(storage)
} }
function linspace(min, max, length) {
var arr = new Array(length);
var step = ( max - min ) / ( length - 1 );
for (var i = 0; i < length; ++i )
arr[i] = min + ( i * step )
return arr
}
function bisectionMethod(min,max,Biot) { function bisectionMethod(min,max,Biot) {
errorTolerance = (1/Math.pow(10,8)) errorTolerance = (1/Math.pow(10,8))
@ -130,30 +123,22 @@ var errorTolerance = 10; //Stove is accurate to 25 degree Celcius Should hopeful
} }
} }
function layerModel(name,RadiusPercent) { function layerModel(name,radiusPercentage) {
this.name = name; this.name = name;
this.radiusPercent=RadiusPercent; this.radiusPercent=radiusPercentage;
this.initialTemp = 20; this.initialTemp = 20;
this.waterLost = 0; this.waterLost = 0;
this.finalTemperature = 20; this.finalTemperature = 20;
this.volume = null;
} }
function turkeyModel(weight) { function turkeyModel(weight) {
var waterMultiplier = 0
this.totalRadius = calculateRadius(weight) this.totalRadius = calculateRadius(weight)
this.skin = new layerModel("Skin",0.85) this.skin = new layerModel("Skin",0.85)
this.body = new layerModel("Body",0.45) this.body = new layerModel("Body",0.45)
this.core = new layerModel("Core",0.01) this.core = new layerModel("Core",0.01)
this.skin.volume = sphereVolume(this.totalRadius) - sphereVolume(this.skin.radiusPercent*this.totalRadius);
this.body.volume = sphereVolume(this.skin.radiusPercent*this.totalRadius) - sphereVolume(this.body.radiusPercent*this.totalRadius); this.cookCondition = function(cookValue) {
this.core.volume = sphereVolume(this.body.radiusPercent*this.totalRadius) - 0;
this.skin.waterLost = this.skin.volume*waterMultiplier
this.body.waterLost = this.body.volume*waterMultiplier
this.core.waterLost = this.core.volume*waterMultiplier
this.cookCondition = function(cookValue,volume) {
var multiplier = 1; var multiplier = 1;
if (cookValue>=multiplier*250000) { if (cookValue>=multiplier*250000) {
return("House Fire") return("House Fire")
@ -183,31 +168,18 @@ this.core.waterLost = this.core.volume*waterMultiplier
this.updateLayerTemps = function() { this.updateLayerTemps = function() {
//Temperature Calculations //Temperature Calculations
this.skin.finalTemperature = transientSphereSeries (this.skin.radiusPercent*this.totalRadius,this.totalRadius,this.skin.initialTemp,ovenObject.steadyTemp,globalTime) this.skin.finalTemperature = transientSphereSeries (this.skin.radiusPercent*this.totalRadius,this.totalRadius,this.skin.initialTemp,ovenObject.steadyTemp,globalTime)
this.body.finalTemperature = transientSphereSeries (this.body.radiusPercent*this.totalRadius,this.totalRadius,this.body.initialTemp,ovenObject.steadyTemp,globalTime) this.body.finalTemperature = transientSphereSeries (this.body.radiusPercent*this.totalRadius,this.totalRadius,this.body.initialTemp,ovenObject.steadyTemp,globalTime)
this.core.finalTemperature = transientSphereSeries (this.core.radiusPercent*this.totalRadius,this.totalRadius,this.core.initialTemp,ovenObject.steadyTemp,globalTime) this.core.finalTemperature = transientSphereSeries (this.core.radiusPercent*this.totalRadius,this.totalRadius,this.core.initialTemp,ovenObject.steadyTemp,globalTime)
//Water Loss Calculations //Water Loss Calculations
//Skin
this.skin.waterLost = this.skin.waterLost + waterLoss(this.skin.finalTemperature) this.skin.waterLost = this.skin.waterLost + waterLoss(this.skin.finalTemperature)
//Distribute Water
//this.body.waterLost = this.body.waterLost - surfaceExchange(this.body.radiusPercent*this.totalRadius,this.totalRadius)*(tempLoss);
//Body
this.body.waterLost = this.body.waterLost + waterLoss(this.body.finalTemperature) this.body.waterLost = this.body.waterLost + waterLoss(this.body.finalTemperature)
//Distribute Water
//this.skin.waterLost = this.skin.waterLost - surfaceExchange(this.skin.radiusPercent*this.totalRadius,this.body.radiusPercent*this.totalRadius)*(tempLoss);
//this.core.waterLost = this.core.waterLost - surfaceExchange(this.body.radiusPercent*this.totalRadius,this.skin.radiusPercent*this.totalRadius)*(tempLoss);
//Core
this.core.waterLost = this.core.waterLost + waterLoss(this.core.finalTemperature) this.core.waterLost = this.core.waterLost + waterLoss(this.core.finalTemperature)
//Distribute Water
//this.body.waterLost = this.body.waterLost - (tempLoss);
console.log("Skin: "+ this.skin.waterLost + " " + turkey.cookCondition(this.skin.waterLost,this.skin.volume)); console.log("Skin: "+ this.skin.waterLost + " " + turkey.cookCondition(this.skin.waterLost));
console.log("Body: "+ this.body.waterLost + " " + turkey.cookCondition(this.body.waterLost,this.body.volume)); console.log("Body: "+ this.body.waterLost + " " + turkey.cookCondition(this.body.waterLost));
console.log("Core: "+ this.core.waterLost + " " + turkey.cookCondition(this.core.waterLost,this.core.volume)); console.log("Core: "+ this.core.waterLost + " " + turkey.cookCondition(this.core.waterLost));
} }
} }
@ -219,13 +191,8 @@ function sphereSurfaceArea(radius) {
return (4*Math.PI*Math.pow(radius,2)) return (4*Math.PI*Math.pow(radius,2))
} }
function surfaceExchange(outerRadius,innerRadius) {
var denominator = (sphereSurfaceArea(innerRadius) + sphereSurfaceArea(outerRadius) )
return(sphereSurfaceArea(outerRadius)/denominator )
}
function waterLoss(temperature) { function waterLoss(temperature) {
loss = (1) * Math.pow(10,(temperature-20)/80)-1 return (Math.pow(10,(temperature-20)/80)-1)
return (loss)
} }
var oldBiot=null; var oldBiot=null;
@ -235,10 +202,10 @@ var max = 10000; // This are for setting Lambda boundries and nothing else
//thermalConduct = ((tempInitial-20)*(0.13/60)) + 0.32; //thermalConduct = ((tempInitial-20)*(0.13/60)) + 0.32;
var sum=0; var sum=0;
var alpha = thermalConduct/(density*cp) var alpha = thermalConduct/(density*cp)
console.log("Alpha is " + alpha) //console.log("Alpha is " + alpha)
var Fourier = (alpha*t)/Math.pow(rTotal,2) var Fourier = (alpha*t)/Math.pow(rTotal,2)
console.log("Fourier is " + Fourier) //console.log("Fourier is " + Fourier)
var biotNum = heatConvection * rTotal/thermalConduct var biotNum = heatConvection * rTotal/thermalConduct
@ -248,7 +215,7 @@ var biotNum = heatConvection * rTotal/thermalConduct
oldBiot = biotNum; oldBiot = biotNum;
} }
console.log("The Biot Value is " + biotNum) //console.log("The Biot Value is " + biotNum)
for (var i = 0; i<lambdaTerms.length; i++) { for (var i = 0; i<lambdaTerms.length; i++) {
lambdaN = lambdaTerms[i] lambdaN = lambdaTerms[i]
@ -267,10 +234,10 @@ return(tempAtTimeAndRadius)
//Running the Program Stuff //Running the Program Stuff
ovenObject = new oven (); ovenObject = new oven ();
turkey = new turkeyModel(poundsToKilograms(7.26)); turkey = new turkeyModel(7.257);
setInterval(function(){time()},1000);
setInterval(function(){time()},10);
//setTimeout(function(){alert(ovenObject.steadyTemp)},360000)
totalCookTime = 0; totalCookTime = 0;
scale = 1 scale = 1
function time() { function time() {

Loading…
Cancel
Save