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

Add "Vertical" as a load direction #7

Open
dmorchard opened this issue May 18, 2019 · 1 comment
Open

Add "Vertical" as a load direction #7

dmorchard opened this issue May 18, 2019 · 1 comment

Comments

@dmorchard
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
When adding a gravity loads, such as snow, to a sloped member the user has to resolve the load into the appropriate "Transverse" and "Axial" components and apply both.

Describe the solution you'd like
It'd be handy to have a third load direction, "Vertical", with the T and A components automatically resolved and applied to the member.

Additional context
Taking it a step further, perhaps there could be 4 load types: x-local, y-local, X-global & Y-global. Or "Axial", "Transverse", "Horizontal" & "Vertical" if you prefer.

@dmorchard
Copy link
Collaborator Author

This is mostly an update, but please jump in if you think I'm headed for disaster...

I've been focused on this issue the past couple days, and I think I've got a pretty simple solution. This new function inside the FERFunctions module gives the gist of it...

'Returns the fixed end reaction vector for a point load of any orientation
'Replaces original functions: FER_PtLoad & FER_AxialPtLoad
Public Function FER_PointLoad(P As Double, x As Double, L As Double, LambdaX As Double, LambdaY, LoadDir As LoadDirection) As Matrix
    
    'Define variables
    Dim b As Double
    b = L - x
    
    'Create the fixed end reaction vector
    Set FER_PointLoad = New Matrix
    Call FER_PointLoad.Resize(6, 1)
    
    'Resolve point load into local x & y components
    Dim Px As Double, Py As Double
    Select Case direction
    Case Axial
        Px = P
        Py = 0
    Case Transverse
        Px = 0
        Py = P
    Case Horizontal
        Px = P * LambdaX 'a.k.a DirCos
        Py = P * LambdaY 'a.k.a DirSin
    Case Vertical
        Px = P * LambdaY
        Py = P * LambdaX
    End Select
    
    'Populate the fixed end reaction vector
    With FER_PointLoad
        Call .SetValue(1, 1, -Px * (L - x) / L)
        Call .SetValue(2, 1, Py * b ^ 2 * (L + 2 * x) / L ^ 3)
        Call .SetValue(3, 1, Py * x * b ^ 2 / L ^ 2)
        Call .SetValue(4, 1, -Px * x / L)
        Call .SetValue(5, 1, Py * x ^ 2 * (L + 2 * b) / L ^ 3)
        Call .SetValue(6, 1, -Py * x ^ 2 * b / L ^ 2)
    End With
    
End Function

Also this enumeration inside the FEModel class module gets 2 new entries...

'Directions for member loads
Public Enum LoadDirection
    Transverse 'Local y
    Axial 'Local x
    Vertical 'Global Y
    Horizontal 'Global X
End Enum

The existing distributed load functions, FER_LinLoad & FER_AxialLinLoad are similarly combined/replaced, and that one being so much more complex I've focused my testing efforts on it entirely. Good news: the approach seems to be solid! I like it because it doesn't require creation of 2 entries in the array of loads in order to achieve horizontal or vertical loading on a sloped member, which is one way my OP could've been interpreted.

Still on my to-do list: chase these functions back through the chain of calling subs/functions to recode accordingly, passing all the required arguments. Then squash bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants