Beispiel #1
0
        /***************************************************/
        /**** Private methods                           ****/
        /***************************************************/

        private List <NodeReaction> ReadNodeReaction(List <string> ids = null)
        {
            //Implement code for reading Node Reactions
            List <NodeReaction> bhomNodeReactions = new List <NodeReaction>();

            IModel ramModel = m_Application.GetDispInterfacePointerByEnum(EINTERFACES.IModel_INT);

            ILoadCases ramLoadCases = ramModel.GetLoadCases(EAnalysisResultType.RAMFrameResultType);
            //Get IWalls
            List <IWall> allRamWalls = ReadRamWalls(ramModel);

            // Adding node reactions per wall per loadcase, this is node reactions at btm of wall
            foreach (IWall wall in allRamWalls)
            {
                for (int i = 0; i < ramLoadCases.GetCount(); i++)
                {
                    //Get Loadcases
                    ILoadCase   ramLoadCase    = ramLoadCases.GetAt(i);
                    IPointLoads wallNodeForces = wall.GetNodeForcesAtEdge(EAnalysisResultType.RAMGravityResultType, ramLoadCase.lUID, EEdge.eBottomEdge);
                    for (int j = 0; j < wallNodeForces.GetCount(); j++)
                    {
                        //Get Node Forces
                        IPointLoad   wallNodeForce    = wallNodeForces.GetAt(j);
                        NodeReaction bhomNodeReaction = wallNodeForce.ToBHoMObject(ramLoadCase);
                        bhomNodeReactions.Add(bhomNodeReaction);
                    }
                }
            }

            return(bhomNodeReactions);
        }
Beispiel #2
0
        private void duStuff(ILoads rLoads, double mult, int i, ref ErrorInfo[] err, ref ICalculation calc)
        {
            ILoadCase          lCase = rLoads.GetLoadCase(1, ItemAt.AtNo);
            AnalysisParameters param = new AnalysisParameters();

            param.ModifyLoadingByFactor = true;
            param.LoadingFactor         = mult;
            param.Method = AnalysisMethodType.SecondOrder;

            //Loads
            //lc.PrepareModification();
            rLoads.PrepareModification();
            try
            {
                lCase.SetAnalysisParameters(ref param);
            }
            finally
            {
                rLoads.FinishModification();
                //lc.FinishModification();
                lCase = null;
            }

            err = calc.Calculate(LoadingType.LoadCaseType, 1);
            if (err.Length == 0)
            {
                IResults       res   = calc.GetResultsInFeNodes(LoadingType.LoadCaseType, 1);
                MaximumResults max   = res.GetMaximum();
                Point3D        point = max.Displacement;
                double         value = Math.Sqrt(Math.Pow(point.X, 2) + Math.Pow(point.Y, 2) + Math.Pow(point.Z, 2));
                chart1.Series["deflection"].Points.AddXY(i, value);
            }
        }
        public override string Execute(IList <string> parameters)
        {
            int    elementId;
            int    loadCaseNumber;
            double loadValue;
            double loadPosition;

            try
            {
                elementId      = int.Parse(parameters[0]);
                loadCaseNumber = int.Parse(parameters[1]);
                loadValue      = double.Parse(parameters[2]);
                loadPosition   = double.Parse(parameters[3]);
            }
            catch
            {
                throw new ArgumentException("Failed to parse AssignConcentratedShearLoadXYPlaneToFrame command parameters.");
            }

            IFrameElement frameElement = base.dbctx.FrameElements[elementId];
            ILoadCase     loadCase     = base.dbctx.LoadCases[loadCaseNumber];
            double        gCoefficient = (frameElement.MaterialProp.EModule * frameElement.SectionProp.MomentOfInertiaZ * frameElement.SectionProp.Mju)
                                         / (frameElement.SectionProp.Area * frameElement.MaterialProp.GModule);

            IFrameLoad frameLoad = this.factory.CreateConcentratedShearLoadXYPlane(loadCase, frameElement.ElementLength, gCoefficient,
                                                                                   loadValue, loadPosition);

            FrameService.AddLoad(frameElement, frameLoad);

            return($"Concentrated shear frame load in XY plane with intensity {loadValue} and Load Case Numeber {loadCaseNumber} has been assigned to element with ID {frameElement.Number}.");
        }
