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

chtMultiregionFoam--unequal temperature at coupled patches

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 6, 2012, 11:05
Default chtMultiregionFoam--unequal temperature at coupled patches
  #1
Member
 
zakir
Join Date: Nov 2011
Posts: 44
Rep Power: 14
zakir hussain is on a distinguished road
Hello everyone
I use chtMultiregionFoam to simulate a heat transfer problem.I just modified the energy equation to steady state.But I found that the temperature fields at a coupled boundary patch do not match the temperature field of the adjacent coupled boundary patch of another mesh region.I plot my result in tecplot360 and it really shows that there are two values on the interface of solid and fluid.
I have attached my model (cross profile,flow is perpendicular with it) ,2d temperature contours ,3d temperature contours( you can find that it is discontinuous)and temperature curve along x axis(you can see the temperature jump at the interface).

I hope you can give me some advice or solution to solve this problem.Thank you very much!

regards!

zakir
Attached Images
File Type: jpg model structure.jpg (19.7 KB, 286 views)
File Type: jpg 2d temperature.jpg (24.1 KB, 286 views)
File Type: png 3d temperature.png (23.5 KB, 289 views)
File Type: jpg temprature changes along x axis.jpg (21.3 KB, 290 views)
zakir hussain is offline   Reply With Quote

Old   September 9, 2012, 13:11
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Zakir,

I've updated my response on the other thread you asked me about the other day: http://www.cfd-online.com/Forums/ope...d-patches.html - check post #2

It's not a direct answer, but it should get you to the solution!

Good luck!
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   September 10, 2012, 21:06
Default The Residuals of my calculation
  #3
Member
 
zakir
Join Date: Nov 2011
Posts: 44
Rep Power: 14
zakir hussain is on a distinguished road
Hi everyone
I have attached the residuals here.I think all residuals have been below 1e-4 So the solution have been convergent.But why can't I get a good result still?

regards!

zakir
Attached Images
File Type: png Screenshot-1.png (15.2 KB, 201 views)
zakir hussain is offline   Reply With Quote

Old   September 11, 2012, 10:25
Default why can't I get a good temperature curve
  #4
Member
 
zakir
Join Date: Nov 2011
Posts: 44
Rep Power: 14
zakir hussain is on a distinguished road
Dear all
I am almost crazy for getting a correct temperature curve.These days I also have tried the conjugateHeatFoam of version 1.6-ext and run the tutorial called conjugateCavity.Code or case are original.After the solution became convergent,I used paraview and tecplot for post processing.I have attached the pictures here.Maybe I am wrong in post processing operation.So I will give the detail steps,I hope you can give me some advice.
1.I chose the last time result and Meshregion (internalMesh and solid/internalMesh ),then applied.
2.I used the 'slice' funciton to create a plane parallel to the xy plane and through the center of thickness.
3.I used the 'plot over line' filter,and chose a line parallel to the x axis.
And I got the temperature xy plot.

The last one is I plot with tecplot360.


I hope you can take some minutes to it and tell me where is the mistake I have made.Thank you very much!

regards!

zakir
Attached Images
File Type: png 27.png (17.0 KB, 139 views)
File Type: png 28.png (33.2 KB, 148 views)
File Type: png 29.png (49.3 KB, 124 views)
File Type: jpg 30.jpg (30.8 KB, 160 views)
File Type: png 31.png (19.9 KB, 152 views)
zakir hussain is offline   Reply With Quote

Old   September 11, 2012, 17:12
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Zakir,

Do you know if you're plotting the values from the center of the cells, or from the faces/point interpolations?

Nonetheless, this is one of those situations where you better first validate if your steps are correct or not.

I suggest that you do the following exercise, to validate/confirm what you're doing and how you're analyzing the results:
  1. Create a simple case with two water and/or air volumes separated by a flat solid plate, with both fluids flowing along the wall.
    This is a simple case that you can create in either 2D or 3D, it doesn't really matter. Also, it's simple enough that you can easily calculate the analytical model of this case.
  2. Do at least 2 or 3 tests, with different flow rates on both sides of fluid volumes.
  3. Do the post-processing the same way you've been doing so far. Compare with the analytical solution.
  4. If it does not compare properly, try changing the source of the results.
    For example, in ParaView you can render the results from the cell centers (the orange cubes) or the interpolated points (the dots).
    The cubes and dots are shown when you're choosing the field to be represented.
  5. If you still have problems, try using a finer mesh, to see if you can get a better result and more identical/similar to the analytical solution.
