I am currently researching electric powertrains with the use of BeamNG.tech. My goal is to make different electric motors, that have been calculated by the institute I am working with, driveable in the game.
From what I have found out while reverse engineering the vehicle files, is that there are four electric drive motors in the game (front/rear - normal/performance) that use a rpm-torque table to determine the torque that goes into the electric gearbox, is that correct?
My main question would be, if you are calculating voltages and currents for the electric drivetrain in the background and if not, how I could approach adding such calculations into the game? Could this be done using a lua extension?
currently, our simulation doesn’t include detailed voltage or current modeling for electric systems. The electric motors in the game whether in vehicles, trailers (for landing gear), or props aren’t simulated on an electrical basis. They currently act as more advanced torque providers rather than fully modeled electric components.
That said, it’s absolutely possible to create your own custom powertrain device that includes the relevant physics for electric motors if you’d like to simulate that behavior more realistically. This is a fully supported and expected use case within the powertrain system, so you’re free to expand or customize it as needed.
We do have plans to make the electric motor simulation more realistic in the future, but for now, the built-in system doesn’t include electrical characteristics like voltage or current flow.
For what calculation do you need voltage and current?
RPM and Torque add up directly to power and power can be represented in the electrical consumption as well. If you for eg. want to add conversion efficiency losses of the motor, you can introduce a secondary lookup table or some if then else cases.
For the battery I would understand your question, especially inter cell dynamics are nor as easily modeled with Watt and Watthours.
Could you provide more information on what you are trying?