Closed epsi1on closed 3 years ago
It gives nonzero values now, can you please do a check again?
I will check this new commit. I did not receive a notification for your comment, sorry.
I did some tests but results still don't match unfortunately
Can you please send the test code here and say what is expected value? I'll make it into a unit test... Thanks
I have used the previous example, but changed frame element coordinates to be x-z plane for simplicity
model.Nodes.Add(new Node(5, 0, 5) { Label = "n1" });
Case 1: load is along the bar element
//creating loads
var u1 = new Loads.PartialNonUniformLoad() { Direction = Vector.K, CoordinationSystem = CoordinationSystem.Local };
double l = ((model.Elements["e0"] as BarElement).EndNode.Location - (model.Elements["e0"] as BarElement).StartNode.Location).Length;
u1.SeverityFunction = Mathh.SingleVariablePolynomial.FromPoints(0, -6, l, -4);
u1.StartLocation = new IsoPoint(-1); //set locations of trapezoidal load
u1.EndLocation = new IsoPoint(1); //set locations of trapezoidal load
//assign loads
model.Elements["e0"].Loads.Add(u1);
//solve model
model.Solve_MPC();
//retrieve solve result
var n0reaction = model.Nodes["n0"].GetSupportReaction();
var n1reaction = model.Nodes["n1"].GetSupportReaction();
Debug.Assert(n0reaction == new Force(fx: -13.3333, fy: 0, fz: 13.3333, 0, 0, 0));
Debug.Assert(n1reaction == new Force(fx: -11.6666, fy: 0, fz: 11.6666, 0, 0, 0));
Case 2: inverse the load (same code)
u1.SeverityFunction = Mathh.SingleVariablePolynomial.FromPoints(0, -4, l, -6);
Debug.Assert(n0reaction == new Force(fx: -11.6666, fy: 0, fz: 11.6666, 0, 0, 0));
Debug.Assert(n1reaction == new Force(fx: -13.3333, fy: 0, fz: 13.3333, 0, 0, 0));
Are you sure about the expected support reactions?
first node is on 0,0,0 and second node is on 5,5,5 so length of beam is about 8.6m.
When i replace the distributed load with approximate series of concentrated loads (using Util.AreaLoad2ConcentratedLoads()
) , i'll get same results, so result seems right to me.
Thanks
Kindly note that I Changed second node to 5,0,5 and changed load definition
I have used the previous example, but changed frame element coordinates to be x-z plane for simplicity
model.Nodes.Add(new Node(5, 0, 5) { Label = "n1" });
.
.
also
running same example in issue 111 (old one) gives not expected results
also note that xi
from element's coordinate is fed to SingleVariablePolynomial
directly.
So for your example it should be something like this:
u1.SeverityFunction = Mathh.SingleVariablePolynomial.FromPoints(-1, -6, 1, -4);
u1.StartLocation = new IsoPoint(-1); //set locations of trapezoidal load
u1.EndLocation = new IsoPoint(1); //set locations of trapezoidal load
but you used this:
u1.SeverityFunction = Mathh.SingleVariablePolynomial.FromPoints(0, -6, l, -4);
u1.StartLocation = new IsoPoint(-1); //set locations of trapezoidal load
u1.EndLocation = new IsoPoint(1); //set locations of trapezoidal load
i.e. parameters of Mathh.SingleVariablePolynomial.FromPoints(xi1,magnitude1,xi2,magnitude2)
are in element's iso parametric coordination system...
I've checked again, sorry for dirty code
this is result for first model and results are same as expected
But didn't know the length of beam of second model to check that out. Can you please give dimensions of second model? beam length and start and end locations that distributed load is applied . I mean this:
Thanks
Good news, the results are getting as expected
element's coordinates are
model.Nodes.Add(new Node(0, 0, 0) { Label = "n0" }); model.Nodes.Add(new Node(5, 5, 5) { Label = "n1" });
load is
var u1 = new Loads.PartialNonUniformLoad() { Direction = Vector.K, CoordinationSystem = CoordinationSystem.Global }; u1.SeverityFunction = Mathh.SingleVariablePolynomial.FromPoints(-0.5, -6, 0.5, -4); u1.StartLocation = new IsoPoint(-0.5); u1.EndLocation = new IsoPoint(0.5);
i'll try to make more test cases to check expected results
OK, reopen this issue if problem still exists
Describe the bug Adding a
PartialNonUniformLoad
to an BarElement do not cause any internal force or support reaction.To Reproduce This is the code We've used and caused wrong result/ runtime error
Expected behavior There should be some non-zero support reaction.
Additional context From discussion #109