CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   chtMultiregionFoam--unequal temperature at coupled patches (https://www.cfd-online.com/Forums/openfoam/106731-chtmultiregionfoam-unequal-temperature-coupled-patches.html)

zakir hussain September 6, 2012 11:05

chtMultiregionFoam--unequal temperature at coupled patches
 
4 Attachment(s)
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

wyldckat September 9, 2012 13:11

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

zakir hussain September 10, 2012 21:06

The Residuals of my calculation
 
1 Attachment(s)
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

zakir hussain September 11, 2012 10:25

why can't I get a good temperature curve
 
5 Attachment(s)
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

wyldckat September 11, 2012 17:12

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

lg88 September 14, 2012 10:52

I have met the same problem with you!If you have solved the problem,just let me know!Thank you


regards!
lg88

zakir hussain September 14, 2012 11:09

4 Attachment(s)
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

wyldckat September 15, 2012 07:52

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

zakir hussain September 21, 2012 10:53

4 Attachment(s)
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

wyldckat September 23, 2012 11:34

3 Attachment(s)
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!

Tobi September 24, 2012 03:53

Hi all,

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

http://ww3.cad.de/foren/ubb/uploads/...ht_neewbie.png


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

Kumudu December 19, 2013 10:40

1 Attachment(s)
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

Tobi December 19, 2013 16:34

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

Kumudu December 19, 2013 17:22

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?

Tobi December 20, 2013 06:31

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 :D - 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

Kumudu December 20, 2013 09:00

Quote:

Originally Posted by Tobi (Post 467174)
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 :D - 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

wyldckat December 29, 2013 16:35

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


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