Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Comsol not following ideal gas law or conservation of mass

Please login with a confirmed email address before reporting spam

Hello,
I am currently working on modeling a high temperature hydrogen heat exchanger. I decided to start as simple as possible and just model the heat transfer into an axi-symmetric tube of hydrogen surrounded by a solid shell.

I am running into two problems. First, COMSOL has decided that the conservation of mass is a suggestion at best and need not be followed. As a check on the results I was getting, I checked the mass flow rate per unit area. I found that the exit mass flow rate is about 25% higher than the inlet mass flow rate. Thus something is obviously wrong with this.

Second, although I have experimented with treating the hydrogen as both a fluid and an ideal gas, at the moment I am letting it be an ideal gas. However, COMSOL doesn't seem the ideal gas law any more than it did the law of conservation of mass. When the pressure and temperature at the inlet are used in combination with the specific gas value of hydrogen (4124 j/kg), a rearranged ideal gas equation rho=P/(R*T) says that the density should be about 1.4 kg/m^3. COMSOL however, returns a value 17 thousand times less than that.

Does anyone have any thoughts or ideas on these problems?
Dan


6 Replies Last Post 10 mag 2016, 11:54 GMT-4
Niklas Rom COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 18 ott 2012, 04:25 GMT-4
Hi, we had a look at the model in a support ticket (the model attached to this post is corrupt, so we got a new one from you).

About the mass conservation question: The likely explanation is that the "Compute surface integral" was not checked in your mass flow integration. It is a 2D axisymmetric model, which requires this if you want to compute a net flow in a 3D sense. The model was saved without this option, which gives a 30% higher value for the exit.

The ideal gas question: The density becomes too low because on the Fluid node, the absolute pressure pA is set to 100 Pa. Solution: set pA to "Pressure (nitf/fluid1)". This alternative should be used if you set the outlet boundary condition to the absolute ambient pressure like you did.
regards
Niklas


Hello,
I am currently working on modeling a high temperature hydrogen heat exchanger. I decided to start as simple as possible and just model the heat transfer into an axi-symmetric tube of hydrogen surrounded by a solid shell.

I am running into two problems. First, COMSOL has decided that the conservation of mass is a suggestion at best and need not be followed. As a check on the results I was getting, I checked the mass flow rate per unit area. I found that the exit mass flow rate is about 25% higher than the inlet mass flow rate. Thus something is obviously wrong with this.

Second, although I have experimented with treating the hydrogen as both a fluid and an ideal gas, at the moment I am letting it be an ideal gas. However, COMSOL doesn't seem the ideal gas law any more than it did the law of conservation of mass. When the pressure and temperature at the inlet are used in combination with the specific gas value of hydrogen (4124 j/kg), a rearranged ideal gas equation rho=P/(R*T) says that the density should be about 1.4 kg/m^3. COMSOL however, returns a value 17 thousand times less than that.

Does anyone have any thoughts or ideas on these problems?
Dan


Hi, we had a look at the model in a support ticket (the model attached to this post is corrupt, so we got a new one from you). About the mass conservation question: The likely explanation is that the "Compute surface integral" was not checked in your mass flow integration. It is a 2D axisymmetric model, which requires this if you want to compute a net flow in a 3D sense. The model was saved without this option, which gives a 30% higher value for the exit. The ideal gas question: The density becomes too low because on the Fluid node, the absolute pressure pA is set to 100 Pa. Solution: set pA to "Pressure (nitf/fluid1)". This alternative should be used if you set the outlet boundary condition to the absolute ambient pressure like you did. regards Niklas [QUOTE] Hello, I am currently working on modeling a high temperature hydrogen heat exchanger. I decided to start as simple as possible and just model the heat transfer into an axi-symmetric tube of hydrogen surrounded by a solid shell. I am running into two problems. First, COMSOL has decided that the conservation of mass is a suggestion at best and need not be followed. As a check on the results I was getting, I checked the mass flow rate per unit area. I found that the exit mass flow rate is about 25% higher than the inlet mass flow rate. Thus something is obviously wrong with this. Second, although I have experimented with treating the hydrogen as both a fluid and an ideal gas, at the moment I am letting it be an ideal gas. However, COMSOL doesn't seem the ideal gas law any more than it did the law of conservation of mass. When the pressure and temperature at the inlet are used in combination with the specific gas value of hydrogen (4124 j/kg), a rearranged ideal gas equation rho=P/(R*T) says that the density should be about 1.4 kg/m^3. COMSOL however, returns a value 17 thousand times less than that. Does anyone have any thoughts or ideas on these problems? Dan [/QUOTE]

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 18 ott 2012, 07:03 GMT-4
Hi Niklas

