MTs, WM2D, and WM Basic Language Script Code
Moderator: scott
re: MTs, WM2D, and WM Basic Language Script Code
Can you look at your post on this thread dated 'Posted: 2019-12-22, 19:06'.
The extra mass would help close up the rim weights at the top.
Also the CF effect would open them at the bottom.
I expect a lock needs to exist to stop opening/closing during part of the rotation.
You have the ability to build a proof of concepts quicker than myself.
There is one little bit extra by linking the minor masses together.
However that is for high rpm reasons.
Cheers
The extra mass would help close up the rim weights at the top.
Also the CF effect would open them at the bottom.
I expect a lock needs to exist to stop opening/closing during part of the rotation.
You have the ability to build a proof of concepts quicker than myself.
There is one little bit extra by linking the minor masses together.
However that is for high rpm reasons.
Cheers
[MP] Mobiles that perpetuate - external energy allowed
- Wubbly
- Aficionado
- Posts: 727
- Joined: Sat Jun 06, 2009 2:15 am
- Location: A small corner of the Milky Way Galaxy
- Contact:
re: MTs, WM2D, and WM Basic Language Script Code
You have to choose some optimal ratio of circumference masses to hinge masses.
I added a linear spring to capture some of the CF+GF of the hinge mass at the bottom of the swing.
At high angular velocities, the CF of the hinge mass pins the circumference masses to the outer, spread position.
It needs a locking mechanism as you noted, but I was never good at locking mechanisms and this one would have to pass through the 0 mark making it even harder to implement.
The sim ran about the same as version 1 as shown by the angular velocity graph.
I added a linear spring to capture some of the CF+GF of the hinge mass at the bottom of the swing.
At high angular velocities, the CF of the hinge mass pins the circumference masses to the outer, spread position.
It needs a locking mechanism as you noted, but I was never good at locking mechanisms and this one would have to pass through the 0 mark making it even harder to implement.
The sim ran about the same as version 1 as shown by the angular velocity graph.
re: MTs, WM2D, and WM Basic Language Script Code
Here's a simple locking/latch mech Wubbly. It's usually pretty reliable, unlike when using rods I've found.
I made two bar pendulums pivoted on the left with pin joints. On the top one I placed a rigid joint on top of the pin joint. Then in the Active When box put in an IF statement to control when it works.
I used the pendulums y position for example. But it can be a combination of x or y positions, angle range etc.
And you don't have to just use IF Statements. AND or OR work as well.
I made two bar pendulums pivoted on the left with pin joints. On the top one I placed a rigid joint on top of the pin joint. Then in the Active When box put in an IF statement to control when it works.
I used the pendulums y position for example. But it can be a combination of x or y positions, angle range etc.
And you don't have to just use IF Statements. AND or OR work as well.
Re: re: MTs, WM2D, and WM Basic Language Script Code
Thank you for your work. You really get there faster than I can.Wubbly wrote:You have to choose some optimal ratio of circumference masses to hinge masses.
I added a linear spring to capture some of the CF+GF of the hinge mass at the bottom of the swing.
At high angular velocities, the CF of the hinge mass pins the circumference masses to the outer, spread position.
It needs a locking mechanism as you noted, but I was never good at locking mechanisms and this one would have to pass through the 0 mark making it even harder to implement.
The sim ran about the same as version 1 as shown by the angular velocity graph.
Yes at high rpm the device will stay in the open position until it slows down.
The linking of the minor masses could help?
There are a few parameter option of minor mass, major mass separation and locking times to test/sim.
Then there is the three sector version.
If we get some good results then I could create a steampunk viewable presentation.
I would need the run data. I will explain if required.
Cheers
[MP] Mobiles that perpetuate - external energy allowed
-
- Devotee
- Posts: 1718
- Joined: Fri Nov 07, 2003 12:22 pm
- Location: Speyer, Germany
- Contact:
re: MTs, WM2D, and WM Basic Language Script Code
Wubbly wrote
It is a dead end !!
But it is your choice to prove me wrong.
When I see a fix axle on levers then I know it will not work, no way, therefore I had made several real physical models, not simulated.
Before you try to make the wheel go round, try to build with your simulator a construction with pendulums and springs were the swinging amplitude is increasing. -->coupled oscillation
I will not offend anyone, it is only my opinion.
You need two systems which can interact, one is arranging the other.
Both systems must be able to move !!
A fix axle system does not fulfill the above condition.
It still seems like a dead end.
It is a dead end !!
But it is your choice to prove me wrong.
When I see a fix axle on levers then I know it will not work, no way, therefore I had made several real physical models, not simulated.
Before you try to make the wheel go round, try to build with your simulator a construction with pendulums and springs were the swinging amplitude is increasing. -->coupled oscillation
I will not offend anyone, it is only my opinion.
You need two systems which can interact, one is arranging the other.
Both systems must be able to move !!
A fix axle system does not fulfill the above condition.
Best regards
Georg
Georg
- Wubbly
- Aficionado
- Posts: 727
- Joined: Sat Jun 06, 2009 2:15 am
- Location: A small corner of the Milky Way Galaxy
- Contact:
re: MTs, WM2D, and WM Basic Language Script Code
Thank you for your input Georg. There's always the "New Topic" button if you want to start your own thread so your ideas can obtain the focus you believe they deserve.
@Fletcher, I need to do more testing on latches. I think part of the problem was catching a moving mass and I don't know when exactly it will be at the latch point, then latching it. If I have a rigid joint and the two points are not lined up, will it still latch or give a constraint error. I think the rod was giving me that problem. I didn't know the actual length of the rod, and when I tried to activate it at a specific background wheel angle, WM2D was not happy.
And if I used the background wheel as the reference, the different mechanisms needed different mod statements because they were positioned at different angles on the background wheel, which wasn't really a problem until ...
one of the mechanisms needed the latch to hold from 270 through 90 (going CCW), the mod would reset to zero after 360, and I needed an additional statement to cover that condition for that mechanism.
Maybe I could activate the rod when the rod is at a specific length, and the background wheel is between a specific range of angles? Maybe that would get around the rod length problem I was having.
@Fletcher, I need to do more testing on latches. I think part of the problem was catching a moving mass and I don't know when exactly it will be at the latch point, then latching it. If I have a rigid joint and the two points are not lined up, will it still latch or give a constraint error. I think the rod was giving me that problem. I didn't know the actual length of the rod, and when I tried to activate it at a specific background wheel angle, WM2D was not happy.
And if I used the background wheel as the reference, the different mechanisms needed different mod statements because they were positioned at different angles on the background wheel, which wasn't really a problem until ...
one of the mechanisms needed the latch to hold from 270 through 90 (going CCW), the mod would reset to zero after 360, and I needed an additional statement to cover that condition for that mechanism.
Maybe I could activate the rod when the rod is at a specific length, and the background wheel is between a specific range of angles? Maybe that would get around the rod length problem I was having.
- Wubbly
- Aficionado
- Posts: 727
- Joined: Sat Jun 06, 2009 2:15 am
- Location: A small corner of the Milky Way Galaxy
- Contact:
re: MTs, WM2D, and WM Basic Language Script Code
Testing latching mechanisms
A while back Jonathan posted a solution for a one way ratchet. If you have a rotating circle, attach one end of a rod to the circle and the other end to the background. When the rotation of the circle is positive, the rod is not active, otherwise activate the rod. It seemed simple enough, but does it work?
The rod constraint has a LENGTH, and a CURRENT LENGTH. When the rod is not active, the CURRENT LENGTH can change, but the LENGTH value of the constraint is always some fixed value. If you activate the rod and the CURRENT LENGTH is not equal to the LENGTH at the time of activation what happens?
Here's a simulation testing this condition. A smaller mass is attached to a large wheel which is pinned to the background. A rod is attached from the background to the wheel and is not active until the main wheel's rotation is negative. See attached Figure.
The small mass rotates the wheel counter clockwise (positive rotation). At some point in time the wheel comes to a stop and tries to rotate in the opposite direction (clockwise). At this point the ActiveWhen statement on the rod kicks in and stops the wheel from rotating backwards. This can be seen on the angular velocity graph which doesn't go negative. It seems to work fine for this condition.
Note that in the ending position, the Length and the Current Length of the rod constraint are not equal, but this does not cause a constraint error.
A while back Jonathan posted a solution for a one way ratchet. If you have a rotating circle, attach one end of a rod to the circle and the other end to the background. When the rotation of the circle is positive, the rod is not active, otherwise activate the rod. It seemed simple enough, but does it work?
The rod constraint has a LENGTH, and a CURRENT LENGTH. When the rod is not active, the CURRENT LENGTH can change, but the LENGTH value of the constraint is always some fixed value. If you activate the rod and the CURRENT LENGTH is not equal to the LENGTH at the time of activation what happens?
Here's a simulation testing this condition. A smaller mass is attached to a large wheel which is pinned to the background. A rod is attached from the background to the wheel and is not active until the main wheel's rotation is negative. See attached Figure.
The small mass rotates the wheel counter clockwise (positive rotation). At some point in time the wheel comes to a stop and tries to rotate in the opposite direction (clockwise). At this point the ActiveWhen statement on the rod kicks in and stops the wheel from rotating backwards. This can be seen on the angular velocity graph which doesn't go negative. It seems to work fine for this condition.
Note that in the ending position, the Length and the Current Length of the rod constraint are not equal, but this does not cause a constraint error.
- Wubbly
- Aficionado
- Posts: 727
- Joined: Sat Jun 06, 2009 2:15 am
- Location: A small corner of the Milky Way Galaxy
- Contact:
re: MTs, WM2D, and WM Basic Language Script Code
Let's try it again, but use an MT001. A mass slides along a slot constraint. A rod is attached to the background wheel and to the sliding mass, and is initially not active.
The LENGTH of the rod is set to some value where the sliding mass is closer to the rim of the background wheel. The rod constraint has an ActiveWhen statement that turns on the rod when the rod length is less than or equal to the LENGTH value of the rod constraint. (You have to use less than or equal to because if you only use equal to, the mass can slip right by where in the previous iteration the length is slightly more, and the next iteration the length is slightly less and it never hits the exactly equal value.) As the wheel rotates CCW, the mass should slide down the slot and when the rodlength becomes 0.2, the rod should lock the mass in place.
When you run the simulation and the rod constraint activates, the mass shoots up and back, and up and back erratically. This can be seen on the current rod length graph. The rod length graph should show the length getting smaller until it hits a certain value, then it should lock in at that value. Instead you get completely erratic behavior. I didn't expect the simulation to react like that.
The LENGTH of the rod is set to some value where the sliding mass is closer to the rim of the background wheel. The rod constraint has an ActiveWhen statement that turns on the rod when the rod length is less than or equal to the LENGTH value of the rod constraint. (You have to use less than or equal to because if you only use equal to, the mass can slip right by where in the previous iteration the length is slightly more, and the next iteration the length is slightly less and it never hits the exactly equal value.) As the wheel rotates CCW, the mass should slide down the slot and when the rodlength becomes 0.2, the rod should lock the mass in place.
When you run the simulation and the rod constraint activates, the mass shoots up and back, and up and back erratically. This can be seen on the current rod length graph. The rod length graph should show the length getting smaller until it hits a certain value, then it should lock in at that value. Instead you get completely erratic behavior. I didn't expect the simulation to react like that.
- Wubbly
- Aficionado
- Posts: 727
- Joined: Sat Jun 06, 2009 2:15 am
- Location: A small corner of the Milky Way Galaxy
- Contact:
re: MTs, WM2D, and WM Basic Language Script Code
So let's try the MT001 latch test again with a rod, but add a rigid joint as the latching mechanism. The ActiveWhen statement on the rigid joint checks the length of the rod, and when the rod length hits a certain value, the rigid joint point on the sliding mass should be directly over the rigid joint point on the background wheel and the lock should engage.
But when you run the simulation, the mass slides past the point of the rigid joint and WM2D gives a constraint error. I increased the simulation resolution and ran again. Same error. Then increased the resolution another factor or 10 and still no good.
I'm not having any luck with these ActiveWhen software latches. The idea is to capture the energy of a spring in some downward stroke of a mechanism, and release it at some later point back into the wheel. An MT001 with the spring 'dialed in' still slows down over time, but it would be nice to be able to have the simulation run without a constraint error.
But when you run the simulation, the mass slides past the point of the rigid joint and WM2D gives a constraint error. I increased the simulation resolution and ran again. Same error. Then increased the resolution another factor or 10 and still no good.
I'm not having any luck with these ActiveWhen software latches. The idea is to capture the energy of a spring in some downward stroke of a mechanism, and release it at some later point back into the wheel. An MT001 with the spring 'dialed in' still slows down over time, but it would be nice to be able to have the simulation run without a constraint error.
- Wubbly
- Aficionado
- Posts: 727
- Joined: Sat Jun 06, 2009 2:15 am
- Location: A small corner of the Milky Way Galaxy
- Contact:
re: MTs, WM2D, and WM Basic Language Script Code
Another try. Eliminate the Rod. Use a rigid joint with an ActiveWhen statement, but position the rigid joint where the sliding mass hits the end of the separator constraint. This way the mass can not slide past the alignment position. Set the elasticity of the separator constraint to zero so the sliding mass won't bounce off, and in the ActiveWhen statement use the length of the separator constraint to determine when to activate the rigid joint.
When the simulation was run, still got a constraint error when the rigid joint tried to activate. Tried deleting the spring to see if that was the problem. Nope. Tried turning off the outside separator constraint and using it only as a length to determine when to activate the rigid joint. Got a Constraint error again.
Back to the drawing board ... again. Maybe I'll have to resort to mechanical latches in combination with ActiveWhen statements.
When the simulation was run, still got a constraint error when the rigid joint tried to activate. Tried deleting the spring to see if that was the problem. Nope. Tried turning off the outside separator constraint and using it only as a length to determine when to activate the rigid joint. Got a Constraint error again.
Back to the drawing board ... again. Maybe I'll have to resort to mechanical latches in combination with ActiveWhen statements.
- Wubbly
- Aficionado
- Posts: 727
- Joined: Sat Jun 06, 2009 2:15 am
- Location: A small corner of the Milky Way Galaxy
- Contact:
re: MTs, WM2D, and WM Basic Language Script Code
Software Limitations. Everyone who has WM2D has to fight with it some. It's just par for the course. Frustrating yes, but it just delays the inevitable. Everyone knows gravity engines don't work, but we choose to research them anyway in hopes of accidentally stumbling across the impossible ;>
re: MTs, WM2D, and WM Basic Language Script Code
I use both rods and joints (sometimes pin joints rather than rigid joints) with the 'ActiveWhen' constraint as latches etc. Some work better than others in some situations. For a while rods weren't working for me at all. Wouldn't activate. Changed to rigid joints. Another time rigid joints wouldn't work properly so tried pin joints and voila it worked again. Sometime separators and ropes. Whatever works at the time.
If I actually try to build real world analogue spring loaded latches that fit in a groove and then release under gravity etc the complexity goes thru the roof for multiple mechs. And that causes its own set of problems. So I avoid them.
The upshot is I try to simplify as much as possible, or find a functional workaround like we're talking about that does the same job. The idea is to test out some action. In a real world build I'd have to build real latches and catches.
If I actually try to build real world analogue spring loaded latches that fit in a groove and then release under gravity etc the complexity goes thru the roof for multiple mechs. And that causes its own set of problems. So I avoid them.
The upshot is I try to simplify as much as possible, or find a functional workaround like we're talking about that does the same job. The idea is to test out some action. In a real world build I'd have to build real latches and catches.
- Wubbly
- Aficionado
- Posts: 727
- Joined: Sat Jun 06, 2009 2:15 am
- Location: A small corner of the Milky Way Galaxy
- Contact:
re: MTs, WM2D, and WM Basic Language Script Code
Figured out why my Rod and square points were not working as latching mechanisms. There's a setting in WM2D for Variable Integration Step (True/False). I was setting that to False making each integration step the same length. This must have made a previous simulation run better (or so I thought) so I kept the setting in subsequent simulations.
Anyway, by flipping that back to the default of True, it solved the problem of the simulation missing the latch condition. By using fixed integration steps, the latch condition was not true at exactly the beginning or end of a step. By using variable integration steps, the simulator can vary the step length so the 'ActiveWhen' condition will land on the beginning or end of a step and then trigger.
Anyway, by flipping that back to the default of True, it solved the problem of the simulation missing the latch condition. By using fixed integration steps, the latch condition was not true at exactly the beginning or end of a step. By using variable integration steps, the simulator can vary the step length so the 'ActiveWhen' condition will land on the beginning or end of a step and then trigger.
re: MTs, WM2D, and WM Basic Language Script Code
Nicely deduced Mr Wubbly :7)