CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

setting boundary conditions for heat transfer

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 11, 2018, 12:45
Default setting boundary conditions for heat transfer
  #1
Member
 
Join Date: Nov 2016
Posts: 34
Rep Power: 9
ywan168 is on a distinguished road
Dear CFD users,

I have some questions about setting boundary conditions for heat transfer calculation. I have a 2D model which is a block having initial temperature varying with depth. In the middle of the block is a fluid domain like shown in the green region in attachment. There is also a two-sided pipe inside of the fluid domain. So this 2-D photo shows there is fluid both inside and outside the pipe. And outside the fluid domain is solid block. I need to couple the walls between fluid and solid pipe, and between fluid and solid block.

The conditions about heat include the fluid temperature at inlet as one boundary, and initial condition of the whole model temperature having a linear temperature gradient varying with depth. I also know the specific heat and thermal conductivity of fluid and pipe, block. Fluid density and other physical properties do not vary with temperature.

I have created interfaces in Mesh, and set mesh interface in fluent. But it failed to run because of floating point exception.

And one has any suggestion for this problem. Thank you~
2.PNG
ywan168 is offline   Reply With Quote

Old   June 11, 2018, 15:15
Default
  #2
Senior Member
 
Join Date: Dec 2016
Posts: 152
Rep Power: 10
RaiderDoctor is on a distinguished road
Okay, you have a lot of stuff going on here. So let's start at the beginning; is this an FSI problem? Are you using a System Coupling module to solve?
RaiderDoctor is offline   Reply With Quote

Old   June 11, 2018, 15:59
Default
  #3
Member
 
Join Date: Nov 2016
Posts: 34
Rep Power: 9
ywan168 is on a distinguished road
Quote:
Originally Posted by RaiderDoctor View Post
Okay, you have a lot of stuff going on here. So let's start at the beginning; is this an FSI problem? Are you using a System Coupling module to solve?
Thank you for your reply! In my model, there are rock formation, pipe and fluid. The contact between fluid and formation, and the contact between fluid and pipe, are required to be coupled because there is both conduction and fluid convection. Fluid is injected from middle, which is pipe inlet, with a constant T, it flows through pipe and circulated out through annulus between pipe and formation. The orange region is the whole fluid domain.

It failed to run because of floating point exception. I don't know why. Probably wrong/insignificant BC?

Thanks
3.PNG
ywan168 is offline   Reply With Quote

Old   June 11, 2018, 16:56
Default
  #4
Senior Member
 
Join Date: Dec 2016
Posts: 152
Rep Power: 10
RaiderDoctor is on a distinguished road
A floating point exception can occur due to a variety of reasons: your solution diverged, your initialization was incorrect, you didn't check a box that needed to be checked, etc. It's really hard to give enough info to solve the problem, without giving too much to overwhelm the other person.


I get that there is a fluid domain, and a solid domain. But, do you have that solid domain linked to another solver? Are you using Mechanical or another application to calculate the heat fluxes on the walls, or is this simply a CFD problem? The reason I ask is because I'm trying to understand your setup.



From what I understand, fluid is coming from the top of the domain inside the pipe, leaving the pipe, turning around, and exiting from the top of the domain outside the pipe. I'd double-check your boundary conditions. While you're at it,take a snapshot of the Calculation Activities panel and post it here for reference.
ywan168 likes this.
RaiderDoctor is offline   Reply With Quote

Old   June 11, 2018, 19:44
Default
  #5
Member
 
Join Date: Nov 2016
Posts: 34
Rep Power: 9
ywan168 is on a distinguished road
Quote:
Originally Posted by RaiderDoctor View Post
A floating point exception can occur due to a variety of reasons: your solution diverged, your initialization was incorrect, you didn't check a box that needed to be checked, etc. It's really hard to give enough info to solve the problem, without giving too much to overwhelm the other person.


