Skip to content
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

Add a failure criteria for using Composite Materials (Tsai Wu Failure Criteria) #444

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
5eb646f
initial commit for tsaiwu wingbox package
vishhwamehta Jun 27, 2024
fe4c98d
Merge remote-tracking branch 'origin/main' into tsaiwu
A-CGray Jul 16, 2024
172358b
Merge remote-tracking branch 'vishwaoas/main' into tsaiwu
vishhwamehta Jul 16, 2024
a93d002
Make geometry spline interpolation mesh independent
A-CGray Jul 17, 2024
f24412f
formatting changes
vishhwamehta Jul 23, 2024
b1dfd08
Merge branch 'main' into tsaiwu
vishhwamehta Jul 23, 2024
fb7f79f
Merge branch 'tsaiwu' of github.com:vishhh17/OpenAeroStruct into tsaiwu
A-CGray Jul 23, 2024
d981854
implemented "useComposite" in the surfdict for the option of using co…
vishhwamehta Jul 30, 2024
92074f7
changed the surface dictionary in the test files to work with the new…
vishhwamehta Jul 30, 2024
720216b
Merge branch 'tsaiwu' of github.com:vishhh17/OpenAeroStruct into tsaiwu
A-CGray Jul 30, 2024
c2b25e7
Made the changes with if statements of "useComposite", bug fixes with…
vishhwamehta Jul 31, 2024
09de0aa
cleaning all the codes, removing unnecessary comments and updating th…
vishhwamehta Jul 31, 2024
052ecdb
bug fixes due to the hardcoded 4 plies
vishhwamehta Jul 31, 2024
64c5b8a
Merge branch 'tsaiwu' of github.com:vishhh17/OpenAeroStruct into tsaiwu
A-CGray Aug 2, 2024
adff022
Modify surface dictionary checks
A-CGray Aug 2, 2024
319a172
Rename surface dict variables to follow OAS conventions
A-CGray Aug 2, 2024
8ce1867
Undo artifact from previous merge
A-CGray Aug 2, 2024
40ca8db
Fix error message
A-CGray Aug 30, 2024
af4c36f
correcting the spatial_beam_functionals
vishhwamehta Sep 13, 2024
a415013
`black -l 120 .`
A-CGray Sep 13, 2024
f386a44
`black -l 120 .`
A-CGray Sep 13, 2024
f7710bb
Fix docstring in failure_ks
A-CGray Sep 13, 2024
8977de6
fixing the files flagged for pull request tests
vishhwamehta Sep 19, 2024
88f47a5
Merge branch 'tsaiwu' of github.com:vishhh17/OpenAeroStruct into tsaiwu
vishhwamehta Sep 19, 2024
96c0cd0
removing the call for shwoing n2, and fixing formatting bug
vishhwamehta Sep 19, 2024
2c53537
removing the asert.near.equal import statement from test file
vishhwamehta Sep 19, 2024
9c52af8
failure files and check_surface_dict modified to use "safety_factor".…
vishhwamehta Sep 19, 2024
c2f5734
removed unused import statements, adding option for the cases where s…
vishhwamehta Sep 19, 2024
2e33dd5
creating and editing the documentation files for OAS documentation
vishhwamehta Sep 19, 2024
a22061b
updating heirarchy for the documentation files
vishhwamehta Sep 19, 2024
454b0a1
Add code excerpt to composites doc page
A-CGray Sep 19, 2024
906f585
documemtation for composite wingbox
vishhwamehta Oct 17, 2024
0205b35
updated the documentation page
vishhwamehta Oct 17, 2024
e98d007
changed the safety factor documentation and added the Pareto front to…
vishhwamehta Oct 23, 2024
1620271
Simplifying some code in failure_ks
A-CGray Nov 1, 2024
78107d4
small docs fix
A-CGray Nov 1, 2024
cfd8706
variable renaming
A-CGray Nov 1, 2024
bd1aa92
More robust if check
A-CGray Nov 1, 2024
2e6e9c0
Check against lower case strings
A-CGray Nov 1, 2024
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
1 change: 1 addition & 0 deletions openaerostruct/aerodynamics/compressible_states.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Class definition for CompressibleVLMStates.
"""

import openmdao.api as om

from openaerostruct.aerodynamics.get_vectors import GetVectors
Expand Down
1 change: 1 addition & 0 deletions openaerostruct/aerodynamics/mesh_point_forces.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Class definition for the MeshPointForces component.
"""

