Skip to content

Commit f1a29a7

Browse files
Merge pull request #466 from jchkoch/feature-timber-sections
Add rectangular CLT section to (new) timber sections library
2 parents c676e1b + fef9d59 commit f1a29a7

File tree

5 files changed

+389
-13
lines changed

5 files changed

+389
-13
lines changed

docs/examples/geometry/section_library.ipynb

Lines changed: 263 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,256 @@
282282
"cell_type": "markdown",
283283
"id": "26",
284284
"metadata": {},
285+
"source": [
286+
"## Rectangular Timber CLT Section\n",
287+
"\n",
288+
"The following example calculates the geometric properties of a rectangular timber crosslaminated section."
289+
]
290+
},
291+
{
292+
"cell_type": "markdown",
293+
"id": "27",
294+
"metadata": {},
295+
"source": [
296+
"### Import Modules\n",
297+
"\n",
298+
"We start by importing the [timber_rectangular_section()](../../gen/sectionproperties.pre.library.timber_sections.timber_rectangular_section.rst#sectionproperties.pre.library.timber_sections.timber_rectangular_section) function from the section library, and the [Material()](../../gen/sectionproperties.pre.pre.Material.rst#sectionproperties.pre.pre.Material) object to define our timber material."
299+
]
300+
},
301+
{
302+
"cell_type": "code",
303+
"execution_count": null,
304+
"id": "28",
305+
"metadata": {},
306+
"outputs": [],
307+
"source": [
308+
"from sectionproperties.analysis import Section\n",
309+
"from sectionproperties.pre import Material\n",
310+
"from sectionproperties.pre.library import clt_rectangular_section"
311+
]
312+
},
313+
{
314+
"cell_type": "markdown",
315+
"id": "29",
316+
"metadata": {},
317+
"source": [
318+
"### Create Geometry\n",
319+
"\n",
320+
"Create a 120 deep by 1000 wide crosslaminated timber slab.\n",
321+
"\n",
322+
"The following material properties are used:\n",
323+
"\n",
324+
"**SPF-Timber - Parallel-to-grain**\n",
325+
" \n",
326+
"- Elastic modulus = 9500 MPa\n",
327+
"- Poisson's ratio = 0.35\n",
328+
"- Density = 4400 kg/m$^3$\n",
329+
"- Yield Strengh = 5.5 MPa\n",
330+
"\n",
331+
"**SPF-Timber - Perpendicular-to-grain**\n",
332+
" \n",
333+
"- Elastic modulus = 317 MPa\n",
334+
"- Poisson's ratio = 0.35\n",
335+
"- Density = 4400 kg/m$^3$\n",
336+
"- Yield Strengh = 5.5 MPa"
337+
]
338+
},
339+
{
340+
"cell_type": "code",
341+
"execution_count": null,
342+
"id": "30",
343+
"metadata": {},
344+
"outputs": [],
345+
"source": [
346+
"timber0 = Material(\n",
347+
" name=\"Timber0\",\n",
348+
" elastic_modulus=9.5e3,\n",
349+
" poissons_ratio=0.35,\n",
350+
" density=4.4e-7,\n",
351+
" yield_strength=5.5,\n",
352+
" color=\"burlywood\",\n",
353+
")\n",
354+
"\n",
355+
"timber90 = Material(\n",
356+
" name=\"Timber90\",\n",
357+
" elastic_modulus=317,\n",
358+
" poissons_ratio=0.35,\n",
359+
" density=4.4e-7,\n",
360+
" yield_strength=5.5,\n",
361+
" color=\"orange\",\n",
362+
")"
363+
]
364+
},
365+
{
366+
"cell_type": "markdown",
367+
"id": "31",
368+
"metadata": {},
369+
"source": [
370+
"### Create the geometry - Major (x-) axis bending"
371+
]
372+
},
373+
{
374+
"cell_type": "code",
375+
"execution_count": null,
376+
"id": "32",
377+
"metadata": {},
378+
"outputs": [],
379+
"source": [
380+
"geom_maj = clt_rectangular_section(\n",
381+
" d=[40, 40, 40], lay_orient=[timber0, timber90, timber0], b=1000\n",
382+
")"
383+
]
384+
},
385+
{
386+
"cell_type": "markdown",
387+
"id": "33",
388+
"metadata": {},
389+
"source": [
390+
"#### Create Mesh and ``Section`` object\n",
391+
"\n",
392+
"Create a mesh with a mesh size of 200 mm$^2$ and plot the mesh."
393+
]
394+
},
395+
{
396+
"cell_type": "code",
397+
"execution_count": null,
398+
"id": "34",
399+
"metadata": {},
400+
"outputs": [],
401+
"source": [
402+
"geom_maj.create_mesh(mesh_sizes=[200])\n",
403+
"sec_maj = Section(geometry=geom_maj)\n",
404+
"sec_maj.plot_mesh()"
405+
]
406+
},
407+
{
408+
"cell_type": "markdown",
409+
"id": "35",
410+
"metadata": {},
411+
"source": [
412+
"#### Perform an Analysis\n",
413+
"\n",
414+
"We perform only a geometric analysis on the timber CLT section."
415+
]
416+
},
417+
{
418+
"cell_type": "code",
419+
"execution_count": null,
420+
"id": "36",
421+
"metadata": {},
422+
"outputs": [],
423+
"source": [
424+
"sec_maj.calculate_geometric_properties()"
425+
]
426+
},
427+
{
428+
"cell_type": "markdown",
429+
"id": "37",
430+
"metadata": {},
431+
"source": [
432+
"#### Calculate Gross Effective Moment of Inertia\n",
433+
"\n",
434+
"We can calculate the gross effective moment of inertia by obtaining the flexural rigidity ($\\sum E.I$) of the section and dividing it by the elastic modulus of the reference timber (i.e. Timber0)."
435+
]
436+
},
437+
{
438+
"cell_type": "code",
439+
"execution_count": null,
440+
"id": "38",
441+
"metadata": {},
442+
"outputs": [],
443+
"source": [
444+
"ei_maj = sec_maj.get_eic(e_ref=timber0)\n",
445+
"print(f\"I_eff,x,major = {ei_maj[0]:.3e} mm4\")"
446+
]
447+
},
448+
{
449+
"cell_type": "markdown",
450+
"id": "39",
451+
"metadata": {},
452+
"source": [
453+
"### Create the geometry - Minor (z-) axis bending"
454+
]
455+
},
456+
{
457+
"cell_type": "code",
458+
"execution_count": null,
459+
"id": "40",
460+
"metadata": {},
461+
"outputs": [],
462+
"source": [
463+
"geom_min = clt_rectangular_section(\n",
464+
" d=[40, 40, 40], lay_orient=[timber90, timber0, timber90], b=1000\n",
465+
")"
466+
]
467+
},
468+
{
469+
"cell_type": "markdown",
470+
"id": "41",
471+
"metadata": {},
472+
"source": [
473+
"#### Create Mesh and ``Section`` object\n",
474+
"\n",
475+
"Create a mesh with a mesh size of 200 mm$^2$ and plot the mesh."
476+
]
477+
},
478+
{
479+
"cell_type": "code",
480+
"execution_count": null,
481+
"id": "42",
482+
"metadata": {},
483+
"outputs": [],
484+
"source": [
485+
"geom_min.create_mesh(mesh_sizes=[200])\n",
486+
"sec_min = Section(geometry=geom_min)\n",
487+
"sec_min.plot_mesh()"
488+
]
489+
},
490+
{
491+
"cell_type": "markdown",
492+
"id": "43",
493+
"metadata": {},
494+
"source": [
495+
"#### Perform an Analysis\n",
496+
"\n",
497+
"We perform only a geometric analysis on the timber CLT section."
498+
]
499+
},
500+
{
501+
"cell_type": "code",
502+
"execution_count": null,
503+
"id": "44",
504+
"metadata": {},
505+
"outputs": [],
506+
"source": [
507+
"sec_min.calculate_geometric_properties()"
508+
]
509+
},
510+
{
511+
"cell_type": "markdown",
512+
"id": "45",
513+
"metadata": {},
514+
"source": [
515+
"#### Calculate Gross Effective Moment of Inertia\n",
516+
"\n",
517+
"We can calculate the gross effective moment of inertia by obtaining the flexural rigidity ($\\sum E.I$) of the section and dividing it by the elastic modulus of the reference timber (i.e. Timber0)."
518+
]
519+
},
520+
{
521+
"cell_type": "code",
522+
"execution_count": null,
523+
"id": "46",
524+
"metadata": {},
525+
"outputs": [],
526+
"source": [
527+
"ei_min = sec_min.get_eic(e_ref=timber0)\n",
528+
"print(f\"I_eff,x,minor = {ei_min[0]:.3e} mm4\")"
529+
]
530+
},
531+
{
532+
"cell_type": "markdown",
533+
"id": "47",
534+
"metadata": {},
285535
"source": [
286536
"## Rectangular Concrete Section\n",
287537
"\n",
@@ -290,7 +540,7 @@
290540
},
291541
{
292542
"cell_type": "markdown",
293-
"id": "27",
543+
"id": "48",
294544
"metadata": {},
295545
"source": [
296546
"### Import Modules\n",
@@ -301,7 +551,7 @@
301551
{
302552
"cell_type": "code",
303553
"execution_count": null,
304-
"id": "28",
554+
"id": "49",
305555
"metadata": {},
306556
"outputs": [],
307557
"source": [
@@ -311,7 +561,7 @@
311561
},
312562
{
313563
"cell_type": "markdown",
314-
"id": "29",
564+
"id": "50",
315565
"metadata": {},
316566
"source": [
317567
"### Create Geometry\n",
@@ -344,7 +594,7 @@
344594
{
345595
"cell_type": "code",
346596
"execution_count": null,
347-
"id": "30",
597+
"id": "51",
348598
"metadata": {},
349599
"outputs": [],
350600
"source": [
@@ -392,7 +642,7 @@
392642
},
393643
{
394644
"cell_type": "markdown",
395-
"id": "31",
645+
"id": "52",
396646
"metadata": {},
397647
"source": [
398648
"### Create Mesh and ``Section`` object\n",
@@ -403,7 +653,7 @@
403653
{
404654
"cell_type": "code",
405655
"execution_count": null,
406-
"id": "32",
656+
"id": "53",
407657
"metadata": {},
408658
"outputs": [],
409659
"source": [
@@ -414,7 +664,7 @@
414664
},
415665
{
416666
"cell_type": "markdown",
417-
"id": "33",
667+
"id": "54",
418668
"metadata": {},
419669
"source": [
420670
"### Perform an Analysis\n",
@@ -425,7 +675,7 @@
425675
{
426676
"cell_type": "code",
427677
"execution_count": null,
428-
"id": "34",
678+
"id": "55",
429679
"metadata": {},
430680
"outputs": [],
431681
"source": [
@@ -434,7 +684,7 @@
434684
},
435685
{
436686
"cell_type": "markdown",
437-
"id": "35",
687+
"id": "56",
438688
"metadata": {},
439689
"source": [
440690
"### Calculate Gross Effective Moment of Inertia\n",
@@ -445,13 +695,13 @@
445695
{
446696
"cell_type": "code",
447697
"execution_count": null,
448-
"id": "36",
698+
"id": "57",
449699
"metadata": {},
450700
"outputs": [],
451701
"source": [
452702
"ei = sec.get_eic(e_ref=concrete)\n",
453-
"print(f\"I_eff = {ei[0]:.3e} mm6\")\n",
454-
"print(f\"I_rec = {(300 * 600**3 / 12):.3e} mm6\")"
703+
"print(f\"I_eff = {ei[0]:.3e} mm4\")\n",
704+
"print(f\"I_rec = {(300 * 600**3 / 12):.3e} mm4\")"
455705
]
456706
}
457707
],
@@ -471,7 +721,7 @@
471721
"name": "python",
472722
"nbconvert_exporter": "python",
473723
"pygments_lexer": "ipython3",
474-
"version": "3.9.17"
724+
"version": "3.12.8"
475725
}
476726
},
477727
"nbformat": 4,

docs/user_guide/geometry.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,16 @@ Concrete Sections
315315
~sectionproperties.pre.library.concrete_sections.double_lift_core_b
316316
~sectionproperties.pre.library.concrete_sections.stairwell
317317

318+
.. _label-timber-library:
319+
320+
Timber Section
321+
""""""""""""""
322+
323+
.. autosummary::
324+
:nosignatures:
325+
326+
~sectionproperties.pre.library.timber_sections.clt_rectangular_section
327+
318328
.. _label-bridge-library:
319329

320330
Bridge Sections

src/sectionproperties/pre/library/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,4 @@
7070
tee_section,
7171
zed_section,
7272
)
73+
from sectionproperties.pre.library.timber_sections import clt_rectangular_section

0 commit comments

Comments
 (0)