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

Heattransfer of a pipe using chtMultiRegionFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 22, 2013, 15:44
Default Heattransfer of a pipe using chtMultiRegionFoam
  #1
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 21
Bloerb will become famous soon enough
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
File Type: png pipe.png (43.1 KB, 247 views)
Attached Files
File Type: zip laminar.zip (74.6 KB, 334 views)

Last edited by Bloerb; September 25, 2013 at 11:34.
Bloerb is offline   Reply With Quote

Old   September 23, 2013, 17:08
Default
  #2
Member
 
Jace
Join Date: Oct 2012
Posts: 77
Rep Power: 16
zhengzh5 is on a distinguished road
Quote:
Originally Posted by Bloerb View Post
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.
zhengzh5 is offline   Reply With Quote

Old   September 24, 2013, 01:05
Default
  #3
Member
 
Gabriel de PInho RImoli
Join Date: Mar 2013
Posts: 49
Rep Power: 13
Grimoli is on a distinguished road
I cant see the arquives
Grimoli is offline   Reply With Quote

Old   September 24, 2013, 01:28
Default
  #4
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 21
Bloerb will become famous soon enough
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<Thermo, Type>::T(scalar f, scalar T0, scalar (thermo<Thermo, Type>::*F)(const scalar) const, scalar (thermo<Thermo, Type>::*dFdT)(const scalar) const, scalar (thermo<Thermo, Type>::*limit)(const scalar) const) const
[2]     in file /home/opencfd/OpenFOAM/OpenFOAM-2.2.1/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 
[0]
Bloerb is offline   Reply With Quote

Old   September 24, 2013, 16:23
Default
  #5
Member
 