import numpy as np
import openmdao.api as om

Expand Down
1 change: 1 addition & 0 deletions openaerostruct/docs/advanced_features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ These examples show some advanced features in OpenAeroStruct.
advanced_features/openconcept_coupling.rst
advanced_features/customizing_prob_setup.rst
advanced_features/mphys_coupling.rst
advanced_features/composites_walkthrough.rst
178 changes: 178 additions & 0 deletions openaerostruct/docs/advanced_features/composites_walkthrough.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
.. _Composites Walkthrough:

A walkthrough of the composites model
=====================================

This page will walk you through the composites model in OpenAeroStruct.
The composites module allows you to define composite material properties and laminate layups for the wing structure.

.. literalinclude:: ../composite_wingbox_mpt_opt_example.py
:start-after: checkpoint 7
:end-before: checkpoint 8

Here, ``useComposite`` is a boolean variable that is set to True to enable the composites model and ``safety_factor`` is the factor of safety used for determining the Tsai-Wu based failure
criteria of the composite material. The composite material properties are defined using the following variables:

- ``ply_angles`` is a list of the angles of the plies with respect to the x-axis.
- ``ply_fractions`` is a list of the ply fractions of the plies. (Should be the same length as ``ply_angles``, with the sum of the fractions equal to 1).
- ``E1`` is the modulus of elasticity in the fiber direction.
- ``E2`` is the modulus of elasticity in the transverse direction.
- ``G12`` is the shear modulus.
- ``nu12`` is the Poisson's ratio.
- ``sigma_t1`` is the tensile strength in the fiber direction.
- ``sigma_c1`` is the compressive strength in the fiber direction.
- ``sigma_t2`` is the tensile strength in the transverse direction.
- ``sigma_c2`` is the compressive strength in the transverse direction.
- ``sigma_12max`` is the maximum shear strength.

.. note::
The composites failure model doesn't use the ``strength_factor_for_upper_skin`` option from the surface dictionary.
If you want to apply a knockdown factor on the compressive strength to account for buckling, you should scale down the values of ``sigma_c1`` and ``sigma_c2``.

Currently, the moduli of elasticity of the entire FEM spatial beam model are assumed to be isotropic
in 2D plane so as to not change the entire model and is left for the future works. The values of the
moduli of elasticity are found using The unidirectional ply properties are used to find the stiffness matrix of the plies:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo?


.. math::

Q = \begin{bmatrix}
\frac{E_1}{1-\nu_{12}\nu_{21}} & \frac{\nu_{21}E_2}{1-\nu_{12}\nu_{21}} & 0 \\
\frac{\nu_{12}E_1}{1-\nu_{12}\nu_{21}} & \frac{E_2}{1-\nu_{12}\nu_{21}} & 0 \\
0 & 0 & G_{12}
\end{bmatrix}

where :math:`E_1` and :math:`E_2` are the moduli of elasticity in the fiber direction and transverse direction, respectively,
:math:`\nu_{12}` and :math:`\nu_{21}` are the Poisson's ratios, and :math:`G_{12}` is the shear modulus.

The transformed reduced stiffness matrix is found using the following equation:

.. math::

\bar{Q} = T^T Q T

where :math:`T` is the transformation matrix. The transformation matrix is found using the following equation:

.. math::

T = \begin{bmatrix}
\cos \theta & \sin \theta & 0 \\
-\sin \theta & \cos \theta & 0 \\
0 & 0 & 1
\end{bmatrix}

where :math:`\theta` is the angle of the ply with respect to the x-axis.

The effective reduced stiffness matrix for the laminate is found using the weighted sum of the reduced stiffness matrices of the plies,
using their respective ply fraction constituition:

