{"id":14977233,"url":"https://github.com/jorgedelossantos/nusa","last_synced_at":"2025-08-21T07:32:56.691Z","repository":{"id":57447354,"uuid":"50276322","full_name":"JorgeDeLosSantos/nusa","owner":"JorgeDeLosSantos","description":"A Python library for structural analysis using the finite element method","archived":false,"fork":false,"pushed_at":"2025-05-06T21:37:39.000Z","size":14492,"stargazers_count":131,"open_issues_count":0,"forks_count":34,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-07-06T02:52:47.580Z","etag":null,"topics":["beam","finite-element-analysis","ipynb","structural-analysis","truss"],"latest_commit_sha":null,"homepage":"http://jorgedelossantos.github.io/nusa/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JorgeDeLosSantos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-24T06:58:13.000Z","updated_at":"2025-06-10T08:25:54.000Z","dependencies_parsed_at":"2022-09-05T05:10:36.174Z","dependency_job_id":null,"html_url":"https://github.com/JorgeDeLosSantos/nusa","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/JorgeDeLosSantos/nusa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JorgeDeLosSantos%2Fnusa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JorgeDeLosSantos%2Fnusa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JorgeDeLosSantos%2Fnusa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JorgeDeLosSantos%2Fnusa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JorgeDeLosSantos","download_url":"https://codeload.github.com/JorgeDeLosSantos/nusa/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JorgeDeLosSantos%2Fnusa/sbom","scorecard":{"id":74401,"data":{"date":"2025-08-11","repo":{"name":"github.com/JorgeDeLosSantos/nusa","commit":"4bb5763dfc354f43f0aec3ff9db4cb83cbf1c0d7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-15T04:31:58.164Z","repository_id":57447354,"created_at":"2025-08-15T04:31:58.164Z","updated_at":"2025-08-15T04:31:58.164Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271444410,"owners_count":24760801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["beam","finite-element-analysis","ipynb","structural-analysis","truss"],"created_at":"2024-09-24T13:55:19.981Z","updated_at":"2025-08-21T07:32:51.681Z","avatar_url":"https://github.com/JorgeDeLosSantos.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](nusa/img/nusa-logo.png)\n\nA Python library for structural analysis using the finite element method, designed for academic purposes.\n\n## Versions\n\n* **0.1.0** (16/11/2016)\n* **0.2.0** (14/07/2019)\n* **0.3.dev0** Development version \n\n## Requirements\n\n* NumPy\n* Matplotlib\n* Tabulate\n* [GMSH](http://gmsh.info/)\n\n\n## Installation\n\nFrom PyPI (0.2.0 version):\n\n```\n$ pip install nusa\n```\n\nor from this repo (development version):\n\n```\n$ pip install git+https://github.com/JorgeDeLosSantos/nusa.git\n```\n\n\n## Elements type supported\n\n* Spring\n* Bar\n* Truss\n* Beam\n* Linear triangle (currently, only plane stress)\n\n\n## Mini-Demos\n\n### Linear Triangle Element\n\n```python\nfrom nusa import *\nimport nusa.mesh as nmsh\n\nmd = nmsh.Modeler()\na = md.add_rectangle((0,0),(1,1), esize=0.1)\nb = md.add_circle((0.5,0.5), 0.1, esize=0.05)\nmd.substract_surfaces(a,b)\nnc, ec = md.generate_mesh()\nx,y = nc[:,0], nc[:,1]\n\nnodos = []\nelementos = []\n\nfor k,nd in enumerate(nc):\n    cn = Node((x[k],y[k]))\n    nodos.append(cn)\n    \nfor k,elm in enumerate(ec):\n    i,j,m = int(elm[0]),int(elm[1]),int(elm[2])\n    ni,nj,nm = nodos[i],nodos[j],nodos[m]\n    ce = LinearTriangle((ni,nj,nm),200e9,0.3,0.1)\n    elementos.append(ce)\n\nm = LinearTriangleModel()\nfor node in nodos: m.add_node(node)\nfor elm in elementos: m.add_element(elm)\n    \n# Boundary conditions and loads\nminx, maxx = min(x), max(x)\nminy, maxy = min(y), max(y)\n\nfor node in nodos:\n    if node.x == minx:\n        m.add_constraint(node, ux=0, uy=0)\n    if node.x == maxx:\n        m.add_force(node, (10e3,0))\n\nm.plot_model()\nm.solve()\nm.plot_nsol(\"seqv\")\n```\n\n![](docs/nusa-info/es/src/linear-triangle-element/model_plot.png)\n![](docs/nusa-info/es/src/linear-triangle-element/nsol.png)\n\n\n### Spring element\n\n**Example 01**. For the spring assemblage with arbitrarily numbered nodes shown in the figure \nobtain (a) the global stiffness matrix, (b) the displacements of nodes 3 and 4, (c) the \nreaction forces at nodes 1 and 2, and (d) the forces in each spring. A force of 5000 lb\nis applied at node 4 in the `x` direction. The spring constants are given in the figure.\nNodes 1 and 2 are fixed.\n\n![](docs/nusa-info/es/src/spring-element/example_01.PNG)\n\n```python\n# -*- coding: utf-8 -*-\n# NuSA Demo\nfrom nusa import *\n    \ndef test1():\n    \"\"\"\n    Logan, D. (2007). A first course in the finite element analysis.\n    Example 2.1, pp. 42.\n    \"\"\"\n    P = 5000.0\n\n    # Model\n    m1 = SpringModel(\"2D Model\")\n\n    # Nodes\n    n1 = Node((0,0))\n    n2 = Node((0,0))\n    n3 = Node((0,0))\n    n4 = Node((0,0))\n\n    # Elements\n    e1 = Spring((n1,n3),1000.0)\n    e2 = Spring((n3,n4),2000.0)\n    e3 = Spring((n4,n2),3000.0)\n\n    # Adding elements and nodes to the model\n    for nd in (n1,n2,n3,n4):\n        m1.add_node(nd)\n    for el in (e1,e2,e3):\n        m1.add_element(el)\n\n    m1.add_force(n4, (P,))\n    m1.add_constraint(n1, ux=0)\n    m1.add_constraint(n2, ux=0)\n    m1.solve()\n\nif __name__ == '__main__':\n    test1()\n```\n\n\n### Beam element\n\n**Example 02**. For the beam and loading shown, determine the deflection at point C. \nUse E = 29 x 10\u003csup\u003e6\u003c/sup\u003e psi.\n\n![](docs/nusa-info/es/src/beam-element/P913_beer.PNG)\n\n```python\n\"\"\"\nBeer \u0026 Johnston. (2012) Mechanics of materials. \nProblem 9.13 , pp. 568.\n\"\"\"\nfrom nusa import *\n\n# Input data \nE = 29e6\nI = 291 # W14x30 \nP = 35e3\nL1 = 5*12 # in\nL2 = 10*12 #in\n# Model\nm1 = BeamModel(\"Beam Model\")\n# Nodes\nn1 = Node((0,0))\nn2 = Node((L1,0))\nn3 = Node((L1+L2,0))\n# Elements\ne1 = Beam((n1,n2),E,I)\ne2 = Beam((n2,n3),E,I)\n\n# Add elements \nfor nd in (n1,n2,n3): m1.add_node(nd)\nfor el in (e1,e2): m1.add_element(el)\n    \nm1.add_force(n2, (-P,))\nm1.add_constraint(n1, ux=0, uy=0) # fixed \nm1.add_constraint(n3, uy=0) # fixed\nm1.solve() # Solve model\n\n# Displacement at C point\nprint(n2.uy)\n```\n\n## GUIs based on NuSA\n\n* [wxTruss](https://github.com/JorgeDeLosSantos/wxtruss)\n\n\n## Documentation\n\nTo build documentation based on docstrings execute the `docs/toHTML.py` script. (Sphinx required)\n\nTutorials (Jupyter notebooks):\n\nSpanish version (in progress):\n\n* [Introducción a NuSA](docs/nusa-info/es/intro-nusa.ipynb)\n* [Elemento Spring](docs/nusa-info/es/spring-element.ipynb)\n* [Elemento Bar](docs/nusa-info/es/bar-element.ipynb)\n* [Elemento Beam](docs/nusa-info/es/beam-element.ipynb)\n* [Elemento Truss](docs/nusa-info/es/truss-element.ipynb)\n* [Elemento LinearTriangle](docs/nusa-info/es/linear-triangle-element.ipynb)\n\nEnglish version (TODO): \n\n* [Introduction to NuSA](docs/nusa-info/en/intro-nusa.ipynb)\n* [Spring element](docs/nusa-info/en/spring-element.ipynb)\n* [Bar element](docs/nusa-info/en/bar-element.ipynb)\n* [Beam element](docs/nusa-info/en/beam-element.ipynb)\n* [Truss element](docs/nusa-info/en/truss-element.ipynb)\n* [LinearTriangle element](docs/nusa-info/en/linear-triangle-element.ipynb)\n\n\n## About...\n\n```\nDeveloper: Pedro Jorge De Los Santos\nE-mail: delossantosmfq@gmail.com\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjorgedelossantos%2Fnusa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjorgedelossantos%2Fnusa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjorgedelossantos%2Fnusa/lists"}