Simulating inter-connected springs/beams

  • Thread starter Thread starter Alkatran
  • Start date Start date
AI Thread Summary
The discussion centers on challenges faced in simulating a system of interconnected springs at nodes. The primary issue is the overestimation of energy due to the fixed step method used for calculating instantaneous forces, leading to an increase in total energy unless significant damping is applied. A proposed workaround involves recalculating forces if energy increases after each iteration, effectively managing energy creep. However, the fundamental problem lies in the stepwise approach, which introduces errors that affect both energy conservation and the model's accuracy compared to real-world behavior. To address this, reducing the step size can minimize approximation errors, while finding a more accurate midpoint value for calculations may require deeper analysis of the model rather than just programming adjustments.
Alkatran
Science Advisor
Homework Helper
Messages
959
Reaction score
0
I've been writing a simple program to simulate what is essentially a bunch of springs connected together at nodes. However, I'm having trouble.

Currently I just calculate instantaneous force for every spring/node, step ahead a fixed amount, and repeat. The problem is this tends to overestimate and I end up with a the whole system gaining a ton of energy unless I dampen the springs by a large factor.

What is the next step up for this type of thing?
 
Technology news on Phys.org
It sounds like stepwise recalculations (possibly coupled with rounding errors on floating point numbers) are causing the problem. One kludge is to add up the total energy after each iteration and, if it has increased from the previous total, do a second pass to reduce all forces proportionately. This will solve the problem of creeping energy increase directly.

Of course the main problem is the stepwise approach used in the simulation. The errors introduced by these approximations will cause total energy to change and they will also cause the model's behavior to deviate from an actual device's. The simplest solution is to reduce the size of each step to minimize the "staircase approximation" of the curves that are being modeled. Another solution is to find a better, more accurate midpoint value at each iteration, but this is not a programmatic problem, it takes some analysis of your model to find out what is best.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Back
Top