CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Heattransfer of a pipe using chtMultiRegionFoam (https://www.cfd-online.com/Forums/openfoam-solving/123840-heattransfer-pipe-using-chtmultiregionfoam.html)

Bloerb September 22, 2013 14:44

Heattransfer of a pipe using chtMultiRegionFoam
 
2 Attachment(s)
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.

zhengzh5 September 23, 2013 16:08

Quote:

Originally Posted by Bloerb (Post 453002)
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.

Grimoli September 24, 2013 00:05

I cant see the arquives

Bloerb September 24, 2013 00:28

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]


zhengzh5 September 24, 2013 15:23

Quote:

Originally Posted by Bloerb (Post 453242)
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.

Sasy September 24, 2013 16:10

Helpinf
 
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??

zhengzh5 September 24, 2013 16:14

Quote:

Originally Posted by Sasy (Post 453375)
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?

Sasy September 24, 2013 16:36

Quote:

Originally Posted by zhengzh5 (Post 453376)
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?

zhengzh5 September 24, 2013 17:13

Quote:

Originally Posted by Sasy (Post 453382)
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!

Sasy September 25, 2013 01:49

Quote:

Originally Posted by zhengzh5 (Post 453387)
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,

Bloerb September 25, 2013 10:07

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

http://picload.org/thumbnail/olaprpa/3.pnghttp://picload.org/thumbnail/olaprpr/2.pnghttp://picload.org/thumbnail/olapriw/1.png

Marta November 4, 2013 07:13

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

peteryuan November 27, 2013 15:14

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)


skuznet December 24, 2013 12:07

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?

Manula December 25, 2013 04:31

Quote:

Originally Posted by skuznet (Post 467551)
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

skuznet December 30, 2013 00:22

1 Attachment(s)
Hi Stephan!

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

Thank you!

Sergey

zhengzh5 March 24, 2014 16:17

Quote:

Originally Posted by skuznet (Post 468059)
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.

skuznet March 25, 2014 10:39

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

skuznet March 25, 2014 10:41

2 Attachment(s)
Here are my cases: transient and steady

zhengzh5 March 25, 2014 11:43

Quote:

Originally Posted by skuznet (Post 482043)
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,


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