Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Trouble Setting up Non-Isothermal Flow through a Tube

Please login with a confirmed email address before reporting spam

Hello all,

I've been having difficulties setting up a non-isothermal flow study for a project; we've been trying to use COMSOL to back up some of our experimental results. We were able to get a fairly good representation of the flow field with COMSOL in a previous study, but have been having trouble pulling temperature data to see if it also matches the experiment.

I have set up two models: one models half of the tube and applies symmetry conditions, while the other models the entire tube and the surrounding medium.

PROJECT BACKGROUND:
We set up a small copper tube with an internal diameter of 0.160" which has two small holes of about 0.042" diameter in it's side (Sorry for the English units). One end of the tube is attached to the in-house air pressure system at 20 psi and the other end is closed off. The inlet is pressurized to 20 psi in-house pressure- at room temperature of 68*F - and the air flows through the pipe; it escapes through the two small holes drilled in the side of the tube, reaching the ambient environment (11.76 psia, 68*F).

Our experimental results showed the flow was choked within the outlet holes. For clarification of the setup I have attached a .png picture which depicts the study.
--------------------------------------------------
MODEL 1: "COMSOL - Mod 0, HP, kom + htif"
After running a fairly simple k-omega turbulent study, I tried adding heat transfer in fluids physics to the model. Although the study will converge to a solution, the temperature profile throughout the tube does not look like anything we saw in the experiment- it's constant. I am thinking this is because I haven't properly set up the physics to work with each other.

I have attached this model (COMSOL - Mod 0, HP, kom + htif). Does anyone have any thoughts?

--

MODEL 2: "COMSOL - Tube and Room - Mod 0"
This model studies the tube and the surrounding "room". The tube sits inside of the room and is pressurized by a cylinder which connects it to the area outside of the room - I did this as I was having trouble setting the inlet conditions if the tube if it was just sitting inside of the room. I tried modeling the system with the non-isothermal flow physics.

Although I don't receive any errors right away when I start the study, the solution will not converge and I will get an error message back a couple minutes in to the computations stating that NaN values were returned in the residual equations. This leads me to believe that I haven't properly set up the boundary conditions.

Any suggestions? Again, I have attached the model (COMSOL - Tube and Room - Mod 0) for your convenience and viewing pleasure.
----

Thank you ahead of time for the help; I've been well and truly stumped by this problem over the last few days.

Best regards,
~ Connor



3 Replies Last Post 23 juil. 2014, 11:30 UTC−4
Erik Bornhöft COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21 juil. 2014, 10:30 UTC−4
Dear Connor,

I'll try to help you with some points you should consider in your models:

1. Always use the "non-isothermal flow" model for turbulent non-isothermal flow. This interface uses the kays-crawford model for turbulent heat transport, which is not the same as coupling the background convection field to heat transfer in fluids only.

2. You need to use a much finer mesh for your tube. Some elements to resolve the diameter and then additionally some boundary layers to resolve the turbulent boundary layer. See also the following entries and models:
www.comsol.de/blogs/which-turbulence-model-should-choose-cfd-application/
www.comsol.de/model/shell-and-tube-heat-exchanger-12685

3. If you want to have free convection in a volume you will need to add gravity to your equations. This can be done by a "volume force" depending on density and g_const. See for example:
www.comsol.de/model/modeling-nonisothermal-flow-with-gravity-volume-forces-2152


--
Hope that helps!

Best regards,
Erik

*********************
Erik Bornhöft
Senior Technical Sales Engineer
COMSOL Multiphysics GmbH
Robert-Gernhardt-Platz 1
37073 Göttingen
Deutschland

Knowledge Base:
www.comsol.de/support/knowledgebase/browse/900/

COMSOL Blog:
www.comsol.de/blogs/
Dear Connor, I'll try to help you with some points you should consider in your models: 1. Always use the "non-isothermal flow" model for turbulent non-isothermal flow. This interface uses the kays-crawford model for turbulent heat transport, which is not the same as coupling the background convection field to heat transfer in fluids only. 2. You need to use a much finer mesh for your tube. Some elements to resolve the diameter and then additionally some boundary layers to resolve the turbulent boundary layer. See also the following entries and models: http://www.comsol.de/blogs/which-turbulence-model-should-choose-cfd-application/ http://www.comsol.de/model/shell-and-tube-heat-exchanger-12685 3. If you want to have free convection in a volume you will need to add gravity to your equations. This can be done by a "volume force" depending on density and g_const. See for example: http://www.comsol.de/model/modeling-nonisothermal-flow-with-gravity-volume-forces-2152 -- Hope that helps! Best regards, Erik ********************* Erik Bornhöft Senior Technical Sales Engineer COMSOL Multiphysics GmbH Robert-Gernhardt-Platz 1 37073 Göttingen Deutschland Knowledge Base: http://www.comsol.de/support/knowledgebase/browse/900/ COMSOL Blog: http://www.comsol.de/blogs/

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21 juil. 2014, 17:35 UTC−4
Erik,

