BriefFiniteElementNet / BriefFiniteElement.Net

BriefFiniteElementDotNET (BFE.NET) is a library for linear-static Finite Element Method (FEM) analysis of solids and structures in .NET
GNU Lesser General Public License v3.0
154 stars 57 forks source link

Concentrated load on bar element crashes #17

Closed PedroArvy closed 5 years ago

PedroArvy commented 5 years ago

Thank you for your incredible package, great work!!

I tried modifying a simple example by placing a concentrated load on a bar element midspan.

Is this possible? The code below crashes on Solve_MPC

public void SingleSpanBeamWithOverhang()
{
  var model = new BriefFiniteElementNet.Model();

  var pin = new Constraint(dx: DofConstraint.Fixed, dy: DofConstraint.Fixed, dz: DofConstraint.Fixed, rx: DofConstraint.Fixed, ry: DofConstraint.Fixed, rz: DofConstraint.Released);

  Node n1, n2;

  model.Nodes.Add(n1 = new Node(x: 0.0, y: 0.0, z: 0.0) { Constraints = pin });
  model.Nodes.Add(n2 = new Node(x: 10.0, y: 0.0, z: 0.0) { Constraints = pin });

  var elm1 = new BarElement(n1, n2);

  model.Elements.Add(elm1);

  elm1.Section = new BriefFiniteElementNet.Sections.UniformParametric1DSection(a: 0.01, iy: 8.3e-6, iz: 8.3e-6, j: 16.6e-6);//section's second area moments Iy and Iz = 8.3*10^-6, area = 0.01
  elm1.Material = BriefFiniteElementNet.Materials.UniformIsotropicMaterial.CreateFromYoungPoisson(210e9, 0.3);//Elastic mudule is 210e9 and poisson ratio is 0.3

  var frc = new Force();
  frc.Fz = 1000;// 1kN force in Z direction

  var elementLoad = new BriefFiniteElementNet.ConcentratedLoad1D(frc, 5, CoordinationSystem.Local);
  elm1.Loads.Add(elementLoad);//is this possible?

  model.Solve_MPC();//crashes here

  var d2 = n2.GetNodalDisplacement();
}
epsi1on commented 5 years ago

Hello, You are welcome. Yes this is not fully implemented yet. Will update soon

PedroArvy commented 5 years ago

Great. Thanks for letting me know.

epsi1on commented 5 years ago

Code is updated and the crash is fixed now, however there is need to numerical result be checked. Can you please check and verify the numerical result with updated code?