hello
i am trying to convert line connection forces to loads in C#:
Is there an easy way to convert FemDesign.Results.lineconnectionForce to FemDesign.GenericClasses.ILoadElement ?
hello
i am trying to convert line connection forces to loads in C#:
Hi @Jonathan
You need to extract the properties from the LineConnectionForce object and create a new LineLoad object.
var lcf = femDesign.GetResults<Results.LineConnectionForce>(units)[0];
var fx = lcf.Fx;
var fy = lcf.Fy;
var fz = lcf.Fz;
var mx = lcf.Mx;
var my = lcf.My;
var mz = lcf.Mz;
LineConnectionForce also gives you access to NodeId, ElementId that can be use in conjunction with the finite element objects.
var nodes = femDesign.GetFeaNodes();
var bars = femDesign.GetFeaBars();
var shells = femDesign.GetFeaShells();
Hi Marco!
Ok so i break the line connection force down to a 3dVector so i can build it up again as a load:
// option 1create a dictionary to have an easier look up method
var nodes = femDesign.GetFeaNodes();
var nodeDictionary = nodes.ToDictionary(n => n.NodeId, n => new Geometry.Point3d(n.X, n.Y, n.Z));
// option 2
var node_0 = nodes[0];
var point_0 = new Geometry.Point3d(node_0.X, node_0.Y, node_0.Z);
I am also having a look at your problem in converting LineConnectionForces to BeamLoad and it might be that you need to return some results by the femDesign.GetResultsFromBsc()
and use the attached bsc.
LineConnectionElements.bsc (3.6 KB)
The data that FEM-Design gives us has the following data structure.
If you want to create the load from the values, the logic is the following:
ID 855 connects the node 1647 and 1588. From these 2 node ids, you can find the point location and create an edge.
LineConnectionForces gives you 3 values for each ID. The force to apply is last value.
I am going to implement the LineConnectionElement
results but, for the time being, you will need to manipulate the .csv file on your own