- #1
SherlockOhms
- 310
- 0
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.