Jace
Join Date: Oct 2012
Posts: 77
Rep Power: 16
zhengzh5 is on a distinguished road
Quote:
Originally Posted by Bloerb View Post
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<Thermo, Type>::T(scalar f, scalar T0, scalar (thermo<Thermo, Type>::*F)(const scalar) const, scalar (thermo<Thermo, Type>::*dFdT)(const scalar) const, scalar (thermo<Thermo, Type>::*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.
zhengzh5 is offline   Reply With Quote

Old   September 24, 2013, 17:10
Default Helpinf
  #6
New Member
 
sasan
Join Date: Sep 2013
Posts: 28
Rep Power: 13
Sasy is on a distinguished road
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??
Nostradamus likes this.
Sasy is offline   Reply With Quote

Old   September 24, 2013, 17:14
Default
  #7
Member
 
Jace
Join Date: Oct 2012
Posts: 77
Rep Power: 16
zhengzh5 is on a distinguished road
Quote:
Originally Posted by Sasy View Post
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?
mizzou likes this.
zhengzh5 is offline   Reply With Quote

Old   September 24, 2013, 17:36
Default
  #8
New Member
 
sasan
Join Date: Sep 2013
Posts: 28
Rep Power: 13
Sasy is on a distinguished road
Quote:
Originally Posted by zhengzh5 View Post
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?
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?
Sasy is offline   Reply With Quote

Old   September 24, 2013, 18:13
Default
  #9
Member
 
Jace
Join Date: Oct 2012
Posts: 77
Rep Power: 16
zhengzh5 is on a distinguished road
Quote:
Originally Posted by Sasy View Post
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!
zhengzh5 is offline   Reply With Quote

Old   September 25, 2013, 02:49
Default
  #10
New Member
 
sasan
Join Date: Sep 2013
Posts: 28
Rep Power: 13
Sasy is on a distinguished road
Quote:
Originally Posted by zhengzh5 View Post
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,
Sasy is offline   Reply With Quote

Old   September 25, 2013, 11:07
Default
  #11
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 21
Bloerb will become famous soon enough
Sasy, opening your own topic for that would have been better instead of posting here with unrelated things to my problem. Nevertheless let me answer that question:
chtMultiRegion can solve incompressible fluids. My entire topic states that. Download my case and look at the propertys of the water phase. In addition the tutorial case Liquidheater is probably a good start for that.

On demand here a few links to the case with a fine mesh and some improvements.
http://www.file-upload.net/download-...nt.tar.gz.html

https://mega.co.nz/#!Z8JzjBZI!Swl7T1...sWLQOzZbRjUW1U
I have not uploaded stuff for a while now. If another hoster would be appreciated please feel free to contact me. You can start the case by typing
chtMultiRegionFoam
paraFoam -touchAll
paraFoam -builtin
The SplitMeshRegion or other commands are not included. For simplicity i did not use changedictionary or other tweaks.
It is probably an error of mesh or boundary condition. Some tips would be really appriciated

Bloerb is offline   Reply With Quote

Old   November 4, 2013, 08:13
Default
  #12
Member
 
Marta's Avatar
 
Marta Lazzarin
Join Date: Jun 2009
Location: Italy
Posts: 71
Rep Power: 17
Marta is on a distinguished road
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
Marta is offline   Reply With Quote

Old   November 27, 2013, 16:14
Default
  #13
New Member
 
Y
Join Date: Feb 2013
Location: The Earth
Posts: 25
Rep Power: 13
peteryuan is on a distinguished road
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<Thermo, Type>::T(scalar f, scalar T0, scalar (thermo<Thermo, Type>::*F)(const scalar) const, scalar (thermo<Thermo, Type>::*dFdT)(const scalar) const, scalar (thermo<Thermo, Type>::*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::hConstThermo<Foam::rhoConst<Foam::specie> >, Foam::sensibleEnthalpy>::T(double, double, double, double (Foam::species::thermo<Foam::hConstThermo<Foam::rhoConst<Foam::specie> >, Foam::sensibleEnthalpy>::*)(double, double) const, double (Foam::species::thermo<Foam::hConstThermo<Foam::rhoConst<Foam::specie> >, Foam::sensibleEnthalpy>::*)(double, double) const, double (Foam::species::thermo<Foam::hConstThermo<Foam::rhoConst<Foam::specie> >, Foam::sensibleEnthalpy>::*)(double) const) const in "/opt/openfoam222/platforms/linuxGccDPOpt/lib/libfluidThermophysicalModels.so"
#3  Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::rhoConst<Foam::specie> >, Foam::sensibleEnthalpy> > > >::calculate() in "/opt/openfoam222/platforms/linuxGccDPOpt/lib/libfluidThermophysicalModels.so"
#4  Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::rhoConst<Foam::specie> >, 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)
peteryuan is offline   Reply With Quote

Old   December 24, 2013, 13:07
Default
  #14
Member
 
Sergey
Join Date: Nov 2013
Posts: 87
Rep Power: 13
skuznet is on a distinguished road
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?
skuznet is offline   Reply With Quote

Old   December 25, 2013, 05:31
Default
  #15
New Member
 
Manula Pathirana
Join Date: Dec 2013
Posts: 2
Rep Power: 0
Manula is on a distinguished road
Quote:
Originally Posted by skuznet View Post
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
Manula is offline   Reply With Quote

Old   December 30, 2013, 01:22
Default
  #16
Member
 
Sergey
Join Date: Nov 2013
Posts: 87
Rep Power: 13
skuznet is on a distinguished road
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
File Type: gz fin2.tar.gz (6.8 KB, 79 views)
skuznet is offline   Reply With Quote

Old   March 24, 2014, 17:17
Default
  #17
Member
 
Jace
Join Date: Oct 2012
Posts: 77
Rep Power: 16
zhengzh5 is on a distinguished road
Quote:
Originally Posted by skuznet View Post
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.
zhengzh5 is offline   Reply With Quote

Old   March 25, 2014, 11:39
Default
  #18
Member
 
Sergey
Join Date: Nov 2013
Posts: 87
Rep Power: 13
skuznet is on a distinguished road
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
File Type: jpg Ufluid.jpg (44.9 KB, 165 views)
File Type: jpg Tfluid.jpg (40.7 KB, 112 views)
File Type: jpg Tsolid.jpg (39.0 KB, 122 views)
File Type: jpg UCSmall.jpg (93.9 KB, 126 views)
skuznet is offline   Reply With Quote

Old   March 25, 2014, 11:41
Default
  #19
Member
 
Sergey
Join Date: Nov 2013
Posts: 87
Rep Power: 13
skuznet is on a distinguished road
Here are my cases: transient and steady
Attached Files
File Type: gz UCsnappyW.tar.gz (83.2 KB, 75 views)
File Type: gz UCsnappyWSteady1.tar.gz (83.5 KB, 64 views)
skuznet is offline   Reply With Quote

Old   March 25, 2014, 12:43
Default
  #20
Member
 
Jace
Join Date: Oct 2012
Posts: 77
Rep Power: 16
zhengzh5 is on a distinguished road
Quote:
Originally Posted by skuznet View Post
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,
zhengzh5 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
[DesignModeler] DesignModeler Pipe within pipe shields ANSYS Meshing & Geometry 13 November 25, 2018 23:14
Heattransfer between two fluids with chtMultiRegionFoam Black-Pearl OpenFOAM Running, Solving & CFD 1 September 7, 2013 09:03
fluid to solid heattransfer with chtMultiRegionFoam schteff OpenFOAM 5 August 20, 2010 08:45
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 10:11
fluid flow fundas ram Main CFD Forum 5 June 17, 2000 22:31


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