Skip to content

Conversation

@JohnDN90
Copy link
Member

@JohnDN90 JohnDN90 commented Mar 9, 2020

This branch adds support for various cross sections named and parameterized based on MSC Nastran's beam library.

JohnDN90 added 20 commits March 11, 2020 10:12
… no bending.

Addresses enhancment discussed in GitHub Issue #40
This was done to increase intuitiveness of MAST and bring it more closely inline with commerical FEA programs.
This was originally done on Oct 11 2019 in GitLab develop branch with commit b0647ec.
Added virtual set_material method to element_property_card_base.h
Allows enhanced polymorphism between derived section classes by allowing 1D, 2D, and 3D section pointers to be stored in the same data structure (i.e. std::map), while still having access to the set_material method.
Added init() and y_vector() methods to element_property_card_base to increase the polymorphism capability of 1D sections.
Originially added on Sept 23 2019 in commits 635ba2c and a04a113 on GitLab in develop branch.
…nter, and stress evaluation points (and the derivative of these points) to 1D section.

This was originally done over multiple commits on the GitLab MAST-Library repository on the develop branch.
This was originally done on GitLab MAST-Library repo in develop branch.
…perties.

Added ROD cross section and corresponding supporting base classes.
Added missing MPI tests for ROD section.
TODO: Still need to add MPI tests and sensitivity test.
Added missing MPI tests for TUBE section
Added missing sensitivity tests for TUBE section.
Fixed bug which resulted in errors when run with MPI.
Fixed bug which resulted in 1 extra (unused) DOF was added to global system.
This bug seemed to only affect non-symmetric cross sections.
This reduces computational costs for warping systems.
Refer to Robbie van Leeuwen paper.
…ethod.

Created an Aluminum 7075-T6 and Titantium 6Al-4V materials for reuse in tests.
Created an Aluminum 7075-T6 L cross section for reuse in L section tests.
Created helper function to approximate field function derivatives via finite difference.
Removed some leftover libMesh::out statements from debugging.
…ard.

Previously hardcoded values for a rectangular section were used.
@JohnDN90 JohnDN90 force-pushed the feature/add_beam_library branch from 8b2ffd8 to 9f9f9ed Compare March 11, 2020 14:25
This was done to maintain compatibility with PETSc versions older than 3.9.
@JohnDN90
Copy link
Member Author

@manavbhatia and @jdeaton I think this initial beam library is ready to be moved into master. If you two could look it over, I'd appreciate it.

@JohnDN90 JohnDN90 requested review from jdeaton and manavbhatia March 31, 2020 19:58
* Only used by 1D sections. Added for polymorphism enhancement.
* Added by DJN.
*/
virtual RealVectorX& y_vector() {
Copy link
Member

Choose a reason for hiding this comment

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

@JohnDN90 Why do we need these here? I agree with the adding the material above for sure. It seems like it would make more sense for the ones only used by 1D sections to be in the 1D section card class as pure virtual methods.

Is there somewhere else in the code (like in element creation I guess) where we use ElementPropertyCardBase and need these here?

Copy link
Member Author

Choose a reason for hiding this comment

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

For elements, the property card is stored as a ElementPropertyCardBase here.

I believe I added it to be able to access it from something like that. I added a lot of that "polymorphism" enhancement stuff a while back when I first started and was getting back in the groove of writing C++. Most likely there is a better way to handle it that I'm not familiar with at the moment.

Copy link
Member

Choose a reason for hiding this comment

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

Based on that I'm assuming that during the element construction process, those functions are called in a general way in the different "xxx_operator()" methods so they probably need to be there.

I'm thinking then in the 1st level child classes for each type, we need to implement the methods that aren't used with an assertion and the final specifier for completeness.

https://en.cppreference.com/w/cpp/language/final

I'll look into it and try some stuff out. I'm beefing up the documentation on some of the older base classes as I go through.

@jdeaton jdeaton marked this pull request as ready for review April 2, 2020 17:50
@jdeaton jdeaton self-requested a review April 2, 2020 17:51
@jdeaton
Copy link
Member

jdeaton commented Apr 3, 2020

As I'm going through this I'm pretty sure that some of the section property classes (and accompanying files need renamed). For example, Solid1DTubeSectionElementPropertyCard doesn't make sense because a hollow tube is not a solid section...should probably be just 1DTubeSectionElementPropertyCard.

I think we could also consider a larger refactoring here for clarity. The more specific classes don't follow the same naming convention as the base classes they inherit from. For example:

  • ElementPropertyCardBase-ElementPropertyCard1D-Solid1DSectionElementPropertyCard
  • ElementPropertyCardBase-ElementPropertyCard1D-Multilayer1DSectionElementPropertyCard
  • ElementPropertyCardBase-ElementPropertyCard1D-xxx1DxxSectionElementPropertyCard
    and
  • ElementPropertyCardBase-ElementPropertyCard2D-Solid2DSectionElementPropertyCard
  • ElementPropertyCardBase-ElementPropertyCard2D-Multilayer2DSectionElementPropertyCard

What if we refactored everything to more consistent naming like:

  • ElementPropertyCardBase-ElementPropertyCard1D-ElementPropertyCard1DSolidSection
  • ElementPropertyCardBase-ElementPropertyCard1D-ElementPropertyCard1DMultilayerSection
  • ElementPropertyCardBase-ElementPropertyCard1D-ElementPropertyCard1DxxxSection
  • ElementPropertyCardBase-ElementPropertyCard2D-ElementPropertyCard2DSolidSection
  • ElementPropertyCardBase-ElementPropertyCard2D-ElementPropertyCard2DMultilayerSection
  • ElementPropertyCardBase-ElementPropertyCard2D-ElementPropertyCard2DxxxSection

This would benefit a number of things with sorting. Related files would be grouped together, classes in IDE's would group, and I believe the API documentation would sort related element property classes closer together.

@manavbhatia do you have any thoughts on this bigger refactoring? We will definitely fix the oddly named 1D sections for the beam library.

@manavbhatia
Copy link
Member

I second comments by @jdeaton. One other comment I would add is concerning the if/then/else blocks in the internal_residual and related methods to manage the workflow with or without warping analysis. As I understand, you are also looking to add similar blocks to switch for springs/bush elements in upcoming PRs.

My upcoming changes are looking to address such changes where new types of internal_residual evaluation routines can be added by a user to implement new types of elements without needed to add blocks like these. Once this gets merged, this would provide a new (hopefully, improved) mechanism to address such situations. I don't think it would affect this current implementation, but I am just giving you a heads up.

@manavbhatia
Copy link
Member

Once comments from @jdeaton have been addressed, then this can be merged.

In other words, this moves the defintion of the PointLoad class definition from the examples into the library itself.
This was implemented a long time ago but was never merged into master.
…dual degrees of freedom.

This was implemented a long time ago, but is just now being moved to GitHub.
…nt RHS.

Backwards compatibility of the adjoint_solve method is maintained.
…et-dof-bcs

Feature/nonzero dirichlet dof bcs
Modified "adjoint_solve" method to allow user to explicitly set adjoi…
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.

4 participants