.. math::

Q_{eff} = \sum_{i=1}^{n} f_i Q_{bar_i}

where :math:`f_i` is the ply fraction of the :math:`i^{th}` ply.

The effective compliance matrix is found using the following equation:

.. math::

S_{eff} = Q_{eff}^{-1}

The effective laminate properties are found using the following equations:

.. math::
E_{11} = \frac{1}{S_{eff_{11}}}\\
G = \frac{1}{S_{eff_{66}}}

These moduli of elasticility values are hence used to determine the stiffness matrix of the entire FEM spatial beam model. Thereafter, at the 4 critical points in the wingbox (mentioned in the aerostruct-wingbox walkthrough),
the strains are calculated for each of the constituent plies by transforming the strains at the critical points to the laminate coordinate system. This is done using the following equation:\\
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: ":\" ?

using the transformation:

.. math::

\begin{pmatrix}
\epsilon_1 \\
\epsilon_2 \\
\gamma_{12}
\end{pmatrix}
=
[T]
\begin{pmatrix}
\epsilon_x \\
\epsilon_y \\
\gamma_{xy}
\end{pmatrix}

The strains are then used to calculate the stresses in the laminate using the following equation:

.. math::

\begin{pmatrix}
\sigma_1 \\
\sigma_2 \\
\tau_{12}
\end{pmatrix}
=
[Q]
\begin{pmatrix}
\epsilon_1 \\
\epsilon_2 \\
\gamma_{12}
\end{pmatrix}

