Many objects deform according to Hooke's law; many materials behave elastically and have a Young's modulus.
One can deduce quite a bit about intermolecular or interatomic forces just from a simple experiment, and from the observations that solid objects are difficult to compress and, once broken, do not spontaneously repair. From this you can deduce that, (i) when the interatomic spacing is greater than its unstressed value, the attractive forces between atoms must be greater than the repulsive forces (the attractive forces balance both the repulsive forces and the forces you impose).
Two further observations: First it is extremely difficult to compress a metal, so (iii) the repulsive forces must become very large, even for small reductions in r.
From all these observations, we can deduce that the interatomic repulsive and attractive forces, as a function of interatomic separation must look qualitatively rather as shown in the graph below at left. The division of forces into attractive and repulsive components is at least a little arbitrary: What is really important are the total force and energy, which we can actually measure.
Again, a vertical grey line marks the unstressed value of r and, of course, it identifies the separation at which the total force is zero. Young's modulus Y for a material is defined as the ratio of tensile stress to tensile strain. Many polymeric materials, such as rubber, have much lower values of Young's modulus than other solids. Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Those of you familiar with the algorithm know that it has two main components: repulsion between nodes in Coulomb's law fashion and spring-like attraction along edges using Hooke's law, both of these components involve pairwise calculations between nodes. The Barnes-Hut algorithm works nicely for the former which would bring the repulsion component to O(n log n). Dividing the nodes based on location into overlapping bins and performing pairwise calculations only between nodes in the same bin. I feel the second option that you gave should work with linear complexity in terms of the number of edges. EDIT: Sorry I earlier thought that each node is connected to every other node through a spring.
Not the answer you're looking for?Browse other questions tagged c# algorithm graph physics nodes or ask your own question. How can I avoid the embarrassment associated with needing a sabbatical for alcoholism and mental health treatment? Where can we store our luggage after checking out so we don't have to book an extra hotel night? In this section, we explain the origin of elastic properties and Hooke's law by consideration of the forces and energies between atoms or molecules in a solid. The extension or compression can be read on the ruler, and the force is measured with a spring balance (which itself uses a spring).
Hooke's law is F = -kx where F is the applied force, x is the deformation, and k a constant for a particular spring.
Here, you have slightly decreased the average distance between the atoms but the repulsive force between pairs of atoms has been able to resist the compressive force you applied. Conversely, (ii) when the interatomic spacing is less than its unstressed value, the repulsive forces between atoms must be greater than the attractive forces. Second, once you have broken a piece of metal, it doesn't automatically spring back together: (iv) if the atoms are separated from each other by even a distance of much less than a mm, the attractive forces are effectively zero. But how can curves like these give a linear relation between the force applied and the stretching of the interatomic bonds? They are analytical approximations to realistic interatomic forces, but will illustrate how to relate atomic properties to macroscopic material properties. However, the repulsive term is simply a convenient, differentiable function that gives a very strong repulsion.
To relate Hooke's law to Young's modulus in the experiment above, it would be necessary to consider bending of the wire. Thestretching mechanismhere is different, because to a large extent stretching straightens polymer molecules, rather than changing the average distance between them. However, this might not work in all cases, especially since the initial configuration of the nodes is random and connected nodes could be anywhere. If it matters at all, I'm using C# and it'd be nice if it were trivial to throw in a parallel loop.
Just iterate through them and keep updating the resultant forces on the respective 2 nodes. If so you can take care of the attraction component in O(n * k) by storing attraction in adjacency list instead of adjacency matrix. I maintained and iterated through a collection of neighbours for each node, which allowed the entire acceleration routine to be easily parallelized (along with Barnes-Hut). Note that Hooke's law is only valid over a limited range: in this case, once the spring is compressed about 10 cm, larger forces produce hardly any further reduction in length, because the spring's coils are in contact. Unless the wire is very thin or you are very strong, the amount of stetching will be small, and the wire will not break.
If we divide the area elements of A = y2, we have one intermolecular bond and its force F to consider.
I could change how I generate the nodes but unless they are all in the same bin it would still produce incorrect results. What has happened here is that you have slightly increased the average distance, r, between the atoms. It corresponds to a linear approximation to F(r), passing through the point (r0,0), where r0 is the unstressed length. The kinks can occur at many different locations, so usually there are many possible configurations corresponding to a particular shortened length. My C# implementation handles around 100000 nodes and 150000 edges at an acceptable level of performance.
However, the attractive force between pairs of atoms has been able to resist the tensile force you applied. Integrating Hooke's law gives a potential energy U(r) that is parabolic about the minimu at r0. Although the length of the spring may change by many percent, nowhere is the steel compressed or stretched more than one percent. Consequently, the entropy of the contracted state is higher than that of the straightened state. Hooke's law thus corresponds to the green linedrawn on the F(r) plot and the green parabola on the U(r) plot.
When you stretch rubber, much of the work you do goes into the −TS term of the free energy, so this is an entropic force. The insets on each graph show close-ups of these approximation, and show that the approximations are poor for deformations of more than a few percent. 