If you have trouble analyzing this simple test case, you can attach it in your next post, so it's easier to check if things are working as intended. Because it they are not working properly, that case can then be used for reporting as a bug.


Best regards,
Bruno
vs1 likes this.
__________________
wyldckat is offline   Reply With Quote

Old   September 14, 2012, 10:52
Default
  #6
Member
 
jack
Join Date: Jul 2011
Posts: 52
Rep Power: 14
lg88 is on a distinguished road
I have met the same problem with you!If you have solved the problem,just let me know!Thank you


regards!
lg88
lg88 is offline   Reply With Quote

Old   September 14, 2012, 11:09
Default
  #7
Member
 
zakir
Join Date: Nov 2011
Posts: 44
Rep Power: 14
zakir hussain is on a distinguished road
Hello Bruno
I have tried what you told me."a simple case with two water and/or air volumes separated by a flat solid plate, with both fluids flowing along the wall."Although I didn't compared the result with analytical solution,it is wrong.It was so obvious.
The residuals have been convergent,But the temperature still have the same problem in the interface.And the velocity at the interface is not zero.It is strange.I have attached the result here.The first one is the 3D velocity contour.The second is the residuals.The third is the 2d velocity slice.The last one is the temperature field changes along the white line in the third picture.Maybe I have made some mistakes in the setting of the case.Or I have done some wrong operation in the post-processing.But I have checked the case again and again.I hope you can give me some idea.Thank you very much.

regards!

zakir
Attached Images
File Type: png Screenshot.png (40.3 KB, 112 views)
File Type: png Screenshot-4.png (14.4 KB, 100 views)
File Type: png Screenshot-1.png (68.8 KB, 133 views)
File Type: jpg Screenshot-2.jpg (23.0 KB, 121 views)
zakir hussain is offline   Reply With Quote

Old   September 15, 2012, 07:52
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Zakir,

Now that you have a simple case prepared, it'll be easier for us to work together to figure out if this is a setup problem or a bug in OpenFOAM.

Please package this simple case you have, preferably in a similar way as the tutorials that come with OpenFOAM, namely in a state right before the mesh is generated.

In case you don't know, you can package the case by running the following command in the parent folder:
Code:
tar -czf simple_case.tar.gz simple_case
Then attach the file "simple_case.tar.gz" to your next post.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   September 21, 2012, 10:53
Default
  #9
Member
 
zakir
Join Date: Nov 2011
Posts: 44
Rep Power: 14
zakir hussain is on a distinguished road
Hi Bruno
I am sorry for late updating my poster because I have been outside for days.
I have created a different case which contains heat transfer between solids only.And I did the post-processing as what I said before.The T xy plot is just along the short white line in the second picture.
The version I used is OF-1.6-ext

regards!

zakir
Attached Images
File Type: jpg Screenshot-3.jpg (11.4 KB, 100 views)
File Type: png Screenshot-4.png (13.5 KB, 77 views)
File Type: jpg Screenshot-5.jpg (24.9 KB, 132 views)
Attached Files
File Type: gz solidSolid1.tar.gz (23.5 KB, 49 views)
zakir hussain is offline   Reply With Quote

Old   September 23, 2012, 11:34
Default
  #10
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Zakir,

I went to bed last night and woke up this morning thinking about doing this example. Attached you will find:
  1. Plane_wall_plot_line.jpg - it shows how the plot line is defined on the 3D model (on the left).
  2. Plane_wall_T_plot.jpg - it shows how the fields to be plotted were chosen (for the plot on the right).
  3. planeWall2D.tar.gz - this is the example case I was thinking about when I wrote some posts ago. It's based on the tutorial "heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater".
Now, this is basically the example shown in the book "Fundamentals of Heat and Mass Transfer" by Frank P. Incropera et. al, chapter 3, section 3.1 "The Plane Wall", where appears a graph similar to the one shown on the attached images.

The mesh of this example case "planeWall2D" is based on the cavity case, but with 1m x 1m. It's divided into 3 regions:
  • "topAir" - 0.6 to 1m - where the air is cold at 300K and flows from the left to the right at 0.1m/s. The top patch is a symmetry plane.
  • "wall" - 0.4 to 0.6m - where a solid wall is placed, initiated at 300K and has a high conduction factor.
  • "bottomAir" - 0 to 0.4m - where the air is hot at 500K and flows from the left to the right at 0.1m/s. The bottom patch is a symmetry plane.
