-
Notifications
You must be signed in to change notification settings - Fork 75
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
Gaussian Process Buckling Constraints in Blade Stiffened Shell Constitutive Subclass #311
Gaussian Process Buckling Constraints in Blade Stiffened Shell Constitutive Subclass #311
Conversation
…into GPbladeconstitutive
…into GPbladeconstitutive
@sean-engelstad, before you go further down this path, you should review the element routines that already exists. There already exists sub-routines to compute the mass centroid, moments of inertia, etc. Please review them to avoid duplicating code. |
Also @sean-engelstad , not sure how you're intending to do the panel length/width computation but you may be able to re-use what I have implemented in the panel length constraint |
@A-CGray I decided to replicate what you did with the panel length constraint, with some small modifications for the panel width constraint. I will just add some code into FUNtoFEM to compute chain rule products of panel length, panel width DVs with the coordinate derivatives sensitivities for our workflow. |
@A-CGray, ok I switched to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make sure that all classes/methods added to constitutive.pyx have proper docstrings, describing what they do, inputs, outputs etc. See the other classes/methods for formatting reference
@timryanb I finished adding the docstrings for all methods, classes in the constitutive.pyx file that I added. |
@A-CGray, did you have a chance to take a look at this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @sean-engelstad this is really good work. I have a lot of comments but they're mostly duplicates about using new
and delete[]
in places that you don't need to. I commented all the examples of this that I saw in the constitutive class, I think there are some more cases in the GPModel classes that I didn't leave comments on but should still be fixed.
Also, you could add a panel width constraint to this integration test that already tests the panel length constraint
Thanks @A-CGray, I'm resolving the comment discussions as I go through and update the code if that's good with you. For comments where there might be more discussion I'll leave it unresolved |
@A-CGray @timryanb, alright I'm done addressing all the items in Ali's review. The only point left up for debate is whether I should change my constitutive object to be a subclass of Ali's in constitutive.pyx which would cleanup a few repeated methods. It caused me quite a bit of problems last time I tried that, but maybe I would be able to figure it out now since I have more experience with the Cython. Also I verified that the buckling loads still match my trained ML models in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @sean-engelstad , this addresses all my comments, with the exception of the cython wrapper like you said, so I'd like @timryanb to give final approval on that.
I did a little reading of the cython documentation and it seems like you can't override the cinit of a parent class, so it will always be called, which causes issues here because we don't want to actually create a BladeStiffenedShell
object when trying to create a GPBladeStiffenedShell
object.
@timryanb would it work if we switched these classes from using __cinit__
to __init__
?
@sean-engelstad @A-CGray, I believe it should be possible to make this class into a cython sub-class. Both the GP and regular version of the cython class would have to inherit from a parent base class that held the common API between the two classes. An example of this would be the In this case you could add the new common baseclass to the
You can then add the API to the Both your and @A-CGray's class would have to be updated in the Also make sure to set the |
@timryanb Wait => don't merge it yet, there is a problem when running on big cases right now which I've traced back to incref(). Unittests pass, but large case doesn't work at the moment |
Update: I needed to also store one of the other constitutive subclass ptrs namely |
@timryanb should be good to merge now if you wanna take one more look. I can run the wing examples and the tests pass now with the updates to constitutive.pyx |
I should be able to take a look at it sometime tomorrow @sean-engelstad |
@sean-engelstad also can you add your new panel constraints to the constraint autodocs list here. You just have to add the name of the python file in the constraints module folder that your new code lives in |
@timryanb - ok I added the docs for panel width and fixed constitutive.pyx |
@timryanb I fixed the docs mistake you just caught |
This code is linked to the repo, ml_buckling
TACSGPBladeStiffenedShellConstitutive
from the base classTACSBladeStiffenedShellConstitutive
, which overrides the buckling constraints and combined buckling-stress failure criterionTACSBladeStiffenedShellConstitutive
used panel length as a DV which was enforced to be equal to the actual panel length from a separate computation of a panel length constraint. In the new classTACSGPBladeStiffenedShellConstitutive
, panel width is also required, and both the panel length and width need to be set in at runtime through some additional infrastructure in TACS (not through a constraint => as this doesn't work great with our FUNtoFEM + ESP/CAPS infrastructure).TODO:
tacs/constraints
TACSGPBladeStiffenedShellConstitutive
class for the following subtests:computePanelStiffness()
which uses smearedStiffnesses is correct or if we need a new unsmeared routine here.computeStiffenerCripplingStiffness()
routine for panel-like stiffness of the stiffenerShearGaussianProcessModel
and the other GP classes asTACSShearGaussianProcessModel
etc.