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

Fix partial load span bug #22

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

cding91
Copy link

@cding91 cding91 commented Nov 5, 2024

@SaMohamed FEALiTE2D is a wonderful library for frame analysis. I have used it in two of my engineering software projects. I particularly like FEALiTE2D's internal mesh segment. It makes meshing so simple. It automatically considers loading discontinuity using mesh segments. I think this a big differentiating factor.

While using LinearMesher to handle internal meshing, I encountered bug. I have taken some time investigating it and provided a fix for it.

Bug

Null pointer exception is raised under the following scenario. When I apply uniform load over a frame element only on part of the span, I call GetElementInternalForcesAt with position set beyond where the uniform load ends. For example, see below.

image

I have added some tests for PostProcessor class . The test GetElementInternalForcesAt_WithPartialUniformLoad_EdgeSegment_ReturnsCorrectForce will trigger the bug.

Cause

I think the root cause is GetElementInternalForces when the library calculates end responses of each mesh segment. To calculate the responses, I believe the library just uses all the loads on the left of the mesh segment left end. For frame unfiorm load, FrameUniformLoad uniformLoad = uL.GetLoadValueAt(element, x) as FrameUniformLoad; may result into null reference.

Fix

I believe uL.GetLoadValueAt(element, x) as FrameUniformLoad is really just for coordinate transformation. Passing uL.L1 instead of x can serve the purpose and avoid null reference problem.

Docs

I suggested adding a github page documentation for this library. I have taken liberty to create one just my company to use. It is auto generated by DocFx. I am happy to transfer the page to this repo.

@cding91 cding91 closed this Nov 5, 2024
@cding91 cding91 deleted the fix-partial-load-span-bug branch November 5, 2024 17:07
@cding91 cding91 restored the fix-partial-load-span-bug branch November 5, 2024 17:08
@cding91 cding91 reopened this Nov 5, 2024
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.

1 participant