-
Notifications
You must be signed in to change notification settings - Fork 2
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
34 ramberg osgood plasticity #45
base: main
Are you sure you want to change the base?
Conversation
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.
If I can trust the ro.png
, this seems to work, which is nice:)
We should just have a disussion on what belongs in the example and what in the package.
examples/ramberg_osgood.py
Outdated
""" | ||
|
||
|
||
class RambergOsgood3D(object): |
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.
Have you tried using @jitclass
here? In my memory jitclass
was not as fast as jit functions, but maybe they have progressed in the last years.
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.
I did not try jitclass
yet, but I also think, in the old version I did not use a class, because it was user to jit a function. I have no strong opinion on this. I can try @jitclass
, but would not want to start a comparison of performance here.
examples/ramberg_osgood.py
Outdated
self.QT_views.append((QT_parent, QT_child, QT_sub)) | ||
self._tangent.append(df.fem.Function(QT_sub)) | ||
|
||
self.stress = df.fem.Function(QV) |
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.
If we want this problem definition to work with incremental laws, we need the stress two times. One time for the updated state and one for the initial state. Same for history variables
self.stress.x.scatter_forward() | ||
self.tangent.x.scatter_forward() | ||
|
||
def eps(self, u): |
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.
On main
, there is already a pre-defined mandel strain function
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.
Something like
from .stress_strain import ufl_mandel_strain
inside interfaces.py
will lead to a circular import.
My current solution is to let IncrSmallStrainProblem.eps
be an abstractmethod
that the user has to implement. I would consider this the safer option. If there was some default eps
and the user does not have to think about it, then this could potentially lead to the IncrSmallStrainProblem
computing mandel strain, although user has implemented some material routine expecting standard voigt basis.
Hi @srosenbu ,
this is a draft for the ramberg osgood example. It's now working with dolfinx version 0.6.0, but the formulation is not incremental and the compilation of the forms has to be explicitly called by the user at the moment. Also, I would like to reduce the complexity and remove certain parts of the code that are not necessary here.
We could also have a talk in the next days and add a general
fenics_constitutive.interfaces.IncrSmallStrainProblem
, such that the class is simply imported here (and potentially in the other examples).Also, I did not generate the documentation yet.