Say Hello to an Extraterrestrial Ocean - and Maybe Extraterrestrial Life
<?xml version="1.0" encoding="UTF-8"?>
<!--Xholon Workbook http://www.primordion.com/Xholon/wb/ (C) Ken Webb Sat Mar 24 2012 10:51:13 GMT-0400 (EDT)-->
<XholonWorkbook>
<Notes><![CDATA[
Xholon
------
Title: Say Hello to an Extraterrestrial Ocean - and Maybe Extraterrestrial Life
Description:
Url: http://www.time.com/time/health/article/0,8599,2109837,00.html
InternalName:
YoutubeId:
Keywords:
My Notes
--------
Jeffrey Kluger, at Time magazine, reports on the dynamic processes at work on Saturn's moon Enceladus.
Two processes compete to define the albedo (brightness) of the surface of Enceladus::
(1) the constant fall of dust and other meteor debris, that tends to darken the surface, and
(2) the constant "repaving" of the surface with ice crystals resulting from cryo (ice) volcanoes, that tends to brighten the surface.
This workbook simulates the changing albedo, under the influence of these two processes.
To watch the simulation unfold::
Press the Run button above.
Press the Pause button in the overlay.
Watch as the albedo changes.
As with all Xholon Workbook apps, you can modify anything by editing the content of the various editors.
]]></Notes>
<script implName="lang:python:inline:"><![CDATA[
#print "height = 12.34 m"
]]></script>
<script implName="lang:javascript:inline:"><![CDATA[
//print("height = 56.78 meters\n");
]]></script>
<_-.XholonClass>
<!-- domain objects -->
<PhysicalSystem/>
<Space/>
<SolarSystem/>
<Planet>
<Earth/>
<Saturn/>
</Planet>
<Moon>
<Luna/>
<Enceladus/>
</Moon>
<Ring>
<ERing/>
</Ring>
<Spacecraft>
<Cassini/>
</Spacecraft>
<Cryovolcanism/> <!-- a process (behavior) where ice volcanoes produce ice crystals -->
<IceCrystals/>
<CosmicBombardment/> <!-- a process (behavior) where incoming meteors produce dust and debris -->
<CosmicDebris/> <!-- dust, meteor impacts -->
<!-- quantities -->
<Albedo superClass="Dimensionless"/>
</_-.XholonClass>
<xholonClassDetails>
<Enceladus>
<port name="albedo" connector="#xpointer(Albedo)"/>
<port name="iceCrystals" connector="#xpointer(IceCrystals)"/>
<port name="cosmicDebris" connector="#xpointer(CosmicDebris)"/>
</Enceladus>
</xholonClassDetails>
<PhysicalSystem>
<Space>
<SolarSystem>
<Earth>
<Luna> <!-- Earth's moon -->
<Albedo>0.12</Albedo> <!-- 12% of incoming sunlight is reflected -->
</Luna>
</Earth>
<Saturn>
<Enceladus> <!-- Saturn's moon -->
<Albedo>1.00</Albedo> <!-- 100% of incoming sunlight is reflected -->
<IceCrystals>1000</IceCrystals>
<CosmicDebris>1000</CosmicDebris>
<Cryovolcanism/>
<CosmicBombardment/>
</Enceladus>
<ERing/>
</Saturn>
</SolarSystem>
</Space>
</PhysicalSystem>
<Blockbehavior implName="lang:python:inline:"><![CDATA[
# This works if pasted in as a last child of Block.
#height.incVal(0.02)
#print("Python wants something to do. Height:" + str(height))
]]></Blockbehavior>
<Blockbehavior implName="lang:javascript:inline:"><![CDATA[
// This works if pasted in as a last child of Block.
//height.incVal(0.02);
//print("JavaScript wants something to do. Height:" + height + "\n");
]]></Blockbehavior>
<Cryovolcanismbehavior implName="lang:webEditionjs:inline:"><![CDATA[
this.bindPorts(this.parent().parent());
this.iceCrystals.incVal(100);
]]></Cryovolcanismbehavior>
<CosmicBombardmentbehavior implName="lang:webEditionjs:inline:"><![CDATA[
this.bindPorts(this.parent().parent());
this.cosmicDebris.incVal(1);
]]></CosmicBombardmentbehavior>
<Albedobehavior implName="lang:webEditionjs:inline:"><![CDATA[
var myPlanet = this.parent('.Albedo').parent('.Enceladus');
if (myPlanet.length == 1) {
this.bindPorts(myPlanet);
var iceCrystalsCount = this.iceCrystals.attr('val') - 0;
var cosmicDebrisCount = this.cosmicDebris.attr('val') - 0;
var totalCount = iceCrystalsCount + cosmicDebrisCount;
this.albedo.attr('val', iceCrystalsCount / totalCount)
print("\nEnceladus albedo: " + this.albedo.attr('val'));
// SVG
var svg = $($('div#mySVGDiv > object')[0].contentDocument.getElementsByTagNameNS(svgns, 'svg')[0]);
var enceladusSVG = svg.children('g').children('circle');
var rgbVal = Math.floor(256 * this.albedo.attr('val'));
if (rgbVal < 0) {rgbVal = 0;}
else if (rgbVal > 255) {rgbVal = 255;}
var fillAttr = 'rgb(' + rgbVal + ',' + rgbVal + ',' + rgbVal + ')';
enceladusSVG.attr('fill', fillAttr)
}
]]></Albedobehavior>
<Blockbehavior implName="lang:bsh:inline:"><![CDATA[
// This works if pasted in as a last child of Block.
//height.incVal(0.02);
//System.out.print("Java/Beanshell wants something to do. Height:" + height + "\n");
]]></Blockbehavior>
<Blockbehavior implName="lang:jruby:inline:"><![CDATA[
#require 'java'
# This works if pasted in as a last child of Block.
#$height.incVal(0.02)
#puts "Ruby wants something to do. Height: #{$height}"
]]></Blockbehavior>
<Blockbehavior implName="lang:groovy:inline:"><![CDATA[
// This works if pasted in as a last child of Block.
//height.incVal(0.02);
//System.out.print("Groovy wants something to do. Height:" + height + "\n");
]]></Blockbehavior>
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml,
<svg width="400" height="300" xmlns="http://www.w3.org/2000/svg">
<g>
<title>Space</title>
<rect id="PhysicalSystem/Space" fill="#000000" height="300" width="400"/>
</g>
<g>
<title>Enceladus</title>
<circle id="PhysicalSystem/Space/SolarSystem/Saturn/Enceladus" fill="rgb(127,127,127)" cx="150" cy="100" r="50"/>
</g>
</svg>
]]></Attribute_String><Attribute_String roleName="setup">${MODELNAME_DEFAULT},${SVGURI_DEFAULT}</Attribute_String></SvgClient>
</XholonWorkbook>