Simpliest way to simulate an IC engine

In summary, the conversation discusses the possibility of creating software to simulate internal combustion engines and the factors that would need to be considered in such a simulation. It is concluded that creating a realistic simulation would require a complex combustion model and knowledge of computational fluid dynamics. However, the conversation suggests that practical testing and experience may be more effective in understanding and tuning engine performance.
  • #1
Jonne
12
0
Hi Guys,

I would like to write some software to teach people to tune internal combustion engines. More specifically, as some of you may know, an engine is controlled by two 2D grids or 'maps' which have engine load on one axis and engine RMP on the other. One map tells the engine how early to fire the spark plug, the other tells it how much fuel to inject.

I am just wondering what the simplest physics model I can use that will simulate this and give me realistic results?

I am not looking to allow people to test different engine designs, just see the results of changing values in the maps. For example, adding more fuel may lose torque but would allow for more ignition timing (due to mixture being less prone to http://en.wikipedia.org/wiki/Engine_knocking" ) which would then increase torque.

So, is this possible without having to learn computational fluid dynamics?

Sorry if this is a silly question, I have don't any physics past GCSE level but I'm always willing to learn.

Thanks in advance
 
Last edited by a moderator:
Engineering news on Phys.org
  • #2
In fact, I can make my question a lot more specific..

Given these variables :-

  1. Number of gasoline molecules
  2. Number of oxygen molecules
  3. Cylinder volume
  4. Compression ratio
  5. Burn time (spark advance)

Is it possible to estimate the following outputs :-
  1. Pressure on the crank shaft for each increment of rotation
  2. Number of left over fuel and air molecules

If so, how?

Thanks
 
  • #3
Doesn't anyone have any idea? Even if someone could just tell me which division of Physics I should study, I'd be grateful.
 
  • #4
Jonne said:
So, is this possible without having to learn computational fluid dynamics?

No.

Even knowing that wouldn't be enough. There's heat transfer, you also need a combustion model and all the electrical notions for the spark plug to work under different fuel distributions, high pressure and high temperature.
 
  • #5
You don't need CFD to do this. Combustion models are far too hard to make yourself and you don't need to know the flow in the cylinder. Maps are generally made by practical testing on a dyno.

Wiebe combustion model is used in lotus engine simulation, Ricardo WAVE etc etc.

Get an engine book.
Heywood - Internal combustion engine fundamentals is a good technical book. (very very technical)
Richard Stone - intro to internal combustion eniges is a better book for starting out.

either will set you back about 30-50 quid on amazon.
Also what do you acutally want to achieve from this 'simulation'?
 
Last edited:
  • #6
xxChrisxx said:
what do you acutally want to achieve from this 'simulation'?

Answer:

Jonne said:
I would like to write some software to teach people to tune internal combustion engines.

I am just wondering what the simplest physics model I can use that will simulate this and give me realistic results?

I am not looking to allow people to test different engine designs, just see the results of changing values in the maps.



xxChrisxx said:
You don't need CFD to do this. Combustion models are far too hard to make yourself and you don't need to know the flow in the cylinder. Maps are generally made by practical testing on a dyno.

Practical testing kind of make useless the purpose of simulation.

The simplest combustion model I've seen for simulating (realistically) the outputs (power, exhaust gas characteristics, etc) of an engine assumes that combustion happens at the right time. Meaning that timing advance is appropriate, no matter what it is. The reason is that once the spark plug ignites, there is a delay before the combustion actually starts. Even assuming the same AFR, CR, RPM, etc. that delay still vary a bunch from engine to engine.

As for AFR variations, it was assumed that the combustion efficiency (amount of mixture actually burnt) varies with AFR. There was still another efficiency that varied (if my memory don't fail me) from 85% to 90% to take into account the particular design of each engine (ex.: "quenched spot" where the fuel could not burn due to too much cooling or spots where too much exhaust gas was present, etc.). That last one had to be purely a guess from the part of the programmer.

And just to know how much exhaust gas will stay in the combustion chamber (not even talking about how well it will mix with the fresh mixture), you need at least some CFD of the entire valvetrain, intake and exhaust systems design.

That is with a simple combustion model where all the mixture burns at the same time. To do what you want to do, and I'm no expert on this, you would at least need a model with multiple stage combustion chamber (i.e. the combustion chamber is divided into smaller ones such that you can follow the flames propagation from the spark plug).
 
  • #7
jack action said:
Practical testing kind of make useless the purpose of simulation.

The simplest combustion model I've seen for simulating (realistically) the outputs (power, exhaust gas characteristics, etc) of an engine assumes that combustion happens at the right time. Meaning that timing advance is appropriate, no matter what it is. The reason is that once the spark plug ignites, there is a delay before the combustion actually starts. Even assuming the same AFR, CR, RPM, etc. that delay still vary a bunch from engine to engine.

As for AFR variations, it was assumed that the combustion efficiency (amount of mixture actually burnt) varies with AFR. There was still another efficiency that varied (if my memory don't fail me) from 85% to 90% to take into account the particular design of each engine (ex.: "quenched spot" where the fuel could not burn due to too much cooling or spots where too much exhaust gas was present, etc.). That last one had to be purely a guess from the part of the programmer.

And just to know how much exhaust gas will stay in the combustion chamber (not even talking about how well it will mix with the fresh mixture), you need at least some CFD of the entire valvetrain, intake and exhaust systems design.

That is with a simple combustion model where all the mixture burns at the same time. To do what you want to do, and I'm no expert on this, you would at least need a model with multiple stage combustion chamber (i.e. the combustion chamber is divided into smaller ones such that you can follow the flames propagation from the spark plug).

If he's looking to acutally use this to remap something, then everything you said is totally insufficient for purpose. You can't just 'assume' things if a map is going to be implemented. That's how engines grenade themselves.

Also none of what you said above is in any way simple to model correctly.

However if this is just a mental type excercise, or to get a power/torque output figure, then you can obviously have some leeway on how stringent the model is.YOU DONT NEED CFD TO DO THIS. It's is in no way necessary, both Ricardo WAVE and LES requires geometry but does not do a full CFD model. I can gaurantee you that, as even with pressure wave exhaust tuning, you don't need a CFD model. The model doesn't require knowing what the fluid is acutally doing, only when pressure waves will arrive at the valves. I remember that WAVE does have an option for combustion chamber and valve design that uses CFD/

Fact is, if he's trying to do what I think he's doing then a simulation will be very little help even if he does do one.

Also note that he only had GCSE physics, telling him to model the full intake and exhaust for CFD isn't helpful as he will have niether the knowledge or the necessary software. Not if what he wants to achieve can be done more easily.
 
Last edited:
  • #8
xxChrisxx said:
You can't just 'assume' things if a map is going to be implemented.

That's the point of my last post: The simplest methods i know to find

1. Pressure on the crank shaft for each increment of rotation
2. Number of left over fuel and air molecules

assumes an already appropriate timing and AFR. Hence, they won't work for his purpose.



xxChrisxx said:
Also none of what you said above is in any way simple to model correctly.

Again, my point exactly. I recall the initial question: I am just wondering what the simplest physics model I can use that will simulate this and give me realistic results?

xxChrisxx said:
However if this is just a mental type excercise, or to get a power/torque output figure,

It is not. He wants to know how to estimate mathematically the effects of changing timing and AFR on power, pre-ignition or others.

xxChrisxx said:
Fact is, if he's trying to do what I think he's doing then a simulation will be very little help even if he does do one.

I don't know what you think he's trying to do, but for WHAT HE'S REALLY TRYING TO DO, a SIMPLIFIED simulation will be very little help even if he does do one.

xxChrisxx said:
Also note that he only had GCSE physics, telling him to model the full intake and exhaust for CFD isn't helpful as he will have niether the knowledge or the necessary software. Not if what he wants to achieve can be done more easily.

He asked the questions:

... One map tells the engine how early to fire the spark plug, the other tells it how much fuel to inject. I am just wondering what the simplest physics model I can use that will simulate this ... just see the results of changing values in the maps.

So, is this possible without having to learn computational fluid dynamics?

Even if someone could just tell me which division of Physics I should study


For these questions, my answer is that the simplest computational model would be a very complicated one. Unless somebody has another answer, then I would learn something new today.

Given these variables :-
Number of gasoline molecules
Number of oxygen molecules
Cylinder volume
Compression ratio
Burn time (spark advance)

Is it possible to estimate the following outputs :-
Pressure on the crank shaft for each increment of rotation
Number of left over fuel and air molecules

If so, how?


For this question, although the simplest model will give you some info based on AFR variations, the timing can only be based on assumptions, which defy the purpose of his program since this means that he already knows what the effects of timing are. And, again, if you want to incorporate the effects of timing, it would have to be a very complicated model.
 
  • #9
Many thanks for all the comments, they are greatly appreciated.

Just to clarify, I am not looking to write software to substitute any kind of physical testing. As I'm sure you know, after market engine tuning can be a tricky and potentially dangerous task. I am just looking to provide a sandbox to allow people to change parameters in the ECU and see the results and become au fait with the tuning process before trying anything on their own car. My aim is purely to write something that can help people learn in a safe environment. I'm quite happy make use of pre-calculated lookup tables to simplify the model if required.

There has been a few models mentioned above which I will investigate fully. I will also check out the recommended books although I do feel its my knowledge of physics that is letting me down at this time rather than of the IC engine.

Just thinking again about my comment above about calculating torque at a given increment of the crank shaft, I don't believe this is necessary but I would need calculate/estimate overall torque and detect a condition where pre-ignition and/or denomination may occur.

I would be grateful of any further thoughts.

Jon
 
  • #10
Jonne said:
Many thanks for all the comments, they are greatly appreciated.

Just to clarify, I am not looking to write software to substitute any kind of physical testing. As I'm sure you know, after market engine tuning can be a tricky and potentially dangerous task. I am just looking to provide a sandbox to allow people to change parameters in the ECU and see the results and become au fait with the tuning process before trying anything on their own car. My aim is purely to write something that can help people learn in a safe environment. I'm quite happy make use of pre-calculated lookup tables to simplify the model if required.

There has been a few models mentioned above which I will investigate fully. I will also check out the recommended books although I do feel its my knowledge of physics that is letting me down at this time rather than of the IC engine.

Just thinking again about my comment above about calculating torque at a given increment of the crank shaft, I don't believe this is necessary but I would need calculate/estimate overall torque and detect a condition where pre-ignition and/or denomination may occur.

I would be grateful of any further thoughts.

Jon
To be honest, writing your own is a massive undertaking (given that you have limited knowledge of the physics and model writing experience). I have spent quite a bit of time writing engine simulation (and other) models, and I don't really know where to start with all the variables.

I have a friend that does maps (he builds megasquirt ecu's), and used LES to do design a custom exhaust system and cam timing, I'll have a chat with him and see what he says. I'll also have a look around the web and read up on the papers done with the model you want.

I do have an idea as to what you could do, as we can use a simulation similar to this
http://www.engr.colostate.edu/~allan/thermo/page6/page6.html

The problem is incorporating all the other map variables into something similar to make a single 'combustion input'. You can also use the pressure and work graphs as an input to get a torque output. I have a numerical model that will do this (providing you know the reciprocating masses).

EDIT: In fact that model and applet incorporates quite a few of the variables you describe. The only problem is that it doesn't really accurately describe what happens if you bugger up the map. eg, over lean the mixture
 
Last edited:
  • #11
xxChrisxx said:
To be honest, writing your own is a massive undertaking (given that you have limited knowledge of the physics and model writing experience). I have spent quite a bit of time writing engine simulation (and other) models, and I don't really know where to start with all the variables.

I have a friend that does maps (he builds megasquirt ecu's), and used LES to do design a custom exhaust system and cam timing, I'll have a chat with him and see what he says. I'll also have a look around the web and read up on the papers done with the model you want.

I do have an idea as to what you could do, as we can use a simulation similar to this
http://www.engr.colostate.edu/~allan/thermo/page6/page6.html

The problem is incorporating all the other map variables into something similar to make a single 'combustion input'. You can also use the pressure and work graphs as an input to get a torque output. I have a numerical model that will do this (providing you know the reciprocating masses).

EDIT: In fact that model and applet incorporates quite a few of the variables you describe. The only problem is that it doesn't really accurately describe what happens if you bugger up the map. eg, over lean the mixture

Thanks Chris, very useful indeed. As you say, the model you posted seems fulfil most of the requirements. The only thing missing would be the effect of the AFR, knock detection and the composition of the exhaust gas.

I guess you could fill in these gaps with a pre-calculated table of AFR vs Ignition timing which would give you a set of number which represent: the likely hood of knock (although RMP would also have to be taken into account), the effect on torque and the contents of the exhaust gas; Not very scientific but I can't see why I wouldn't give the desired results.

I have to be honest and say that, although the text makes sense, the formulas are way over my head at the moment. I know I need to brush up on maths and this would be a good time to do it. Do you happen to know of any web sites that can help me understand the equations?

Thanks again
 

Related to Simpliest way to simulate an IC engine

1. What is the purpose of simulating an IC engine?

The purpose of simulating an IC engine is to accurately model and predict its performance and behavior in different conditions. This allows for better understanding of the engine's operation and can be used for optimization and improvement purposes.

2. What are the basic steps for simulating an IC engine?

The basic steps for simulating an IC engine include creating a detailed model of the engine, setting up the simulation parameters, running the simulation, and analyzing the results. This process may also involve validation and refinement of the model.

3. What factors should be considered when simulating an IC engine?

Some important factors to consider when simulating an IC engine include fuel type, air-fuel ratio, ignition timing, valve timing, engine load and speed, and ambient conditions. These factors can greatly affect the engine's performance and emissions.

4. What are the challenges of simulating an IC engine?

One of the main challenges of simulating an IC engine is accurately modeling its complex and dynamic behavior. This requires extensive knowledge of thermodynamics, fluid mechanics, and combustion processes. Additionally, obtaining accurate input data and validating the simulation results can also be challenging.

5. What are some applications of simulating an IC engine?

Simulating an IC engine has a variety of applications, including design and development of new engines, optimization of existing engines, and analysis of engine performance and emissions. It is also used in research and development of alternative fuels and engine control strategies.

Similar threads

Replies
1
Views
913
  • Mechanical Engineering
Replies
1
Views
1K
  • Mechanical Engineering
Replies
6
Views
1K
  • Mechanical Engineering
Replies
11
Views
19K
  • Mechanical Engineering
Replies
7
Views
2K
  • Mechanical Engineering
Replies
3
Views
2K
  • Mechanical Engineering
Replies
9
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
Replies
13
Views
5K
Replies
14
Views
3K
Back
Top