-
Notifications
You must be signed in to change notification settings - Fork 34
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
feat: Strain profile n my mz #161
feat: Strain profile n my mz #161
Conversation
Co-authored-by: talledodiego <[email protected]>
…codes into ec_2004_crack_control
I updated the branch to be reviewed. The method calculate_strain_profile works as follows:
Use example: from shapely import Polygon
from structuralcodes import codes, materials
from structuralcodes.geometry import SurfaceGeometry
from structuralcodes.sections._generic import GenericSection
from structuralcodes.sections._reinforcement import add_reinforcement_line
# from structuralcodes.plots.section_plots import draw_section_response
# CREATE THE SECTION ########
codes.set_design_code(design_code='ec2_2004')
concrete = materials.concrete.create_concrete(fck=25)
reinforcemnet = materials.reinforcement.create_reinforcement(
fyk=500,
Es=200000,
density=7850,
ftk=500,
epsuk=0.07,
)
poly = Polygon(((0, 0), (350, 0), (350, 500), (0, 500)))
geo = SurfaceGeometry(poly, concrete)
geo = add_reinforcement_line(
geo, (50, 450), (300, 450), 12, reinforcemnet, n=3
)
geo = add_reinforcement_line(geo, (50, 50), (300, 50), 20, reinforcemnet, n=6)
sec = GenericSection(
geo,
)
sec.geometry = sec.geometry.translate(-175, -250)
# CREATE THE SECTION ########
# TEST calculate_strain_profile_biaxial ########
n = -260 * 1e3
my = 25 * 1e6 # -150
mz = 80 * 1e6 # -100
res = sec.section_calculator.calculate_strain_profile(n, my, mz)
print(
'eps',
round(res[0] * 1e3, 2),
' chiy',
round(res[1] * 1e6, 2),
' chiz',
round(res[2] * 1e6, 2),
)
forces = sec.section_calculator.integrate_strain_profile(res)
print(
'N',
round(forces[0] / 1e3, 2),
' My',
round(forces[1] / 1e6, 2),
' Mz',
round(forces[2] / 1e6, 2),
) |
Thanks @MestreCarlos for the contribution! I will take a look to it in the coming days. |
Thanks again @MestreCarlos for the contribution. Seeking how to formulate a more robust and efficient algorithm I would propose the following idea based on Newton-Rhapson method (or similar versions like initial tangent or secant). Determination of strain plain given external forces N, My, MzThe vector containing the quantities or in vector form as: The strain The stress Substituting this expression into the first equation the external forces can be written in matrix form as: To this aim we can write the residual vector as: And linearizing it: It is therefore possible to solve for the current step: writing so: This iteration can be done until for instance the residual vector norm The Jacobian matrix is basically the tangent stiffness of the section and is a 3x3 matrix given by: where: Therefore the Jacobian matrix can be written as: The derivative Further remarksOf course we could check first as you are proposing in your code if the point is inside or outside the domain before starting the iterative process. I would suggest for now leaving out this part letting the algorithm fail for the lack of convergence. In a following PR we can address this topic more consistently with the results objects. Said that, are you willing to try exploring drafting this algorithm? Please let me know if I can assist anyhow in the process. PS: |
Ref. our chat in another channel @DanielGMorenaFhecor, @talledodiego is happy to continue the implementation of this feature from where @MestreCarlos left it and along the lines sketched above. I am looking forward to seeing more progress on this one 😃 |
As a Christmas present: done! ready for review! |
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.
Great job on this one @MestreCarlos and @talledodiego! Thanks for contributing!
A first draft for calculate the strain profile fon N+My+Mz forces:
Example: