// changed at Mon Nov 30 2015 10:39:17 GMT+0100 (Central Europe Standard Time) by timfelgentreff
this.addScript(function addConstraints() {
    var F = this.get("F"),
        C = this.get("C"),
        L0 = this.get("L0"),
        cm = this.get("cm"),
        inch = this.get("in"),
        material = this.get("material"),
        structures = this.get("structures");
    material.coefficients = {
        Aluminium: 23.1 / 1000000,
        Copper: 16.5 / 1000000,
        Iron: 11.8 / 1000000
    }
    material.coefficient = 1 / 1000000;
    
    bbb.defaultSolvers = [new Relax()];
    [F,C,L0,cm,inch,material,structures].each(function(ea){disconnectAll(ea); bbb.unconstrainAll(ea)});
    
    // setup type conversions
    [F,C,L0,cm,inch].each(function(ea) {
        ea.beInputLine()
        connect(ea, "savedTextString", ea, "value", function(v) { return Math.round(parseFloat(v) * 100) / 100 });
        connect(ea, "value", ea, "textString", function(v) { return v + "" });
    });
    connect(material, "selection", material, "coefficient", function(v) { return this.sourceObj.coefficients[v] });
    connect(structures, "selection", L0, "savedTextString", function(v) { return String(parseFloat(v)) * 1000 });
    always: {
        F.value - 32 == 1.8 * C.value
    }
    always: {
        inch.value * 2.54 == cm.value
    }
    always: {
        cm.value == ro(L0.value) * ro(material.coefficient) * C.value + ro(L0.value)
    }
});
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
<lively.morphic.Box#7D1E5... - Rectangle>
Tag:
run
save
Tests

-- ALL --
addConstraints
Scripts
-
+
-
Connections
+
-- ALL --
all
ObjectEditor -- Rectangle>>addConstraints
X

Menu
Fahrenheit
231.8
111
Celcius
Centimer
Inches
Material
Aluminium
Copper
Iron
Länge bei 0 Grad Celsius in cm
324000
324035.964
127573.2141681639
2737m Golden Gate Bridge
7180m Bay Bridge
324m Eiffel Tower
656.5m Freemont Bridge
A simple demo to calculate thermal expansion. You can enter and accept with RETURN into any of the temparature or length fields, choose pre-made objects from the left list or materials with different thermal coefficients. It's just a simple demo that uses cooperating solvers (DeltaBlue for textual input/conversion, Relaxation for calculations)