Motor engine physics

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Motor engine physics

Postby PJani » Fri Jan 22, 2010 8:16 am

I am working on OgreNewt Multi Body Vehicle. Now i came so far i want to make vehicle simulation more realistic. I implemented gearbox, clutch and engine which uses torque curve for getting right engine curve. But now i can't figure out how can i get engine RPM and its relation to all wheels. :shock: Because wheels are spinning unrelated to each other and different RPMs.


Any idea will help. :D
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: Motor engine physics

Postby PJani » Fri Jan 22, 2010 10:47 am

Is posible to make differencial joint which will connect two bodies as does now. But instead of applying Torque on tires i would like to apply torque on differencial "input shaft".
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: Motor engine physics

Postby Julio Jerez » Fri Jan 22, 2010 12:15 pm

you can by usin teh relational joints.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Motor engine physics

Postby JernejL » Sat Jan 23, 2010 1:50 pm

The thing that you need is a differential to dyamicly apply gearbox RPM & power to the wheels, just split the power to amout of axles yor truck has, and put a differential onto each axle.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1587
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Motor engine physics

Postby PJani » Tue Jan 26, 2010 5:10 pm

Problem is wheel rpm is uncontrollable. If i apply some torque on all wheels some wheels will start slipping other wheels will be blocked and...

Some wheel get in air when driving across curved terrain and spins like hell. Like every wheel has its own engine.
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: Motor engine physics

Postby Julio Jerez » Tue Jan 26, 2010 6:25 pm

The ralatinal joint do that.

basically you get a gear joint and you link teh tow wheels by teh pin, teh you se the raltion

k1 * w1 = k2 * w2

that is the angulr velocity of teh wheel on teh left is equal to a fration o fteh nagul velity on teh right.

the by controlling k1 and k2 you can make teh wheill work as real difrecial.
when the car go straigh k1 = k2 = 1.0
turn right make k1 bacoem lareg than 1
turning left make k2 becoem larger than 1

if one wheel is is airbone you make you can dissable te hjoint to make a regula diffrenceial, or you can apply a limited dioffrencial whne teh whell is allow to go only som fraction of the speed of teh oeth
whill, the is making k2 or k2 clampe of some value larger than 1 ans smaller that say 2.0

see the Gear Joint
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Motor engine physics

Postby JernejL » Tue Jan 26, 2010 7:06 pm

PJani wrote:Problem is wheel rpm is uncontrollable. If i apply some torque on all wheels some wheels will start slipping other wheels will be blocked and...


That's why you need a differential, it'll solve the slip / blocking wheels when turning.

PJani wrote:Some wheel get in air when driving across curved terrain and spins like hell. Like every wheel has its own engine.


Sounds like your material friction is not set up properly and you compensated for that by applying excess torque instead? This happened in my engine, and until i resolved it the car physics were totally useless, i was building a kind of raycastvehicle tho, in your case it is a multibody vehicle so my specific solution definetly won't work in your case, but a general solution is - apply torque gradually around a proper RPM curve instead of a exponential / constant accumulation formula so that the friction on your wheels can do the job properly, also remember that tire friction & geometry changes the characteristic of a tire depending on tire input (like in Pacejka's formulas).
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1587
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 641 guests