I get that there is a fluid domain, and a solid domain. But, do you have that solid domain linked to another solver? Are you using Mechanical or another application to calculate the heat fluxes on the walls, or is this simply a CFD problem? The reason I ask is because I'm trying to understand your setup.



From what I understand, fluid is coming from the top of the domain inside the pipe, leaving the pipe, turning around, and exiting from the top of the domain outside the pipe. I'd double-check your boundary conditions. While you're at it,take a snapshot of the Calculation Activities panel and post it here for reference.
Thanks! But I simply use Fluent. I created two solid materials (pipe and formation), and fluid material. I activated VOF and Energy and viscous model because the injected fluid is water (turbulent flow). My BCs are velocity inlet; pressure outlet; for formation-wall, it has unchanged temperature distribution which is increased with depth; and coupled interfaces between annulus fluid and formation, coupled interfaces between pipe fluid and pipe wall. Also the surface of formation is 40F. That's all BCs I applied.

There is no special settings in calculation activities panel.
ywan168 is offline   Reply With Quote

Old   June 11, 2018, 20:44
Default
  #6
Senior Member
 
Join Date: Dec 2016
Posts: 152
Rep Power: 10
RaiderDoctor is on a distinguished road
Alright, well it's sounding like you set your problem up correctly. I'm assuming you used Standard Initialization to set the temperature of your domain?



I want to see the calculation page just because I know of a few instances where I didn't set something appropriately, and it failed on me. It's easier just to visually check those things, rather than having to explain it, unfortunately.



The only other thing I can think of is you may be violating conservation of mass somehow. Although, I usually don't run with the energy model enabled, so perhaps it's an error with one of those settings.
RaiderDoctor is offline   Reply With Quote

Old   June 12, 2018, 10:19
Default
  #7
Member
 
Join Date: Nov 2016
Posts: 34
Rep Power: 9
ywan168 is on a distinguished road
Yes, it is standard initialization, calculated from inlet.
ywan168 is offline   Reply With Quote

Old   June 12, 2018, 10:23
Default
  #8
Senior Member
 
Join Date: Dec 2016
Posts: 152
Rep Power: 10
RaiderDoctor is on a distinguished road
Cool. Still, we're going to need more info before we can move forward.
RaiderDoctor is offline   Reply With Quote

Old   June 12, 2018, 12:06
Default
  #9
Member
 
Join Date: Nov 2016
Posts: 34
Rep Power: 9
ywan168 is on a distinguished road
I was able to run the solver, the VF was reasonable, but when fluid flowing out through annulus, the velocity was not right, so the temperature was not right as well. Do you know how to set circulating up velocity?

Thanks,
ywan168 is offline   Reply With Quote

Old   June 12, 2018, 12:11
Default
  #10
Senior Member
 
Join Date: Dec 2016
Posts: 152
Rep Power: 10
RaiderDoctor is on a distinguished road
Circulating velocity? You may need to explain what you mean by that.


Also, what do you mean by the velocity was not right?
RaiderDoctor is offline   Reply With Quote

Old   June 12, 2018, 12:29
Default
  #11
Member
 
Join Date: Nov 2016
Posts: 34
Rep Power: 9
ywan168 is on a distinguished road
Quote:
Originally Posted by RaiderDoctor View Post
Circulating velocity? You may need to explain what you mean by that.


Also, what do you mean by the velocity was not right?
Circulating velocity is actually the velocity in annulus between fluid and formation. As shown in attachment, the inpipe velocity is 471.6 ft/min, which was alright, but the annulus velocity should be 62.1 ft/min because it was narrower than pipe. But the calculated velocity was read as around 200 ft/min.

The model was extreme long with narrow pipe. Probably I need to check CFD limitations, and refine the mesh in bottom, and use gradient based adaption? Because I have large fluid gradient at bottom region.

Thanks,
Capture.PNG
ywan168 is offline   Reply With Quote

Old   June 12, 2018, 14:57
Default
  #12
