public CreateLinearConstantSpring ( IFiniteElementNode node1, IFiniteElementNode node2, double springConstant ) : LinearConstantSpring | ||
node1 | IFiniteElementNode | The node at the start of the spring |
node2 | IFiniteElementNode | The node at the end of the spring |
springConstant | double | The constant value of stiffness of the spring. |
return | LinearConstantSpring |
public void Setup() { nodeFactory = new NodeFactory(ModelType.Truss2D); node1 = nodeFactory.CreateFor2DTruss(0, 0); node2 = nodeFactory.CreateFor2DTruss(0, 1); node3 = nodeFactory.CreateFor2DTruss(0, 2); SUT = new ElementRepository(); elementFactory = new ElementFactory(ModelType.Truss2D, SUT); spring1 = elementFactory.CreateLinearConstantSpring(node1, node2, 1); spring2 = elementFactory.CreateLinearConstantSpring(node2, node3, 2); }
protected void CreateAndStore2DSpringFromOriginTo(double x, double z) { this.nodeFactory = new NodeFactory(ModelType.Truss2D); this.start = nodeFactory.CreateFor2DTruss(0, 0); this.end = nodeFactory.CreateFor2DTruss(x, z); this.elementFactory = new ElementFactory(ModelType.Truss2D); this.SUT = elementFactory.CreateLinearConstantSpring(this.start, this.end, 1); }
protected void CreateAndStore3DSpringFromOriginTo(double x, double y, double z) { nodeFactory = new NodeFactory(ModelType.Truss3D); start = nodeFactory.Create(0, 0, 0); end = nodeFactory.Create(x, y, z); elementFactory = new ElementFactory(ModelType.Truss3D); this.SUT = elementFactory.CreateLinearConstantSpring(start, end, 1); }
public void SetUp() { nodeFactory = new NodeFactory(ModelType.Truss1D); start = nodeFactory.Create(0); end = nodeFactory.Create(1); elementFactory = new ElementFactory(ModelType.Truss1D); SUT = elementFactory.CreateLinearConstantSpring(start, end, 2); }