# Modelling Diesel Cycle in Excel.

• SherlockOhms
In summary, the spreadsheet models an internal combustion engine based on the ideal air-standard Diesel cycle. Input values for the minimum temperature (##T_1##), pressure (##P_1##) and engine size (##V_1##) are given. Compression ratio (##r_v##), cut-off ratio (##r_c##) and two properties of the working fluid (Either ##R##, ##C_P##, ##C_V## or ##\gamma##) are also given. The spreadsheet calculates temperature (##T##) and pressure (##P##) at any point in the cycle, work (##W##) and heat transfers (##Q##) for each process
SherlockOhms

## Homework Statement

Construct a Microsoft Excel® spreadsheet that models an internal combustion engine based on the ideal air-standard Diesel cycle. Given the minimum temperature (##T_1##) and pressure (##P_1##) in the cycle, the engine size (##V_1##), the compression ratio (##r_v##), the cut-off ratio (##r_c##) and two properties of the working fluid (Either ##R##, ##C_P##, ##C_V## or ##\gamma##), the spreadsheet should calculate the temperature (##T##, pressure (##P##) and volume (##V##) at any point in the cycle, the work (##W##) and heat transfers (##Q##) for each process, the net work output (##W_{net}##), the Diesel cycle efficiency (##\eta_{Diesel}##) and the Carnot efficiency (##\eta_{Carnot}##) of the cycle. The spreadsheet should allow the user to vary the minimum temperature in the cycle, the compression and cut-off ratios, the inlet pressure, the engine size, and the properties of the working fluid. Note that if the engine size is not specified, all quantities should be worked out per unit mass.

## Homework Equations

$$PV = mRT$$

## The Attempt at a Solution

From the above equation it can be shown that ##Pv = RT##. Seeing as for an air standard cycle, the mass is constant throughout, when ##V_1## isn't known, the rest of the values will have to be calculated per unit mass.

My problem is with the underlined, bold statement in the problem. How can I make so that excel knows, when ##V_1## is not inputted, that the rest of the problems should be carried out per unit mass? I'm just looking for a general idea here.

My general layout for this spreadsheet will be:
Section 1) Input the above stated values.

Section 2) Calculate work and heat transfers for given sections of the cycle. (I've derived expressions for all the work and heat transfers in terms of the initial conditions. This is also where the problem of when the engine capacity isn't inputted occurs. Would an IF statement, checking the earlier value of ##V_1## work here? Like IF(##V_1## = 0, {Calculate per unit mass},{Calculate normally}).)

Section 3) Tabulate and graph results.

It's going to take more than Pv = RT to model your diesel cycle. You need to assemble all of your equations, list all the inputs and outputs, and go from there.

SteamKing said:
It's going to take more than Pv = RT to model your diesel cycle. You need to assemble all of your equations, list all the inputs and outputs, and go from there.
I was only stating that equation to illustrate that when the initial volume isn't known, the rest of the values will have to be calculated specifically. I'll be modelling it using a T-S/s and P-V/v diagram. What equations can I use to find multiple points on each of the process curves?

It's not acceptable to plot straight lines between the initial and final temperatures for each process. For example, looking at the P-V/v diagram. The first process is an isentropic compression. I can easily find the initial and final conditions of P and V/v. But, how would I go about finding intermediate points on this process curve? Would using the relation ##PV^{\gamma} = k## be the equation required to model this curve, and if so, how would I go about using this equation to find at least 100 intermediate points on the curve in excel? Thanks for the quick reply and apologies for getting off topic.

What I'm thinking is that, I'll know my initial and final V/v. Then, if I split that interval up into, let's say, 100 different values of V/v I can use the equation ##P_{intermediate}V_{intermediate}^{\gamma} = P_{Final}V_{Final}^{\gamma}## to find the corresponding values of ##P_{intermediate}##. This will give me multiple plottable points. Does this sound correct and if so, is it possible to do this in excel without the spreadsheet looking too verbose, SteamKing?

One way to handle this issue would be to use an IF statement, as you mentioned. You could create a cell where the user can input the engine size (##V_1##), and then use an IF statement in your calculations to check if that cell is empty. If it is empty, you can assume that the calculations should be done per unit mass, and use a default value for ##V_1## (such as 1) in your equations. If the cell is not empty, you can use the user-inputted value for ##V_1## in your calculations.

Another approach could be to use a dropdown menu or a set of radio buttons for the user to select whether the calculations should be done per unit mass or not. This way, the user has more control and can easily switch between the two options.

Overall, the key is to have a way to differentiate between when the engine size is inputted and when it is not, and to adjust your calculations accordingly. This could be done through an IF statement, a dropdown menu, or some other method that works for you.

## 1. What is a diesel cycle?

A diesel cycle is a thermodynamic process that describes the combustion of diesel fuel in an engine. It is a four-stroke cycle that includes the processes of compression, fuel injection, expansion, and exhaust.

## 2. Why is it important to model the diesel cycle?

Modelling the diesel cycle allows for a better understanding of the performance and efficiency of diesel engines. It can also help in the design and optimization of engines, as well as in troubleshooting and predicting engine behavior under different conditions.

## 3. How can Excel be used to model the diesel cycle?

Excel is a powerful tool for creating and analyzing mathematical models. It can be used to create a spreadsheet that includes equations and variables to simulate the processes of the diesel cycle, such as compression ratio, heat addition, and work output.

## 4. What are the key components of a diesel cycle model in Excel?

The key components of a diesel cycle model in Excel include the equations for the different processes, such as the ideal gas law for compression and the energy balance equation for heat addition. It also includes variables such as engine specifications, fuel properties, and operating conditions.

## 5. What are some limitations of modelling the diesel cycle in Excel?

While Excel is a versatile tool, it may not be able to accurately model all aspects of the diesel cycle. It may not take into account factors such as heat transfer, combustion chemistry, and emissions. Additionally, the accuracy of the model relies on the accuracy of the input data and assumptions made.

• Engineering and Comp Sci Homework Help
Replies
8
Views
2K
• Engineering and Comp Sci Homework Help
Replies
4
Views
1K
• Engineering and Comp Sci Homework Help
Replies
1
Views
4K
• Engineering and Comp Sci Homework Help
Replies
2
Views
2K
• Engineering and Comp Sci Homework Help
Replies
1
Views
2K
• Introductory Physics Homework Help
Replies
3
Views
360
• Engineering and Comp Sci Homework Help
Replies
1
Views
1K
• Engineering and Comp Sci Homework Help
Replies
2
Views
1K
• Mechanical Engineering
Replies
13
Views
1K
• Classical Physics
Replies
1
Views
566