Closed SerGlushko closed 5 years ago
Yes, End release feature on BarElement is not working right, I'm going to remove it. But in FrameElement2Node it works good.
Hello again, Instead of removing, I've made some changes to code, It should work fine now. can you please have a check?
This is result of your code with updated source code of library:
Thanks
As far as I can see, the hinges work fine now, although isolating node with hinges causes symmetric positive definite exception.
I think I found a problem related to my previous issue, which is closed now. Using GetExactInternalForceAt gives results, mirrored along the rod. And I have noticed that internal moments are inverted now to the compression side, rather than tension side as it was previously. I can give you some more context here or create new issue for this.
Greetings. I don't think it's a bug, but rather myself misunderstanding the situation. I have a simple 2d frame and I want to add a hinge near one of the nodes. The only tool I found for that is Partial End Release Condition. My code:
var model = new Model();
model.Nodes.Add(new Node(0, 0, 0) { Label = "n1" }); model.Nodes.Add(new Node(0, 0, 6) { Label = "n2" }); model.Nodes.Add(new Node(6, 0, 6) { Label = "n3" }); model.Nodes.Add(new Node(6, 0, 0) { Label = "n4" });
model.Nodes["n1"].Constraints = Constraints.Fixed; model.Nodes["n4"].Constraints = Constraints.Fixed;
model.Nodes["n2"].Loads.Add(new NodalLoad(new Force(10000, 0, 0, 0, 0, 0)));
model.Elements.Add(new BarElement(model.Nodes["n1"], model.Nodes["n2"]) { Label = "r1" }); model.Elements.Add(new BarElement(model.Nodes["n2"], model.Nodes["n3"]) { Label = "r2" }); model.Elements.Add(new BarElement(model.Nodes["n3"], model.Nodes["n4"]) { Label = "r3" });
(model.Elements["r1"] as BarElement).Section = new BriefFiniteElementNet.Sections.UniformGeometric1DSection(SectionGenerator.GetRectangularSection(0.01, 0.01)); (model.Elements["r2"] as BarElement).Section = new BriefFiniteElementNet.Sections.UniformGeometric1DSection(SectionGenerator.GetRectangularSection(0.01, 0.01)); (model.Elements["r3"] as BarElement).Section = new BriefFiniteElementNet.Sections.UniformGeometric1DSection(SectionGenerator.GetRectangularSection(0.01, 0.01));
(model.Elements["r1"] as BarElement).Material = BriefFiniteElementNet.Materials.UniformIsotropicMaterial.CreateFromYoungPoisson(210 Math.Pow(10, 9), 0.3); (model.Elements["r2"] as BarElement).Material = BriefFiniteElementNet.Materials.UniformIsotropicMaterial.CreateFromYoungPoisson(210 Math.Pow(10, 9), 0.3); (model.Elements["r3"] as BarElement).Material = BriefFiniteElementNet.Materials.UniformIsotropicMaterial.CreateFromYoungPoisson(210 * Math.Pow(10, 9), 0.3);
(model.Elements["r3"] as BarElement).StartReleaseCondition = new Constraint(dx: DofConstraint.Fixed, dy: DofConstraint.Fixed, dz: DofConstraint.Fixed, rx: DofConstraint.Fixed, ry: DofConstraint.Released, rz: DofConstraint.Fixed);
model.Solve_MPC();
Console.WriteLine((model.Elements["r2"] as BarElement).GetInternalForceAt(1, LoadCase.DefaultLoadCase).My.ToString()); Console.WriteLine((model.Elements["r3"] as BarElement).GetInternalForceAt(-1, LoadCase.DefaultLoadCase).My.ToString()); Console.ReadKey();
My result: I think, that even with the hinge there, the internal moments in two rods near the same node should be close to zero.