Code Monkey home page Code Monkey logo

Comments (9)

alantes avatar alantes commented on July 21, 2024 1

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.

from rl-for-msrs.

alantes avatar alantes commented on July 21, 2024 1

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?

from rl-for-msrs.

alantes avatar alantes commented on July 21, 2024 1

rnal = 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

I think m*a = E \sigma may not be appropriate. m*a represents the total effect of internal forces and external forces. And I am guessing that you may have assumed a to be constant, which makes you feel that E will change with m*a. But a is not a constant. It is E \sigma, along with other forces, that determines a, but not inversely.

from rl-for-msrs.

Junang-Wang avatar Junang-Wang commented on July 21, 2024 1

Thanks man. It is much clear now.

from rl-for-msrs.

Junang-Wang avatar Junang-Wang commented on July 21, 2024

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:
"As for Cosserat rod models, we noticed that the PyElastica numerical package had difficulties dealing with small scale soft robots", "We found that if we increased the density of the robots while at the same time inverse-proportionally decreased gravitational acceleration, the gravity as well as deformation of robots remain the same, and timesteps can be set to larger values. In our case, when we set density to be 10.5 times larger and gravity acceleration to be 10.5 times smalle", so how should I choose the proper scale number? And does this approximation effectively reduce the Young's module? What do you think?

I appreciate your help in advance.

from rl-for-msrs.

Junang-Wang avatar Junang-Wang commented on July 21, 2024

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?

from rl-for-msrs.

alantes avatar alantes commented on July 21, 2024
  1. Sorry. I am not an expert in this field, so I may not provide you with a definite answer.
  2. Thanks.
  3. When mass is scaled, gravitational acceleration will be scaled inversely, and the gravitational force will remain the same. So, m*g will not change. And you agreed that strain \sigma will not be affected by scaled mass, then Young's modulus will stay the same.

from rl-for-msrs.

Junang-Wang avatar Junang-Wang commented on July 21, 2024
  1. I understand m* g will not change. But I am discussing about total force rather than only gravity. From the Newton law, F_total = F_externel + F_gravity = m* (a_externel + g) = E \sigma. The contribution of gravity may not effectively affect Young's modulus but the externel part affects effectively.

from rl-for-msrs.

alantes avatar alantes commented on July 21, 2024

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.

from rl-for-msrs.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.