# Heattransfer of a pipe using chtMultiRegionFoam

 Register Blogs Members List Search Today's Posts Mark Forums Read

September 22, 2013, 14:44
Heattransfer of a pipe using chtMultiRegionFoam
#1
New Member

Stephan
Join Date: Sep 2013
Posts: 5
Rep Power: 3
Hi,

i am trying to simulate the heat transfer from a steel pipe to the water inside of it using chtMultiRegionFoam. I started out with a very loose Mesh and the easiest geometry i could think of. The outer wall is supposed to have a fixed temperature, and the water has a fixed flow rate.

I am interested in the pressure loss and how much heat the water can carry away. The actual geometry is very complex and the flow is quite turbulent. Therefore i tried to implement a turbulence model (k-epsilon) to it. But even in this easy case i can not get it to work. The laminar version works fine. I have never worked with turbulent flow before and changed the files provided by the chtMultiRegionFoam tutorials. Could this be a problem of the mesh?

When running the case with turbulence it states "Maximum number of iterations exceeded"
Some tips on how to implement this properly would be really appreciated. Please scroll down for an updated download file uploaded by me.
Attached Images
 pipe.png (43.1 KB, 106 views)
Attached Files
 laminar.zip (74.6 KB, 149 views)

Last edited by Bloerb; September 25, 2013 at 10:34.

September 23, 2013, 16:08
#2
Member

Jace
Join Date: Oct 2012
Posts: 77
Rep Power: 5
Quote:
 Originally Posted by Bloerb Hi, i am trying to simulate the heat transfer from a steel pipe to the water inside of it using chtMultiRegionFoam. I started out with a very loose Mesh and the easiest geometry i could think of. The outer wall is supposed to have a fixed temperature, and the water has a fixed flow rate. I am interested in the pressure loss and how much heat the water can carry away. The actual geometry is very complex and the flow is quite turbulent. Therefore i tried to implement a turbulence model (k-epsilon) to it. But even in this easy case i can not get it to work. The laminar version works fine. I have never worked with turbulent flow before and changed the files provided by the chtMultiRegionFoam tutorials. Could this be a problem of the mesh? When running the case with turbulence it states "Maximum number of iterations exceeded" Some tips on how to implement this properly would be really appreciated.
Hi,

Doesn't the chtMultiRegionFoam handle turbulence? Correct me if I'm wrong. Looking at the snappyMultiRegionHeater tutorial, I think you can switch on the turbulence by specifying Kepsilon model in the RASproperties instead of laminar.

 September 24, 2013, 00:05 #3 Member   Gabriel de PInho RImoli Join Date: Mar 2013 Posts: 49 Rep Power: 4 I cant see the arquives

 September 24, 2013, 00:28 #4 New Member   Stephan Join Date: Sep 2013 Posts: 5 Rep Power: 3 It can. My problem is, that it won't solve any more as soon as i turn that switch. Instead of heating up the water inside of the pipe the temperature drops significantly and the solver crashes. Code: ``` epsilon: dimensions [0 2 -3 0 0 0 0]; internalField uniform 0.01; boundaryField { water_inlet { type fixedValue; value uniform 0.01; } water_outlet { type inletOutlet; value uniform 0.01; inletValue uniform 0.01; } water_steel { type compressible::epsilonWallFunction; value uniform 0.01; } } k dimensions [0 2 -2 0 0 0 0]; internalField uniform 0.05; boundaryField { water_inlet { type inletOutlet; inletValue uniform 0.05; value uniform 0.05; } water_outlet { type zeroGradient; value uniform 0.05; } water_steel { type compressible::kqRWallFunction; value uniform 0.05; } }``` I tryed refining the mesh in the actual geometry. But 4 million cells just won't do the trick. Code: ```[2] --> FOAM FATAL ERROR: [2] Maximum number of iterations exceeded [2] [2] From function thermo::T(scalar f, scalar T0, scalar (thermo::*F)(const scalar) const, scalar (thermo::*dFdT)(const scalar) const, scalar (thermo::*limit)(const scalar) const) const [2] in file /home/opencfd/OpenFOAM/OpenFOAM-2.2.1/src/thermophysicalModels/specie/lnInclude/thermoI.H at line [0]```