The solver used is chtMultiRegionSimpleFoam and the used OpenFOAM version is 2.1.x. To run the case:
Code:
./Allrun
To clean it up for restarting all over again:
Code:
./Allclean
It runs for 50000 iterations and has a uniform mesh of 100x100x1. The shown result isn't fully converged and probably won't converge, because there is a plume that generates and flows from the sides of the wall.

Nonetheless, I do not get strange results as the ones you're getting Zakir. This is why I say this a very good example for you to diagnose what is going on!

Additional exercises that are left to anyone who's reading this:
  1. Reduce the resolution of the mesh from 100x100x1 to 20x20x1 and use refineMesh to increase resolution where it matters, namely near the wall! A good reference tutorial for this is "multiphase/cavitatingFoam/les/throttle".
  2. Change the properties of the solid and/or top and bottom fluids, so you can see what's going on.
  3. Extend the wall or apply the cyclic boundary condition to the outlets and inlets (the ones named "leftLet" and "rightLeft"), turning this into an infinite wall.
  4. Any more exercises are up to you!
Best regards,
Bruno

PS: I've added this to the openfoamwiki.net: http://openfoamwiki.net/index.php/Ge..._-_planeWall2D
To all forum readers, feel free to improve that page!
Attached Images
File Type: jpg Plane_wall_plot_line.jpg (46.0 KB, 144 views)
File Type: jpg Plane_wall_T_plot.jpg (47.5 KB, 117 views)
Attached Files
File Type: gz planeWall2D.tar.gz (6.0 KB, 47 views)
__________________

Last edited by wyldckat; September 23, 2012 at 13:12. Reason: forgot to mention the OpenFOAM version; added "PS:" as well
wyldckat is offline   Reply With Quote

Old   September 24, 2012, 03:53
Default
  #11
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,

@zakir: You always get temperature differences at the interface and that depends on the flow and viscose layer ->




Therefor its very important to refine your FLUID region to the boundary to get right resolution.

I have no time to read all the lines here but your Heat-Transfer seems "relative correct" ... Here is a case I made for a guy this year:

http://ww3.cad.de/foren/ubb/Forum527...5.shtml#000010

Maybe bruno solved your problem

----------------
Kind Regards
T. Holzmann
Tobi is offline   Reply With Quote

Old   December 19, 2013, 10:40
Default
  #12
Member
 
Kumudu
Join Date: Oct 2013
Posts: 63
Rep Power: 12
Kumudu is on a distinguished road
Hi,

I want to simulate temperature of a ground heat exchanger. I have attached the schematic of ground heat exchanger. This ground heat exchanger is consisted with a borehole ( cylindrical hole dig in the soil). Inside the borehole, there is a U-tube (water is circulating). The borehole is filled with a soil like material called grout. I just want to know how the temperature of soil, grout and fluid is varied with time and depth. Fluid (water) is circulated in the U-pipe with constant flow rate.

Can you tell me how to define the boundary condition for fluid(water) region?
I defined three cell zones(waterInPipe1,waterInPipe2,waterInPipeConnect ) for fluid as it is a U-loop.
waterInPipe1:
At the top ,velocity
InletOutlet
inletValue: (0,0,-10) (-z direction)
For all boundaries, except interface between waterInPipeConnect and waterInPipe1): fixedValue, uniform (0,0,0)

At the interface (waterInPipeConnect and waterInPipe1):velocity boundary conditions
outletInlet
outletValue (4,0,0) (x-diraction)


Similar case for waterInPipe2