Thank you for your response. I've refined the mesh and added boundary layer elements, as well as included in the volumetric force. I've also adjusted the turbulent length scale to be ~0.07*D_inlet, which I noticed I forgot to do.

Unfortunately, I'm still receiving NaN errors and the segregated solvers (Direct -> PARDISO) are not converging. My most recent run returned a "singular matrix" error message. Please see the attached...

Could it be something in the way my boundary conditions are set up? I'm used to specifying a mass flow or velocity profile at the inlet, rather than a pressure differential. Also, could it be due to compressibility? Past experimentation and COMSOL results have shown that the outlet velocity should be in the transonic regime (~ 400 m/s); I'm currently working up a model in the High Mach Number Flow module.

Best regards,
~Connor
Erik, Thank you for your response. I've refined the mesh and added boundary layer elements, as well as included in the volumetric force. I've also adjusted the turbulent length scale to be ~0.07*D_inlet, which I noticed I forgot to do. Unfortunately, I'm still receiving NaN errors and the segregated solvers (Direct -> PARDISO) are not converging. My most recent run returned a "singular matrix" error message. Please see the attached... Could it be something in the way my boundary conditions are set up? I'm used to specifying a mass flow or velocity profile at the inlet, rather than a pressure differential. Also, could it be due to compressibility? Past experimentation and COMSOL results have shown that the outlet velocity should be in the transonic regime (~ 400 m/s); I'm currently working up a model in the High Mach Number Flow module. Best regards, ~Connor


Erik Bornhöft COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 23 juil. 2014, 11:30 UTC−4
Dear Connor,

did you notice the non-isothermal flow interface by default is calculating pressure in relation to a reference pressure of 1[atm] (see "model inputs" in node "Fluid 1")? Setting a boundary condition to p=0 Pa will therefore yield to a pressure of pA = 0 Pa + 1 atm = 1 atm. The variable pA is used in the density function of air. This is the same for the "normal" flow interface, which you could use too, in case you have isothermal flow.

For the mesh: It can be helpful to use the predefined "physics controlled mesh" as a starting point. It is setting up a mesh depending on geometry size and turbulence model. Your mesh might still be too coarse.

Another hint can be to let the pressure condition of the small tube be more upstream in a longer tube. It is not clear to me the pressure will be constant over the whole diameter so close to the main tube in reality. Ramping up the pressure difference from low to high values can help the solver to converge and gives you information on the dependency of pressure difference to velocity.

Finally, if you really expect Mach-numbers larger than 0.3 you should use the High Mach Number Flow interface, as otherwise you will not see any compressibility effects like shock waves.

--

Best regards,
Erik

*********************
Erik Bornhöft
Senior Technical Sales Engineer
COMSOL Multiphysics GmbH
Robert-Gernhardt-Platz 1
37073 Göttingen
Deutschland

Knowledge Base:
www.comsol.de/support/knowledgebase/browse/900/

COMSOL Blog:
www.comsol.de/blogs/
Dear Connor, did you notice the non-isothermal flow interface by default is calculating pressure in relation to a reference pressure of 1[atm] (see "model inputs" in node "Fluid 1")? Setting a boundary condition to p=0 Pa will therefore yield to a pressure of pA = 0 Pa + 1 atm = 1 atm. The variable pA is used in the density function of air. This is the same for the "normal" flow interface, which you could use too, in case you have isothermal flow. For the mesh: It can be helpful to use the predefined "physics controlled mesh" as a starting point. It is setting up a mesh depending on geometry size and turbulence model. Your mesh might still be too coarse. Another hint can be to let the pressure condition of the small tube be more upstream in a longer tube. It is not clear to me the pressure will be constant over the whole diameter so close to the main tube in reality. Ramping up the pressure difference from low to high values can help the solver to converge and gives you information on the dependency of pressure difference to velocity. Finally, if you really expect Mach-numbers larger than 0.3 you should use the High Mach Number Flow interface, as otherwise you will not see any compressibility effects like shock waves. -- Best regards, Erik ********************* Erik Bornhöft Senior Technical Sales Engineer COMSOL Multiphysics GmbH Robert-Gernhardt-Platz 1 37073 Göttingen Deutschland Knowledge Base: http://www.comsol.de/support/knowledgebase/browse/900/ COMSOL Blog: http://www.comsol.de/blogs/

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.