In the last step, one parameter moved three coordinates. In this step, the same portal gets five parameters and fourteen bindings, so that its heights and its loads follow named values too. Along the way we'll learn the simple grammar an expression has to follow, the one rule that governs units inside it, which fields can be bound and which can't, and what a refusal looks like when you get it wrong.
The portal with five parameters and fourteen bindings. Orbit, read the results and hover the members; nothing you do here changes the model.
Members can copy this model into their own projects and work the step in it. Join or sign in.
1.0 The parameters
Open the Parameters tab and you'll find five rows now:
Symbol
Means
Default
Unit
s
Span between the column bases
12
m
he
Eaves height
6
m
ha
Apex rise above the eaves
1.5
m
wd
Dead load on the rafters
6
kN/m
ws
Imposed load on the rafters
4
kN/m
Below them are fourteen bound fields:
the y coordinates of both eaves are he,
the ridge is at s / 2 across and he + ha up,
the right-hand column's x coordinates are s,
the start and end magnitudes of the four line loads on the rafters are -wd and -ws, which are negative because the loads act downwards and the field's sign follows the global y axis.
The whole model is now described by five numbers. Change he and the eaves, the ridge and the columns all move. Change wd and every dead load on every rafter changes with it.
2.0 The grammar
An expression is deliberately simple. It can hold:
numbers, and the symbols of the model's parameters,
+, -, * and /, a leading minus, and brackets,
five functions: abs(x), sqrt(x), min(a, b, ...), max(a, b, ...) and pow(x, n).
That's it. There's no ^, so write pow(s, 2) for a square. There's no implicit multiplication either, so write 2*s, never 2 s. A symbol is made of letters, digits and underscores and can't start with a digit, and the five function names are reserved. An expression that doesn't follow the grammar is refused, with the reason in the field's tooltip, and the field keeps the value it had.
3.0 One rule for units
Every field in the editor has a display unit, shown beside it. A literal number in an expression is in the field's display unit, and every symbol is converted into that unit before the expression is worked out. So 355 in a yield strength field means 355 MPa. A span declared in mm could still drive a coordinate in metres, because the conversion is automatic. A number can also carry its own unit if you want it to, so s / 2 + 500 mm is a span and a half-metre, whatever the field is displayed in.
The rule has a consequence. Every symbol in an expression has to measure what the field measures. he + ha is fine in a coordinate, because both are lengths. wd * s / 2 looks like the reaction of a simply supported beam, and it is. However, Structure Bench never multiplies units together for you or converts between kinds. It's refused in a load-per-metre field because s is a length, and it would be refused in a force field too, because neither wd nor s is a force. Either way, the message names the symbol and both quantities. The one exception is a parameter declared with the unit -, a pure number, which can scale any field, as in -wd * factor.
4.0 What can be bound
Broadly, any numeric field of the model can be bound. This includes node coordinates, material properties (E, ν, fy, density), section properties (A, I, depth), spring stiffnesses, load magnitudes, and the position of a point load along a member. In a 3D frame a member's roll angle binds too.
There are two kinds of parameter, and each one connects to the model in its own way. A numeric parameter, like our span s, holds a number. You connect it by typing it, or an expression that uses it, into a numeric field, such as a node's x coordinate. A categorical parameter holds a choice from a list, such as a list of beam sections. It has no numeric value, so it can't go into a numeric field or an expression. Instead, you connect it by picking it from a member's section or material list. We'll see this in step 7.
Things to try
Press Load the model, open the Parameters tab and read the Bound fields table. It has fourteen rows, each giving a field and its expression. Click the crosshair beside Load ld-dl-1 in Dead · start and the viewport frames the left-hand rafter.
If you're a member, press Copy to my projects and, in your copy, set ha to 0. The ridge drops to the eaves and the rafters go flat. Set it back to 1.5.
Open the nodes table and type s / 3 into the ridge node's x cell, then press Enter, and the ridge slides to 4 m. Type s / 2 to put it back.
Now type s ^ 2 into the same cell and press Enter. The field turns red and keeps s / 2. Hover it and the tooltip names the problem. Try 2 s for the same lesson, then pow(s, 2), which the grammar accepts. It puts the ridge at 144 m, so put s / 2 back.
Press Load in the toolbar to open the loads table and find the dead load on the left-hand rafter. Its magnitudes read -wd. Type -wd * s / 2 into one and press Enter. It's refused, because s is a length and the field takes a load per metre. The tooltip names both, s is a length (m); this field takes a line load (kN/m).
Type -6.5 kN/m into the same field and press Enter. That's accepted, because it's a literal with its own unit, and the field now follows the constant -6.5 kN/m instead of wd. It stays in the accent colour, and wd's Used count drops because no symbol is in it. Type -6.5 instead and the plain number unbinds it. Then type -wd to bind it to the parameter again.
In the Parameters table, click the unit of s and change it to mm. The default becomes 12,000 and the range it's meant to run over becomes 6,000 to 20,000. That range is the parameter's min and max, and you can change either in the line under its row at any time. The model hasn't changed size, only the unit the parameter is declared in, and every binding still resolves to the same coordinates. Change it back to m.
5.0 What you'll see
The bound fields at the defaults
Field
Expression
Resolves to
Node n2 · y
he
6.00 m
Node n3 · x
s / 2
6.00 m
Node n3 · y
he + ha
7.50 m
Node n4 · x
s
12.00 m
Node n4 · y
he
6.00 m
Node n5 · x
s
12.00 m
Dead loads, start and end, both rafters
-wd
-6 kN/m
Imposed loads, start and end, both rafters
-ws
-4 kN/m
Hand check
There isn't much to check yet, but it's a habit worth starting. The ridge height is he+ha=6+1.5=7.5 m, which is the ridge node's y in the table. The rafter length follows by Pythagoras,
Lr=(2
Keep that number. The loads are per metre along the rafter, so this is the length the reactions in step 3 are built from.
6.0 The limits
How much a model can hold
A model holds up to 100 parameters and 500 bindings. An expression is at most 200 characters long and a symbol 32. A parameter that's still bound to a field can't be deleted, so unbind the fields first (the × beside each row of the Bound fields table does it). You can rename the symbol instead, which rewrites every expression that uses it.
7.0 What to take from this step
An expression can only hold numbers, symbols, the four operations, brackets and five functions. A literal is in the field's own unit and a symbol is converted to it. Every symbol has to measure what the field measures, and an expression that mixes kinds is refused rather than guessed at. Most numeric fields can be bound, a 3D member's roll angle included. A choice, such as a member's section, can't hold an expression, because a categorical parameter drives it instead.
Next, we'll look at the other half of the parametric layer, telling Structure Bench which results to watch.