September 24, 2013, 15:23
#5
Member

Jace
Join Date: Oct 2012
Posts: 77
Rep Power: 5
Quote:
 Originally Posted by Bloerb It can. My problem is, that it won't solve any more as soon as i turn that switch. Instead of heating up the water inside of the pipe the temperature drops significantly and the solver crashes. Code: ``` epsilon: dimensions [0 2 -3 0 0 0 0]; internalField uniform 0.01; boundaryField { water_inlet { type fixedValue; value uniform 0.01; } water_outlet { type inletOutlet; value uniform 0.01; inletValue uniform 0.01; } water_steel { type compressible::epsilonWallFunction; value uniform 0.01; } } k dimensions [0 2 -2 0 0 0 0]; internalField uniform 0.05; boundaryField { water_inlet { type inletOutlet; inletValue uniform 0.05; value uniform 0.05; } water_outlet { type zeroGradient; value uniform 0.05; } water_steel { type compressible::kqRWallFunction; value uniform 0.05; } }``` I tryed refining the mesh in the actual geometry. But 4 million cells just won't do the trick. Code: ```[2] --> FOAM FATAL ERROR: [2] Maximum number of iterations exceeded [2] [2] From function thermo::T(scalar f, scalar T0, scalar (thermo::*F)(const scalar) const, scalar (thermo::*dFdT)(const scalar) const, scalar (thermo::*limit)(const scalar) const) const [2] in file /home/opencfd/OpenFOAM/OpenFOAM-2.2.1/src/thermophysicalModels/specie/lnInclude/thermoI.H at line [0]```
I'm not sure if that will solve the problem, but you can give it a try.

in your BC for k and epsilon for the inlet and outlet, I'm not quite sure if you can specify a fixedValue for them, instead use wallFunction on them similar to what you did with the wall BC.

see if that makes any difference.

 September 24, 2013, 16:10 Helpinf #6 New Member   sasan Join Date: Sep 2013 Posts: 28 Rep Power: 3 Hi Foarmers I want simulate evaporation in two phase.(gaz and liquid) with conjugate heat transfer.But i dont know i use two phase solver (such as interFoam or interPhasechangeFoam) and add solid Region or use chtMultiRegionFoam and modify for twophase??

September 24, 2013, 16:14
#7
Member

Jace
Join Date: Oct 2012
Posts: 77
Rep Power: 5
Quote:
 Originally Posted by Sasy Hi Foarmers I want simulate evaporation in two phase.(gaz and liquid) with conjugate heat transfer.But i dont know i use two phase solver (such as interFoam or interPhasechangeFoam) and add solid Region or use chtMultiRegionFoam and modify for twophase??
hey there,

you should probably use chtMultiRegionFoam as a basis and add phase change into the code. To do that, I will imagine you take the solveFluid.H from chtMultiRegionFoam and replace it with interPhaseChangeFoam (not a direct plug and play of course). Any thoughts?

September 24, 2013, 16:36
#8
New Member

sasan
Join Date: Sep 2013
Posts: 28
Rep Power: 3
Quote:
 Originally Posted by zhengzh5 hey there, you should probably use chtMultiRegionFoam as a basis and add phase change into the code. To do that, I will imagine you take the solveFluid.H from chtMultiRegionFoam and replace it with interPhaseChangeFoam (not a direct plug and play of course). Any thoughts?
Do you Know how modify SolveFluid.H for two phase?because for evaporation we have energy equation and source term with mass transfer model.i dont know how implemented this object in this solver?can you guide me?

September 24, 2013, 17:13
#9
Member

Jace
Join Date: Oct 2012
Posts: 77
Rep Power: 5
Quote:
 Originally Posted by Sasy Thank you For Reply Do you Know how modify SolveFluid.H for two phase?because for evaporation we have energy equation and source term with mass transfer model.i dont know how implemented this object in this solver?can you guide me?
Just some thoughts, I'm thinking replacing the entire content of solveFluid.H with interPhaseChangeFoam.C (only the parts solving for alpha, U, p and others) and add on a energy equation (either in h or T) before the twoPhaseProperties->correct();

