Skip to content

B3 fix - #46

Merged
ptrbortolotti merged 11 commits into
wr1_b3from
b3_fix
Aug 26, 2026
Merged

B3 fix#46
ptrbortolotti merged 11 commits into
wr1_b3from
b3_fix

Conversation

@ptrbortolotti

Copy link
Copy Markdown
Contributor

This PR allows to run b3_secfem, commit https://github.com/gbarter/b3_secfem/commit/8d6ac3943a2648ff787f93071f8c820a6219455b

Two key changes:

  • SONATA has historically called anbax assigning E[0] (E11, fiber direction), to Ezz, E[1] (E22, transverse), to Exx, and E[2] (E33, through fibers) to Eyy (
    matMechanicProp[0,0] = m.E[1] #Exx
    ). This is now replicated in classMaterial.py
  • b3_secfem was missing a rotation in the stresses, see the commit above 8d6ac39 to b3_secfem

Tests 01, 02, and 07 still required an updated of the reference values, but changes are hopefully acceptably small. See below a comparison for the K and I matrices for the IEA15 reference wind turbine. Note that the M matrix is nearly identical, whereas some (negligibly small?) differences persist in K

Two additional changes:

  • Updated the dependencies in environment.yaml
  • Renamed a few files, print statements, and function calls from anba/anbax to b3_secfem

Diagonal of K, y on log scale
iea15_K

Diagonal of M, y on log scale
iea15_M

First row of K, y NOT on log scale
iea15_K1

Second row of K, y NOT on log scale
iea15_K2

Third row of K, y NOT on log scale
iea15_K3

Fourth row of K, y NOT on log scale
iea15_K4

Fifth row of K, y NOT on log scale
iea15_K5

Sixth row of K, y NOT on log scale
iea15_K6

Off diagonal terms of M, y NOT on log scale
iea15_Moff

Once b3_secfem is made public, tests should start to pass on GitHub actions. Acknowledgments will also be due to @wr1. Lastly, we should ask co-pilot to overhaul the documentation of SONATA, which is terribly outdated

Comment thread SONATA/cbm/classCBM.py Outdated

"""
if solver == "vabs" or solver == "anbax":
if solver == "vabs" or solver == "b3_secfem":

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Flagging to check that the solver input should be one of these and not anba. Do we ever check that the user gives a valid input for sovler?

Comment thread pyproject.toml Outdated
requires-python = ">=3.9"
license = {text = "MIT"}
keywords = ["Helicopter","Rotor Blade","OpenMdao","Preprocessor","SONATA","VABS","ANBA"]
keywords = ["Helicopter","Rotor Blade","OpenMMDAO","Preprocessor","SONATA","VABS","b3_secfem", "b3_secfem"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why is b3_secfem here twice?

-3.3776077839723290e-01 -8.1393723459371863e+00 1.8617318932166703e-14 6.5218805541439177e-17 -8.8429149001247509e-16 2.8183512372423348e+05
1.9665378682881441e+07 6.3056114727279851e+02 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -3.4242178407083868e-01
6.3056114727869146e+02 5.6354294666494809e+07 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -8.1547402643002442e+00
0.0000000000000000e+00 0.0000000000000000e+00 2.1831356082261625e+08 -6.2101162109742521e-05 5.9039054767654111e+00 0.0000000000000000e+00

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Flagging the '-6.2101162109742521e-05 ' to look more closely since it seems like a big change, but also a really small number, so not sure yet if it is an issue.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The ratios between all the components are still consistent, so this is fine.

@PorterJustin

Copy link
Copy Markdown
Contributor

I don't have any concerns with this PR. A few minor comments above, but also okay with just merging since those aren't major issues introduced here.

I just looked through the PR diffs. I would separately want to verify all of the b3_secfem work is fully consistent/all the theory in that code makes sense with SONATA.

@PorterJustin PorterJustin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

See comments on PR for potential improvements, but okay with me to merge.

@ptrbortolotti
ptrbortolotti merged commit dc23b6a into wr1_b3 Aug 26, 2026
2 of 10 checks passed
@ptrbortolotti
ptrbortolotti deleted the b3_fix branch August 26, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants