In step 8, a cell solved five copies of a model, one after another, and we saw that a cell can run at most 25 solves each time it runs. A wider search belongs in a study, which runs many solves in the background. In this step, we'll read a study's results into a sheet. Our structure is a sign post, a single steel tube fixed at its base, carrying wind loading along its length and a load at the top from the sign. Its height is a parameter, and a study solves the post at seven heights. We'll read the study's table, plot the base moment against the height with the formula drawn over it, and work out the tallest post that passes an elastic check.
A sign post, a CHS 168.3 x 6.3 fixed at its base, under wind up its height and a 4 kN load at the top. 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.
A study is part of Structure Bench's parametric modelling tools. If studies aren't available on your account, you won't see the rest of this step, and you can carry straight on to step 10.
1.0 The idea
A study refers to a parametric study, completed with Structure Bench's parametric modelling tools. It's built as a small node graph on the Studies canvas (the Explore button opens it), which steps one or more of the model's parameters through a range of values, solves the model at every point, and collects the observables we're interested in. Here, the study Height sweep has a Range node that runs the parameter H from 3 m to 9 m in seven points, and it collects the observable M_base, the moment at the base of the post. If you need a refresher on studies, take a look at the Parametric modelling pathway.
The study's results are a table, one row per point, and a sheet can read the latest run of a study as a pandas table with await sb.studies["Height sweep"].table(). Once the results are in the sheet, we can set them out however we like, compare them with a formula, and use them in a check.
2.0 The model
Our model is a single CHS 168.3 x 6.3 in S355, fixed at its base and free at its top, with its height set by the parameter H (6 m by default). It carries a uniform wind load of 1 kN/m along its height and a horizontal point load of 4 kN at the top from the sign, both in the load case Wind (ULS). The 1 kN/m and the 4 kN are design (ULS) loads, already factored, so the base moment they give is a design moment. For a cantilever post under these two loads, the base moment is,
M=2wH2โ+PH
which grows faster than the height, because a taller post has both more wind on it and a longer lever arm for it to act through. The sheet also has three model values, the tube's diameter h (its depth), its second moment of area I and the steel's yield strength fy. We ran the study and stored its results when we built the model.
3.0 The sheet
Press Load the model to open the sheet Height sweep. The first code cell reads the study,
sb.studies holds the model's studies by name, and .table() reads the latest run as a table. As with a solve in step 8, the table comes from Structure Bench rather than from Python, so we await it. The cell shows the table, with the parameter in its own unit and the observable in your display units,
point
H (m)
M_base (kNm)
0
3.0
16.5
1
4.0
24.0
2
5.0
32.5
3
6.0
42.0
4
7.0
52.5
5
8.0
64.0
6
9.0
76.5
3.1 The study against the formula
The next cell plots the study's base moments against the height, with the formula drawn over them,
Python
importnumpyasnpimportmatplotlib.pyplotaspltw,P=1.0,4.0# kN/m and kNH=table["H (m)"].to_numpy()M=table["M_base (kNm)"].abs().to_numpy()Hs=np.linspace(H.min(),H.max(),60)fig,ax=plt.subplots(figsize=(6,3.5))ax.plot(Hs,w*Hs**2/2+P*Hs,color="tab:gray",label="wHยฒ/2 + PH")ax.plot(H,M,"o",color="tab:blue",label="Study")ax.set_xlabel("Height H (m)")ax.set_ylabel("Base moment (kNm)")ax.legend()plt.show()forh,minzip(H,M):
print(f"H = {h:.0f} m: M = {m:.2f} kNm, formula {w*h**2/2+P*h:.2f} kNm")
numpy is the standard Python library for arrays of numbers, and we import it as np. A study's table holds plain numbers, with the units in the column names, so in this cell we work in plain numbers too, with w and P in kN/m and kN. .to_numpy() turns a column into an array, and .abs() takes the size of the base moment, since a reaction moment has a sign. np.linspace makes 60 evenly spaced heights between the shortest and the tallest, so the formula draws as a smooth curve, and the study's seven points are drawn on top of it as dots. In the last two lines, zip(H, M) pairs each height with its moment, so the loop can print them side by side,
Text
H = 3 m: M = 16.50 kNm, formula 16.50 kNm
H = 4 m: M = 24.00 kNm, formula 24.00 kNm
H = 5 m: M = 32.50 kNm, formula 32.50 kNm
H = 6 m: M = 42.00 kNm, formula 42.00 kNm
H = 7 m: M = 52.50 kNm, formula 52.50 kNm
H = 8 m: M = 64.00 kNm, formula 64.00 kNm
H = 9 m: M = 76.50 kNm, formula 76.50 kNm
3.2 The tallest post that passes
The tallest post that passes an elastic check is the one whose base moment equals its elastic moment resistance, Mel,Rdโ=Welโfyโ. Setting wH2/2+PH=Mel,Rdโ gives a quadratic in H, and its positive root is,
H=wโP+P2+2wMel,Rdโโโ
The last cell works it out,
Python
M_Rd=(v.I/(v.h/2)*v.fy).to("kN*m").magnitudeH_max=(-P+np.sqrt(P**2+2*w*M_Rd))/wprint(f"M_el,Rd = {M_Rd:.1f} kNm, so the tallest post that passes is {H_max:.2f} m")
and prints,
Text
M_el,Rd = 44.3 kNm, so the tallest post that passes is 6.23 m
Notice that the cell doesn't use the study at all. The study showed how the moment grows with the height, and the formula agreed with it at every point. So, we can now use the formula to find the height between the study's points where the post reaches its resistance.
If you're a member, press Copy to my projects and try the following in your copy.
Things to try
Press Solve, then Run all to run the sheet in your copy. In a new copy, the first code cell stops with NoStudyRun, because the study hasn't been run in that copy yet. Press Explore to open the Studies canvas, then press โถ Run 7 points on the model node. You can also run await sb.studies["Height sweep"].play() in a cell, which runs the study in the same way. Then press Run all again, and the table, the plot and the lines above appear.
On the Studies canvas, change the Range node to run from 2 m to 10 m in nine points, press โถ Run 9 points on the model node, and run the sheet again. The table and the plot now have nine points, and the formula still agrees with every one. The tallest post that passes is still 6.23 m, because it depends only on the section and the loads.
Change the wind load in the Loads table from 1 kN/m to 1.2 kN/m, press Solve, and run the first code cell. It stops with NoStudyRun, because the study's last run was made on an earlier version of the model, and a sheet only reads a run that matches the model as it stands. Press โถ Run 7 points on the model node and run the sheet again. Now the study's base moments have grown, but the formula column hasn't, because the cell uses the w = 1.0 typed into it. Set the wind load back to 1 kN/m afterwards.
4.0 What you'll see
The sign post's study
The sheet prints
By hand
Base moment at 3 m
M = 16.50 kNm
1ร32/2+4ร3=16.5 kNm
Base moment at 6 m
M = 42.00 kNm
1ร62/2+4ร6=42.0 kNm
Base moment at 9 m
M = 76.50 kNm
1ร92/2+4ร9=76.5 kNm
Elastic moment resistance
M_el,Rd = 44.3 kNm
124.8ร355/1,000=44.3 kNm
Tallest post that passes
6.23 m
the quadratic's positive root, 6.23 m
The study's seven points lie exactly on the formula's curve, which is what we'd expect, because the post is statically determinate and the formula is exact. The post at 6 m, its height in the model, has a design base moment of 42.0 kNm against a design resistance of 44.3 kNm, so it passes with a little to spare. At 7 m, it would carry 52.5 kNm and fail.
Hand check
The base moments. Taking moments about the base of the post, the wind's resultant wH acts at half the height and the sign's load P at the top, so M=wHรH/2+PH. At 6 m, M=1ร6ร3+4ร6=18+24=42 kNm, which is the study's 42.00 kNm, and the formula gives the study's value at every height in the same way.
The resistance. The CHS 168.3 x 6.3 has I=1,050 cmโด and a diameter of 168.3 mm, so,
Welโ=
with ฮณM0โ=1.0.
The tallest post. Setting H2/2+4H=44.3 and solving the quadratic,
H=1โ4+42
which is the sheet's 6.23 m. As a check, a 6.23 m post carries 6.232/2+4ร6.23=19.41+24.92=44.3 kNm, its full elastic resistance.
5.0 What a sheet can read from a study
The run as it stands, and serviceability
A sheet only reads a study's run if it matches the study and the model as they are now. If you've changed either one since the study last ran, table() stops with NoStudyRun and tells you why, rather than handing back numbers from an earlier version of the model. So, whenever you edit the model or the study, run the study again before running the sheet.
You can run a study from a sheet with .play(), and it counts as a solve, just as it would from the Studies canvas. A Seek is different. It searches for the value of a parameter that meets a target, and it can only be run, and its result read, on the Studies canvas.
Finally, the check in this step leaves out serviceability. Under these design loads, a 6 m post deflects 204 mm at the top. A serviceability check would look at its deflection under the unfactored wind load instead.
6.0 What to take from this step
A study runs many solves in the background, and a sheet reads its latest run as a table with await sb.studies[...].table(), once the run matches the model as it stands. In the sheet, we compared the study with a formula, plotted both, and used the formula, once we'd confirmed it against the study, to find the tallest post that passes. A value typed into a sheet doesn't follow the model, so it's always better to read loads and properties from the model where you can.
Next, we'll write the complete check of a steel lintel as a calculation record that someone else can read and check.