Beispiel #4
0
        protected NodalMoments(ILoadCase loadCase, double loadValue)
        {
            Guard.WhenArgument(loadCase, "loadCase").IsNull().Throw();

            this.loadCase  = loadCase;
            this.loadValue = loadValue;
        }
        public override string Execute(IList <string> parameters)
        {
            int    elementId;
            int    loadCaseNumber;
            double loadAtStart;
            double loadAtEnd;
            double loadStartsAt;
            double loadEndsAt;

            try
            {
                elementId      = int.Parse(parameters[0]);
                loadCaseNumber = int.Parse(parameters[1]);
                loadAtStart    = double.Parse(parameters[2]);
                loadAtEnd      = double.Parse(parameters[3]);
                loadStartsAt   = double.Parse(parameters[4]);
                loadEndsAt     = double.Parse(parameters[5]);
            }
            catch
            {
                throw new ArgumentException("Failed to parse AssignDistributedTorsionToFrame command parameters.");
            }

            IFrameElement frameElement = base.dbctx.FrameElements[elementId];
            ILoadCase     loadCase     = base.dbctx.LoadCases[loadCaseNumber];

            IFrameLoad frameLoad = this.factory.CreateDistributedTorsion(loadCase, frameElement.ElementLength, 0.0,
                                                                         loadAtStart, loadAtEnd, loadStartsAt, loadEndsAt);

            FrameService.AddLoad(frameElement, frameLoad);

            return($"Distributed torsion with intensities {loadAtStart} and {loadAtEnd} and Load Case Numeber {loadCaseNumber} has been assigned to element with ID {frameElement.Number}.");
        }
        public override string Execute(IList <string> parameters)
        {
            int    elementId;
            int    loadCaseNumber;
            double loadValue;
            double loadPosition;

            try
            {
                elementId      = int.Parse(parameters[0]);
                loadCaseNumber = int.Parse(parameters[1]);
                loadValue      = double.Parse(parameters[2]);
                loadPosition   = double.Parse(parameters[3]);
            }
            catch
            {
                throw new ArgumentException("Failed to parse AssignConcentratedNormalLoadToFrame command parameters.");
            }

            IFrameElement frameElement = base.dbctx.FrameElements[elementId];
            ILoadCase     loadCase     = base.dbctx.LoadCases[loadCaseNumber];

            IFrameLoad frameLoad = this.factory.CreateConcentratedNormalLoad(loadCase, frameElement.ElementLength, 0.0,
                                                                             loadValue, loadPosition);

            FrameService.AddLoad(frameElement, frameLoad);

            return($"Concentrated normal frame load with intensity {loadValue} and Load Case Numeber {loadCaseNumber} has been assigned to element with ID {frameElement.Number}.");
        }
        public override string Execute(IList <string> parameters)
        {
            int    elementId;
            int    loadCaseNumber;
            double loadAtStart;
            double loadAtEnd;
            double loadStartsAt;
            double loadEndsAt;

            try
            {
                elementId      = int.Parse(parameters[0]);
                loadCaseNumber = int.Parse(parameters[1]);
                loadAtStart    = double.Parse(parameters[2]);
                loadAtEnd      = double.Parse(parameters[3]);
                loadStartsAt   = double.Parse(parameters[4]);
                loadEndsAt     = double.Parse(parameters[5]);
            }
            catch
            {
                throw new ArgumentException("Failed to parse AssignDistributedMomentXZPlaneToFrame command parameters.");
            }

            IFrameElement frameElement = base.dbctx.FrameElements[elementId];
            ILoadCase     loadCase     = base.dbctx.LoadCases[loadCaseNumber];
            double        gCoefficient = (frameElement.MaterialProp.EModule * frameElement.SectionProp.MomentOfInertiaY * frameElement.SectionProp.Mju)
                                         / (frameElement.SectionProp.Area * frameElement.MaterialProp.GModule);

            IFrameLoad frameLoad = this.factory.CreateDistributedMomentXZPlane(loadCase, frameElement.ElementLength, gCoefficient,
                                                                               loadAtStart, loadAtEnd, loadStartsAt, loadEndsAt);

            FrameService.AddLoad(frameElement, frameLoad);

            return($"Distributed moment frame load in XZ plane with intensities {loadAtStart} and {loadAtEnd} and Load Case Numeber {loadCaseNumber} has been assigned to element with ID {frameElement.Number}.");
        }
