Exemple #1
0
        /// <summary>
        /// Gets the total displacements with specified <see cref="loadCombination"/>
        /// </summary>
        /// <param name="loadCase">the load case</param>
        /// <returns></returns>
        public Displacement GetTotalSettlementAmount(LoadCombination loadCombination)
        {
            var buf = new Displacement();

            foreach (var st in settlements)
            {
                if (loadCombination.ContainsKey(st.LoadCase))
                {
                    buf += loadCombination[st.LoadCase] * st.Displacement;
                }
            }

            return(buf);
        }
Exemple #2
0
        /// <summary>
        /// Gets the internal force at <see cref="x" /> position.
        /// </summary>
        /// <param name="x">The position (from start point).</param>
        /// <param name="cmb">The <see cref="LoadCombination" />.</param>
        /// <returns></returns>
        /// <remarks>
        /// Will calculate the internal forces of member regarding the <see cref="cmb" /> <see cref="LoadCombination" />
        /// </remarks>
        public override Force GetInternalForceAt(double x, LoadCombination cmb)
        {
            var gStartDisp = StartNode.GetNodalDisplacement(cmb);
            var gEndDisp   = EndNode.GetNodalDisplacement(cmb);

            var lStartDisp = new Displacement(
                TransformGlobalToLocal(gStartDisp.Displacements),
                TransformGlobalToLocal(gStartDisp.Rotations));

            var lEndDisp = new Displacement(
                TransformGlobalToLocal(gEndDisp.Displacements),
                TransformGlobalToLocal(gEndDisp.Rotations));

            var displVector = new double[]
            {
                lStartDisp.DX, lStartDisp.DY, lStartDisp.DZ,
                lStartDisp.RX, lStartDisp.RY, lStartDisp.RZ,
                lEndDisp.DX, lEndDisp.DY, lEndDisp.DZ,
                lEndDisp.RX, lEndDisp.RY, lEndDisp.RZ
            };

            var lStartForces = Matrix.Multiply(GetLocalStiffnessMatrix(), displVector);

            var startForce = Force.FromVector(lStartForces, 0);

            var forceAtX = -startForce.Move(new Vector(x, 0, 0));

            foreach (var ld in loads)
            {
                if (!cmb.ContainsKey(ld.Case))
                {
                    continue;
                }

                var frc = ((Load1D)ld).GetInternalForceAt(this, x);

                forceAtX += cmb[ld.Case] * frc;
            }

            return(forceAtX);
        }
Exemple #3
0
        internal Force GetSupportReaction2(LoadCombination cmb)
        {
            //TODO: this methods not works correctly!

            var f1 = new Force();
            var f  = new Force();

            foreach (var cse in cmb.Keys)
            {
                parent.LastResult.AddAnalysisResultIfNotExists(cse);
            }



            #region From Connected Elements

            foreach (var elm in ConnectedElements)
            {
                var ind = elm.Nodes.IndexOfReference(this);

                foreach (var cse in cmb.Keys)
                {
                    foreach (var lde in elm.Loads)
                    {
                        if (lde.Case != cse)
                        {
                            continue;
                        }

                        var loads = lde.GetGlobalEquivalentNodalLoads(elm);

                        f1 += cmb[cse] * loads[ind];
                    }
                }
            }

            #endregion

            #region From Loads on this node

            foreach (var load in this.loads)
            {
                if (!cmb.ContainsKey(load.Case))
                {
                    continue;
                }

                f1 += cmb[load.Case] * load.Force;
            }

            #endregion


            foreach (var cse in cmb.Keys)//
            {
                f += cmb[cse] * Force.FromVector(parent.LastResult.Forces[cse], 6 * this.Index);
            }

            var buf = f + -f1;


            if (constraints.DX == DofConstraint.Released)
            {
                buf.Fx = 0;
            }
            if (constraints.DY == DofConstraint.Released)
            {
                buf.Fy = 0;
            }
            if (constraints.DZ == DofConstraint.Released)
            {
                buf.Fz = 0;
            }

            if (constraints.RX == DofConstraint.Released)
            {
                buf.Mx = 0;
            }
            if (constraints.RY == DofConstraint.Released)
            {
                buf.My = 0;
            }
            if (constraints.RZ == DofConstraint.Released)
            {
                buf.Mz = 0;
            }


            return(buf);

            throw new NotImplementedException();
        }