Skip to content

Commit b2a8279

Browse files
committed
Resizing widgets for last of Sample Models
1 parent 44fc165 commit b2a8279

18 files changed

Lines changed: 441 additions & 456 deletions

Curricular Models/MaterialSim/MaterialSim Grain Growth.nlogox

Lines changed: 46 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<model version="NetLogo 7.0.0-beta0" snapToGrid="true">
2+
<model version="NetLogo 7.0.0-beta1" snapToGrid="true">
33
<code><![CDATA[;; two different materials or phases
44
breed [ element1s element1 ] ;; element1 is the main material
55
breed [ element2s element2 ] ;; element2 is the materials which is
@@ -256,72 +256,53 @@ end
256256
; Copyright 2005 Uri Wilensky.
257257
; See Info tab for full copyright and license.]]></code>
258258
<widgets>
259-
<view x="735" wrappingAllowedX="false" y="30" frameRate="60.0" minPycor="-24" height="396" showTickCounter="true" patchSize="8.0" fontSize="10" wrappingAllowedY="false" width="396" tickCounterLabel="ticks" maxPycor="24" updateMode="1" maxPxcor="24" minPxcor="-24"></view>
260-
<note x="35" y="10" height="70" textColorLight="-16777216" fontSize="11" width="285" markdown="false">Model starting point (you can start from a
261-
random arrangement or a picture from a
262-
microscope. You can also determine if you
263-
want a certain percentage of a second
264-
element, sometimes called grain refiner)</note>
265-
<slider x="340" step="1.0" y="440" max="100.0" display="annealing-temperature" height="33" min="0.0" direction="Horizontal" default="0.0" variable="annealing-temperature" units="%" width="262" sizeVersion="0"></slider>
266-
<button x="550" y="325" height="34" disableUntilTicks="true" forever="false" kind="Observer" display="measure grains now" width="155" sizeVersion="0">count-grains-and-measure-grain-size
267-
set update-plots? true</button>
268-
<monitor x="605" precision="3" y="50" height="45" fontSize="11" display="Grain Size" width="100" sizeVersion="0">average-grain-size</monitor>
269-
<button x="30" y="510" height="40" disableUntilTicks="true" forever="true" kind="Observer" display="go" width="122" sizeVersion="0">go</button>
270-
<slider x="30" step="1" y="135" max="99" display="percent-element2" height="33" min="0" direction="Horizontal" default="0.0" variable="percent-element2" units="%" width="185" sizeVersion="0"></slider>
271-
<monitor x="605" precision="2" y="145" height="45" fontSize="11" display="Log Grain Size" width="100" sizeVersion="0">logaverage-grain-size</monitor>
272-
<monitor x="605" precision="2" y="98" height="45" fontSize="11" display="Log time" width="100" sizeVersion="0">logtime</monitor>
273-
<monitor x="605" precision="2" y="250" height="45" fontSize="11" display="Growth exponent" width="118" sizeVersion="0">grain-growth-exponent</monitor>
274-
<note x="30" y="491" height="18" textColorLight="-16777216" fontSize="11" width="139" markdown="false">Run model</note>
275-
<note x="340" y="410" height="25" backgroundDark="0" fontSize="18" width="300" markdown="false" textColorLight="-5298144" backgroundLight="0">Annealing Temperature</note>
276-
<chooser x="30" y="245" height="45" variable="atom-shape" current="0" display="atom-shape" width="125" sizeVersion="0">
277-
<choice type="string" value="hex"></choice>
278-
<choice type="string" value="hexline"></choice>
279-
<choice type="string" value="thin-line"></choice>
280-
<choice type="string" value="line"></choice>
281-
<choice type="string" value="spikes90"></choice>
282-
<choice type="string" value="default"></choice>
259+
<view x="345" wrappingAllowedX="false" y="5" frameRate="60.0" minPycor="-24" height="464" showTickCounter="true" patchSize="9.4" fontSize="10" wrappingAllowedY="false" width="464" tickCounterLabel="ticks" maxPycor="24" updateMode="1" maxPxcor="24" minPxcor="-24"></view>
260+
<note x="30" y="570" backgroundDark="0" fontSize="11" width="139" markdown="false" height="18" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Run model</note>
261+
<note x="30" y="544" backgroundDark="0" fontSize="11" width="295" markdown="false" height="18" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">_____________________________________________</note>
262+
<note x="5" y="75" backgroundDark="0" fontSize="30" width="25" markdown="false" height="36" textColorDark="-1" textColorLight="-5298144" backgroundLight="0">1</note>
263+
<note x="30" y="10" backgroundDark="0" fontSize="11" width="285" markdown="false" height="71" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Model starting point (you can start from a random arrangement or a picture from a microscope. You can also determine if you want a certain percentage of a second element, sometimes called grain refiner)</note>
264+
<note x="3" y="225" backgroundDark="0" fontSize="30" width="25" markdown="false" height="36" textColorDark="-1" textColorLight="-5298144" backgroundLight="0">2</note>
265+
<note x="3" y="375" backgroundDark="0" fontSize="30" width="35" markdown="false" height="36" textColorDark="-1" textColorLight="-5298144" backgroundLight="0">3</note>
266+
<note x="30" y="370" backgroundDark="0" fontSize="11" width="260" markdown="false" height="56" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Draw/edit grains (this is optional, you can use this to "draw" new grain structures, or edit the grains at any point during the simulation)</note>
267+
<note x="0" y="560" backgroundDark="0" fontSize="30" width="25" markdown="false" height="36" textColorDark="-1" textColorLight="-5298144" backgroundLight="0">4</note>
268+
<chooser x="30" y="85" height="60" variable="starting-point" current="0" width="200" display="starting-point">
269+
<choice type="string" value="Random Arrangement"></choice>
270+
<choice type="string" value="Import Image"></choice>
283271
</chooser>
284-
<button x="160" y="245" height="45" disableUntilTicks="false" forever="false" kind="Observer" display="apply shape" width="139" sizeVersion="0">ask element1s [set shape atom-shape]</button>
285-
<button x="30" y="370" height="33" disableUntilTicks="false" forever="true" kind="Observer" display="draw" width="122" sizeVersion="0">turtle-draw</button>
286-
<button x="30" y="409" height="45" disableUntilTicks="false" forever="false" kind="Observer" display="erase all" width="123" sizeVersion="0">erase-all</button>
287-
<slider x="156" step="1.0" y="370" max="6.0" display="brush-size" height="33" min="1.0" direction="Horizontal" default="3.0" variable="brush-size" width="139" sizeVersion="0"></slider>
288-
<note x="30" y="320" height="41" textColorLight="-16777216" fontSize="11" width="285" markdown="false">Draw/edit grains (this is optional, you can use
289-
this to "draw" new grain structures, or edit
290-
the grains at any point during the simulation)</note>
291-
<chooser x="156" y="409" height="45" variable="draw-color" current="0" display="draw-color" width="139" sizeVersion="0">
272+
<slider x="30" step="1" y="150" max="99" width="200" display="percent-element2" height="50" min="0" direction="Horizontal" default="0.0" variable="percent-element2" units="%"></slider>
273+
<note x="30" y="205" backgroundDark="0" fontSize="11" width="290" markdown="false" height="18" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">__________________________________________________________</note>
274+
<note x="30" y="340" backgroundDark="0" fontSize="11" width="295" markdown="false" height="26" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">__________________________________________________________</note>
275+
<button x="235" y="115" height="55" disableUntilTicks="false" forever="false" kind="Observer" width="85">setup</button>
276+
<slider x="30" step="1.0" y="425" max="6.0" width="200" display="brush-size" height="50" min="1.0" direction="Horizontal" default="3.0" variable="brush-size"></slider>
277+
<chooser x="30" y="481" height="60" variable="draw-color" current="0" width="200" display="draw-color">
292278
<choice type="string" value="yellow"></choice>
293279
<choice type="string" value="green"></choice>
294280
<choice type="string" value="cyan"></choice>
295281
<choice type="string" value="blue"></choice>
296282
<choice type="string" value="red"></choice>
297283
</chooser>
298-
<note x="346" y="307" height="18" textColorLight="-16777216" fontSize="11" width="132" markdown="false">Grain measurement</note>
299-
<note x="345" y="10" height="25" textColorLight="-5298144" fontSize="18" width="355" markdown="false">Grain size plot and calculations</note>
300-
<note x="34" y="200" height="45" textColorLight="-16777216" fontSize="11" width="290" markdown="false">Change the shape of atoms (different shapes
301-
might help visualize the atomic planes, or the
302-
proportion of different types of grains)</note>
303-
<button x="157" y="510" height="40" disableUntilTicks="true" forever="false" kind="Observer" display="go once" width="135" sizeVersion="0">go</button>
304-
<chooser x="30" y="85" height="45" variable="starting-point" current="0" display="starting-point" width="185" sizeVersion="0">
305-
<choice type="string" value="Random Arrangement"></choice>
306-
<choice type="string" value="Import Image"></choice>
284+
<note x="35" y="230" backgroundDark="0" fontSize="11" width="250" markdown="false" height="45" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Change the shape of atoms (different shapes might help visualize the atomic planes, or the proportion of different types of grains)</note>
285+
<chooser x="30" y="277" height="60" variable="atom-shape" current="0" width="200" display="atom-shape">
286+
<choice type="string" value="hex"></choice>
287+
<choice type="string" value="hexline"></choice>
288+
<choice type="string" value="thin-line"></choice>
289+
<choice type="string" value="line"></choice>
290+
<choice type="string" value="spikes90"></choice>
291+
<choice type="string" value="default"></choice>
307292
</chooser>
308-
<button x="218" y="85" height="83" disableUntilTicks="false" forever="false" kind="Observer" width="80" sizeVersion="0">setup</button>
309-
<note x="345" y="365" height="41" backgroundDark="0" fontSize="11" width="210" markdown="false" textColorLight="-16777216" backgroundLight="0">This slider determines how often
310-
the grain size is measured</note>
311-
<note x="344" y="478" height="75" backgroundDark="0" fontSize="11" width="405" markdown="false" textColorLight="-16777216" backgroundLight="0">A high annealing temperature makes some atoms randomly jump
312-
to the next grain. When it is zero, only the energetically favorable
313-
jumps will happen. Temperature here is represented as a relative
314-
value -- a percentage of random jumps out of the possible jumps.
315-
100% means that all the jumps are random.</note>
316-
<note x="30" y="175" height="18" backgroundDark="0" fontSize="11" width="290" markdown="false" textColorLight="-16777216" backgroundLight="0">_____________________________________________</note>
317-
<note x="30" y="295" height="26" backgroundDark="0" fontSize="11" width="295" markdown="false" textColorLight="-16777216" backgroundLight="0">_____________________________________________</note>
318-
<note x="30" y="465" height="18" backgroundDark="0" fontSize="11" width="295" markdown="false" textColorLight="-16777216" backgroundLight="0">_____________________________________________</note>
319-
<note x="5" y="75" height="36" backgroundDark="0" fontSize="30" width="25" markdown="false" textColorLight="-5298144" backgroundLight="0">1</note>
320-
<note x="3" y="225" height="36" backgroundDark="0" fontSize="30" width="20" markdown="false" textColorLight="-5298144" backgroundLight="0">2</note>
321-
<note x="3" y="375" height="36" backgroundDark="0" fontSize="30" width="25" markdown="false" textColorLight="-5298144" backgroundLight="0">3</note>
322-
<note x="3" y="500" height="36" backgroundDark="0" fontSize="30" width="25" markdown="false" textColorLight="-5298144" backgroundLight="0">4</note>
323-
<slider x="345" step="1" y="325" max="200" display="ticks-per-measurement" height="33" min="1" direction="Horizontal" default="50.0" variable="ticks-per-measurement" width="197" sizeVersion="0"></slider>
324-
<plot x="345" autoPlotX="true" yMax="1.0" autoPlotY="true" yAxis="Log grain size" y="50" xMin="0.0" height="245" legend="false" xMax="1.0" yMin="0.0" xAxis="Log time" display="Grain Size (log-log)" width="250" sizeVersion="0">
293+
<button x="235" y="285" height="45" disableUntilTicks="false" forever="false" kind="Observer" width="85" display="apply shape">ask element1s [set shape atom-shape]</button>
294+
<button x="235" y="435" height="45" disableUntilTicks="false" forever="true" kind="Observer" width="85" display="draw">turtle-draw</button>
295+
<button x="235" y="485" height="45" disableUntilTicks="false" forever="false" kind="Observer" width="85" display="erase all">erase-all</button>
296+
<button x="30" y="589" height="50" disableUntilTicks="true" forever="true" kind="Observer" width="122" display="go">go</button>
297+
<button x="157" y="589" height="50" disableUntilTicks="true" forever="false" kind="Observer" width="135" display="go once">go</button>
298+
<note x="395" y="490" backgroundDark="0" fontSize="18" width="300" markdown="false" height="25" textColorDark="-1" textColorLight="-5298144" backgroundLight="0">Annealing Temperature</note>
299+
<note x="395" y="575" backgroundDark="0" fontSize="11" width="430" markdown="false" height="86" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">A high annealing temperature makes some atoms randomly jump to the next grain. When it is zero, only the energetically favorable jumps will happen. Temperature here is represented as a relative value -- a percentage of random jumps out of the possible jumps. 100% means that all the jumps are random.</note>
300+
<slider x="395" step="1.0" y="520" max="100.0" width="262" display="annealing-temperature" height="50" min="0.0" direction="Horizontal" default="0.0" variable="annealing-temperature" units="%"></slider>
301+
<note x="820" y="5" backgroundDark="0" fontSize="18" width="355" markdown="false" height="25" textColorDark="-1" textColorLight="-5298144" backgroundLight="0">Grain size plot and calculations</note>
302+
<monitor x="1110" precision="2" y="170" height="60" fontSize="11" width="118" display="Log Grain Size">logaverage-grain-size</monitor>
303+
<monitor x="1110" precision="2" y="105" height="60" fontSize="11" width="118" display="Log time">logtime</monitor>
304+
<monitor x="1110" precision="3" y="40" height="60" fontSize="11" width="118" display="Grain Size">average-grain-size</monitor>
305+
<plot x="825" autoPlotX="true" yMax="1.0" autoPlotY="true" yAxis="Log grain size" y="40" xMin="0.0" height="270" legend="false" xMax="1.0" yMin="0.0" width="275" xAxis="Log time" display="Grain Size (log-log)">
325306
<setup></setup>
326307
<update>;; only update this as often as we have specified below
327308
;; we have to subtract one because the tick command is always
@@ -334,6 +315,12 @@ set update-plots? false</update>
334315
<update>plotxy logtime logaverage-grain-size</update>
335316
</pen>
336317
</plot>
318+
<note x="825" y="325" backgroundDark="0" fontSize="11" width="132" markdown="false" height="18" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">Grain measurement</note>
319+
<button x="1080" y="355" height="35" disableUntilTicks="true" forever="false" kind="Observer" width="145" display="measure grains now">count-grains-and-measure-grain-size
320+
set update-plots? true</button>
321+
<note x="825" y="410" backgroundDark="0" fontSize="11" width="315" markdown="false" height="41" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">This slider determines how often the grain size is measured</note>
322+
<slider x="825" step="1" y="350" max="200" width="250" display="ticks-per-measurement" height="50" min="1" direction="Horizontal" default="50.0" variable="ticks-per-measurement"></slider>
323+
<monitor x="1110" precision="2" y="250" height="60" fontSize="11" width="118" display="Growth exponent">grain-growth-exponent</monitor>
337324
</widgets>
338325
<info><![CDATA[## WHAT IS IT?
339326

Sample Models/Chemistry & Physics/GasLab/GasLab Adiabatic Piston.nlogox

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<model version="NetLogo 7.0.0-beta0" snapToGrid="true">
2+
<model version="NetLogo 7.0.0-beta1" snapToGrid="true">
33
<code><![CDATA[globals
44
[
55
tick-delta ;; how much we advance the tick counter this time through
@@ -453,13 +453,6 @@ end
453453
<widgets>
454454
<view x="275" wrappingAllowedX="false" y="7" frameRate="30.0" minPycor="-40" height="328" showTickCounter="true" patchSize="4.0" fontSize="10" wrappingAllowedY="false" width="328" tickCounterLabel="ticks" maxPycor="40" updateMode="1" maxPxcor="40" minPxcor="-40"></view>
455455
<slider x="5" step="1" y="7" max="1000" width="250" display="number-of-particles" height="50" min="1" direction="Horizontal" default="100.0" variable="number-of-particles"></slider>
456-
<button x="40" y="65" height="40" disableUntilTicks="false" forever="false" kind="Observer" width="90">setup</button>
457-
<button x="135" y="65" height="40" disableUntilTicks="true" forever="true" kind="Observer" width="90" display="go/stop">go</button>
458-
<slider x="5" step="1" y="110" max="20" width="250" display="init-particle-speed" height="50" min="1" direction="Horizontal" default="10.0" variable="init-particle-speed"></slider>
459-
<slider x="5" step="1" y="165" max="20" width="250" display="particle-mass" height="50" min="1" direction="Horizontal" default="1.0" variable="particle-mass"></slider>
460-
<slider x="5" step="1" y="220" max="100" width="250" display="box-height" height="50" min="20" direction="Horizontal" default="95.0" variable="box-height" units="%"></slider>
461-
<slider x="5" step="1" y="275" max="100" width="250" display="box-width" height="50" min="20" direction="Horizontal" default="80.0" variable="box-width" units="%"></slider>
462-
<slider x="5" step="100" y="330" max="5000" width="250" display="piston-mass" height="50" min="100" direction="Horizontal" default="3500.0" variable="piston-mass"></slider>
463456
<plot x="615" autoPlotX="true" yMax="70.0" autoPlotY="true" yAxis="height" y="10" xMin="0.0" height="170" legend="false" xMax="50.0" yMin="0.0" width="238" xAxis="time" display="Piston Height vs. Time">
464457
<setup>set-plot-y-range 0 (2 * raw-height)</setup>
465458
<update></update>
@@ -503,6 +496,13 @@ end
503496
<monitor x="255" precision="1" y="415" height="60" fontSize="11" width="100" display="height">piston-height</monitor>
504497
<monitor x="480" precision="1" y="450" height="60" fontSize="11" width="116" display="total energy">piston-energy</monitor>
505498
<monitor x="860" precision="1" y="405" height="60" fontSize="11" width="135" display="total system energy">total-energy</monitor>
499+
<slider x="5" step="1" y="60" max="20" width="250" display="init-particle-speed" height="50" min="1" direction="Horizontal" default="10.0" variable="init-particle-speed"></slider>
500+
<slider x="5" step="100" y="280" max="5000" width="250" display="piston-mass" height="50" min="100" direction="Horizontal" default="3500.0" variable="piston-mass"></slider>
501+
<slider x="5" step="1" y="225" max="100" width="250" display="box-width" height="50" min="20" direction="Horizontal" default="78.0" variable="box-width" units="%"></slider>
502+
<slider x="5" step="1" y="170" max="100" width="250" display="box-height" height="50" min="20" direction="Horizontal" default="95.0" variable="box-height" units="%"></slider>
503+
<slider x="5" step="1" y="115" max="20" width="250" display="particle-mass" height="50" min="1" direction="Horizontal" default="1.0" variable="particle-mass"></slider>
504+
<button x="40" y="335" height="40" disableUntilTicks="false" forever="false" kind="Observer" width="90">setup</button>
505+
<button x="135" y="335" height="40" disableUntilTicks="true" forever="true" kind="Observer" width="90" display="go/stop">go</button>
506506
</widgets>
507507
<info><![CDATA[## WHAT IS IT?
508508

0 commit comments

Comments
 (0)