Skip to content
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

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

zidanmahmoud
Copy link
Contributor

@zidanmahmoud zidanmahmoud commented Dec 17, 2019

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.
FiberBeamColumnElement
[Fabio Taucer, Enrico Spacone, and Filip Filippou. A fiber beam-column element for seismic response analysis of reinforced concrete structures. 01 1991.]

Copy link
Member

@loumalouomega loumalouomega left a 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);
Copy link
Member

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:

Suggested change
rBMatrix = ZeroMatrix(3, 5);
noalias(rBMatrix) = ZeroMatrix(3, 5);

Copy link
Contributor Author

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 ..

Copy link
Member

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

Copy link
Contributor Author

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 ____ _ _
Copy link
Member

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
Copy link
Member

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

Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Member

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
Copy link
Member

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?

Copy link
Member

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
Copy link
Member

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"
Copy link
Member

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);
Copy link
Member

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

Copy link
Contributor Author

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 ..

Copy link
Member

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

Copy link
Contributor Author

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. 🤞

Copy link
Member

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

Copy link
Contributor Author

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;
Copy link
Member

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);
}

Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

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?

Copy link
Contributor Author

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?

Copy link
Member

Choose a reason for hiding this comment

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

Indeed

Copy link
Member

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";
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok

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