cuspaceflight / bamboo

Cooling system modelling for liquid rocket engines.
GNU Affero General Public License v3.0
16 stars 4 forks source link

Bartz Equation Units #33

Closed storm345 closed 3 years ago

storm345 commented 3 years ago

https://github.com/cuspaceflight/bamboo/blob/6f463e8b3d24671c1506d3f8f376d9c062b0b9ca/bamboo/cooling.py#L84

Hi!

I'm curious if you've managed to validate your heating predictions against other calculations or experimental data to be able to trust its predictions? I ask since the Bartz equation for the hot side heat transfer coefficient looks potentially to have an incorrect correction term. I have however seen various works using the same correction term with SI units, but no validation was performed of their results so this may have been in error.

It's not the easiest thing to determine which units the 0.026 correction term is valid for to be certain in the value as they are not explicitly given in RPE or some of the other places referencing the formula. After some digging into the older references to the equation, the following was my attempt to convert the correction term to accept SI units: (Excuse the MATLAB) https://pastebin.com/cMfrNVmN

I'd be interested to hear what data you may have to inform which is the correct correction term to choose, and/or if you agree with the unit conversions in the linked pastebin.

dug20 commented 3 years ago

Hi!

I think you're right! We completely missed that so thanks so much for pointing that out! I think what you did in your MATLAB should work, and I've got a copy of Bartz' original paper which has the units of everything explicitly stated, so once I have the time I'll try double checking your numbers and fixing the error in our code. I suspect the coolant-side equation we got from RPE also has the same problem which I'll try look into, and it also looks like I missed out a factor of 'g' in (pc/c_star) on this line:

https://github.com/cuspaceflight/bamboo/blob/6f463e8b3d24671c1506d3f8f376d9c062b0b9ca/bamboo/cooling.py#L109

Unfortunately we've only done one very rough validation, using some data we found on the Vulcain Engine (the results are at the bottom of this Jupyter Notebook), which I'll try re-running once I've added the corrections for all of these errors (but there are some other aspects of the results that are suspicious, such as the mass flow rate predicted using perfect gas assumptions). However I do recognise this is only one dataset we've compared against, and it would definitely be better if we could do more.

storm345 commented 3 years ago

Glad to hopefully have been of some help! Please do post an update with your findings as I'll be interested to know if you come to the same equation at the end. That factor of 'g' may also depend on the units used so be careful with that (Imperial units for weight and mass can be a bit funky - 1lbf = 1slug * [g in ft/s])

dug20 commented 3 years ago

Looking at Bartz paper again, it turns out he actually states that the "0.026" is dimensionless. I double checked for myself, and added my derivation below in case you're interested (which I hope is legible). Also, from what I can tell, the "g" is only necessary in Bartz' original equation because he used lb/in2 to represent pressure. If you use Pa to represent pressure in metric, the "g" isn't necessary (but it would be, for example, if you decided to use kg/m2 for whatever reason).

I did find a mistake in our code though, which is that the (mu**0.2*cp/Pr**0.6) term actually needs to be evaluated at stagnation conditions, so I'll fix that imminently and close this issue once I've done that.

Thanks nonetheless for raising the potential units issue though, I wouldn't have spotted our other mistake if you hadn't!

image image

storm345 commented 3 years ago

Hi Dug, I'm glad we agree on the choice of units originally intended by Bartz - The factor of g it seems you are right is definitely the thing causing the discrepancy between the systems/constants! I think however he used lbf/in^2 though for the pressure unit since pressure is not a measure of masses per area, also numerically 1lbf/in^2 is 1lbm/in^2 too anyway - your conclusion still is correct though.

In the dimensional analysis you then use the relation of lbf with lbm that 1lbf = 32.174049 [lbm-ft/s^2] - due to the weird definition of F =/= ma in Imperial system and thus the definition of "force" being a bit funky - With specific heat as [BTU/(lbm-degR)] and viscosity as [lbm/inch-sec]. This gives the unit of the original Bartz equation as 32.174049^(-0.8) sec^1.6 ft^(-0.8) (Note the constant in the unit because of imperial system weirdness, note that 32.174049 is the numerical value of the imperial equivalent of g but here does not have a unit) - Not quite dimensionless or the constant shouldn't depend on the unit system but close so that in the Imperial system you don't notice it isn't dimensionless. If you do the same thing with the same equation (including g) using SI units you end up with a unit of sec^1.6*m^-0.8, which is similar but without the scaling term.

With the 'g' included in the form of the Bartz equation the correct SI correction term would be 0.0042 as found in my pastebin and you are correct that omitting this from the equation (Conveniently making dimensionless what you were describing as dimensionless) recovers the original correction term of 0.026. This can easily be checked since 0.0042 * 9.81^0.8 ~= 0.026. I think the most "correct" SI equation therefore omits the g and uses the 0.026 to retain non-dimensionality of the constant as you stated.

I agree it was good to go through this and is a good reminder to be careful with these unit systems

dug20 commented 3 years ago

Ah yes sorry that is a mistake on my part, lbm is numerically equivalent to lbf (when I wrote my original working I just assumed lbf was the Imperial equivalent of a Newton, but after googling it seems there is no such thing), and so the 'g' does always need to be present in Imperial.

And if I understand you correctly, you're saying that if you use pressure in Pa and include the 'g' , you need to replace the 0.026 constant with 0.0042. Otherwise if you used Pa and exclude the 'g' (or use kgf/m^2 and included the 'g') then you can keep the original 0.026. And I think I agree with all that!