Exemplo n.º 1
0
        /// <summary>
        /// Calculates the component of the combined force for the requested node and degree of freedom combination.
        /// </summary>
        /// <param name="item">The <see cref="NodalDegreeOfFreedom">Nodal Degree of Freedom</see> for which we wish to get a component of force.</param>
        /// <param name="combinedForceOnNode">The combined force on the node for all degrees of freedom of that node.</param>
        /// <returns>the component of the applied force at the requested node for the specified degree of freedom on that node.</returns>
        private double GetCombinedForceFor(NodalDegreeOfFreedom item, out ForceVector combinedForceOnNode)
        {
            Guard.AgainstNullArgument(item, "item");

            combinedForceOnNode = this.GetCombinedForceOn(item.Node);

            return(combinedForceOnNode[item.DegreeOfFreedom]);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Adds a displacement result to this set of results
        /// </summary>
        /// <param name="nodalDegreeOfFreedom">The node and global degree of freedom identifier of the displacement component.</param>
        /// <param name="displacementComponent">The value of the displacement in this global direction</param>
        public void AddDisplacement(NodalDegreeOfFreedom nodalDegreeOfFreedom, double displacementComponent)
        {
            if (!this.displacements.ContainsKey(nodalDegreeOfFreedom.Node))
            {
                this.displacements.Add(nodalDegreeOfFreedom.Node, new DisplacementVector(nodalDegreeOfFreedom.Node));
            }

            this.displacements[nodalDegreeOfFreedom.Node].SetValue(nodalDegreeOfFreedom.DegreeOfFreedom, displacementComponent);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Adds a reaction result to this set of results.
        /// </summary>
        /// <param name="nodalDegreeOfFreedom">The node and global degree of freedom identifier for this reaction component.</param>
        /// <param name="forceComponent">The value of the reaction in this global direction</param>
        public void AddReaction(NodalDegreeOfFreedom nodalDegreeOfFreedom, double forceComponent)
        {
            if (!this.reactions.ContainsKey(nodalDegreeOfFreedom.Node))
            {
                this.reactions.Add(nodalDegreeOfFreedom.Node, new ReactionVector(nodalDegreeOfFreedom.Node));
            }

            this.reactions[nodalDegreeOfFreedom.Node].SetValue(nodalDegreeOfFreedom.DegreeOfFreedom, forceComponent);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Frees a node in a given degree of freedom.
        /// </summary>
        /// <param name="node">The node to free</param>
        /// <param name="degreeOfFreedomToFree">the degree of freedom in which to free the node</param>
        public void UnconstrainNode(IFiniteElementNode node, DegreeOfFreedom degreeOfFreedomToFree)
        {
            NodalDegreeOfFreedom nodalDegreeOfFreedomToFree = new NodalDegreeOfFreedom(node, degreeOfFreedomToFree);

            this.UnconstrainNode(nodalDegreeOfFreedomToFree);
        }
Exemplo n.º 5
0
 /// <summary>
 /// Constrains a node in a given degree of freedom.
 /// </summary>
 /// <param name="nodalDegreeOfFreedomToConstrain">The node and degree of freedom to constrain</param>
 public void ConstrainNode(NodalDegreeOfFreedom nodalDegreeOfFreedomToConstrain)
 {
     this.constrainedNodalDegreesOfFreedom.Add(true, nodalDegreeOfFreedomToConstrain);
 }
Exemplo n.º 6
0
        /// <summary>
        /// Constrains a node in a given degree of freedom.
        /// </summary>
        /// <param name="node">The node to constrain</param>
        /// <param name="degreeOfFreedomToConstrain">the degree of freedom in which to constrain the node.</param>
        public void ConstrainNode(IFiniteElementNode node, DegreeOfFreedom degreeOfFreedomToConstrain)
        {
            NodalDegreeOfFreedom nodalDegreeOfFreedomToConstrain = new NodalDegreeOfFreedom(node, degreeOfFreedomToConstrain);

            this.ConstrainNode(nodalDegreeOfFreedomToConstrain);
        }
Exemplo n.º 7
0
 /// <summary>
 /// Determines whether a node is constrained in the given degree of freedom
 /// </summary>
 /// <param name="nodalDegreeOfFreedomToCheck">The node and degree of freedom to check whether it is constrained</param>
 /// <returns>True if this particular node and degree of freedom are constrained; otherwise, false.</returns>
 public bool IsConstrained(NodalDegreeOfFreedom nodalDegreeOfFreedomToCheck)
 {
     return(this.constrainedNodalDegreesOfFreedom.KeyOfValue(nodalDegreeOfFreedomToCheck));
 }
Exemplo n.º 8
0
        /// <summary>
        /// Determines whether a node is constrained in the given degree of freedom
        /// </summary>
        /// <param name="nodeToCheck">the node to check whether it is constrain in a particular degree of freedom</param>
        /// <param name="degreeOfFreedomToCheck">The particular degree of freedom of the node to check for constraint</param>
        /// <returns>True if this particular node and degree of freedom are constrained; otherwise, false.</returns>
        public bool IsConstrained(IFiniteElementNode nodeToCheck, DegreeOfFreedom degreeOfFreedomToCheck)
        {
            NodalDegreeOfFreedom nodeDof = new NodalDegreeOfFreedom(nodeToCheck, degreeOfFreedomToCheck);

            return(this.IsConstrained(nodeDof));
        }
Exemplo n.º 9
0
 /// <summary>
 /// Frees a node in a given degree of freedom.
 /// </summary>
 /// <param name="nodalDegreeOfFreedomToFree">The node and degree of freedom to free</param>
 public void UnconstrainNode(NodalDegreeOfFreedom nodalDegreeOfFreedomToFree)
 {
     this.constrainedNodalDegreesOfFreedom.Add(false, nodalDegreeOfFreedomToFree);
 }