There's probably going to be something broken along the way that needs to be fixed...let me know!

September 25, 2013, 01:49
#10
New Member

sasan
Join Date: Sep 2013
Posts: 28
Rep Power: 3
Quote:
 Originally Posted by zhengzh5 Just some thoughts, I'm thinking replacing the entire content of solveFluid.H with interPhaseChangeFoam.C (only the parts solving for alpha, U, p and others) and add on a energy equation (either in h or T) before the twoPhaseProperties->correct(); There's probably going to be something broken along the way that needs to be fixed...let me know!
Hi jace
Thank you For Reply and Helping
But i have another question?
chtMultiRegionFoam is for compressible fluid,But for me is incompresible fluid (water).is there chtMultiRegionFoam solver for incompresible?
Regards,

 November 4, 2013, 08:13 #12 Member     Marta Lazzarin Join Date: Jun 2009 Location: Italy Posts: 69 Rep Power: 8 Hello everybody! Do you know if, maybe thanks to one of the recent updates, OpenFOAM is now able to solve two phase flows with with conjugate heat transfer? Thanks a lot anyway

 November 27, 2013, 16:14 #13 New Member   Y Join Date: Feb 2013 Location: Dresden =) Posts: 24 Rep Power: 4 Hi Stephan, thank you so much for this case. I am using openfoam 2.2.2. As I tried to chtMultiRegionFoam the case, I always get the following message. Could you help me out? Thank you, peter Code: ```--> FOAM FATAL ERROR: Maximum number of iterations exceeded From function thermo::T(scalar f, scalar T0, scalar (thermo::*F)(const scalar) const, scalar (thermo::*dFdT)(const scalar) const, scalar (thermo::*limit)(const scalar) const) const in file /home/opencfd/OpenFOAM/OpenFOAM-2.2.2/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 76. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam222/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #1 Foam::error::abort() in "/opt/openfoam222/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #2 Foam::species::thermo >, Foam::sensibleEnthalpy>::T(double, double, double, double (Foam::species::thermo >, Foam::sensibleEnthalpy>::*)(double, double) const, double (Foam::species::thermo >, Foam::sensibleEnthalpy>::*)(double, double) const, double (Foam::species::thermo >, Foam::sensibleEnthalpy>::*)(double) const) const in "/opt/openfoam222/platforms/linuxGccDPOpt/lib/libfluidThermophysicalModels.so" #3 Foam::heRhoThermo >, Foam::sensibleEnthalpy> > > >::calculate() in "/opt/openfoam222/platforms/linuxGccDPOpt/lib/libfluidThermophysicalModels.so" #4 Foam::heRhoThermo >, Foam::sensibleEnthalpy> > > >::correct() in "/opt/openfoam222/platforms/linuxGccDPOpt/lib/libfluidThermophysicalModels.so" #5 in "/opt/openfoam222/platforms/linuxGccDPOpt/bin/chtMultiRegionFoam" #6 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6" #7 in "/opt/openfoam222/platforms/linuxGccDPOpt/bin/chtMultiRegionFoam" Aborted (core dumped)```

 December 24, 2013, 13:07 #14 Member   Sergey Join Date: Nov 2013 Posts: 86 Rep Power: 3 Hello! Were you able to solve you problem? I'm trying to solve similar problem - heat transfer with turbulent flow through very complex domain. Did you try using steady-state solver?

December 25, 2013, 05:31
#15
New Member

Manula Pathirana
Join Date: Dec 2013
Posts: 2
Rep Power: 0
Quote:
 Originally Posted by skuznet Hello! Were you able to solve you problem? I'm trying to solve similar problem - heat transfer with turbulent flow through very complex domain. Did you try using steady-state solver?

I didn't have time to look at it again. But, I will work hopefully, in this week. So, if I solve the problem I will tell you.

Best
Kumudu

December 30, 2013, 01:22
#16
Member

Sergey
Join Date: Nov 2013
Posts: 86
Rep Power: 3
Hi Stephan!

I wonder if you can take a look at my case and see if I'm using correctly BCs.

Thank you!

Sergey
Attached Files
 fin2.tar.gz (6.8 KB, 35 views)

