Skip to content

New section library #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Dec 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import locale


locale.setlocale(locale.LC_ALL, '')
locale.setlocale(locale.LC_ALL, "")

# -- Path setup --------------------------------------------------------------

Expand Down Expand Up @@ -50,10 +50,10 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinx_gallery.gen_gallery',
"sphinx.ext.autodoc",
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
"sphinx_gallery.gen_gallery",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -181,23 +181,23 @@

sphinx_gallery_conf = {
# convert rst to md for ipynb
'pypandoc': False,
"pypandoc": False,
# path to your examples scripts
'examples_dirs': ['../../examples/'],
"examples_dirs": ["../../examples/"],
# path where to save gallery generated examples
'gallery_dirs': ['sphinx_gallery_examples'],
"gallery_dirs": ["sphinx_gallery_examples"],
# Patter to search for example files
'filename_pattern': r'\.py',
"filename_pattern": r"\.py",
# Remove the 'Download all examples' button from the top level gallery
'download_all_examples': False,
"download_all_examples": False,
# Sort gallery example by file name instead of number of lines (default)
'within_subsection_order': FileNameSortKey,
"within_subsection_order": FileNameSortKey,
# directory where function granular galleries are stored
'backreferences_dir': None,
"backreferences_dir": None,
# Modules for which function level galleries are created. In
'doc_module': 'sectionproperties',
'image_scrapers': ('matplotlib',),
'first_notebook_cell': ('%matplotlib inline\n'),
"doc_module": "sectionproperties",
"image_scrapers": ("matplotlib",),
"first_notebook_cell": ("%matplotlib inline\n"),
}

# sphinx_gallery_conf = {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 6 additions & 5 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ can be found in the README file on github.
rst/installation
rst/structure
rst/geom_mesh
rst/section_library
rst/advanced_geom
rst/analysis
rst/post
Expand All @@ -36,14 +37,14 @@ can be found in the README file on github.

Here's a quick example that harnesses some of the power of *sectionproperties* and shows its simplicity::

import sectionproperties.pre.sections as sections
import sectionproperties.pre.library.steel_sections as steel_sections
from sectionproperties.analysis.cross_section import Section

# create geometry of the cross-section
geometry = sections.i_section(d=203, b=133, t_f=7.8, t_w=5.8, r=8.9, n_r=8)
geometry = steel_sections.i_section(d=203, b=133, t_f=7.8, t_w=5.8, r=8.9, n_r=8)

# generate a finite element mesh
geometry.create_mesh(mesh_sizes=[2.5])
geometry.create_mesh(mesh_sizes=[10])

# create a Section object for analysis
section = Section(geometry)
Expand All @@ -58,9 +59,9 @@ Here's a quick example that harnesses some of the power of *sectionproperties* a
print(section.get_ic()) # second moments of area about the centroidal axis
>>>(23544664.29, 3063383.07, 0.00)
print(section.get_j()) # torsion constant
>>>62907.79
>>>62954.43
print(section.get_As()) # shear areas in the x & y directions
>>>(1842.17, 1120.18)
>>>(1842.24, 1120.19)

Support
-------
Expand Down
10 changes: 5 additions & 5 deletions docs/source/rst/advanced_geom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ Creating Merged Sections

For this example, we will create a custom section out of two similar "I" sections::

import sectionproperties.pre.sections as sections
import sectionproperties.pre.library.steel_sections as steel_sections
import sectionproperties.analysis.cross_section as cross_section

i_sec1 = sections.i_section(d=250, b=150, t_f=13, t_w=10, r=12, n_r=12)
i_sec1 = steel_sections.i_section(d=250, b=150, t_f=13, t_w=10, r=12, n_r=12)
i_sec2 = i_sec1.rotate_section(45)

.. figure:: ../images/examples/i_sec1.png
Expand Down Expand Up @@ -159,11 +159,11 @@ Another example

Here, we will simply combine two squares with the default material::

import sectionproperties.pre.sections as sections
import sectionproperties.pre.library.standard_sections as standard_sections
from sectionproperties.analysis.cross_section import Section

s1 = sections.rectangular_section(1,1)
s2 = sections.rectangular_section(0.5,0.5).shift_section(1,0.25)
s1 = standard_sections.rectangular_section(1,1)
s2 = standard_sections.rectangular_section(0.5,0.5).shift_section(1,0.25)
geometry = s1 + s2
geometry

Expand Down
Loading