Code center > Suggestions

Tie Forces

<< < (4/7) > >>

Botsareus:
Num, I am planning to use DB 2.34.x and virmus_P to simulate this thing: will it work or what should I use?

Please give me the source code and density value for this: (density of fluid * cd * radius of cylinder)

(I have no clue for the equation of cd)

Therefor, I can simulate the whole thing and get it over with.

P.S.

I think its going to be f((x+y)/2) and not (f(x)+f(y))/2 because the tie itself is part of the firction also. I think we should use this.

This: (f(x)+f(y))/2  means that the tie is some kind of external fource acting on the bodys after they already moved thorugh the space.


I am also not sure If I solved the circuler friction problem correctly, all will be done once I have a simulation and see the best result.

Numsgil:
1.  You can just have a constant Cd value for experiments.  Basically, it's Av^2 * length, where A has Cd in it, so go ahead and just make up a number for A.  It doesn't matter terribly much.

2.  Not friction, drag.  Let's get that terminology fixed right now.  Because you can have both in 2.4, and they operate differently.

3.  I have the spring forces already done.  That's things like one bot oscillating back and forth with another.  This is drag forces, which are things like two bots orbitting around each other.

4.  And you can't just use angular momentum friction either (that is, applying a resistive force to their angular momentum), since friction works independantly of velocity, and tehrefore can't be used to model drag.  There's at least 3 different resistive forces that are possible.  One is independant of velocity, one is linearly dependant, and the other is quadratically dependant.


--- Quote ---This: (f(x)+f(y))/2 means that the tie is some kind of external fource acting on the bodys after they already moved thorugh the space.
--- End quote ---

No, you have it wrong.  What it implies is that the slope/derivative is not constant.  Ie: some non linear function.  Which is exactly what we have here.  Force does not have to be a linear function.  It does not have to be a * b.  It can be anything it wants.

Force = A * velocity^2 per unit length.  You can't average velocity, then square.  You'll get a different answer then if you first square the velocity, then average.  That's the problem here.

But the real problem is that each piece of the tie is moving at a different velocity.  If the tie was moving at a constant velocity all over, you could just square that velocity.  But it doesn't, so you can't.

The answer here is integration, which I'm sure is above your head.  The problem is the integration confuses me.

It's not going to be any average of anything.  I explained that it can't be that, because the relation is quadratic.  You can only average linear functions.  Well, average and get a good answer anyway.  I suppose you can do anything you want.  It just won't be right.

Remember: this function only takes into account drag.  And then must apply that force to the bots, since they're the ones that actually move.  Other forces are done in other functions.

Check out how physics are done in 2.4 to see what I mean.

If any of the terms I am using are unfamiliar, please go look them up.

Botsareus:
Yea well I am not exactly sure how you want to intergrate it , If I knew I would of been able to help. For my pupreses I would of left it a.) get avrage velosity b.) apply "friction".  actualy my thing would look like:

((all the movment and gravity and sutch forses avraged) apply to tie forses avrage for all seporate ties) apply friction or drag or what ever the heck.

P.S.

Over all I think you have a more realisitc picture in you head , and I dont want to ruin it for you by proposing a more simpler but easyer to code picture.

However, I will make a quick test bot because I still dont beleave that a bots do not deselarate while moving in a circles the tie at the midpoint.

And see how vermis_P behaves in 2.34 after gravity and all is applyed to it.

Endy:
Slightly off topic but is this "math error" why the bots will sometimes fall downward if their tie is exactly horizontal and why they seem to like rotating mbs so much?

This does make me curious how the bots will behave once we get the physics working right.

Botsareus:
...


Ok I seem to find no tie / swimming codes at all in 2.34... There is nothing to see num, you should of atleast tryed to use the old code in combination with your freacky forces, but since you wrote everything like a pro vector physisist I can see why you have trouble of just sticking it in there with all the nice code.

Bots DO terminate rotation:

--- Quote ---'2.37.4 spins like butter , stops spinning like butter, respects tie like butter... what more do you need?
'Extract from Shen's


def job 50
def fixtie 51

' - Gene 1 -
' Fix the Tie
cond
   *.multi 1 =
   *.fixtie 1 =
start
 1 .tienum store
 314 .fixang store
 300 .fixlen store
 30 .stifftie store
 0 .fixtie store
stop

' - Gene 2 -
' Head ties to Tail and gets ready for fixing
cond
   *.robage 0 =
start
 1 .tie store
 1 .job store
 1 .fixtie store
stop

' - Gene 3 -
' Lone bot repros the Head bot and gets ready for fixing
cond
   *.numties 0 =
   *.robage 0 !=
start
 50 .repro store
 2 .job store
 1 .fixtie store
stop

' - Gene 4 -
' Start Repro Loop
cond
   *.nrg 5000 >
   *.multi 1 =
start
 1 .deltie store
stop

cond
*.robage 100 <
start
 10 .up store
stop
end
--- End quote ---


My work here is done. (or is it?)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version