Skip to content

Commit fdb126c

Browse files
Merge pull request #84 from robbievanleeuwen/principal_stress
Minor style changes
2 parents e5e6744 + 89626ef commit fdb126c

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
# Add any paths that contain custom static files (such as style sheets) here,
9292
# relative to this directory. They are copied after the builtin static files,
9393
# so a file named "default.css" will overwrite the builtin "default.css".
94-
html_static_path = ['_static']
94+
html_static_path = []
9595

9696
# Custom sidebar templates, must be a dictionary that maps document names
9797
# to template names.

docs/source/rst/post.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,14 +332,14 @@ Shear Stress (:math:`\sigma_{zxy}`)
332332

333333
.. automethod:: sectionproperties.analysis.cross_section.StressPost.plot_vector_zxy
334334
:noindex:
335-
335+
336336
Major Principal Stress (:math:`\sigma_{1}`)
337-
""""""""""""""""""""""""""""""""""""
337+
"""""""""""""""""""""""""""""""""""""""""""
338338
.. automethod:: sectionproperties.analysis.cross_section.StressPost.plot_stress_1
339339
:noindex:
340340

341341
Minor Principal Stress (:math:`\sigma_{2}`)
342-
""""""""""""""""""""""""""""""""""""
342+
"""""""""""""""""""""""""""""""""""""""""""
343343
.. automethod:: sectionproperties.analysis.cross_section.StressPost.plot_stress_2
344344
:noindex:
345345

sectionproperties/analysis/cross_section.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3809,17 +3809,17 @@ def plot_vector_zxy(self, pause=True):
38093809
return self.plot_stress_vector(sigxs, sigys, title, pause)
38103810

38113811
def plot_stress_1(self, pause=True):
3812-
"""Produces a contour plot of the Major principal stress :math:`\sigma_{1}` resulting from all
3813-
actions.
3812+
"""Produces a contour plot of the major principal stress :math:`\sigma_{1}` resulting from
3813+
all actions.
38143814
38153815
:param bool pause: If set to true, the figure pauses the script until the window is closed.
38163816
If set to false, the script continues immediately after the window is rendered.
38173817
38183818
:return: Matplotlib figure and axes objects (fig, ax)
38193819
:rtype: (:class:`matplotlib.figure.Figure`, :class:`matplotlib.axes`)
38203820
3821-
The following example plots a contour of the Major principal stress within a 150x90x12 UA section
3822-
resulting from the following actions:
3821+
The following example plots a contour of the Major principal stress within a 150x90x12 UA
3822+
section resulting from the following actions:
38233823
38243824
* :math:`N = 50` kN
38253825
* :math:`M_{xx} = -5` kN.m
@@ -3849,7 +3849,7 @@ def plot_stress_1(self, pause=True):
38493849
:align: center
38503850
:scale: 75 %
38513851
3852-
Contour plot of the Major Principal stress.
3852+
Contour plot of the major principal stress.
38533853
"""
38543854

38553855
title = 'Stress Contour Plot - $\sigma_{1}$'
@@ -3861,17 +3861,17 @@ def plot_stress_1(self, pause=True):
38613861
return self.plot_stress_contour(sigs, title, pause)
38623862

38633863
def plot_stress_2(self, pause=True):
3864-
"""Produces a contour plot of the Minor principal stress :math:`\sigma_{2}` resulting from all
3865-
actions.
3864+
"""Produces a contour plot of the minor principal stress :math:`\sigma_{2}` resulting from
3865+
all actions.
38663866
38673867
:param bool pause: If set to true, the figure pauses the script until the window is closed.
38683868
If set to false, the script continues immediately after the window is rendered.
38693869
38703870
:return: Matplotlib figure and axes objects (fig, ax)
38713871
:rtype: (:class:`matplotlib.figure.Figure`, :class:`matplotlib.axes`)
38723872
3873-
The following example plots a contour of the Minor principal stress within a 150x90x12 UA section
3874-
resulting from the following actions:
3873+
The following example plots a contour of the Minor principal stress within a 150x90x12 UA
3874+
section resulting from the following actions:
38753875
38763876
* :math:`N = 50` kN
38773877
* :math:`M_{xx} = -5` kN.m
@@ -3901,7 +3901,7 @@ def plot_stress_2(self, pause=True):
39013901
:align: center
39023902
:scale: 75 %
39033903
3904-
Contour plot of the Minor Principal stress.
3904+
Contour plot of the minor principal stress.
39053905
"""
39063906

39073907
title = 'Stress Contour Plot - $\sigma_{2}$'
@@ -3912,7 +3912,6 @@ def plot_stress_2(self, pause=True):
39123912

39133913
return self.plot_stress_contour(sigs, title, pause)
39143914

3915-
39163915
def plot_stress_vm(self, pause=True):
39173916
"""Produces a contour plot of the von Mises stress :math:`\sigma_{vM}` resulting from all
39183917
actions.
@@ -4127,8 +4126,8 @@ def calculate_combined_stresses(self):
41274126
self.sig_zx = self.sig_zx_mzz + self.sig_zx_v
41284127
self.sig_zy = self.sig_zy_mzz + self.sig_zy_v
41294128
self.sig_zxy = (self.sig_zx ** 2 + self.sig_zy ** 2) ** 0.5
4130-
self.sig_1 = self.sig_zz / 2 + np.sqrt( (self.sig_zz / 2) ** 2 + self.sig_zxy ** 2)
4131-
self.sig_2 = self.sig_zz / 2 - np.sqrt( (self.sig_zz / 2) ** 2 + self.sig_zxy ** 2)
4129+
self.sig_1 = self.sig_zz / 2 + np.sqrt((self.sig_zz / 2) ** 2 + self.sig_zxy ** 2)
4130+
self.sig_2 = self.sig_zz / 2 - np.sqrt((self.sig_zz / 2) ** 2 + self.sig_zxy ** 2)
41324131
self.sig_vm = (self.sig_zz ** 2 + 3 * self.sig_zxy ** 2) ** 0.5
41334132

41344133

0 commit comments

Comments
 (0)