Code Monkey home page Code Monkey logo

Comments (3)

Hasanmz avatar Hasanmz commented on July 19, 2024

Hi,
I have faced the same problem. However, I check the code a bit more detail and I believe that that line of code should be changed to:
Call AddLoadCombo("Combo 1", Array("Case 1"), Array(1))
It will work then. Of course @JWock82 is to confirm that.

from xlframe.

JWock82 avatar JWock82 commented on July 19, 2024

@Hasanmz is correct. This has changed since I added the load combination feature, and I just haven't gotten around to updating the test routines yet. I recommend following the intellisense built into the methods themselves and looking at the arguments they require. The method AddLoadCombo takes a name, and an array of load case names (e.g. Array("D", "L", "S")) and an array of load factors corresponding to the load cases (e.g. Array(1.2, 1.6, 0.5)).

Here's what the first test routine would look like with the new changes:

    'Finite Element Method, Problem 3.27
    'This example tests the program's ability to correctly model 2D truss elements, sum forces at joints,
    'report axial forces, and report deflections at nodes
    'The test was successfully run on 8/16/2017
    Private Sub FEM_Problem_3_27()
        
        'Start a new finite element model
        Dim myModel As New FEModel
        
        'Define the nodes
        Call myModel.AddNode("N1", 0, 0)
        Call myModel.AddNode("N2", 60 * 12, 0)
        Call myModel.AddNode("N3", 30 * 12, 40 * 12)
        Call myModel.AddNode("N4", 30 * 12, 60 * 12)
        
        'Define the members
        Call myModel.AddMember("M1", "N1", "N3", 30000000, 10, 3)
        Call myModel.AddMember("M2", "N2", "N3", 30000000, 10, 3)
        Call myModel.AddMember("M3", "N3", "N4", 30000000, 10, 3)
        
        'Define the supports
        Call myModel.EditSupport("N1", True, True, True)
        Call myModel.EditSupport("N2", True, True, True)
        Call myModel.EditSupport("N4", True, True, True)
        
        'Define the member end releases
        Call myModel.EditEndReleases("M1", True, True)
        Call myModel.EditEndReleases("M2", True, True)
        Call myModel.EditEndReleases("M3", False, True)
        
        'Define the joint loads
        Call myModel.AddNodeLoad("N3", 5000, FX, "D")
        Call myModel.AddNodeLoad("N3", -10000, FY, "D")
        
        'Define a load combination (unfactored dead load in this case)
        Call myModel.AddLoadCombo("Combo 1", Array("D"), Array(1))
        
        'Clear 'Sheet1'
        Sheet1.Cells.Clear
        
        'Print the displacements at 'N3'
        Sheet1.Range("A1") = "Node N3 Displacements"
        Sheet1.Range("A2") = myModel.GetDisp("N3", DX, "Combo 1")
        Sheet1.Range("A3") = myModel.GetDisp("N3", DY, "Combo 1")
        Sheet1.Range("A4") = myModel.GetDisp("N3", RZ, "Combo 1")
        
        'Show equilibrium at 'N3' - Reactions should equal 0 at 'N3')
        Sheet1.Range("A6") = "Sum of Forces and Moments at N3"
        Sheet1.Range("A7") = myModel.GetReaction("N3", FX)
        Sheet1.Range("A8") = myModel.GetReaction("N3", FY)
        Sheet1.Range("A9") = myModel.GetReaction("N3", MZ)
        
        'Show the member axial forces
        Sheet1.Range("E1") = "Member Axial Forces"
        Sheet1.Range("E2") = myModel.GetMaxAxial("M1")
        Sheet1.Range("F2") = myModel.GetMinAxial("M1")
        Sheet1.Range("E3") = myModel.GetMaxAxial("M2")
        Sheet1.Range("F3") = myModel.GetMinAxial("M2")
        Sheet1.Range("E4") = myModel.GetMaxAxial("M3")
        Sheet1.Range("F4") = myModel.GetMinAxial("M3")
        
    End Sub

If anyone wants to update the documentation or the test routines I would love to have the help.

from xlframe.

JWock82 avatar JWock82 commented on July 19, 2024

I just updated the test routines.

from xlframe.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.