Beispiel #8
0
        /***************************************************/

        public static NodeReaction ToBHoMObject(this IPointLoad ramPointLoad, ILoadCase ramLoadCase)
        {
            SCoordinate ramPoint;

            ramPointLoad.GetCoordinate(out ramPoint);
            Point  bhomPoint  = ramPoint.PointFromRAM();
            string ramPointID = bhomPoint.X.ToString() + ", " + bhomPoint.Y.ToString() + ", " + bhomPoint.Z.ToString() + ", "; // no object id option for RAM nodes, id by coordinates instead

            //TODO: resolve below identifiers extractable through the API
            int    mode     = -1;
            double timeStep = 0;

            NodeReaction bhomNodeReaction = new NodeReaction(
                ramPointID,
                ramLoadCase.strLoadCaseGroupLabel + ramLoadCase.strTypeLabel,
                mode,
                timeStep,
                Basis.XY,
                ramPointLoad.dFx,
                ramPointLoad.dFy,
                ramPointLoad.dFz,
                ramPointLoad.dMxx,
                ramPointLoad.dMyy,
                ramPointLoad.dMzz
                );

            return(bhomNodeReaction);
        }
Beispiel #9
0
        /***************************************************/

        public static LoadCombination ToBHoMObject(IModel ramModel, ILoadCombination ramLoadCombination)
        {
            LoadCombination loadCombination = new LoadCombination();

            loadCombination.Name   = ramLoadCombination.strDisplayString;
            loadCombination.Number = ramLoadCombination.lLabelNo;

            ILoadCombinationTerms iLoadCombinationTerms = ramLoadCombination.GetLoadCombinationTerms();

            for (int i = 0; i < iLoadCombinationTerms.GetCount(); i++)
            {
                //Get LoadCombination Cases and Factors
                ILoadCombinationTerm iLoadCombinationTerm = iLoadCombinationTerms.GetAt(i);
                int        caseID     = iLoadCombinationTerm.lLoadCaseID;
                ILoadCases iLoadCases = ramModel.GetLoadCases(EAnalysisResultType.RAMFrameResultType);
                ILoadCase  iLoadCase  = iLoadCases.Get(caseID);

                //Convert Loadcase from RAM to BHoM
                Loadcase bhomLoadcase = ToBHoMObject(iLoadCase);
                //Add dict for load factor and loadcase
                loadCombination.LoadCases.Add(new Tuple <double, ICase>(iLoadCombinationTerm.dFactor, bhomLoadcase));
            }

            return(loadCombination);
        }