Question:
1. will this velocity boundary condition works?(because this should have a continuous flow)
2. how to define temperature for fluid-fluid interface
3. How to define constant mass flow rates in the whole fluid region(waterInPipe1, waterInPipe2 and waterInPipeConnect)?
4. How to define pressure at each fluid region (I don't want to simulate pressure and as the mass flow rate is constant, I think pressure is also constant)?
5. how to define k, P,P_rgh,Ychar,Ypmma for each of these region?
I mean what would be the boundary and initial conditions for these values in fluid regions( I just know the mass flow rate value only, I don't know about the pressure values)

5.what are these Ychar,Ypmma stand for
why we have P and P_rgh ( I don't know about this)


Please give me some advice to do this. The flow is incompresible and has a constant mass flow rate. To fluid to pipe, convection heat transfer is exist. I want to find convective heat transfer coefficient as well.

Thanks in advance

Kumudu
Attached Files
File Type: docx Ground heat exchanger.docx (70.9 KB, 36 views)
Kumudu is offline   Reply With Quote

Old   December 19, 2013, 16:34
Default
  #13
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi Kumudu,

a lot of question you are asking are describt in the tutorials. Please have a look at one tutorial then you will see how to set your BC.

You will find to set:

- U
- T
- p
- p_rgh
- k
- epsilon

Additionally:

p = total pressure
p_rgh = p - rho *gh (total pressure - hydrodynamic pressure)


You inlet BC for U should be a fixedValue. Not inletOutlet.
To define your BC please refer to the tutorials. You set every condition and initial solution in the folder 0/

Regards
Tobi
Tobi is offline   Reply With Quote

Old   December 19, 2013, 17:22
Default
  #14
Member
 
Kumudu
Join Date: Oct 2013
Posts: 63
Rep Power: 12
Kumudu is on a distinguished road
Hi Tobi,

Thanks for the reply. Can you send me a link for chtMultiRegionFoam tutorial. I have gone through planeWall 2D tutorial. But, I didn't exactly find answer to my questions.

So, at the fluid -fluid interface, how should I set the boundary conditions for velocity and temperature. I have seen only solid-fluid interface interaction example. But, can you explain, boundary conditions for pressure at fluid-fluid interface as well. At the inlet, of the first and second pipe, I have to give the zeroGradient for pressure. I think this would be the same for fluid-fluid interface. Am I correct?
Kumudu is offline   Reply With Quote

Old   December 20, 2013, 06:31
Default
  #15
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

I had a look at your document and did not see any fluid-fluid Interface ?

At least a fluid fluid Interface is not possible in my physical world - only if you have two immiscible fluids like air - water. If you have water water you always Need a solid between, arenīt you


Hmmm if you are asking for tutorials it seems that you are a beginner with openfoam. Did you ever read the user-guide?

Code:
 
mkdir -p $FOAM_RUN
cp -r $FOAUM_TUTORIALS $FOAM_RUN
 
cd $FOAM_RUN
cd tutorials/heatTransfer/chtMultiRegionSimpleFoam/
There you find the tutorials.

Regards Tobi
Tobi is offline   Reply With Quote

Old   December 20, 2013, 09:00
Default
  #16
Member
 
Kumudu
Join Date: Oct 2013
Posts: 63
Rep Power: 12
Kumudu is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Hi,

I had a look at your document and did not see any fluid-fluid Interface ?

At least a fluid fluid Interface is not possible in my physical world - only if you have two immiscible fluids like air - water. If you have water water you always Need a solid between, arenīt you


Hmmm if you are asking for tutorials it seems that you are a beginner with openfoam. Did you ever read the user-guide?

Code:
 
mkdir -p $FOAM_RUN
cp -r $FOAUM_TUTORIALS $FOAM_RUN
 
cd $FOAM_RUN
cd tutorials/heatTransfer/chtMultiRegionSimpleFoam/
There you find the tutorials.

Regards Tobi
***************************************

Hi Tobi,

Thanks for the reply. Yes.I am new to OpenFoam and I thought you are talking about some tutorials available in Internet. I went through the tutorial in the OpenFoam , run directory.

Actually, I divided my fluid domain into three regions waterInPipe1,waterInPipe2, waterInPipeConnect since I wanted to define the fluid region using only topoSetDict without defining different blocks in the blockMesh. Yes, I know that I can define this water in the pipe as a one fluid region.Then, I will have one inlet and outlet and others are walls.

As I wanted to change the diameter and length of the U-pipe and simulate again and again, I just defined it as three fluid regions. So, is there any easy method to define this U-pipe as a one fluid region and change the diameter and length whenever I want to change?

Thanks again
Kumudu is offline   Reply With Quote

Old   December 29, 2013, 16:35
Default
  #17
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
For future readers: the line of questions and answers for Kumudu's problem is continued on this thread: http://www.cfd-online.com/Forums/ope...egionfoam.html
wyldckat is offline   Reply With Quote

Reply

Tags
unequal temperature


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
[OpenFOAM] plot temperature vs time in paraview - chtMultiRegionFoam phsieh2005 ParaView 2 March 16, 2014 06:50
Inlet won't apply UDF and has temperature at 0K! tccruise Fluent UDF and Scheme Programming 2 September 14, 2012 06:08
chtMultiRegionFoam - exchange data between flow field and temperature phsieh2005 OpenFOAM Running, Solving & CFD 0 February 7, 2012 09:16
High temperature methane+air Peter FLUENT 5 January 26, 2009 18:04
Help! Coupled Vs Implicit - Total temperature sile FLUENT 3 March 10, 2003 15:58


All times are GMT -4. The time now is 01:29.