assistance programming an engine cycle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
assistance programming an engine cycle
I am trying to program a basic Otto engine cycle and am having difficulty with states 2-3. Between these states, I need to have a numerical method that calculates a new pressure based on the old pressure and relationships with known values and constants. The independent variable is crank angle (theta). I've attached a working copy of the worksheet as well as some notes depicting the logic.
I've attempted to use theta as both a vector index and range variable but haven't been successful. Thank you in advance.
Solved! Go to Solution.
- Labels:
-
Physics
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Additionally, there was a term missing from the recommended edit, please see attached...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I hope this help you
Study 15. Otto Cycle or what is behind the simplified formula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you for providing these references. From what I could tell, these are not directly applicable to the approach I am taking with a variable heat release rate at variable timing (spark initiation and duration). They are however a terrific source for future use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Would fit these changes to the program?
but between P23 and P12 = U0 there is no difference as shown in the graph.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This looks promising... I'll try to implement and provide more feedback.
Looking further, and this is manageable with the previous routine, P_34_Theta takes the form of P_12_Theta but with a unique Kappa defined by the last state (Pressure and Volume) from 23. And the final angle/state (4) just drops back to P_i or atmospheric.
Thanks for the recommendation, more to follow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Can you share how you declared V0? I'm not able to see that on what was furnished.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Additionally, there was a term missing from the recommended edit, please see attached...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Joshua Keena,
I added a zero to the name all variables which may be confused with those of physical constants, or units of measure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi F.M.
Thanks... I made the changes and I see what you mean about there not being a difference between the two vectors. It appears that the loop isn't overwriting the original pressures in that vector (P_23). Please see attached for v3. I've transposed both vectors (P_12 and P_23) for comparison at the end of the worksheet.
Sincerely,
Josh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
So FM, fourth time's a charm!
See attached, based largely on you unlocking the numerical routine to get the process done for states 2-3, and finding an error in my index notation, I got it to work. At the bottom of the worksheet you'll see the classic 'P-V' diagram for an Otto cycle, and below it plotted on a log-log basis.
Thanks again for your assistance!
With gratitude,
Josh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
So FM, fourth time's a charm!
See attached, based largely on you unlocking the numerical routine to get the process done for states 2-3, and finding an error in my index notation, I got it to work. At the bottom of the worksheet you'll see the classic 'P-V' diagram for an Otto cycle, and below it plotted on a log-log basis.
Thanks again for your assistance!
With gratitude,
Josh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi JK,
The result is wonderful.
Good continuation of your work!
Greetings
FM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
FM,
Thanks, and thanks as well for your tips and support.
Sincerely,
Josh