Thanks for the precisions, the fact that there are 2 pressures, the gauge and absolute pressure is often overlooked, in particular by new users.
But I noticed that during the Milan Conference, this issue was stressed twice in the different mini-courses by the speakers, so the message should gently pass ;)

Absolute pressure + gauge pressure to deal with material properties, gauge pressure locally to the solver, important for among others the scaling and the numerics.
It is like the absolute and relative temperature in Kelvin, and °C or °F, the former is both an absolute and a relative measure, while the latter are to be considered as only relative values.

As for most features of COMSOL, as we are dealing with many physics, and in an unified environment, once you know them it's "ah, oui mais bien sûr" but before often "c'est quoi cette f... chose" ...

--
Good luck
Ivar
Hi Niklas Thanks for the precisions, the fact that there are 2 pressures, the gauge and absolute pressure is often overlooked, in particular by new users. But I noticed that during the Milan Conference, this issue was stressed twice in the different mini-courses by the speakers, so the message should gently pass ;) Absolute pressure + gauge pressure to deal with material properties, gauge pressure locally to the solver, important for among others the scaling and the numerics. It is like the absolute and relative temperature in Kelvin, and °C or °F, the former is both an absolute and a relative measure, while the latter are to be considered as only relative values. As for most features of COMSOL, as we are dealing with many physics, and in an unified environment, once you know them it's "ah, oui mais bien sûr" but before often "c'est quoi cette f... chose" ... -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 19 ott 2012, 14:40 GMT-4
Thank you for taking a look at this.
A couple of questions. First, with regards to the mass flow rate, while I understand that changing the integration to take into account the surface rather than just the line will of course change the value, why is it changing the ratio between the entrance flow rate and the exit flow rate? Since the model is axi-symmetric, the total flow rate along any line extending from the center of the cylinder to the outer edge should be exactly the same as any other line. Thus, computing the surface rather than the line integral should just scale the values up, right?

Second, by un-checking the absolute pressure box I should be able to make comsol come the density with the local rather than absolute pressure, correct?

Thank you for your time.
Thank you for taking a look at this. A couple of questions. First, with regards to the mass flow rate, while I understand that changing the integration to take into account the surface rather than just the line will of course change the value, why is it changing the ratio between the entrance flow rate and the exit flow rate? Since the model is axi-symmetric, the total flow rate along any line extending from the center of the cylinder to the outer edge should be exactly the same as any other line. Thus, computing the surface rather than the line integral should just scale the values up, right? Second, by un-checking the absolute pressure box I should be able to make comsol come the density with the local rather than absolute pressure, correct? Thank you for your time.

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 19 ott 2012, 16:04 GMT-4
Hi

COMSOL adds the local + the absolute presure for the material parameters, and its much cleaner to use the in/out average pressure as the absolute pressure and work with a gauge pressure for the flow analysis, this helps also the numeric scaling issues

Then the total flow is the integrated product of the velocity times the 2*pi*r*dr area in 2D axi (instead of dx*dy in 2D) so its not really the same if the velocity is, or not constant (U = U0 or = U(r)), or ... ?

--
Good luck
Ivar
Hi COMSOL adds the local + the absolute presure for the material parameters, and its much cleaner to use the in/out average pressure as the absolute pressure and work with a gauge pressure for the flow analysis, this helps also the numeric scaling issues Then the total flow is the integrated product of the velocity times the 2*pi*r*dr area in 2D axi (instead of dx*dy in 2D) so its not really the same if the velocity is, or not constant (U = U0 or = U(r)), or ... ? -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 25 ott 2012, 19:00 GMT-4
Hi,

I’m having a similar problem, as the one discussed previously.

Mine suggests that the ideal gas law is not working as it should. My model has a gas that has an initial H2 concentration, this gas enters in contact with a hot surface that heats up the gas. This rise in temperature should decrease the concentration of the Hydrogen (as the hydrogen volume expands).

This is not happening, what can I do? It seems as if the heat module is not coupled with the Transport of diluted species module.
Hi, I’m having a similar problem, as the one discussed previously. Mine suggests that the ideal gas law is not working as it should. My model has a gas that has an initial H2 concentration, this gas enters in contact with a hot surface that heats up the gas. This rise in temperature should decrease the concentration of the Hydrogen (as the hydrogen volume expands). This is not happening, what can I do? It seems as if the heat module is not coupled with the Transport of diluted species module.

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 10 mag 2016, 11:54 GMT-4
Hi, sorry to disturb but could it possible to tell me how did you get a new model? Because I also found the original model is broken and cannot be opened.

Thanks
Hi, sorry to disturb but could it possible to tell me how did you get a new model? Because I also found the original model is broken and cannot be opened. Thanks

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.