GithubHelp home page GithubHelp logo

fealite / fealite2d Goto Github PK

View Code? Open in Web Editor NEW
38.0 5.0 10.0 304 KB

A finite element analysis library for 2D frame, beams and truss elements using C#

License: MIT License

C# 100.00%
finite-element-methods finite-elements finite-element-analysis structral engineering civil-engineering beam frame structural-engineering structural-analysis

fealite2d's Introduction

FEALiTE2D

A fast and reliable finite element analysis library for 2D frame, beam and truss elements using C#.

NuGet FEALiTE2D
NuGet FEALiTE2D.Plotting

Features

  • Analysis of frame, beam, truss/link members.
  • Various load types:
    • Frame point load.
    • Frame uniform load.
    • Frame trapezoidal load.
    • Nodal point load.
    • Support displacement.
  • Loads can be set in global and element's local coordinate system.
  • Nodes can have local and global coordinate system.
  • Loads can be assigned in variant load cases of different natures.
  • Loads can be combined in a load combination with load magnification factors.
  • Rigid Supports of 3 degrees of freedom.
  • Elastic supports using translational and rotational springs.
  • Variety of predefined cross-sections.
  • Linear mesher for better analysis results.

Sign convention for loads in global and local coordinate system.

Loads - Global Local

Example

Here is a 2D framed strcture subjected to various loading conditions Example1-Loads

public void TestStructure()
{
     // units are kN, m
     FEALiTE2D.Structure.Structure structure = new FEALiTE2D.Structure.Structure();

     Node2D n1 = new Node2D(0, 0, "n1");
     Node2D n2 = new Node2D(9, 0, "n2");
     Node2D n3 = new Node2D(0, 6, "n3");
     Node2D n4 = new Node2D(9, 6, "n4");
     Node2D n5 = new Node2D(0, 12, "n5");
     n1.Restrain(NodalDegreeOfFreedom.UX, NodalDegreeOfFreedom.UY, NodalDegreeOfFreedom.RZ); //fully restrained
     n2.Restrain(NodalDegreeOfFreedom.UX, NodalDegreeOfFreedom.UY, NodalDegreeOfFreedom.RZ); //fully restrained

     structure.AddNode(n1, n2, n3, n4, n5);
     IMaterial material = new GenericIsotropicMaterial() { E = 30E6, U = 0.2, Label = "Steel", Alpha = 0.000012, Gama = 39885, MaterialType = MaterialType.Steel };
     IFrame2DSection section = new Generic2DSection(0.075, 0.075, 0.075, 0.000480, 0.000480, 0.000480 * 2, 0.1, 0.1, material);
    
     FrameElement2D e1 = new FrameElement2D(n1, n3, "e1") { CrossSection = section };
     FrameElement2D e2 = new FrameElement2D(n2, n4, "e2") { CrossSection = section };
     FrameElement2D e3 = new FrameElement2D(n3, n5, "e3") { CrossSection = section };
     FrameElement2D e4 = new FrameElement2D(n3, n4, "e4") { CrossSection = section };
     FrameElement2D e5 = new FrameElement2D(n4, n5, "e5") { CrossSection = section };
     structure.AddElement(new[] { e1, e2, e3, e4, e5 });

     LoadCase loadCase = new LoadCase("live", LoadCaseType.Live);
     structure.LoadCasesToRun.Add(loadCase);
     n2.SupportDisplacementLoad.Add(new SupportDisplacementLoad(10E-3, -5E-3, -2.5 * Math.PI / 180, loadCase));
     e3.Loads.Add(new FramePointLoad(0, 0, 7.5, e3.Length / 2, LoadDirection.Global, loadCase));
     e4.Loads.Add(new FrameTrapezoidalLoad(0, 0, -15, -7, LoadDirection.Global, loadCase, 0.9, 2.7));
     e5.Loads.Add(new FrameUniformLoad(0, -12, LoadDirection.Local, loadCase));
     n3.NodalLoads.Add(new NodalLoad(80, 0, 0, LoadDirection.Global, loadCase));
     n5.NodalLoads.Add(new NodalLoad(40, 0, 0, LoadDirection.Global, loadCase));
     n1.NodalLoads.Add(new NodalLoad(40, 0, 0, LoadDirection.Global, loadCase));

     structure.LinearMesher.NumberSegements = 35;
     structure.Solve();
}

Ploting internal forces and displacments

Use ploting Library FEALiTE2D.Plotting, create dxf plotter with correct options and save the file on your local machine.

var op = new FEALiTE2D.Plotting.Dxf.PlottingOption 
{ 
    NFDScaleFactor = 0.01,
    SFDScaleFactor = 0.01,
    BMDScaleFactor = 0.01, 
    DisplacmentScaleFactor = 1,
    DiagramsHorizontalOffsets = 10 
};
var plotter = new FEALiTE2D.Plotting.Dxf.Plotter(structure, op);
plotter.Plot("D:\\internal forces.dxf", loadCase);

internal forces

fealite2d's People

Contributors

samohamed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fealite2d's Issues

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.