...and a little update. I found the cause of the disparity between your results and mine this afternoon. I had used the wrong coefficient in C_v = c * R. I had it set to the diatomic value of 2.5, and have changed it to 3.3. Now our results are identical to many decimal places.
Yes! I notice that I get some elevated values from yours, but from my experience in programming, and the fact that I approached a part of the code slightly different than yours, that there is just a final little "something" I need to nail down. But I am confident that I will have this solved...
At this point, I am going to get my graphics looking better. My current ones were just to get things displaying so I could see something. Now I just need to make them more traditional looking with tic marks and relative to a common origin (all my curves have been anchored to the origin at this...
Tried a = 0 and b = 0, and as expected, the pressure curves and temperature curves were respectively coincident.
Also tried inlet temperature around 35 degF and initial tank temperature at about 90 degF (press = 100psi). There was a dip as the cold air filled the tank. After a time, of...
True, true.
Update:
FINALLY got my code running now. I forgot to switch my VdW constants over to ##ft^3, atm, mol## units. Took me a while to track it down via process of elimination.
At any rate, I find it interesting that the curves for real gas vs. ideal gas show that they are switched...
But what is different then, between the inlet valve in our discussion, and the expansion valve in an air-conditioning system? Is it the liquid state of the refrigerant vs. the gas state of the tank fill model? Both are still regarded as "fluids".
I thought that whenever a gas moved from a high pressure volume to a low pressure volume that that gas cooled as it expanded, but that when it encounters more and more collisions in the tank, it quickly heats up?
Thanks again for your code. I will compare your output with mine for the same...
Yes, that might help, thanks!
One thing I notice is that our curves do not show the Joule-Thompson Effect when the tank starts at low pressures, but moderate temperatures.
Chester,
I just noticed that your graphs disappeared, and some posts from you about a week and a half ago, that I never saw! This is weird.
I am going over your posts from June 5, which for some reason never showed up on my side.