These local axial and shear stresses are then utilized to calculate the value of the **Strength Ratios** for each ply using Equation 5, where the coefficients are defined by:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You refer to Eq. 5, but in the readthedocs equations are not numbered (there might be a way to show equation numbers, I'm not sure though)


.. math::

F_{11} = \frac{1}{S_L^{(+)} S_L^{(-)}} \quad \text{and} \quad F_1 = \frac{1}{S_L^{(+)}} - \frac{1}{S_L^{(-)}}

.. math::

F_{22} = \frac{1}{S_T^{(+)} S_T^{(-)}} \quad \text{and} \quad F_2 = \frac{1}{S_T^{(+)}} - \frac{1}{S_T^{(-)}}

.. math::

F_{66} = \frac{1}{2 S_{LT}^{2}}

where :math:`S_L^{(+)} \text{and} S_L^{(-)}` are the longitudinal strengths in tension and compression respectively,
:math:`S_T^{(+)} \text{and} S_T^{(-)}` are the transverse strengths in tension and compression respectively and
:math:`S_{LT}^{(+)}` is the shear strength of a ply. The strength ratios are then used to calculate the Tsai-Wu based failure criteria for each ply.
The Tsai-Wu failure criteria is given by:

.. math::

F_1 \sigma_1 + F_2 \sigma_2 + F_{11} \sigma_1^2 + F_{22} \sigma_2^2 + F_{66} \tau_{12}^2 = 1

In order to implement the safety factor in the Tsai-Wu failure criteria, the equation is re-written as:

.. math::
a &= F_1 \sigma_1 + F_2 \sigma_2 \\
b &= F_{11} \sigma_1^2 + F_{22} \sigma_2^2 + F_{12} \sigma_1 \sigma_2

We hence caclulate the **Strength Ratios** using the formula:

.. math::

SR = \frac{1}{2} (a + \sqrt{a^2 + 4 b})

The strength ratio values hence calculated for each ply (determined by the length of ``ply_angles``) at each critical point (4 total),
(hence 4 x ``numplies`` strength ratio values for each beam element) for all beam elements are aggregated using a **KS Aggregate** function:

.. math::

\hat{g}_{KS}(\rho, g) = \max_j g_j + \frac{1}{\rho} \ln \left( \sum_{j=1}^{n_g} \exp \left( \rho (g_j - \max_j g_j) \right) \right)


where :math:`g` is :math:`\left( \frac{SR}{SR_{\text{lim}}} - 1 \right)` value for each ply and :math:`SR_{\text{lim}}` is defined as:

.. math::

SR_{\text{lim}} = \frac{1}{FOS}


The failure is determined by the value of :math:`\hat{g}_{KS}(\rho, g)` exceeding 0.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before showing the results below, I think it'd be nice to add something like "you can find the complete runscript for the composites model here: " or maybe embed the runscript.

Are the surface dict additions the only changes required to run the composite model? If so, it should be clarified here (e.g. "we don't need any other changes in the runscripts besides additional entries in the surface dict" or something like that)

Also, adding subsections (e.g. "Model", "Example", "Results", etc) in this doc page would make it easier to navigate this page.

The effect of using composites can be seen in the following figure. A Pareto-optimal front is generated for the wingbox model using Isotropic (Almunim) and Orthotropic (Carbon Fiber Reinforced Polymer) materials.

.. image:: /advanced_features/figs/compositeModelPareto.png
:width: 600
:align: center
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

777 vsp model avaialable here: http://hangar.openvsp.org/vspfiles/375
"""

import os
import numpy as np

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@
# Structural values are based on aluminum 7075
"E": 73.1e9, # [Pa] Young's modulus
"G": (73.1e9 / 2 / 1.33), # [Pa] shear modulus (calculated using E and the Poisson's ratio here)
"yield": (420.0e6 / 1.5), # [Pa] allowable yield stress
"yield": 420.0e6, # [Pa] yield stress
"safety_factor": 1.5, # safety factor
"mrho": 2.78e3, # [kg/m^3] material density
"strength_factor_for_upper_skin": 1.0, # the yield stress is multiplied by this factor for the upper skin
"wing_weight_ratio": 1.25,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@
# Structural values are based on aluminum 7075
"E": 73.1e9, # [Pa] Young's modulus
"G": (73.1e9 / 2 / 1.33), # [Pa] shear modulus (calculated using E and the Poisson's ratio here)
"yield": (420.0e6 / 1.5), # [Pa] allowable yield stress
"yield": 420.0e6, # [Pa] yield stress
"safety_factor": 1.5, # safety factor
"mrho": 2.78e3, # [kg/m^3] material density
"strength_factor_for_upper_skin": 1.0, # the yield stress is multiplied by this factor for the upper skin
"wing_weight_ratio": 1.25,
Expand Down
6 changes: 3 additions & 3 deletions openaerostruct/docs/aerostructural_wingbox_walkthrough.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ The `c_max_t` value is the location of the maximum thickness of the airfoil alon
:end-before: checkpoint 6

Next we provide some information related to structures.
We provide the Young's and shear moduli, as well as the allowable yield stress and density of the material being used (the wingbox model currently assumes that the material is isotropic).
Here we use include a safety factor of 1.5 in the allowable yield stress.
We provide the Young's and shear moduli, as well as the maximum yield stress and density of the material being used. The material can either be assumed to be isotropic (like aluminum) or orthotropic (like carbon fiber reinforced polymer).
Here we use include a safety factor of 1.5 using the `safety_factor` key.
The `strength_factor_for_upper_skin` value can be used to adjust the yield strength of the upper skin relative to the lower skin.
For example, if we were using different alloys for the top and bottom skin (e.g., Al7075 vs Al2024) we would provide the allowable yield stress of the lower skin for `yield` and the ratio of the yield strengths of the upper skin to the lower skin for `strength_factor_for_upper_skin`.
For example, if we were using different alloys for the top and bottom skin (e.g., Al7075 vs Al2024) we would provide the maximum yield stress of the lower skin for `yield` and the ratio of the yield strengths of the upper skin to the lower skin for `strength_factor_for_upper_skin`.
The `wing_weight_ratio` number is used to estimate the weight of other components not modeled in the wingbox structure (e.g., overlaps, fasteners, etc.).
With the `exact_failure_constraint` set to `False`, we aggregate the stress constraints for the FEM elements into a single constraint using the Kreisselmeier--Steinhauser function.
This helps reduce computational cost during optimization by replacing a large number of constraints (one for each stress combination for each element) with a single constraint.
Expand Down
Loading
Loading