-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What‘s the unit in the code? #2
Comments
Hi, Junang-Wang! Thank you for your interest and sorry for the confusion. The work went through many trials and errors and it was not maintained neatly throughout the process. And many apologies for that I did not have enough time and energy to clean up my code before publishing since I have already graduated and get occupied by many other commitments. Anyway, strictly speaking, I did not use standard SI units but rather a scaled version. As you may know, many numerical softwares (like Abaqus subroutines) will not qualify the units you use, meaning that you do not have to adopt standard SI (though I believe it will be better to use SI, of course). In my case, heights and lengths are in the units of mm. Density of the materials is 1860 kg/m^3 = 1.86 * 10^6 g/(1000 mm)^3 = 1.86 * 10^-3 g/ mm^3, which was set in my programs to be 1.86e3/1000 = 1.86. So, you can see that my unit of mass is 10^-3 g. Gravitational acceleration was -9.80665e0 * 1000. This is because 9.8 m/s^2 = 9.8 * 10^3 mm/s^2. Like wise, Young's modulus is 84.5kPa = 84.5 * 10^3 * N/m^2 = 84.5 * 10^3 * (kg*m/s^2)/(m^2) = 84.5 * 10^3 * kg/(m * s^2) = 84.5 * 10^3 *10^6 * (10^-3 g)/(10^3 mm * s^2) = 84.5 * 10^6 * (10^-3 g)/(mm * s^2) = 84500000 (10^-3 g)/(mm * s^2). In any cases, the units of time were not scaled. If I recollect it correctly, I hoped to avoid extremely small numbers in Python in the first glance. For example, if I use SI, the small scale of the robots will make the mass of them very small, which might lead to some numerical problems in Python. But I am not sure if it is still the case. If you are willing to, you can turn all of the numbers into SI and have a try. Let me know if you have other questions. |
Hi, alantes! Thank you for your reply, now I understand the unit problem. I also have some other questions regarding your code. In your code, damping constant (denoted as "nu")is setting to 150. However, I am woundering how should I choose the appropriate damping constant in my system, is there any standard poccess or guideline I can follow? The other equstion, quoting from your paper: I appreciate your help in advance. |
1.) To the best of my knowledge, no, there are no standardized procedures of choosing damping coefficient. You can check this thread for more discussions: https://www.researchgate.net/post/Damping-ratio-is-always-the-parameter-that-determine-with-greatest-degree-of-uncertainty 2.) In my opinion, the difficulties of calculating motion quantities of small-scale rods in PyElastica is not something well expected or examined. As I might have mentioned in my paper, a possible reason for the problem is that small-scale dimensions make moments extremely small, and as a result of this, in my experiments with PyElastica, after several steps of calculating the velocities will soon became extremely large and the program will generate NaN numbers. You can consider that there might be a curve describing the difficulties of calculating, and the x-axis is how small your models are. When the dimensions of your models are regular values, like 1.0 m or above, everything is fine; however, if your dimenisons are below a threshold, the smaller your dimensions are, the harder it is for PyElastica to converge and calculate dynamics. I do not mean to attribute this as a bug of PyElastica because there will be tons of unexpected conditions when you are developing a large and comprehensive numerical software. As a researcher using the public repository for unregular purposes, I believe we should try to figuring out tricks to circumvent the limitations of the package. So, my way was to scale acceleration, and in my own experiments I found that 10.5 times larger will take the total computational time to what I can afford, and did not perform large tests to the convergence performance of PyElastica, i.e., the "curve" I described above. Therefore, I do not have a standardized procecesure for you to choose the scale factor. Sorry. However, as a general suggestion, the smaller your models are, the larger scale factor you should choose. 3.) I do not think Young's modules are reduced, nor do the elastic forces. Any details about why you think so? |
Thanks for you reply, Alantes. Your discussion helps me a lot. (1) Is the only method for determining damping constant through a manul comparsion of experiments and simulations and manually picking a number? (2) I agree with your option that after several steps of evaluation, the velocities of small scale rods elements will become extremely large. Your explanation is reasonable. (3) Let's say If one were to makes density 10.5 times larger. For an unshearable rod, from Newton's law, F=m* a, and the stress F = E \sigma, where m* is scale mass(10.5times), E is Young's modulus and \sigma is strain. So that , m*a = E \sigma, and acceleration a and strain \sigma are given be current state which is not affected by scale mass. So, for my perspective, if one make density 10.5 times large, it will effectively scale down Young's modulus. I am not sure if my logic is current. What do you think? |
|
|
In static and equilibrium cases, a_external = 0, meaning that the stable deformations will the the same as the unscaled version. In dynamic cases, the increased mass will increase the inertia of the robots, and acceleration will be smaller than the unscaled version. Young's modulus, as is set in the programs, stays the same. I hope it is clear now. |
I think |
Thanks man. It is much clear now. |
Hi alantes,
I have been going though your paper. Very nice paper. However, I have a question about the units in your code. In the paper, your robot is in size of 20mm * 8mm * 0.8mm with Young's modulus and density setting to 84.5kPa and 1860kg/m^3 respectively. However, in your following code, you set length = 20, but Young's modulus = 84.5*10^6 and density = 1860.
So I am thinking which units you are using?
Looking forward to your reply. Thanks for advance.
The text was updated successfully, but these errors were encountered: