-
Notifications
You must be signed in to change notification settings - Fork 250
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
[Seismic] Fiber Beam-Column Element #6116
base: master
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.
Several comments, please @AlejandroCornejo check the CL implementations, I think it can be simplified
void FiberBeamColumnSection::CalculateBMatrix(Matrix& rBMatrix) | ||
{ | ||
KRATOS_TRY | ||
rBMatrix = ZeroMatrix(3, 5); |
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.
it is possible to assign manually the zeros? (is cheaper), otherwise:
rBMatrix = ZeroMatrix(3, 5); | |
noalias(rBMatrix) = ZeroMatrix(3, 5); |
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.
This is just to ensure resizing the matrix and fill it to zeros. I pass a matrix of 0,0 size then resize it with zeros then fill the numbers. noalias
would not work because it requires size conformity. Would it be a better solution to do resize
then fill manually or simply pass the correct size of the matrix? This thing is also done in a couple other places in the code ..
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.
OK, in that case you should check the size first, resize if required and use noalias then
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.
Will do. Thanks
@@ -0,0 +1,304 @@ | |||
// KRATOS ____ _ _ |
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.
The header are .h for agreement
IndexType mId; // id of the section | ||
double mPosition; // position of the integration point | ||
double mWeight; // weight of the integration point | ||
double mTolerance; // tolerance of the section equilibrium |
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.
This should be aproeprty, saving in each section is super expensive
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.
This in the other hand should be defined in a shared object to reduce memory needs
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.
It is used in one function. I could simply pass it to the function from the element without saving it.
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.
For example
|
||
IndexType mId; // id of the section | ||
double mPosition; // position of the integration point | ||
double mWeight; // weight of the integration point |
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 this be evaluated on running time?
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.
Ok, I see this is not a condition, nevermind my comment
* @author Mahmoud Zidan | ||
*/ | ||
|
||
class KRATOS_API(SEISMIC_APPLICATION) FiberBeamColumnSection |
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 this is not a condition should be ain a different folder, not in custom_conditions
|
||
// Project includes | ||
#include "includes/properties.h" | ||
#include "custom_constitutive/uniaxial_kent_park.hpp" |
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.
Idem. headers are .h
rSerializer.save("mStrainR", mStrainR); | ||
rSerializer.save("mStrainP", mStrainP); | ||
rSerializer.save("mUnloadSlope", mUnloadSlope); | ||
rSerializer.save("mTangentModulus", mTangentModulus); |
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.
Do you really need to save everything?, particularly the tangent modulus
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.
The tangent modulus, in particular, I am saving in memory because the computation of the material response involves many steps so that we do not have to do all the computations when we just need the tangent modulus. I am looking into reducing the number of saved variables ..
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 trust you, just in case
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 reduced many of the mConverged* variables, and I believe the results are still the same. 🤞
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 recommend to create a test before change anything and change the things later, so you know you haven't broke anything
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.
Sorry for the delay. I fixed the test case and added it to CI, but the test case fails and the results are slightly different. So, I think keeping the extra variables is needed for now 😐
void UniaxialMenegottoPintoMaterialLaw::FinalizeMaterialResponsePK2(Parameters& rValues) | ||
{ | ||
KRATOS_TRY | ||
mConvergedLoadingIndex = mLoadingIndex; |
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.
This is not properly done, please look the plasticity laws implemented by @AlejandroCornejo. You don't save everything twice, you revaluate and update the converged value
void FiberBeamColumnElement3D2N::PrintData(std::ostream& rOStream) const { | ||
pGetGeometry()->PrintData(rOStream); | ||
} | ||
|
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.
What the main difference with the beam element already existing?
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.
Differences are:
- Geometry is a
line_gauss_lobatto_3d_2
, similar but another integration rule - The integration points are sections, which are discretized into fibers
- After every non-linear iteration, a loop of element equilibrium is performed
- The stiffness matrix is the inverse of the integral of section flexibility matrices
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.
Ok, can we look for an approach in order to reduce code duplication?
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.
Technically, some methods are exactly the same, because the global dofs are the same. The local however are different. It is only one axial force and two biaxial moments in this element. So in principle maybe they can share a base class?
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.
Indeed
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 suggest to wait with this for two reasons:
- Many methods in the structural elements are duplicated, I was talking to @KlausBSautter that we should do a proper refactor soon
- @KlausBSautter has implemented a new beam element, which still needs to be merged, it will replace completely the current one
// calling base class register to register Kratos components | ||
KratosApplication::Register(); | ||
|
||
KRATOS_INFO("") << " KRATOS ____ _ _ \n"; |
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.
We decided to avoid this, or at least doing it in only one line
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.
Ok
This element is to model the response of reinforced concrete beam-column elements due to seismic loading. The element was first developed as part of StructuralMechanicsApplication, but because it is very specific as per the discussion in #6107, it is put in its own application for now.
In details, the objective of this element is to model reinforced concrete under cyclic loading, typically beyond the yielding point. It models a 1D element under axial force and biaxial moments. The formulation of the element is a flexibility (inverse stiffness) based and solved with displacement control non-linear FEM developed in StructuralMechanicsApp (#5799 & #5968) so that it handles the material softening in the concrete. Essentially, the element is cut into sections, where the numerical integration points live. The sections are discretized into fibers, where each fiber can have its own constitutive law (Figure). The stiffness of the element is derived from the flexibility matrices of the sections, which in turn are derived from the tangent moduli of the fibers.

[Fabio Taucer, Enrico Spacone, and Filip Filippou. A fiber beam-column element for seismic response analysis of reinforced concrete structures. 01 1991.]