Enzymes for fiddling: Temperature?

Trying to fiddle with a temperature slider.

-Created a temperature slide, in Celsius, from 0-100.
-Under starch, modified "while run for 30" block so that instead of "forward 1," it's "forward [temp slider/10]." Did the same for glucose and enzymes, so things move faster when temp is higher.
-I set starch to 200 and ran the simulation at temp = 0 without enzymes. Noticed breakdown spontaneously. Why? There's a random breakdown chance in the "procedure: randomly break down." That rate should depend on temp also. So... modified that procedure so that the chance correlates with temperature. Instead of randomly generating a number between 0 and 9999 and, if it's less than 2, breaking down, I modified the "if it's less than" so that that check-vs. value is related to temp.

Okay... so you can control the temperature (=speed of particles). There is still a random breakdown chance, and it's temp dependent.
I haven't yet included denaturation of the enzyme.

My current solution is based on the slider that I created. In the enzyme tab, I noticed that there is a "time until usable again" variable. I modified that block so that if the temperature slider is higher than 37 degrees, there is a particular chance that the "time until usable again" variable is "reset" to a higher value. That means that the enzyme will function less at a higher temperature value because it spends more of its time unusable.

Next question: how can I make that function work for different slider names? Currently, my "denaturing" function is based on the name of the temperature slider, so if students name theirs something different, my denaturing function won't work.

Engine speed5
Loading...
0%

Loading...