Senior Member
 
Join Date: Dec 2016
Posts: 152
Rep Power: 10
RaiderDoctor is on a distinguished road
I still don't quite understand what you mean by "circulating velocity". Also, it might be beneficial to post a picture with words describing your setup. I'm not sure what "annulus" means. Furthermore, if the annulus is more narrow than the pipe, then it should have a higher velocity, right? It looks like your solution is correct, as the pipe cross-sectional area is actually smaller than the cross-sectional area of the fluid outside the pipe. This means that you will have higher fluid velocity inside than outside. Also, how big is your mesh? If the picture you posted previously showed the element size, I can tell you right now that they are way too big.
ywan168 likes this.
RaiderDoctor is offline   Reply With Quote

Old   June 12, 2018, 15:13
Default
  #13
Member
 
Join Date: Nov 2016
Posts: 34
Rep Power: 9
ywan168 is on a distinguished road
Quote:
Originally Posted by RaiderDoctor View Post
I still don't quite understand what you mean by "circulating velocity". Also, it might be beneficial to post a picture with words describing your setup. I'm not sure what "annulus" means. Furthermore, if the annulus is more narrow than the pipe, then it should have a higher velocity, right? It looks like your solution is correct, as the pipe cross-sectional area is actually smaller than the cross-sectional area of the fluid outside the pipe. This means that you will have higher fluid velocity inside than outside. Also, how big is your mesh? If the picture you posted previously showed the element size, I can tell you right now that they are way too big.
The pipe ID is 2.675 in, pipe OD is 3.5 in, and hole ID is 7.875 in. The attached is the model.

2.PNG
ywan168 is offline   Reply With Quote

Old   June 12, 2018, 15:16
Default
  #14
Member
 
Join Date: Nov 2016
Posts: 34
Rep Power: 9
ywan168 is on a distinguished road
circulating velocity is the velocity when fluid flowing up, because at the beginning fluid enter the domain with negative velocity going down, then went up at the bottom with a positive velocity.

Actually the annulus cross section area is larger than the pipe cross section area.
ywan168 is offline   Reply With Quote

Old   June 12, 2018, 16:11
Default
  #15
Member
 
Join Date: Nov 2016
Posts: 34
Rep Power: 9
ywan168 is on a distinguished road
Quote:
Originally Posted by RaiderDoctor View Post
Alright, well it's sounding like you set your problem up correctly. I'm assuming you used Standard Initialization to set the temperature of your domain?



I want to see the calculation page just because I know of a few instances where I didn't set something appropriately, and it failed on me. It's easier just to visually check those things, rather than having to explain it, unfortunately.



The only other thing I can think of is you may be violating conservation of mass somehow. Although, I usually don't run with the energy model enabled, so perhaps it's an error with one of those settings.
But it's interesting when you mention I might violating conservation of mass law because of the long pipe with small diameter. Could you specify that, and how to check mass imbalance?

Thanks,
ywan168 is offline   Reply With Quote

Old   June 12, 2018, 20:00
Default
  #16
Senior Member
 
Join Date: Dec 2016
Posts: 152
Rep Power: 10
RaiderDoctor is on a distinguished road
Well, as it stands right now, I don't think your pipes are small diameter unless your length is significantly larger. If the annulus cross-sectional area is larger, then that helps explain your decrease in velocity


The way to check your mass imbalance is two-fold: is your continuity residual converging? If it is, then that's a good sign that the mass is balanced. Another way to check is to set up a solution monitor for the mass flow rate at the inlet and outlet. If they mass in matches the mass out, then you're fine. Honestly, if continuity wasn't conserved, the solution would fail, so I'm pretty sure it's not that.



Could you tell us your mesh size, and what your smallest element is?
ywan168 likes this.
RaiderDoctor is offline   Reply With Quote

Old   June 12, 2018, 23:34
Default
  #17
Member
 
