How do you make a realistic physics engine?

Click For Summary

Discussion Overview

The discussion centers around the feasibility and methodology of creating a realistic physics engine for simulating a car engine in Blender using Python. Participants explore the complexities involved in accurately modeling physical processes and forces, as well as the challenges of proving the engine's functionality through simulation.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant expresses a desire to create a simulation that functions as a proof of concept for a car engine, emphasizing the need for a realistic representation of all elements involved.
  • Another participant suggests considering the level of detail required, questioning whether to simulate all physical processes or just generate appropriate forces.
  • Discussion includes the finite element method (FEM) as a potential approach for accurately modeling forces and thermodynamic processes.
  • Participants discuss the necessity of coding various physical formulas, including those for friction and heat, and storing relevant material properties as variables.
  • There is a suggestion to define the resolution and constraints of the simulation, with a note on the distinction between macroscopic and microscopic physics.
  • One participant challenges the approach of simulating every component, arguing that a more practical method would involve ensuring each sub-component functions correctly to guarantee overall engine performance.
  • Concerns are raised about the reliability of simulations in proving real-world functionality, with references to the potential for simulations to misrepresent physical realities.
  • A simpler starting point for the simulation is proposed, such as modeling a crankshaft's rotation before adding complexity.

Areas of Agreement / Disagreement

Participants express differing views on the best approach to simulating the car engine, with some advocating for a comprehensive model while others suggest a more modular approach. The discussion remains unresolved regarding the most effective methodology for achieving a realistic simulation.

Contextual Notes

Participants acknowledge the complexity of accurately simulating all factors involved in engine dynamics, including potential oversights in the equations and variables necessary for a successful model.

ageattack
Messages
9
Reaction score
0
Here's what I need, and this might sound far-fetched, but please answer it to the best of your ability. I want to create a car engine in blender, and then add a physics engine to make it run. The thing is, I don't want to animate it, I want to apply python script that can actually make the engine run as if it were real. I want this to be capable of verifying and proving that the engine works. This, I assume, would be a huge job. I guess what I'm asking is whether it's possible to make such code, and if so where should I start?
 
Technology news on Phys.org
Hey ageattack and welcome to the forums.

How much detail do you want to have? Are you trying to simulate everything all the way to the thermo-mechanical processes that end up driving the pistons? Are you just interested in generating the appropriate forces so that they can be simulated without any other form of data?
 
Well chiro, what I want this simulation to be is a proof of concept, something that will prove that the engine will work without having to build it in real life. So I need every element implemented that would be present in the real world.
 
In terms of simulating real force in the most accurate way, I'd take a look at the finite element method and other derivatives for modelling lots of forces.

In terms of the thermodynamics and thermo-mechanics, you will probably have to build statistical simulations that obey these thermodynamic constraints and use the FEM or force simulator unit to add these forces.

You will also have to take into account any attribute that can vary the forces in any way whether that it includes the material used, the temperature in relation to that material and any material properties that cause variation in the forces that are being modeled.

What experience do you have with the various kinds of physical dynamics?
 
  • Like
Likes   Reactions: 1 person
So essentially, I'd have to code every formula in that would apply to the engine, for instance that of friction, heat equations, pressure constants, everything that applies to the engines working, right? Give everything mass, density, etc and store those values as variable under the array of each element, for instance an array of steel having variables like heat capacity, friction coefficient, etc. then the formulas I mentioned above would fill themselves in based on the available variables.
 
You need to generate the forces and let the force engine deal with the evolution of the system.

You need to define the resolution that you want for your simulation and the constraints and initial conditions used to make your system evolve.

If the constraints are statistical then you can use pseudo-random generators to generate the forces which will then evolve with the evolution of your system.

You have to keep in mind that macroscopic physics is not the same as microscopic physics. In the context of statistical physics, these macroscopic measures may represent some kind of expectation or moment (or function there-of) but they won't represent the microscopic attributes.

You need to understand mechanics (especially dynamics) in general before you can understand how to do this kind of thing.

Are you doing physics or have you done a physics or engineering degree?
 
ageattack said:
I want this simulation to be is a proof of concept, something that will prove that the engine will work without having to build it in real life. So I need every element implemented that would be present in the real world.

That is back to front, compared with the way you would normally turn your concept into a real world design.

Suppose you wanted to design a conventional car engine "from scratch". First decide what power you want to produce. From that, you know how much fuel you have to burn. So you can decide how many cylinders, the engine RPM, etc.

Then you need some way to get fuel and air into the cylinders, so you might need to think about a fuel injector system and a turbocharger. You also need to get the work out of the cylinders, so you need to think about the cranks and connecting rods, etc...

The point is, you if every sub-component does what it is supposed to do, the engine is "guaranteed" to work the way you intended. So you don't need to do the impossible task of trying to simulate "everything" in one computer model.

Also, a simulation that "works" doesn't prove anything about what would happen in real life, unless you can show there are no significant errors in it. For example you can find plenty of simulations on the web that "prove" perpetual motion machines work!
 
chiro said:
Are you doing physics or have you done a physics or engineering degree?

I'm currently doing physics, only in my first year university year though. I haven't learned everything yet, but I know a fair bit.
 
  • #10
@alephZero so your saying that correctly completing the equations for all the factors of this engine(probably several hundred) should figure out whether the engine would work? I mean I know it is, but I just think there'll be a factor I will forget about.
 
  • #11
But if the simulation runs the engine "as if it was real", won't the simulation include the same equations, one way or another?

Supposing you correctly simulate an engine design that doesn't work. So when you try to run it, nothing happens. Then what you do? Most likely, you try to solve the equations to figure out why it doesn't work...
 
  • Like
Likes   Reactions: 1 person
  • #12
Good point. I guess the simulation would only be useful for the visual aspect of all this.
 
  • #13
If that is a proof-of-concept type of thing, then I'd start with something very simple. Like having the crankshaft rotate at a constant angular speed, with the motion of everything else derived from this rotation kinematically.

You can make things more complex than that afterwards, but this is probably the minimum you have to do.
 

Similar threads

Replies
1
Views
2K
Replies
10
Views
5K
  • · Replies 7 ·
Replies
7
Views
3K
Replies
4
Views
1K
  • · Replies 9 ·
Replies
9
Views
4K
Replies
12
Views
4K
  • · Replies 22 ·
Replies
22
Views
3K
Replies
32
Views
3K
Replies
23
Views
3K
Replies
28
Views
3K