March 24, 2014, 17:17
#17
Member

Jace
Join Date: Oct 2012
Posts: 77
Rep Power: 5
Quote:
 Originally Posted by skuznet Hi Stephan! I wonder if you can take a look at my case and see if I'm using correctly BCs. Thank you! Sergey
hey, it's been a while and not sure if you managed to solve your problem.

took a quick look, and all of your fields are using "calculated" BC, which can't be right.... did you upload the correct version?

and you need to specify the initial conditions for solidDomain and fluidDomains separately like you had for constant and system directory.

March 25, 2014, 11:39
#18
Member

Sergey
Join Date: Nov 2013
Posts: 86
Rep Power: 3
Hi zhengzh5!

I still didn't solve my problem completely. But had some progress.
I was able to obtain conformal mesh using STL geometry and snappyHexMesh utility and to set up transient and steady-state cases. The cases run OK. The velocity distribution in the fluid region and temperature distribution in the solid region looks realistic, but the temperature distribution in the fluid region doesn't look realistic. It looks that heat doesn't flow into the fluid region.
I'm not sure where is the problem, wheather it is the problem with boundary conditions or with thermophysical properties.

The boundary conditions in 0/ folder are initialy "calculated", but then they are replaced with other conditions using changeDictionry for both fluid and solid regions.

Can you please take a look at my cases? I wonder if you could see any problems with case setup?

Thank you!
Attached Images
 Ufluid.jpg (44.9 KB, 56 views) Tfluid.jpg (40.7 KB, 40 views) Tsolid.jpg (39.0 KB, 44 views) UCSmall.jpg (93.9 KB, 47 views)

March 25, 2014, 11:41
#19
Member

Sergey
Join Date: Nov 2013
Posts: 86
Rep Power: 3
Here are my cases: transient and steady
Attached Files
 UCsnappyW.tar.gz (83.2 KB, 30 views) UCsnappyWSteady1.tar.gz (83.5 KB, 21 views)

March 25, 2014, 12:43
#20
Member

Jace
Join Date: Oct 2012
Posts: 77
Rep Power: 5
Quote:
 Originally Posted by skuznet Hi zhengzh5! I still didn't solve my problem completely. But had some progress. I was able to obtain conformal mesh using STL geometry and snappyHexMesh utility and to set up transient and steady-state cases. The cases run OK. The velocity distribution in the fluid region and temperature distribution in the solid region looks realistic, but the temperature distribution in the fluid region doesn't look realistic. It looks that heat doesn't flow into the fluid region. I'm not sure where is the problem, wheather it is the problem with boundary conditions or with thermophysical properties. The boundary conditions in 0/ folder are initialy "calculated", but then they are replaced with other conditions using changeDictionry for both fluid and solid regions. Can you please take a look at my cases? I wonder if you could see any problems with case setup? Thank you!
hey Sergey,

sorry, didn't notice that you were using changeDictionary for the initial conditions.

1. I don't have time to run your cases yet, but what's the dimension for your geometry? I noticed that your fluid flow is 0.1 m/s, and the fluid entering the domain is set at 300K. Therefore, if the fluid doesn't stay in the domain long enough, it wouldn't pick up too much energy from the heated solid.

2. for your temperature BC at the outlet. try using zeroGradient instead of inletOutlet. I think with your current setup, you're telling the solver that in case there's any fluid flowing back into the domain, the temperature should be set at 300K. In reality, the temperature should be the temperature of the fluid exiting the domain.

3. you can always try using polynomial thermophysical instead of constant properties if you expect the temperature to vary quite a bit from your reference value in order to account of varying Cp, viscosity and kappa.

Lets give that a shot and see =)

Regards,

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post [DesignModeler] DesignModeler Pipe within pipe shields ANSYS Meshing & Geometry 12 April 30, 2015 03:58 Black-Pearl OpenFOAM Running, Solving & CFD 1 September 7, 2013 08:03 schteff OpenFOAM 5 August 20, 2010 07:45 Abhi Main CFD Forum 12 July 8, 2002 09:11 ram Main CFD Forum 5 June 17, 2000 21:31

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