/// <summary> /// Converts one area load applied on a BarElement with a series of equivalent ConcentratedLoads /// </summary> /// <param name="element">The element.</param> /// <param name="load">The load.</param> /// <param name="cse">The cse.</param> public static void AreaLoad2ConcentratedLoads(BarElement element, PartialNonUniformLoad load, LoadCase cse) { var n = 1000; var d = element.EndNode.Location - element.StartNode.Location; var l = d.Length; for (var i = 0; i < n; i++) { var dx = l / n; var x = i * dx + 0.5 * dx; var cn = new ConcentratedLoad(); var xi = (2 * x - l) / l; cn.ForceIsoLocation = new IsoPoint(xi, 0, 0); var mag = load.GetMagnitudeAt(element, cn.ForceIsoLocation); var f = load.Direction * mag * dx; cn.Force = new Force(f, Vector.Zero); cn.Case = cse; cn.CoordinationSystem = load.CoordinationSystem; if (mag != 0.0) { element.Loads.Add(cn); } } }
public static void test1() { var load = new PartialNonUniformLoad(); //creating new instance of load load.SeverityFunction = Mathh.Polynomial.FromPoints(-1, 5, 1, 7); load.StartLocation = new IsoPoint(-0.5); //set locations of trapezoidal load load.EndLocation = new IsoPoint(0.5); //set locations of trapezoidal load load.Direction = Vector.K; //set direction load.CoordinationSystem = CoordinationSystem.Global; //set coordination system var model = new Model(); model.Nodes.Add(new Node(0, 0, 0) { Label = "n0" }); model.Nodes.Add(new Node(4, 0, 0) { Label = "n1" }); model.Elements.Add(new BarElement(model.Nodes["n0"], model.Nodes["n1"]) { Label = "e0" }); model.Nodes["n0"].Constraints = model.Nodes["n1"].Constraints = Constraints.Fixed; var sec = new Sections.UniformGeometric1DSection(SectionGenerator.GetISetion(0.24, 0.67, 0.01, 0.006)); var mat = Materials.UniformIsotropicMaterial.CreateFromYoungPoisson(210e9, 0.3); (model.Elements["e0"] as BarElement).Material = mat; (model.Elements["e0"] as BarElement).Section = sec; var u1 = load; model.Elements["e0"].Loads.Add(u1); model.Solve_MPC(); var n1Force = model.Nodes["n1"].GetSupportReaction(); Console.WriteLine("support reaction of n1: {0}", n1Force); var elm = model.Elements[0] as BarElement; var frc = elm.GetGlobalEquivalentNodalLoads(u1); }