Join Date: Nov 2016
Posts: 34
Rep Power: 9
ywan168 is on a distinguished road
Yes, sure. The pipe depth is 1200 ft, which is extremely long. I now have 90314 nodes and 27268 elements after refinement. Minimum face area is 0.002097203 m^2, max face area is 3.975652 m^2. Maximum aspect ratio is 218.092.
ywan168 is offline   Reply With Quote

Old   June 12, 2018, 23:35
Default
  #18
Member
 
Join Date: Nov 2016
Posts: 34
Rep Power: 9
ywan168 is on a distinguished road
So I don’t know why the velocity calculated at annulus is not right. It is hard to find the problem.
ywan168 is offline   Reply With Quote

Old   June 13, 2018, 10:44
Default
  #19
Member
 
Join Date: Nov 2016
Posts: 34
Rep Power: 9
ywan168 is on a distinguished road
Quote:
Originally Posted by RaiderDoctor View Post
I still don't quite understand what you mean by "circulating velocity". Also, it might be beneficial to post a picture with words describing your setup. I'm not sure what "annulus" means. Furthermore, if the annulus is more narrow than the pipe, then it should have a higher velocity, right? It looks like your solution is correct, as the pipe cross-sectional area is actually smaller than the cross-sectional area of the fluid outside the pipe. This means that you will have higher fluid velocity inside than outside. Also, how big is your mesh? If the picture you posted previously showed the element size, I can tell you right now that they are way too big.
Hello,

I am attaching a plot with inlet and outlet mass flow rate, it seems that they are not equal. Am I comparing it right? BTW, the inlet fluid density is 9 ppg, and outlet fluid density is 11.5 ppg. I still didn't get right velocity in annulus.

Thanks,
Capture.PNG
ywan168 is offline   Reply With Quote

Old   June 13, 2018, 13:05
Default
  #20
Senior Member
 
Join Date: Dec 2016
Posts: 152
Rep Power: 10
RaiderDoctor is on a distinguished road
Okay, let's attack your issues one at a time. Sound good?


So, the first and major issue I see is that your mesh is not good at all. There is no way you can expect a usable answer when your elements are nearly as big as your geometry. That isn't really how CFD works. To give you some perspective, simulations ran on blood vessels can contain anywhere from 1 million elements, to 10 million, depending upon the simulation. And these are for structures that are significantly smaller than your described pipe-annulus setup. So, you are going to need a much finer mesh before you start showing any accurate data.


The next issue lies in your geometry. Why do you need to simulate the whole pipe? I get that you want to be as accurate as possible, but this is computationally inefficient to perform. If you wanted to run on the bottom one-foot section (where a lot of the interesting thing happens) that'd be a much more efficient simulation. I get that you want to let the computer solve the equations for you, but you need to drastically shorten your fluid domain, otherwise this will waste a lot of time. I would make the assumption that at a certain distance away from the circulating region, the fluid can be thought of as fully developed, and calculated fairly easily by hand. Not saying I want to, just saying that it doesn't seem awful.



Also, as a side not on geometry, you can actually simplify it since it's a pipe. Instead of taking the entire cross-sectional area, only model one half of that since it's axisymmetric. This way, you save on resources, and can produce a much finer mesh. Model the middle line as "symmetry" and the solver will automatically solve it appropriately.



One final note, as you will notice, your mass in and mass out graphs do are not only mismatched (meaning that you are not satisfying continuity) but they are also taken at every time step. Try to take at every iteration, as this will help you see how the values change over the course of the simulation and help you better judge convergence.
RaiderDoctor is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 91 December 21, 2022 04:50
Wind turbine simulation Saturn CFX 58 July 3, 2020 01:13
Out File does not show Imbalance in % Mmaragann CFX 5 January 20, 2017 10:20
Velocity vector in impeller passage ngoc_tran_bao CFX 24 May 3, 2016 21:16
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 06:28


All times are GMT -4. The time now is 06:40.