Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Hydrogen tank de-pressurisation

  1. Mar 10, 2008 #1
    Hello all

    I wish to simulate hydrogen flow from a high pressure tank 700 bar down to 11 bar via a Pressure relief valve. In practice we notice the hydrogen tank cooling (starting from room temperatures) down drastically as well as the relief valve. My task is to simulate the cooling effect when ambient temperatures at around -20° C, and hence need some working equations to model such a system. I aint no physicist and hence cant grab my head around thermodynamic equations ( isentropic vs isenthalpic) to solve such a system. Although I do understand the concept, I fail to put these equations to numbers.
    I have all geometric values and also the flow rates of hydrogen leaving the tank, as well as the starting temperature, pressures and volumes as inputs to my system and my main concern is to calculate (dynamically if possible) the temperature drop of the H2 tank, the PR valve and the gas itself.
    The joule-thompson appraoch for hydrogen doesnt satisfy the system in practice.
    Your comments are appreciated
  2. jcsd
  3. Mar 10, 2008 #2


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Hi hashsback,
    This isn't a trivial calculation. There's a considerable amount of interaction between the expanding/cooling hydrogen and the resultant heat transfer from the walls of the vessel. The thermal mass of the vessel is also very significant and must be accounted for to do this with real accuracy, not to mention the heat transfer from the environment tending to warm the vessel. In short, to do this you need to model the situation and do a numerical analysis on it, either using a program or spreadsheet.

    Just curious though - why isn't your relief valve reseating? Why is your vessel blowing down to 11 bar from 700?
  4. Mar 10, 2008 #3
    Thanks for your reply

    I can imagine such a system isnt trivial to model. I can handle the heat transfer between the walls of the tank and the gas inside and other surrounding effects. Whats is required though is the equation for estimating the temperature of the hydrogen in the tank as the gas is slowly transported out of the tank. Matlab or simulink can help in the numerical analysis if could just get a working equation for H2 cooling in the tank.

    For clarification, my vessel is a hydrogen storage tank and H2 is supplied for electrochemical reactions at about 1 g/s. So the Pressure relief valve is not exactly a safety feature but rather it controls the depressuring of the gas from the tank. Depending on the tank pressure, it opens up to ensure the gas leaving is at 11 bar.
    To maximize storage, the pressure in the tank is so high.
    In practice both the tank and pressure valve freeze drastically when operated at room temperatures. My task is to simulate this freezing when we start the operations at 0°C or lower.
  5. Mar 10, 2008 #4


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Hi hashsback,
    Do you have a database for fluid properties of hydrogen gas, especially, internal energy, enthalpy, entropy and density as a function of pressure and temp? Something like the NIST REFPROP database?
    http://www.nist.gov/srd/nist23.htm [Broken]
    This database also allows you to pull back properties with any 2 variables, so you don't have to only use pressure and temp to pull back a value.

    If not, I could help you with the equations for those properties, but it makes it much harder. We have our own database that can be accessed by Excel, so I generally make up these kinds of programs in Excel and pull back those properties directly from that database. If I had to do it using equations for each property, my brain might bleed.

    Note you also need information such as the enthalpy of the steel vessel and surface areas for heat transfer. That's generally easy enough. The harder part is determining the convective heat transfer coefficient.

    I don't use Matlab or simulink so I can't help you with programming.
    Last edited by a moderator: May 3, 2017
  6. Mar 11, 2008 #5
    Hi Q_Goest
    While I realise the pain in setting model equations from thermodynamics, I have absolutely no access to Hydrogen databases and hence no choice.
    I have no trouble modelling heat and mass transfer for the H2 tank, but I atleast need a simplified set of equations describing the cooling of the gas.
    Joule-thompson effect is making it even worse to explain such a phenomena.
    I understand that getting equations describing real gas behaviour is improbable, all I am looking for is a place to start.
  7. Mar 11, 2008 #6


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Hi hashback,
    I’ll get you started. Up to you to ask questions.

    Since you don’t have a database, I don’t know of any way to apply the first law directly so you’ll have to do it differently than I’d normally do it. That said, I’ll have to poke around for the right answer for you, so bear with me.

    First, you have to set the initial conditions in the tank.
    - Pressure
    - Temp
    - Density
    - Total mass
    - Vessel volume
    - Vessel mass
    - Vessel internal area
    - Vessel external area

    I’d suggest doing numerous iterations using time steps. Make the time steps as small as needed to get a result that converges. By that I mean, try some course time steps (get a pressure/temperature curve for the vessel) then try finer time steps (get a pressure/temperature curve for the vessel). As you go to finer and finer time steps you should find the pressure/temperature curves all start to match which is when you know you’ve got convergence.

    Calculate the flow out of the vessel using your initial conditions. Use flow equations for valves (gas) given here:
    About half way down are equations for critical and sub critical flow.

    If flow is controlled not by a wide open valve but by some other criteria, explain what that criteria is and I’ll try to help.

    If flow is controlled by an orifice, such as a relief valve, explain and we can change the flow equations.

    Given a time step, dt, you now have mass out, mo.

    Here’s the tricky part. Normally, I’d apply the first law: dU = Hout. But you don’t have a prop database. So we can calculate P after removing the mass (mo), we can use the fact that the gas that remains inside the vessel is expanding isentropically, not isenthalpically such as you are implying by referencing the Joule Thompson effect. The JT effect regards the isenthalpic expansion of a gas across a restriction in a pipe.

    Anyway, getting back to the isentropic part. You might be able to apply P2 = P1 (V1/V2)^gamma as shown here:
    Note that you have the initial volume (it’s always the vessel volume) and the initial pressure (it’s always the pressure at the start of your time step). Final volume, V2 is the volume determined by removing the volume determined by calulating the density of the gas initially and multiplying times mass removed after the gas flows out the valve during the time step.

    You now have P2 so use the equations on the NASA page to also determine T2.

    You now have some lower pressure and temperature, but you now need to consider what heat transfer you have from the vessel walls. You said you have no trouble modeling heat transfer, but the trouble is always in determining the convective heat transfer on the inner wall. You have a wall temp and a new gas temp, so you’ll need to model the convective heat transfer at this point. This requires vessel temp and vessel internal area.

    Once you have the heat transfer from the vessel to the wall, you need to consider the change in temp of the vessel. For now, I’ll assume you know how to do this. Note that we can make the simplifying assumption that there is no thermal gradient across the vessel wall. If blowdown of the vessel is very quick, this may be a poor assumption. You tell me.

    Once you have the vessel temp, you can calculate the heat transfer from ambient. Again, this is another convective heat transfer problem. You need vessel temp, ambient temp and vessel external area.

    After you’ve done all this, you can start over and perform the next time step.

    Side note: You mentioned you’re going up to 700 bar. At atmospheric temp, compressibility Z for hydrogen is 1.38 so you should take that into account when determining mass and density. Luckily, there’s no significant affect on gamma, so I think the isentropic expansion calculations are still good without alteration.

    Let me know where you need more detail as I realize this is very top level. Note the above is basically an integration using the Simpson rule. You can modify this using the Trapezoid rule by simply predicting the conditions at the end of the time step and then using an average where applicable. That’s a bit more trouble, and generally not worth the effort since your errors due to unknowns and aproximations are generally much larger than using a constant for each time step.

    Also, it’s always nice to actually instrument a test setup and see how accurately your model actually predicts things so you can improve the model next time. Generally however, the chance to actually do the instrumentation is a real blessing but at least it can’t hurt to ask the powers that be.
  8. Mar 12, 2008 #7
    Wow I m impressed :-)

    Ok yesterday I took a good look at the H2 tank, and all the instrumentation and will possibly test it in detail next week or so.
    We have a heat sensor inside the tank, also a pressure sensor. As we release H2 at about 2 g/s, pressure drops gradually from about 200 bar to 20 bar, corresponding to a drop from ambient 293°K to 270°K for the gas temperature inside the tank.
    Small corrections here, I got an update on the needs of my simulation. The interest lies in the temperature of the gas in the tank (and not the tank itself as the tank is well insulated), because this gas pressure is lowered to 11 bar via a pressure regulator (not a pressure relief valve... sorry) and this regulator material has certain temperature specs. Under freezing temperatures, this regulator should function and I need to simulate under all working conditions, if the gas temperature could actually drop below the specified lower temperature limit and damage the regulator.

    I am currently using van der waal equation to calculate the mass (and calculate the density from the mass) of the gas at given pressure, temperature at time =0 .
    At time >0, for a single time step, I am unable to use the P2 = P1 (V1/V2)^gamma because essentially the remaining gas inside the tank simply occupies the volume of the tank (V1=V2). What does change in a time step is the density which inturn changes the pressure. Currently I m trying to solve this issue.

    My approach is to calculate an apparent rise in volume V2 by adding the volume of the released gas to the volume of the tank. The Volume of the released gas is calculated under the assumption that the gas just leaving the system is at the same density as the gas in the tank. I am getting realistic results but can only validate this approach once I get the dynamic temperature/pressure drop from the experiment next week.
    Will update if I get any realistic results (trying to simulate for 1sec time steps)
  9. Mar 12, 2008 #8


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    If the tank is well insulated, you can neglect heat transfer from the environment, but you still should consider heat transfer from the tank walls which have tremendous thermal mass. dT for the tank wall is simply the specific heat times mass. What you’ll find is that the thermal mass of the vessel wall is very significant and will warm the gas considerably as it expands.

    My fault - looks like I screwed up on the explanation. To use this equation, consider the mass of gas leaving the vessel during time step t. That gas has some initial density, rho so it takes up some volume Vm = rho * m. Once the gas leaves the vessel, that volume V is taken up by the rest of the gas inside the tank which expands into that volume. So V2 is the total volume of the tank and V1 is the volume of the tank minus the volume that was taken up by the mass that left: V1 = V2 – Vm. In other words, all you need to do is calculate the volume taken up by the mass that leaves the tank during the time step and subtract that volume from the tank volume to get initial volume V1 of the gas that is expanding inside the tank.

    Then you should also model the temperature drop (isenthalpic) across the regulator. The temperature drop inside the vessel is isentropic, but the temperature drop across the reg is isenthalpic. To do this, you need to consider the JT effect.

    Hope that helps.
  10. Mar 13, 2008 #9
    Thanx a bunch, ofcourse this discussion helps me a lot. Once I start modelling the situation, it gets better with time. All I needed was a place to start.
    What do you think of my approach?
    1) I get the density of the system via Van der Waals at t=0
    2) Calculate the loss of volume for one time step.
    3)Get pressure and then temperature using equations for isentropic expansion for this time step
    4)finally update the pressure and temperature to calculate density at t=1.

    I am trying to figure out if I need to start looking into some sort of convergence within a time step.

    I m on the same track as you proposed here, and now without considering the heat losses what I get is the maximum temperature drop in the vessel. This drop is ofcourse much higher than what is observed. Now I m onto calculating the heat loss to the inner walls of the vessel as well as the outlet nozzle which is not insulated (the temp sensor is located near this nozzle)
    An interesting point here is the extent of this process being isentropic. I read on a forum that for gases, its about 90% isentropic.
  11. Mar 13, 2008 #10


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Hi hashsback,
    Calculating the density via Van der Waals is good, though I never use that equation myself. I’d want to verify the accuracy of that against known databases for hydrogen, but I’d have to believe it’s accurate.

    Regarding isentropic efficiency, you can look at it that way (ie: you can say there’s less than perfect isentropic efficiency when expanding <that's all the polytropic equation does - very simplistic>) but that’s a poor way of understanding what’s really going on. Why is there lower efficiency? What mechanisms should result in there being less than 100% isentropic efficiency upon expanding a gas? And how does it compare to simply applying conservation of energy (ie: how does that compare to applying the first law to the situation)?

    If you model the expansion as being adiabatic (no heat transfer) using the first law (dU = Hout) then compare that result with a “100% efficient” isentropic expansion, you’ll find the two different methods of analysing this problem come out with exactly the same answer. In other words, the process is accurately modeled as being an isentropic expansion with 100% efficiency under adiabatic conditions.

    The reason the gas inside the vessel doesn’t ACTUALLY cool down as much as predicted by using the first law or isentropic expansion is because of the considerable heat transfer between the vessel wall and gas. The thermal mass of the walls is huge, so the walls won’t have to cool down much to warm the gas considerably. Hydrogen has excellent thermal conductivity and we can expect there to be considerable heat transfer. This isn’t an adiabatic expansion. So to model this with any real accuracy, we can't assume adiabatic conditions for the gas. We have to take into account the heat transfer from the vessel. If you don't take the heat transfer into account, the error in determining temperature profile will be huge.

    On a side note: by doing the time step, and assuming conditions are constant over that period, there will be a small error in the isentropic expansion calculation. The volume calculated for the gas that has left the tank is not going to be perfectly accurate. You can improve the calculation by determining the density of the gas after it expands and then recalculating volume. This volume will be at a lower temperature so density will be slightly higher and volume will be slightly smaller. So if you take the average of the two calculated volumes, that should improve the final calculation.
  12. Mar 13, 2008 #11


    User Avatar
    Science Advisor

    The Redlich-Kwong equation of state is purportedly superior to the Van der Waals.

    NIST uses one of their equations of state for Hydrogen. Here is what they have listed in REFPROP:

    Leachman, J.W., Jacobsen, R.T, Lemmon, E.W., "Fundamental Equations of State for Parahydrogen, Normal Hydrogen, and Orthohydrogen," to be published in the International Journal of Thermophysics, 2007.

    The uncertainty in density is 0.1% at temperatures from the triple point to 250 K and at pressures up to 40 MPa, except in the critical region, where an uncertainty of 0.2% in pressure is generally attained. In the region between 250 and 450 K and at pressures from 0.1 to 300 MPa, the uncertainty in density is 0.04%. At temperatures between 450 and 1000 K, the uncertainty in density increases to 1%. At pressures between 300 and 2000 MPa, the uncertainty in density is 8%. Speed of sound data are represented within 0.5% below 100 MPa. The estimated uncertainty for heat capacities is 1.0%. The estimated uncertainties of vapor pressures and saturated liquid densities calculated using the Maxwell criterion are 0.2% for each property.

    Here is the web database from NIST:


    You can get a lot of information from there without buying REFPROP.

    Hope that helps.

  13. Mar 13, 2008 #12
    Thanx for the tips guys

    CS... I will look into the Redlich-Kwong equations of state.
    Q_Goest The next logical step would be to update the temperature of the system at every time step taking into consideration the heat transfer between the inner walls of the tank and the hydrogen in the tank. I was hoping to use
    m_H2.cp.(T_updated-T_H2)= Q(heat transfer) = h.A. (T_wall-T_H2)

    "A" is the area of the inner wall
    "h" is the overall heat transfer coefficient
    Thanks once again for all the help
  14. Mar 13, 2008 #13


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Everything’s good here except Cp (specific heat at constant pressure) should be Cv (specific heat at constant volume).

    Think of it this way – the first law for this reduces to:
    dU = Qin – Hout
    for every time step. We’re using a trick by using isentropic expansion which accounts for adiabatic expansion (no heat) so dU = Hout. So by doing this, we account for the change in dU due to the enthalpy of the gas leaving the chamber. Now we have to account for the heat.

    dU = Qin

    We know this is m*Cv*dT = Qin

    So you want to use the specific heat at constant volume to determine the change in temperature due to heat.

    Take another example. In the case of a heat exchanger where there is no stored energy and the process is steady state:
    dU = 0 = Qin + Hin – Hout


    dH = Qin

    dH = m*Cp*dT

    so for a heat exchanger, the first law can be rewriten m*Cp*dT = Q

    Cp accounts for the work done by the gas, but in our case, we’re accounting for that already.
  15. Apr 8, 2008 #14
    Good morning folks
    Sorry for the rather big break.
    Just got back some experimental results.
    As expected,
    1. the tank depressurisation results in cooling of hydrogen
    2. the pipe leading hydrogen to the pressure regulator is a bit warmer due to heat exchange with environment
    3. the pressure regulator has to some extent free expansion from 300 bar to 10 bar and considering negative joule thompson coefficient for hydrogen, the gas warms up and so does the pressure regulator (ambient temperature is 25°C).

    Now as for the simulation, such processes need equation. I have already have good model behaviour for 1 and 2. Now we come to the Joule thompson issue.
    I am trying to calculate the resulting temperature given the pressure drop. Joule thompson coefficient u_JT = (dT/dP). Simplifying u_JT=(T2-T1)/(P2-P1)
    P1, T1 and P2 are the knowns and T2 and u_JT are the unknowns.
    My search for other equations for u_JT lead me to some equations
    u_JT= ((2a/RT)-b)/cp (based on van der waals)
    Not very satisfactory results. Temperature rise was nominal

    Attached Files:

  16. Apr 8, 2008 #15


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Hi hashback,
    Note the sudden drop in temperature inside the vessel when dT is small. This is due to the isentropic expansion. The curve flattens out due to heat transfer as dT grows.

    The expansion across the valve is considered an isenthalpic (dH = 0) process - and yes, you're correct that temperature for hydrogen increases in this case. Normally, I'd just pull in a value for enthalpy given the upstream state and then take that and pressure to find temperature for the downstream state. You can do this very easily using REFPROP (see post 4). If your company gave you the funding to do the test, you should be able to swing a few hundred for this program. It's invaluable for doing thermo calcs, otherwise you spend too much time just trying to find properties. <bleh> :yuck:

    Couple other suggestions just in case you can't get REFPROP... You might try Perry's Chemical Engineering Handbook or one of the gas handbooks such as https://www.amazon.com/Matheson-Data-Book-Carl-Yaws/dp/0071358544"paper. Have you done an internet search for properties databases? There are a couple, though the ones I've looked at don't have the right info for you.
    Last edited by a moderator: May 3, 2017
  17. Apr 9, 2008 #16
    Hello Q_Goest
    I have acquired a database for retrieving the Cp value for various temperatures and pressures. It seems sufficient for my work. Although I would love to have an extensive database like REFPROP, this was a one time project for me, my Phd work is related to another topic. Nevertheless, I really appreciate your enthusiasm on this forum. I am thankfull to you as our discussions got me started and eventually reach this point. I wish you luck in your work and drop me a line on this thread if there is anything you would find interesting for a discussion.
    have a nice day
  18. Feb 11, 2011 #17
    Hello hashback,

    I just saw your post about the de-pressurisation of a hydrogen tank and im working on the same issue. I need to model what temperature the vessel gets after blowing down from 31 bar to 11 bar. Using equation T2 = T1*(P2/P1) ^(gamma-1/gamma) gives the temperature after depressurisation but at the same time there is a heat transfer for the enviroment right?

    I calculate the convection factor using the morgan equation Nu = C*(Ra)^n but the temperature always decreases and maybe im wrong but the enviroment its supposed to heat the vessel right? Otherwise the tank can reach temperatures around -60ºC and that seems impossible to me. I dont know what im doing wrong but when i recalculate the temperature the heat transfered from the enviroment is insignificant.

    What temperature do you think will reach the vessel if its at ambient temperature at the beginnig??? I would apreciate any of your help!

    P.S: sorry for my english but im spanish and technical language is even harder for me ;)
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook