extensions [table palette] ; grains are grouped atoms consisting of ; either ferrite or pearlite atoms breed [grains grain] ; atoms consist of either ferrite (iron) ; or pearlite (iron-carbide) breed [atoms atom] grains-own [ ; ferrite or pearlite grain composition ; a list of all the temperatures of atoms ; being part of this grain atom-temperatures ] atoms-own [ ; ferrite, pearlite, austenite or ; martensite atom composition ; this atoms temperature temperature ; number of sides on which this atom has ; no neighbors. Used for heat distribution. free-sides ; agent set of neighboring atoms according ; to hex grid neighboring-atoms ; boolean to flag atoms placed at the ; grain boundaries boundary? ] globals [ ; the overall mean temperature of all grains mean-grain-temperature ; minimum normalizing temperature depends ; on carbon content of the steel min-normalizing-temperature ; the temperature threshhold in which the ; standard normalization takes places max-normalizing-temperature ; map containing the relationship between ; carbon content of the steel to the ; minimum normalizing temperature carbon-temperature-table ; the maximum temperature that can be ; applied to grains maximum-total-temperature ; the minimum possible temperature ; we don't simulate freezing procedures etc. room-temp ; the temperature limit atoms are trying ; to bond with grains minimum-bond-temperature ; overall number of grains number-of-grains ; the overall average grain size ; results in length of atom-temperatures average-grain-size ; the yield strength resulting from ; the grain structure using the ; Hall-Patch Relation yield-strength ; depending on carbon content and temperature ; before the quench this value indicates the ; steels hardness (additionally its brittleness) hardness ] ;------------------------------------------------------------------------------------------------------ to setup-carbon-temperature-table set carbon-temperature-table table:make table:put carbon-temperature-table 0.1 900 table:put carbon-temperature-table 0.2 850 table:put carbon-temperature-table 0.3 810 table:put carbon-temperature-table 0.4 790 table:put carbon-temperature-table 0.5 770 table:put carbon-temperature-table 0.6 750 table:put carbon-temperature-table 0.7 730 table:put carbon-temperature-table 0.8 720 table:put carbon-temperature-table 0.9 750 table:put carbon-temperature-table 1.0 800 table:put carbon-temperature-table 1.1 840 table:put carbon-temperature-table 1.2 870 table:put carbon-temperature-table 1.3 900 table:put carbon-temperature-table 1.4 930 table:put carbon-temperature-table 1.5 950 table:put carbon-temperature-table 1.6 970 end ;------------------------------------------------------------------------------------------------------ ;------------------------------------------------------------------------------------------------------ to setup clear-all ; initialize the table to calculate the min normalizing ; temp according to selected carbon content setup-carbon-temperature-table ; here we set up the normalizing temperature window ; related to the carbon content set min-normalizing-temperature table:get carbon-temperature-table percent-carbon set max-normalizing-temperature min-normalizing-temperature + 100 set maximum-total-temperature max-normalizing-temperature + 200 set room-temp 20 ; the minimum temperature at which atoms try to bond ; with the nearest grain set minimum-bond-temperature 350 setup-grains set number-of-grains initial-grains setup-atoms reset-ticks end ;------------------------------------------------------------------------------------------------------ ; randomly distributes specified number of grain agents ; grain material will be chosen with a propability matching ; the selected carbon content ;------------------------------------------------------------------------------------------------------ to setup-grains ask n-of initial-grains patches [ sprout-grains 1 [ ; we only want the atoms to be displayed ; grains will only serve as reference points set hidden? true ; tempertures will be append by the turtles ; themselves in setup-atoms set atom-temperatures [] ; every second agent in world will be shifted down ; to setup the hex grid if (pxcor mod 2 = 0) [ set ycor ycor - 0.5 ] ; select composition of this grain with a propability ; to match the ferrite / pearlite distribution according ; to the selected carbon content ifelse (percent-carbon >= random-float 0.8) [ set composition "pearlite" ] [ set composition "ferrite"] ] ] end ;------------------------------------------------------------------------------------------------------ ; places an atom on every patch ; composition and heading are detemined by the nearest grain agent ;------------------------------------------------------------------------------------------------------ to setup-atoms ask patches [ sprout 1 [ set breed atoms set temperature room-temp set color [211 211 211] set boundary? false ; we append this atoms temperature to the temp-list ; of the nearest grain agent let nearest-grain min-one-of (grains) [ distance myself ] ask nearest-grain [ set atom-temperatures fput room-temp atom-temperatures ] let grain-composition [composition] of nearest-grain let grain-heading [heading] of nearest-grain set composition grain-composition ; select the proper shape now we know which composition ; the nearest grain has set shape composition ; head the same way to better see the grouping of atoms set heading grain-heading ] ] ; every grains temperature list indicates the number of ; atoms in this grain set average-grain-size mean [length atom-temperatures] of grains ; predict yield strength using the simplified Hall-Patch Relation set yield-strength ((1 / sqrt average-grain-size) + (1 / standard-deviation [length atom-temperatures] of grains)) * 10 set hardness count atoms with [composition = "pearlite"] / count atoms ; here we initialize the neighbor agentset for each atom ask atoms [ ; every second for hex grid ifelse (pxcor mod 2 = 0) [ set ycor ycor - 0.5 set neighboring-atoms atoms-on patches at-points [[0 1] [1 0] [1 -1] [0 -1] [-1 -1] [-1 0]] ] [ set neighboring-atoms atoms-on patches at-points [[0 1] [1 1] [1 0] [0 -1] [-1 0] [-1 1]] ] ; we need the number of sides with no neioghbor ; to determine if atom is on wall set free-sides (7 - (count neighboring-atoms)) ] ; mark atoms at the grain boundaries black ask atoms [ if (not is-number? reduce [ [this next] -> ifelse-value (this = next) [this] [false] ] [heading] of neighboring-atoms) [ set color black ] ] end ;------------------------------------------------------------------------------------------------------ ; main code sequence ;------------------------------------------------------------------------------------------------------ to step ask atoms [ apply-temperature ] ask atoms [ apply-color ] normalize-grains bond-atoms apply-grain-temperatures set number-of-grains count grains set mean-grain-temperature (mean [temperature] of atoms) ; update the yield strength indicator set yield-strength ( (1 / sqrt average-grain-size) + (1 / standard-deviation [length atom-temperatures] of grains) ) * 10 set hardness ( (count atoms with [composition = "pearlite"]) + (count atoms with [composition = "martensite"] * 2) ) / count atoms tick end ;------------------------------------------------------------------------------------------------------ ; each atoms temperature results in mean temp of neighbors ; the number of free sides (atom is next to wall) adds to ; the temperature increase or decrease since heat is applied ; from the outside ;------------------------------------------------------------------------------------------------------ to apply-temperature let mean-neighbor-temp mean([temperature] of neighboring-atoms) ifelse (state = "heat") [ if (temperature < maximum-total-temperature) [ set temperature mean-neighbor-temp + free-sides ] ] [ ifelse (state = "cool") [ set temperature mean-neighbor-temp - free-sides ] [ ifelse (state = "quench") [ ; the temp of the atom right before the quench determines the propability of pearlite atoms ; transforming to martensite atoms if ( (percent-carbon >= 0.8) and (temperature >= min-normalizing-temperature) and (random-float 5 < percent-carbon) ) [ set composition "martensite" ] set temperature temperature - 20 ] [ ; idle set temperature mean-neighbor-temp ] ] ] ; this atoms temperauture must not be out of bounds ifelse (temperature > maximum-total-temperature) [ set temperature maximum-total-temperature ] [ if (temperature < room-temp) [ set temperature room-temp ] ] end ;------------------------------------------------------------------------------------------------------ ; changes this atoms color with a gradient related to its temperature ; marks the atoms at the boundaries black ;------------------------------------------------------------------------------------------------------ to apply-color ; no visible color changes should occur ; under threshhold ifelse (temperature < minimum-bond-temperature) [ set color [211 211 211] ] [ ; we simulate heating colors of steel ; with a gradient ranging from gray to ; orange-yellow set color palette:scale-gradient [ [211 211 211] [215 50 41] [178 34 34] [255 69 0] [255 174 66] ] temperature minimum-bond-temperature max-normalizing-temperature ] ; mark atoms at the grain boundaries black if (not is-number? reduce [ [this next] -> ifelse-value (this = next) [this] [false] ] [heading] of neighboring-atoms) [ set color black ] end ;------------------------------------------------------------------------------------------------------ ; if a grain is in normalizing temperature range, it tries to avoid ; proximity to other grains to simulate the grain adjustment ; the longer the normalizing in the correct temp range takes places, ; the more evenly spread the grains will be ;------------------------------------------------------------------------------------------------------ to normalize-grains ask grains [ ; we use the atom at the exact location of the grain agent ; to determine the local temperature let atom-at-this-patch one-of atoms-on patch-here let atom-temperature [temperature] of atom-at-this-patch if (atom-temperature > min-normalizing-temperature) [ ; we need the direction to the nearest grain neighbor ; to walk one step in the opposite direction ; this adjusts the spatial grain distribution over time let nearest-neighbor min-one-of other grains [ distance myself ] let original-direction (heading) face nearest-neighbor rt 180 forward 1 set heading random 360 ; if the local temperature exceeds the normalizing range ; the number of grains will decrease, resulting in fewer ; larger grains ifelse (atom-temperature > max-normalizing-temperature) [ if (random 1000 = 0 and number-of-grains > 10) [ die ] ] [ if (random 1000 = 0 and number-of-grains <= 100) [ hatch 1 set hidden? true ] ] ] ] end ;------------------------------------------------------------------------------------------------------ ; all atoms inside the normalizing temp range try to align to the ; nearest grain, inheriting its attributes ;------------------------------------------------------------------------------------------------------ to bond-atoms ask atoms [ ifelse(temperature > minimum-bond-temperature) [ let this-temperature (temperature) let nearest-grain min-one-of (grains) [ distance myself ] let grain-composition [composition] of nearest-grain let grain-heading [heading] of nearest-grain if (composition != "martensite") [ set composition grain-composition ] if (temperature > min-normalizing-temperature) [ ifelse (composition != "martensite") [ set composition "austenite" set shape composition ] [ set shape "austenite" ] if (state != "quench" and composition = "martensite") [ set composition "austenite" set shape composition ] ] set heading grain-heading ] [ set shape composition ] ] end ;------------------------------------------------------------------------------------------------------ ; at the last step of each tick we re-assign the temperatures of atoms ; in grains after the new alignment ;------------------------------------------------------------------------------------------------------ to apply-grain-temperatures ask grains [ set atom-temperatures [] ] ask atoms [ let nearest-grain min-one-of (grains) [ distance myself ] ask nearest-grain [ set atom-temperatures fput room-temp atom-temperatures ] ] ; report average grain size set average-grain-size mean [length atom-temperatures] of grains end ;------------------------------------------------------------------------------------------------------ @#$#@#$#@ GRAPHICS-WINDOW 353 10 1148 806 -1 -1 12.902 1 10 1 1 1 0 0 0 1 -30 30 -30 30 1 1 1 ticks 30.0 BUTTON 180 143 253 184 run step T 1 T OBSERVER NIL NIL NIL NIL 0 BUTTON 14 143 96 182 NIL setup NIL 1 T OBSERVER NIL NIL NIL NIL 1 BUTTON 98 143 178 183 step step NIL 1 T OBSERVER NIL NIL NIL NIL 0 SLIDER 11 17 350 50 percent-carbon percent-carbon 0.1 1.6 0.8 0.1 1 % HORIZONTAL MONITOR 13 53 176 98 Min Normalizing Temp min-normalizing-temperature 0 1 11 MONITOR 13 192 132 237 Avg Grain Temp mean-grain-temperature 0 1 11 SLIDER 14 103 349 136 initial-grains initial-grains 10 50 35.0 5 1 NIL HORIZONTAL PLOT 12 518 350 802 Number of Atoms NIL NIL 0.0 10.0 0.0 10.0 true true "" "" PENS "Ferrite" 1.0 0 -2674135 true "" "plot count atoms with [composition = \"ferrite\"]" "Pearlite" 1.0 0 -14070903 true "" "plot count atoms with [composition = \"pearlite\"]" "Austenite" 1.0 0 -14439633 true "" "plot count atoms with [composition = \"austenite\"]" "Martensite" 1.0 0 -16777216 true "" "plot count atoms with [composition = \"martensite\"]" MONITOR 182 54 350 99 Max Normalizing Temp max-normalizing-temperature 0 1 11 MONITOR 135 193 243 238 Yield Strength yield-strength 3 1 11 CHOOSER 257 141 349 186 state state "heat" "cool" "quench" "idle" 2 SLIDER 1163 135 1292 168 exp-ticks-list exp-ticks-list 1000 10000 2600.0 1000 1 NIL HORIZONTAL MONITOR 245 194 349 239 Hardness hardness 3 1 11 PLOT 13 240 352 511 Grains NIL NIL 0.0 10.0 0.0 10.0 true true "" "" PENS "Count" 1.0 0 -5298144 true "" "plot number-of-grains" "Avg Size" 1.0 0 -14070903 true "" "plot average-grain-size" @#$#@#$#@ ## WHAT IS IT? This model’s goal is to simulate the effects on the microstructure of carbon steel while being exposed to varying temperatures. The idea is to simulate the **normalizing** and **hardening** processes and to observe the changes in the steel’s **grain structure** and its **mechanical properties**. The main components of carbon steel on which this model is based are iron and carbon. The amount of carbon inside the steel significantly changes its properties. The carbon content for low carbon steel typically ranges from 0.1% - 0.6%. Beyond 0.6% carbon the steel is considered high carbon steel. This model includes carbon content ranges from 0.1% to 1.6%. #### Grain structure When looking at the initial grain structure of carbon steel it consists of different types of grains. **Ferrite** grains are made of pure iron determining mechanical properties like ductility inside the steel. Another type of grain, occurring more frequently the higher the carbon content is, is **Pearlite**. Pearlite consists of iron and carbon which is also called iron-carbide, giving the steel the properties of hardness and strength. In steel containing about 0.4% carbon, ferrite and pearlite grains are evenly distributed. The number of pearlite grains increases until 0.8% carbon, from where the steel consists of 100% pearlite grains. #### Normalizing The normalizing process is used to adjust the mechanical properties of steel such as **ductility**, **hardness**, and **tensile strength**. The main goal is to recrystallize the steel’s distorted grain structure into an undistorted one. When applying a certain amount of heat to carbon steel over a certain amount of time, the grain structure changes. While the temperature of the steel is inside the normalizing temperature range, new grains begin to form, originating from the grain boundaries and absorbing the existing grains. The resulting grain structure usually differs from the original in a more uniform grain size and distribution. It is common practice to apply more than one normalizing cycles to carbon steel to acquire an even finer grain structure from cycle to cycle. If the temperature, however, is too high, the new grains forming at the grain boundaries grow at the expense of their neighbors resulting in a coarse-grained structure and giving the steel commonly undesirable mechanical properties. #### Hardening The process of hardening is usually applied to carbon steel containing only pearlite grains. The steel is heated above its recrystallization temperature and then quenched in either oil or water. As the temperature drops rapidly, **martensite** begins to form giving the steel a very high hardness but also brittleness. To overcome the brittleness the process of tempering is used, which is not part of this model. ## HOW IT WORKS The model is setup with an adjustable amount of **initial grains**. Each grain consists of a multitude of **atoms**. The whole world area consists of one atom per patch. Each atom orientates itself to its nearest grain neighbor and inherits its properties (to distinguish between ferrite, pearlite etc.). Depending on the adjustable **carbon content**, ferrite grains exist beside the pearlite grains. Temperature can be applied to the material to simulate the processes of normalizing and hardening. The amount of heat in each atom determines its color by a **color-gradient**, roughly resembling the color real carbon steel would have at this temperature. If the material’s temperature is high enough, the atoms inside the grains will transform to **austenite**. During normalizing the grains will reorganize themselves and grow in number if the correct amount of heat is applied. They will decrease in number if the average grain temperature exceeds the recommended normalizing temperature range. At this stage the material can either be **air-cooled** or **quenched** resulting in different grain compositions and mechanical properties. While air-cooling the austenite will transform back into ferrite and pearlite grains. The longer the normalizing has taken place the more grains will have formed as a result. If the material is quenched after having applied the correct amount of heat, the austenite will transform to martensite if the carbon content is at least 0.8%. ## HOW TO USE IT ### Setup **1.** Adjust the amount of carbon with the **percent-carbon** slider. **2.** Adjust the amount of grains with the **initial-grains** slider. **3.** Click **setup** to form ferrite and pearlite grains depending on **percent-carbon** and **initial-grains**. ### Normalizing Note the initial yield-strength. **1.** Set the **state** dropdown to heat and click run. At first nothing will change except the **Avg Grain Temp** monitor since heat is being applied from the outside and needs to spread through the material. Observe the color change from grey to red and then to orange and yellow. At a certain temperature, atoms at the grain boundaries will try to re-orientate themselves to the nearest grain. Observe the formation of austenite at a certain temperature. If the average grain temperature is inside the normalizing temperature range, observe how the grains will re-orientate and adjust their position to spread more evenly across the area. **2.** When inside the normalizing temperature range, set the **state** to idle to keep applying the same amount of heat. Observe how the number of grains grows over time. If the temperature is too high, the number of grains will decrease. **3.** Set the **state** to cool to “air-cool” the steel. Observe how the austenite forms back to ferrite and pearlite and color changes back to grey when cooled. **4.** Compare the resulting **yield strength** with the original one after the setup. ### Hardening **1.** Select over 0.8% **percent-carbon** to successfully harden the steel and click **setup**. **2.** Note the **hardness**. **3.** Set the **state dropdown** to heat and click run. Observe the same behavior as during normalizing. **4.** Leave the **state** at heat until the maximum possible temperature is reached (observing the **Avg Grain Temp** monitor) **5.** Set state to quench. Observe how the material cools rapidly and the austenite forms back to pearlite and martensite. **6.** Compare the resulting **hardness** with the original one. ## MONITORS **Avg Grain Temp**: The average grain temperature. **Yield Strength**: An indicator specifying at which point the plastic deformation of the material becomes permanent. (Calculated using the Hall-Petch relation) **Hardness**: An indicator to compare the hardness of the material dependent on its composition. ## PLOTS **Grains**: Number of grains over time (red). Average grain size over time (blue). **Number of Atoms**: The number of atoms over time for ferrite (red), pearlite (blue), austenite (green) and martensite (black). ## THINGS TO NOTICE In reality, new grains begin to form at the grain boundaries while normalizing. This model simulates this by simply hatching grains over time which will re-orientate along with the existing ones. Mechanical properties described in this model are simple indicators to show relations between the grain structure and composition. In reality, the mechanical properties of steel depend on many more factors which are not included in this model. ## THINGS TO TRY Try to harden the material with less than 0.8% carbon. Is the hardening successful? Is there any transformation into martensite? Try to normalize after successful hardening. What happens with the martensite after normalizing? ## EXTENDING THE MODEL Obviously, the missing element in this model is the tempering process where the hardened steel is relieved of its brittleness. ## RELATED MODELS Crystallization Basic Crystallization Directed Crystallization Moving MaterialSim Grain Growth ## CREADITS AND REFERENCES Made by Felix Rauchenwald in June 2019. @#$#@#$#@ default true 0 Polygon -7500403 true true 150 5 40 250 150 205 260 250 airplane true 0 Polygon -7500403 true true 150 0 135 15 120 60 120 105 15 165 15 195 120 180 135 240 105 270 120 285 150 270 180 285 210 270 165 240 180 180 285 195 285 165 180 105 180 60 165 15 arrow true 0 Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150 austenite true 0 Polygon -7500403 true true 0 150 75 30 225 30 300 150 225 270 75 270 Line -16777216 false 0 150 300 150 Line -16777216 false -15 225 285 225 Line -16777216 false 225 -15 225 285 Line -16777216 false -15 75 285 75 Line -16777216 false 150 -15 150 285 Line -16777216 false 75 15 75 315 box false 0 Polygon -7500403 true true 150 285 285 225 285 75 150 135 Polygon -7500403 true true 150 135 15 75 150 15 285 75 Polygon -7500403 true true 15 75 15 225 150 285 150 135 Line -16777216 false 150 285 150 135 Line -16777216 false 150 135 15 75 Line -16777216 false 150 135 285 75 bug true 0 Circle -7500403 true true 96 182 108 Circle -7500403 true true 110 127 80 Circle -7500403 true true 110 75 80 Line -7500403 true 150 100 80 30 Line -7500403 true 150 100 220 30 butterfly true 0 Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240 Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240 Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163 Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165 Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225 Circle -16777216 true false 135 90 30 Line -16777216 false 150 105 195 60 Line -16777216 false 150 105 105 60 car false 0 Polygon -7500403 true true 300 180 279 164 261 144 240 135 226 132 213 106 203 84 185 63 159 50 135 50 75 60 0 150 0 165 0 225 300 225 300 180 Circle -16777216 true false 180 180 90 Circle -16777216 true false 30 180 90 Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89 Circle -7500403 true true 47 195 58 Circle -7500403 true true 195 195 58 circle false 0 Circle -7500403 true true 0 0 300 circle 2 false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 cow false 0 Polygon -7500403 true true 200 193 197 249 179 249 177 196 166 187 140 189 93 191 78 179 72 211 49 209 48 181 37 149 25 120 25 89 45 72 103 84 179 75 198 76 252 64 272 81 293 103 285 121 255 121 242 118 224 167 Polygon -7500403 true true 73 210 86 251 62 249 48 208 Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123 cylinder false 0 Circle -7500403 true true 0 0 300 dot false 0 Circle -7500403 true true 90 90 120 face happy false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 255 90 239 62 213 47 191 67 179 90 203 109 218 150 225 192 218 210 203 227 181 251 194 236 217 212 240 face neutral false 0 Circle -7500403 true true 8 7 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Rectangle -16777216 true false 60 195 240 225 face sad false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 168 90 184 62 210 47 232 67 244 90 220 109 205 150 198 192 205 210 220 227 242 251 229 236 206 212 183 ferrite true 0 Polygon -7500403 true true 0 150 75 30 225 30 300 150 225 270 75 270 fish false 0 Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166 Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165 Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60 Polygon -7500403 true true 30 136 151 77 226 81 280 119 292 146 292 160 287 170 270 195 195 210 151 212 30 166 Circle -16777216 true false 215 106 30 flag false 0 Rectangle -7500403 true true 60 15 75 300 Polygon -7500403 true true 90 150 270 90 90 30 Line -7500403 true 75 135 90 135 Line -7500403 true 75 45 90 45 flower false 0 Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135 Circle -7500403 true true 85 132 38 Circle -7500403 true true 130 147 38 Circle -7500403 true true 192 85 38 Circle -7500403 true true 85 40 38 Circle -7500403 true true 177 40 38 Circle -7500403 true true 177 132 38 Circle -7500403 true true 70 85 38 Circle -7500403 true true 130 25 38 Circle -7500403 true true 96 51 108 Circle -16777216 true false 113 68 74 Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218 Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240 hex false 0 Polygon -7500403 true true 0 150 75 30 225 30 300 150 225 270 75 270 house false 0 Rectangle -7500403 true true 45 120 255 285 Rectangle -16777216 true false 120 210 180 285 Polygon -7500403 true true 15 120 150 15 285 120 Line -16777216 false 30 120 270 120 leaf false 0 Polygon -7500403 true true 150 210 135 195 120 210 60 210 30 195 60 180 60 165 15 135 30 120 15 105 40 104 45 90 60 90 90 105 105 120 120 120 105 60 120 60 135 30 150 15 165 30 180 60 195 60 180 120 195 120 210 105 240 90 255 90 263 104 285 105 270 120 285 135 240 165 240 180 270 195 240 210 180 210 165 195 Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195 line true 0 Line -7500403 true 150 0 150 300 line half true 0 Line -7500403 true 150 0 150 150 martensite true 0 Polygon -7500403 true true 0 150 75 30 225 30 300 150 225 270 75 270 Polygon -16777216 true false 75 45 Polygon -16777216 true false 45 60 105 75 45 75 45 60 Polygon -16777216 true false 15 90 120 105 15 105 15 90 Polygon -16777216 true false 300 150 180 135 300 135 300 150 Polygon -16777216 true false 270 90 195 75 270 75 270 90 Polygon -16777216 true false 150 15 135 90 135 15 150 15 Polygon -16777216 true false 120 270 105 135 105 270 120 270 Polygon -16777216 true false 180 15 165 150 165 15 180 15 Polygon -16777216 true false 150 270 135 180 135 270 150 270 Polygon -16777216 true false 285 195 150 180 285 180 285 195 Polygon -16777216 true false 195 270 180 210 180 270 195 270 Polygon -16777216 true false -15 135 90 150 -15 150 -15 135 Polygon -16777216 true false -15 165 60 180 -15 180 -15 165 Polygon -16777216 true false 15 195 90 210 15 210 15 195 pearlite true 0 Polygon -7500403 true true 0 150 75 30 225 30 300 150 225 270 75 270 Rectangle -16777216 true false 150 30 150 270 Rectangle -16777216 true false 105 30 195 270 pentagon false 0 Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120 person false 0 Circle -7500403 true true 110 5 80 Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 Rectangle -7500403 true true 127 79 172 94 Polygon -7500403 true true 195 90 240 150 225 180 165 105 Polygon -7500403 true true 105 90 60 150 75 180 135 105 plant false 0 Rectangle -7500403 true true 135 90 165 300 Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285 Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285 Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210 Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135 Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135 Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60 Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90 square false 0 Rectangle -7500403 true true 30 30 270 270 square 2 false 0 Rectangle -7500403 true true 30 30 270 270 Rectangle -16777216 true false 60 60 240 240 star false 0 Polygon -7500403 true true 151 1 185 108 298 108 207 175 242 282 151 216 59 282 94 175 3 108 116 108 t true 0 Rectangle -7500403 true true 46 47 256 75 Rectangle -7500403 true true 135 76 167 297 target false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 Circle -7500403 true true 60 60 180 Circle -16777216 true false 90 90 120 Circle -7500403 true true 120 120 60 tree false 0 Circle -7500403 true true 118 3 94 Rectangle -6459832 true false 120 195 180 300 Circle -7500403 true true 65 21 108 Circle -7500403 true true 116 41 127 Circle -7500403 true true 45 90 120 Circle -7500403 true true 104 74 152 triangle false 0 Polygon -7500403 true true 150 30 15 255 285 255 triangle 2 false 0 Polygon -7500403 true true 150 30 15 255 285 255 Polygon -16777216 true false 151 99 225 223 75 224 truck false 0 Rectangle -7500403 true true 4 45 195 187 Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194 Rectangle -1 true false 195 60 195 105 Polygon -16777216 true false 238 112 252 141 219 141 218 112 Circle -16777216 true false 234 174 42 Rectangle -7500403 true true 181 185 214 194 Circle -16777216 true false 144 174 42 Circle -16777216 true false 24 174 42 Circle -7500403 false true 24 174 42 Circle -7500403 false true 144 174 42 Circle -7500403 false true 234 174 42 turtle true 0 Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210 Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105 Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105 Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87 Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210 Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99 wheel false 0 Circle -7500403 true true 3 3 294 Circle -16777216 true false 30 30 240 Line -7500403 true 150 285 150 15 Line -7500403 true 15 150 285 150 Circle -7500403 true true 120 120 60 Line -7500403 true 216 40 79 269 Line -7500403 true 40 84 269 221 Line -7500403 true 40 216 269 79 Line -7500403 true 84 40 221 269 x false 0 Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ NetLogo 6.0.4 @#$#@#$#@ setup repeat 20 [ go ] @#$#@#$#@ @#$#@#$#@ setup step if (mean-grain-temperature = maximum-total-temperature) [ set state "quench" ] state = "quench" and mean-grain-temperature = room-temp hardness count atoms with [composition = "ferrite"] count atoms with [composition = "pearlite"] count atoms with [composition = "martensite"] setup step ifelse (mean-grain-temperature > min-normalizing-temperature) [ set state "cool" ] [ set state "heat" ] ticks >= exp-ticks-list number-of-grains yield-strength average-grain-size @#$#@#$#@ @#$#@#$#@ default 0.0 -0.2 0 0.0 1.0 0.0 1 1.0 0.0 0.2 0 0.0 1.0 link direction true 0 Line -7500403 true 150 150 90 180 Line -7500403 true 150 150 210 180 @#$#@#$#@ 0 @#$#@#$#@