Beispiel #10
0
        public override string Execute(IList <string> parameters)
        {
            int    nodeId;
            int    loadCaseNumber;
            double loadValue;

            try
            {
                nodeId         = int.Parse(parameters[0]);
                loadCaseNumber = int.Parse(parameters[1]);
                loadValue      = double.Parse(parameters[2]);
            }
            catch
            {
                throw new ArgumentException("Failed to parse AssignForceY command parameters.");
            }

            Node      node     = base.dbctx.Nodes[nodeId];
            ILoadCase loadCase = base.dbctx.LoadCases[loadCaseNumber];


            INodalLoad nodeLoad = new ForceYDirection(loadCase, loadValue);

            NodeService.AddLoad(node, nodeLoad);

            return($"Nodal force load parallel to Y axis with intensity {loadValue} and Load Case Numeber {loadCaseNumber} has been assigned to node with ID {node.Number}.");
        }
        //Sets all the member loads to RFEM (Only uniform distributed load is implemented
        private static void setRFEMmemberLoads(ILoads rLoads, MemberLoad[] rMemberLoads)
        {
            Dictionary <int, List <MemberLoad> > loads = new Dictionary <int, List <MemberLoad> >();

            foreach (MemberLoad rMemberLoad in rMemberLoads)
            {
                if (!loads.ContainsKey(int.Parse(rMemberLoad.Comment)))
                {
                    List <MemberLoad> nLoad = new List <MemberLoad>();
                    MemberLoad        a     = rMemberLoad;
                    a.Comment = "";
                    nLoad.Add(a);

                    loads[int.Parse(rMemberLoad.Comment)] = nLoad;
                }
                else
                {
                    MemberLoad a = rMemberLoad;
                    a.Comment = "";
                    loads[int.Parse(rMemberLoad.Comment)].Add(a);
                }
            }
            foreach (int n in loads.Keys)
            {
                ILoadCase lCase = rLoads.GetLoadCase(n, ItemAt.AtNo);
                lCase.PrepareModification();

                lCase.SetMemberLoads(loads[n].ToArray());
                lCase.FinishModification();
            }
        }
        public static void CreateModel(Karamba.Models.Model kModel)
        {
            if (RModel != null)
            {
                Node[]         rNodes         = Nodes(kModel.nodes);
                NodalSupport[] rSupports      = Supports(kModel.supports);
                Material[]     rMaterials     = Materials(kModel.materials);
                CrossSection[] rCrossSections = CrossSections(kModel.crosecs, kModel);
                Tuple <Member[], Dlubal.RFEM5.Line[]> vali = Members(kModel.elems);
                Member[]            rMembers      = vali.Item1;
                Dlubal.RFEM5.Line[] rLines        = vali.Item2;
                LoadCase[]          lCases        = LoadCases();
                MemberLoad[]        rMemberLoads  = MemberLoads(kModel.eloads);
                NodalLoad[]         rNodalLoads   = NodalLoads(kModel.ploads);
                MemberHinge[]       rMemberHinges = MemberHinges(kModel.joints);

                //Get active RFEM5 application
                try
                {
                    IModelData rData  = RModel.GetModelData();
                    ILoads     rLoads = RModel.GetLoads();

                    //Model elements
                    rData.PrepareModification();

                    rData.SetNodes(rNodes);
                    rData.SetNodalSupports(rSupports);
                    rData.SetMaterials(rMaterials);
                    rData.SetCrossSections(rCrossSections);
                    rData.SetMemberHinges(rMemberHinges);
                    rData.SetLines(rLines);
                    rData.SetMembers(rMembers);

                    rData.FinishModification();

                    //Load cases
                    rLoads.PrepareModification();
                    rLoads.SetLoadCases(lCases);
                    rLoads.FinishModification();

                    //Loads
                    ILoadCase lCase = rLoads.GetLoadCase(1, ItemAt.AtNo);
                    lCase.PrepareModification();
                    lCase.SetMemberLoads(rMemberLoads);
                    lCase.SetNodalLoads(rNodalLoads);
                    lCase.FinishModification();
                }

                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, ex.Source, MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
        public override string Execute(IList <string> parameters)
        {
            int    elementId;
            int    loadCaseNumber;
            double loadAtStart;
            double loadAtEnd;
            double loadStartsAt;
            double loadEndsAt;

            try
            {
                elementId      = int.Parse(parameters[0]);
                loadCaseNumber = int.Parse(parameters[1]);
                loadAtStart    = double.Parse(parameters[2]);
                loadAtEnd      = double.Parse(parameters[3]);
                loadStartsAt   = double.Parse(parameters[4]);
                loadEndsAt     = double.Parse(parameters[5]);
            }
            catch
            {
                throw new ArgumentException("Failed to parse AssignDistributedMomentAroundGlobalYDirection command parameters.");
            }

            IFrameElement frameElement  = base.dbctx.FrameElements[elementId];
            ILoadCase     loadCase      = base.dbctx.LoadCases[loadCaseNumber];
            double        gCoefficientY = (frameElement.MaterialProp.EModule * frameElement.SectionProp.MomentOfInertiaY * frameElement.SectionProp.Mju)
                                          / (frameElement.SectionProp.Area * frameElement.MaterialProp.GModule);

            double gCoefficientZ = (frameElement.MaterialProp.EModule * frameElement.SectionProp.MomentOfInertiaZ * frameElement.SectionProp.Mju)
                                   / (frameElement.SectionProp.Area * frameElement.MaterialProp.GModule);

            Vector <double> startPointEntryLoad = Vector <double> .Build.SparseOfArray(new double[] { 0, loadAtStart, 0 });

            Vector <double> endPointEntryLoad = Vector <double> .Build.SparseOfArray(new double[] { 0, loadAtEnd, 0 });

            Vector <double> startPointLoadVector = FrameService.InclinedLoadVector(frameElement, startPointEntryLoad);
            Vector <double> endPointLoadVector   = FrameService.InclinedLoadVector(frameElement, endPointEntryLoad);

            IFrameLoad frameMomentAroundLocalX = this.factory.CreateDistributedTorsion(loadCase, frameElement.ElementLength, 0.0,
                                                                                       startPointLoadVector[0], endPointLoadVector[0], loadStartsAt, loadEndsAt);

            IFrameLoad frameMomentAroundLocalY = this.factory.CreateDistributedMomentXZPlane(loadCase, frameElement.ElementLength, gCoefficientY,
                                                                                             startPointLoadVector[1], endPointLoadVector[1], loadStartsAt, loadEndsAt);

            IFrameLoad frameMomentAroundLocalZ = this.factory.CreateDistributedMomentXYPlane(loadCase, frameElement.ElementLength, gCoefficientZ,
                                                                                             startPointLoadVector[2], endPointLoadVector[2], loadStartsAt, loadEndsAt);

            FrameService.AddLoad(frameElement, frameMomentAroundLocalX);
            FrameService.AddLoad(frameElement, frameMomentAroundLocalY);
            FrameService.AddLoad(frameElement, frameMomentAroundLocalZ);

            return($"Distributed frame moment around global Y direction with intensities {loadAtStart} and {loadAtEnd} and Load Case Numeber {loadCaseNumber} has been assigned to element with ID {frameElement.Number}.");
        }
        protected ConcentratedLoads(ILoadCase loadCase, double elementLength, double gCoefficient, double loadValue, double loadPosition)
        {
            Guard.WhenArgument(loadCase, "loadCase").IsNull().Throw();
            Guard.WhenArgument(elementLength, "elementLength").IsNaN().Throw();
            Guard.WhenArgument(gCoefficient, "gCoefficient").IsNaN().Throw();
            Guard.WhenArgument(loadValue, "loadValue").IsNaN().Throw();
            Guard.WhenArgument(loadPosition, "loadPosition").IsNaN().Throw();

            this.loadCase      = loadCase;
            this.elementLength = elementLength;
            this.gCoefficient  = gCoefficient;
            this.loadValue     = loadValue;
            this.loadPosition  = loadPosition;
        }
Beispiel #15
0
 public HomeController(ILoad load, IVGALoad LoadVGA, IRAMLoad LoadRAM, ILoadCPU LoadCPU, ILoadCase LoadCase, ILog LogService, IUser UserService
                       , ILoadCart LoadCartService, ICartRepository CartService, ISearchQuerry SearchService)
 {
     _LoadComputer    = load;
     _LoadVGA         = LoadVGA;
     _LoadRAM         = LoadRAM;
     _LoadCPU         = LoadCPU;
     _LoadCase        = LoadCase;
     _LogService      = LogService;
     _UserService     = UserService;
     _LoadCartService = LoadCartService;
     _CartService     = CartService;
     _SearchService   = SearchService;
 }
Beispiel #16
0
        /***************************************************/

        public static Loadcase ToBHoMObject(this ILoadCase ramLoadCase)
        {
            Loadcase Loadcase = new Loadcase();

            Loadcase.Name   = ramLoadCase.strSymbol;
            Loadcase.Number = ramLoadCase.lUID;
            ELoadCaseType LoadType = ramLoadCase.eLoadType;

            switch (LoadType)
            {
            case ELoadCaseType.NotionalDeadLCa:
            case ELoadCaseType.DeadLCa:
            case ELoadCaseType.ConstructionDeadLCa:
            case ELoadCaseType.MassDeadLCa:
                Loadcase.Nature = LoadNature.Dead;
                break;

            case ELoadCaseType.ConstructionLiveLCa:
            case ELoadCaseType.LiveLCa:
            case ELoadCaseType.LiveReducibleLCa:
            case ELoadCaseType.LiveRoofLCa:
            case ELoadCaseType.LiveStorageLCa:
            case ELoadCaseType.LiveUnReducibleLCa:
            case ELoadCaseType.NotionalLiveLCa:
            case ELoadCaseType.PartitionLCa:
                Loadcase.Nature = LoadNature.Live;
                break;

            case ELoadCaseType.SnowLCa:
                Loadcase.Nature = LoadNature.Snow;
                break;

            case ELoadCaseType.SeismicLCa:
                Loadcase.Nature = LoadNature.Seismic;
                break;

            case ELoadCaseType.WindLCa:
                Loadcase.Nature = LoadNature.Wind;
                break;

            default:
                Loadcase.Nature = LoadNature.Other;
                break;
            }

            return(Loadcase);
        }
Beispiel #17
0
        /***************************************************/
        /**** Private methods                           ****/
        /***************************************************/

        private List <Loadcase> ReadLoadCase(List <string> ids = null)
        {
            //Implement code for reading loadcases
            List <Loadcase> bhomLoadCases = new List <Loadcase>();

            ILoadCases ILoadCases = m_Model.GetLoadCases(EAnalysisResultType.RAMFrameResultType);

            for (int i = 0; i < ILoadCases.GetCount(); i++)
            {
                //Get Loadcases
                ILoadCase LoadCase     = ILoadCases.GetAt(i);
                Loadcase  bhomLoadcase = BH.Adapter.RAM.Convert.ToBHoMObject(LoadCase);
                bhomLoadCases.Add(bhomLoadcase);
            }

            return(bhomLoadCases);
        }
        public override string Execute(IList <string> parameters)
        {
            int    elementId;
            int    loadCaseNumber;
            double loadValue;
            double loadPosition;

            try
            {
                elementId      = int.Parse(parameters[0]);
                loadCaseNumber = int.Parse(parameters[1]);
                loadValue      = double.Parse(parameters[2]);
                loadPosition   = double.Parse(parameters[3]);
            }
            catch
            {
                throw new ArgumentException("Failed to parse AssignConcentratedLoadGlobalYDirection command parameters.");
            }

            IFrameElement frameElement  = base.dbctx.FrameElements[elementId];
            ILoadCase     loadCase      = base.dbctx.LoadCases[loadCaseNumber];
            double        gCoefficientY = (frameElement.MaterialProp.EModule * frameElement.SectionProp.MomentOfInertiaZ * frameElement.SectionProp.Mju)
                                          / (frameElement.SectionProp.Area * frameElement.MaterialProp.GModule);

            double gCoefficientZ = (frameElement.MaterialProp.EModule * frameElement.SectionProp.MomentOfInertiaY * frameElement.SectionProp.Mju)
                                   / (frameElement.SectionProp.Area * frameElement.MaterialProp.GModule);

            Vector <double> EntryLoad = Vector <double> .Build.SparseOfArray(new double[] { 0, loadValue, 0 });

            Vector <double> LoadVector = FrameService.InclinedLoadVector(frameElement, EntryLoad);

            IFrameLoad frameLoadLocalX = this.factory.CreateConcentratedNormalLoad(loadCase, frameElement.ElementLength, 0.0,
                                                                                   LoadVector[0], loadPosition);

            IFrameLoad frameLoadLocalY = this.factory.CreateConcentratedShearLoadXYPlane(loadCase, frameElement.ElementLength, gCoefficientY,
                                                                                         LoadVector[1], loadPosition);

            IFrameLoad frameLoadLocalZ = this.factory.CreateConcentratedShearLoadXZPlane(loadCase, frameElement.ElementLength, gCoefficientZ,
                                                                                         LoadVector[2], loadPosition);

            FrameService.AddLoad(frameElement, frameLoadLocalX);
            FrameService.AddLoad(frameElement, frameLoadLocalY);
            FrameService.AddLoad(frameElement, frameLoadLocalZ);

            return($"Concentrated frame load in global Y direction with intensity {loadValue} and Load Case Numeber {loadCaseNumber} has been assigned to element with ID {frameElement.Number}.");
        }
Beispiel #19
0
        protected DistributedLoads(ILoadCase loadCase, double elementLength, double gCoefficient, double loadAtStart, double loadAtEnd, double loadStartsAt, double loadEndsAt)
        {
            Guard.WhenArgument(loadCase, "loadCase").IsNull().Throw();
            Guard.WhenArgument(elementLength, "elementLength").IsNaN().Throw();
            Guard.WhenArgument(gCoefficient, "gCoefficient").IsNaN().Throw();
            Guard.WhenArgument(loadAtStart, "loadAtStart").IsNaN().Throw();
            Guard.WhenArgument(loadAtEnd, "loadAtEnd").IsNaN().Throw();
            Guard.WhenArgument(loadStartsAt, "loadStartsAt").IsNaN().Throw();
            Guard.WhenArgument(loadEndsAt, "loadEndsAt").IsNaN().Throw();

            this.loadCase      = loadCase;
            this.elementLength = elementLength;
            this.gCoefficient  = gCoefficient;
            this.loadAtStart   = loadAtStart;
            this.loadAtEnd     = loadAtEnd;
            this.loadStartsAt  = loadStartsAt;
            this.loadEndsAt    = loadEndsAt;
        }
Beispiel #20
0
        NodeDisplacements GetNodeDisplacements(Node Node, ILoadCase LoadCase)
        {
            NodeDisplacements nodeDisplacements;
            dynamic           displacements;

            displacements = new double[6];
            this.StaadWrapper.Output.GetNodeDisplacements(Node.ID, LoadCase.Id, ref displacements);

            nodeDisplacements = new NodeDisplacements()
            {
                x        = displacements[0],
                y        = displacements[1],
                z        = displacements[2],
                rx       = displacements[3],
                ry       = displacements[4],
                rz       = displacements[5],
                Node     = Node,
                LoadCase = LoadCase
            };

            return(nodeDisplacements);
        }
Beispiel #21
0
        IEnumerable <BeamForces> GetBeamForces(Beam Beam, ILoadCase LoadCase)
        {
            var     beamForces = new List <BeamForces>();
            dynamic forces     = new double[6];

            for (int i = 0; i <= 1; i++)
            {
                this.StaadWrapper.Output.GetMemberEndForces(Beam.Id, i, LoadCase.Id, ref forces, 0);
                beamForces.Add(new BeamForces()
                {
                    Fx       = forces[0],
                    Fy       = forces[1],
                    Fz       = forces[2],
                    Mx       = forces[3],
                    My       = forces[4],
                    Mz       = forces[5],
                    Node     = i == 0 ? Beam.StartNode : Beam.EndNode,
                    Beam     = Beam,
                    LoadCase = LoadCase
                });
            }

            return(beamForces);
        }
 //Concentrated forces
 public IFrameLoad CreateConcentratedNormalLoad(ILoadCase loadCase, double elementLength, double gCoefficient,
                                                double loadValue, double loadPosition)
 {
     return(new ConcentratedNormalForce(loadCase, elementLength, gCoefficient, loadValue, loadPosition));
 }
Beispiel #23
0
 public DistributedTorsion(ILoadCase loadCase, double elementLength, double gCoefficient, double loadAtStart, double loadAtEnd,
                           double loadStartsAt, double loadEndsAt) : base(loadCase, elementLength, gCoefficient, loadAtStart, loadAtEnd, loadStartsAt, loadEndsAt)
 {
 }
 public ForceYDirection(ILoadCase loadCase, double loadValue) : base(loadCase, loadValue)
 {
 }
Beispiel #25
0
        private IEnumerable<BeamForces> GetBeamForces(Beam Beam, ILoadCase LoadCase)
        {
            List<BeamForces> beamForces = new List<BeamForces>();
            dynamic forces = new double[6];

            for (int i = 0; i <= 1; i++)
            {
                this.Staad.Output.GetMemberEndForces(Beam.ID, i, LoadCase.ID, ref forces, 0);
                beamForces.Add(new BeamForces()
                    {
                        Fx = forces[0],
                        Fy = forces[1],
                        Fz = forces[2],
                        Mx = forces[3],
                        My = forces[4],
                        Mz = forces[5],
                        Node = i == 0 ? Beam.StartNode : Beam.EndNode,
                        Beam = Beam,
                        LoadCase = LoadCase
                    });
            }

            return beamForces;
        }
 public MomentAroundX(ILoadCase loadCase, double loadValue) : base(loadCase, loadValue)
 {
 }
 public ConcentratedShearXYPlane(ILoadCase loadCase, double elementLength, double gCoefficient,
                                 double loadValue, double loadPosition) : base(loadCase, elementLength, gCoefficient, loadValue, loadPosition)
 {
 }
Beispiel #28
0
        private NodeDisplacements GetNodeDisplacements(Node Node, ILoadCase LoadCase)
        {
            NodeDisplacements nodeDisplacements;
            dynamic displacements;

            displacements = new double[6];
            this.Staad.Output.GetNodeDisplacements(Node.ID, LoadCase.ID, ref displacements);

            nodeDisplacements = new NodeDisplacements()
            {
                x = displacements[0],
                y = displacements[1],
                z = displacements[2],
                rx = displacements[3],
                ry = displacements[4],
                rz = displacements[5],
                Node = Node,
                LoadCase = LoadCase
            };

            return nodeDisplacements;
        }
Beispiel #29
0
 public CaseController(ILoadCase LoadService)
 {
     _LoadService = LoadService;
 }
 public IFrameLoad CreateDistributedMomentXZPlane(ILoadCase loadCase, double elementLength, double gCoefficient, double loadAtStart, double loadAtEnd,
                                                  double loadStartsAt, double loadEndsAt)
 {
     return(new DistributedMomentXZPlane(loadCase, elementLength, gCoefficient, loadAtStart, loadAtEnd, loadStartsAt, loadEndsAt));
 }
 public IFrameLoad CreateConcentratedMomentXZPlane(ILoadCase loadCase, double elementLength, double gCoefficient,
                                                   double loadValue, double loadPosition)
 {
     return(new ConcentratedMomentXZPlane(loadCase, elementLength, gCoefficient, loadValue, loadPosition));
 }
 public ConcentratedNormalForce(ILoadCase loadCase, double elementLength, double gCoefficient,
                                double loadValue, double loadPosition) : base(loadCase, elementLength, gCoefficient, loadValue, loadPosition)
 {
 }