From fb038b31331f315efddb2a780d194cd0c35fa4e4 Mon Sep 17 00:00:00 2001 From: Rafael Date: Sat, 26 Oct 2024 11:24:51 -0300 Subject: [PATCH] DOC: updates in documentation --- README.md | 1 + composipy/core/property.py | 13 ++++++++++--- composipy/core/strength.py | 10 ++++++++++ composipy/version.py | 2 +- doc/notebooks/Stress_strain_of_laminate.ipynb | 18 ++++++++++++++++++ 5 files changed, 40 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d32b8e4..35e16f8 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ See [OrthotropicMaterial](https://rafaelpsilva07.github.io/composipy/reference/c ```python from composipy import LaminateProperty + #[BOTTOM ------------------------ TOP] stacking = [-45, 45, 90, 0, 0, 0, 0, 90, 45, -45] laminate1 = LaminateProperty(stacking, mat_1) ``` diff --git a/composipy/core/property.py b/composipy/core/property.py index d5d086b..6ad4567 100644 --- a/composipy/core/property.py +++ b/composipy/core/property.py @@ -13,10 +13,10 @@ class Property(ComposipyValidator): class LaminateProperty(Property): ''' - This class creates laminate object. It needs Material objects (to define plies) and the angle information. + This class creates a LaminateProperty object. It requires Material objects (to define plies) and angle information. Some formulation characteristics are: - Laminate formulations ares used (see References) - Main reference is the chapter 4 of reference 2. + - Laminate formulations are used (see References). + - The main reference is Chapter 4 of Reference 2. Parameters ---------- @@ -49,6 +49,13 @@ class LaminateProperty(Property): >>> laminate_2.ABD # retunrs an array containing bending stiffness matrix [D] of the laminate >>> laminate_2.xiA # lamination parameters of extension >>> laminate_2.xiA # lamination parameters of bending + + Note + ----- + The first element of the stacking list corresponds to the BOTTOM OF THE LAYUP, and the last element corresponds to the + TOP OF THE LAYUP. This is important for non-symmetric laminates. + + Refer to https://github.com/rafaelpsilva07/composipy/issues/28. ''' def __init__(self, stacking, plies): diff --git a/composipy/core/strength.py b/composipy/core/strength.py index 0588ba0..5e58386 100644 --- a/composipy/core/strength.py +++ b/composipy/core/strength.py @@ -184,6 +184,11 @@ def calculate_strain(self): ------- strains : pd.Dataframe ply by ply strains in plate direction and material direction + + Note + ---- + The sequence of the DataFrame starts from the TOP OF THE LAYUP to the BOTTOM OF THE LAYUP, which is the reverse of the definition order. + When defining the laminate, the first element of the list corresponds to the bottom-most layer. This is especially important for non-symmetric laminates. ''' epsilonk = self._epsilonk() epsilonk_123 = self._epsilonk_123() @@ -241,6 +246,11 @@ def calculate_stress(self): ------- stress : pd.Dataframe ply by ply stress in plate direction and material direction + + Note + ---- + The sequence of the DataFrame starts from the TOP OF THE LAYUP to the BOTTOM OF THE LAYUP, which is the reverse of the definition order. + When defining the laminate, the first element of the list corresponds to the bottom-most layer. This is especially important for non-symmetric laminates. ''' stressk = self._stressk() diff --git a/composipy/version.py b/composipy/version.py index 618528c..1b37c69 100644 --- a/composipy/version.py +++ b/composipy/version.py @@ -1 +1 @@ -__version__ = '1.5.0' \ No newline at end of file +__version__ = '1.5.1' \ No newline at end of file diff --git a/doc/notebooks/Stress_strain_of_laminate.ipynb b/doc/notebooks/Stress_strain_of_laminate.ipynb index ab9f1c6..b345f48 100644 --- a/doc/notebooks/Stress_strain_of_laminate.ipynb +++ b/doc/notebooks/Stress_strain_of_laminate.ipynb @@ -229,6 +229,15 @@ "df_strain.head(6) #display the first 6" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Note\n", + "The sequence of the DataFrame starts from the TOP OF THE LAYUP to the BOTTOM OF THE LAYUP, which is the reverse of the definition order.\n", + "When defining the laminate, the first element of the list corresponds to the bottom-most layer. This is especially important for non-symmetric laminates." + ] + }, { "cell_type": "code", "execution_count": 27, @@ -404,6 +413,15 @@ "df_stress.head(6) #display the first 6" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Note\n", + "The sequence of the DataFrame starts from the TOP OF THE LAYUP to the BOTTOM OF THE LAYUP, which is the reverse of the definition order.\n", + "When defining the laminate, the first element of the list corresponds to the bottom-most layer. This is especially important for non-symmetric laminates." + ] + }, { "cell_type": "code", "execution_count": 30,