Exemplo n.º 1
0
        public AnalysisCase(string name)
        {
            Name = name;

            NodeDeformations    = new CombinableList <NodeDeformation>();
            Reactions           = new CombinableList <Reaction>();
            FrameInternalForces = new CombinableList <FrameInternalForce>();
        }
Exemplo n.º 2
0
        public CombinableList <T> Multiply(double factor)
        {
            CombinableList <T> result = new CombinableList <T>();

            for (int i = 0; i < Count; i++)
            {
                result.Add(this[i].Multiply(factor));
            }
            return(result);
        }
Exemplo n.º 3
0
        public Combination(string name, bool isEnvelope)
        {
            Name       = name;
            IsEnvelope = isEnvelope;

            acCoefficients = new Dictionary <AnalysisCase, double>();
            coCoefficients = new Dictionary <Combination, double>();

            MinNodeDeformations    = new CombinableList <NodeDeformation>();
            MinReactions           = new CombinableList <Reaction>();
            MinFrameInternalForces = new CombinableList <FrameInternalForce>();

            MaxNodeDeformations    = new CombinableList <NodeDeformation>();
            MaxReactions           = new CombinableList <Reaction>();
            MaxFrameInternalForces = new CombinableList <FrameInternalForce>();
        }
Exemplo n.º 4
0
        public CombinableList <T> AbsMax(CombinableList <T> other)
        {
            if (Count == 0)
            {
                return(other);
            }

            CombinableList <T> result = new CombinableList <T>();

            for (int i = 0; i < Count; i++)
            {
                if (!this[i].IsCompatibleWith(other[i]))
                {
                    throw new ArgumentException("Lists are not compatible.");
                }
                result.Add(this[i].Abs().Max(other[i].Abs()));
            }
            return(result);
        }
Exemplo n.º 5
0
        public CombinableList <T> MultiplyAndAdd(double factor, CombinableList <T> other)
        {
            if (Count == 0)
            {
                return(other.Multiply(factor));
            }

            CombinableList <T> result = new CombinableList <T>();

            for (int i = 0; i < Count; i++)
            {
                if (!this[i].IsCompatibleWith(other[i]))
                {
                    throw new ArgumentException("Lists are not compatible.");
                }
                result.Add(this[i].MultiplyAndAdd(factor, other[i]));
            }
            return(result);
        }
Exemplo n.º 6
0
        public void Update()
        {
            MinNodeDeformations.Clear();
            MinReactions.Clear();
            MinFrameInternalForces.Clear();

            MaxNodeDeformations.Clear();
            MaxReactions.Clear();
            MaxFrameInternalForces.Clear();

            if (IsEnvelope)
            {
                HasEnvelopeValues = true;
            }

            foreach (KeyValuePair <AnalysisCase, double> pair in acCoefficients)
            {
                AnalysisCase analysisCase = pair.Key;
                double       coefficient  = pair.Value;
                if (IsEnvelope)
                {
                    MinNodeDeformations    = MinNodeDeformations.Min(analysisCase.NodeDeformations.Multiply(coefficient));
                    MinReactions           = MinReactions.Min(analysisCase.Reactions.Multiply(coefficient));
                    MinFrameInternalForces = MinFrameInternalForces.Min(analysisCase.FrameInternalForces.Multiply(coefficient));

                    MaxNodeDeformations    = MaxNodeDeformations.Max(analysisCase.NodeDeformations.Multiply(coefficient));
                    MaxReactions           = MaxReactions.Max(analysisCase.Reactions.Multiply(coefficient));
                    MaxFrameInternalForces = MaxFrameInternalForces.Max(analysisCase.FrameInternalForces.Multiply(coefficient));
                }
                else
                {
                    MinNodeDeformations    = MinNodeDeformations.MultiplyAndAdd(coefficient, analysisCase.NodeDeformations);
                    MinReactions           = MinReactions.MultiplyAndAdd(coefficient, analysisCase.Reactions);
                    MinFrameInternalForces = MinFrameInternalForces.MultiplyAndAdd(coefficient, analysisCase.FrameInternalForces);

                    MaxNodeDeformations    = MaxNodeDeformations.MultiplyAndAdd(coefficient, analysisCase.NodeDeformations);
                    MaxReactions           = MaxReactions.MultiplyAndAdd(coefficient, analysisCase.Reactions);
                    MaxFrameInternalForces = MaxFrameInternalForces.MultiplyAndAdd(coefficient, analysisCase.FrameInternalForces);
                }
            }

            foreach (KeyValuePair <Combination, double> pair in coCoefficients)
            {
                Combination combination = pair.Key;
                double      coefficient = pair.Value;
                combination.Update();
                if (IsEnvelope || combination.HasEnvelopeValues)
                {
                    HasEnvelopeValues = true;

                    MinNodeDeformations    = MinNodeDeformations.Min(combination.MinNodeDeformations.Multiply(coefficient));
                    MinReactions           = MinReactions.Min(combination.MinReactions.Multiply(coefficient));
                    MinFrameInternalForces = MinFrameInternalForces.Min(combination.MinFrameInternalForces.Multiply(coefficient));

                    MaxNodeDeformations    = MaxNodeDeformations.Max(combination.MaxNodeDeformations.Multiply(coefficient));
                    MaxReactions           = MaxReactions.Max(combination.MaxReactions.Multiply(coefficient));
                    MaxFrameInternalForces = MaxFrameInternalForces.Max(combination.MaxFrameInternalForces.Multiply(coefficient));
                }
                else
                {
                    MinNodeDeformations    = MinNodeDeformations.MultiplyAndAdd(coefficient, combination.MinNodeDeformations);
                    MinReactions           = MinReactions.MultiplyAndAdd(coefficient, combination.MinReactions);
                    MinFrameInternalForces = MinFrameInternalForces.MultiplyAndAdd(coefficient, combination.MinFrameInternalForces);

                    MaxNodeDeformations    = MaxNodeDeformations.MultiplyAndAdd(coefficient, combination.MaxNodeDeformations);
                    MaxReactions           = MaxReactions.MultiplyAndAdd(coefficient, combination.MaxReactions);
                    MaxFrameInternalForces = MaxFrameInternalForces.MultiplyAndAdd(coefficient, combination.MaxFrameInternalForces);
                }
            }
        }