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

Temperature in chtMultiRegionSimpleFoam diverges

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 10, 2015, 10:40
Default Temperature in chtMultiRegionSimpleFoam diverges
  #1
Member
 
Join Date: Jan 2011
Posts: 45
Rep Power: 15
buffi is on a distinguished road
I have a chtMultiRegionSimpleFoam case with these boundary conditions for T:

0/inner/T (the "inner" region is a channel, heated by "outer")
Code:
dimensions      [0 0 0 1 0 0 0];

internalField   uniform 300;

boundaryField
{
  ".*"
  {
    type zeroGradient;
  }
  port_minX
  {
      type            fixedValue;
      value           $internalField;
  }
  inner_top_to_outer_bottom
  {
    type            compressible::turbulentTemperatureCoupledBaffleMixed;
    value           $internalField;
    neighbourFieldName T;
    kappa           fluidThermo;
    kappaName       none;
  }
  inner_bottom_to_outer_top
  {
    type            compressible::turbulentTemperatureCoupledBaffleMixed;
    value           $internalField;
    neighbourFieldName T;
    kappa           fluidThermo;
    kappaName       none;
  }
}
0/outer/T (the "outer" region consists of two half channels stacked on top and bottom of "inner")
Code:
dimensions      [0 0 0 1 0 0 0];

internalField   uniform 300;

boundaryField
{
  ".*"
  {
    type zeroGradient;
  }
  cyclic_half0
  {
    type cyclic;
    neighbourPatch cyclic_half1;
  }
  cyclic_half1
  {
    type cyclic;
    neighbourPatch cyclic_half0;
  }
  port_maxX
  {
    type            fixedValue;
    value           $internalField;
  }
  outer_bottom_to_inner_top
  {
    type            compressible::turbulentTemperatureCoupledBaffleMixed;
    value           $internalField;
    neighbourFieldName T;
    kappa           fluidThermo;
    kappaName       none;
  }
  outer_top_to_inner_bottom
  {
    type            compressible::turbulentTemperatureCoupledBaffleMixed;
    value           $internalField;
    neighbourFieldName T;
    kappa           fluidThermo;
    kappaName       none;
  }
}
Both flows have the same inlet temperature and there shouldn't be any net heat transfer between the two flows.

This is my fvSolution for both regions, taken from the tutorials:
Code:
solvers
{
    rho
    {
        solver          PCG
        preconditioner  DIC;
        tolerance       1e-7;
        relTol          0;
    }

    p_rgh
    {
        solver           GAMG;
        tolerance        1e-7;
        relTol           0.01;

        smoother         GaussSeidel;

        cacheAgglomeration true;
        nCellsInCoarsestLevel 10;
        agglomerator     faceAreaPair;
        mergeLevels      1;
    }

    "(U|h|k|epsilon)"
    {
        solver           PBiCG;
        preconditioner   DILU;
        tolerance        1e-7;
        relTol           1e-3;
    }
}

SIMPLE
{
    momentumPredictor on;
    nNonOrthogonalCorrectors 0;
    pRefCell        0;
    pRefValue       0;
    rhoMax          rhoMax [ 1 -3 0 0 0 ] 998.21;
    rhoMin          rhoMin [ 1 -3 0 0 0 ] 998.21;
}

relaxationFactors
{
    fields
    {
        rho             1;
        p_rgh           0.7;
    }
    equations
    {
        U               0.3;
        h               0.7;
        nuTilda         0.7;
        k               0.7;
        epsilon         0.7;
        omega           0.7;
        "ILambda.*"     0.7;
    }
}
T does not show in those, but that should be taken care of by the "h" entries.

Yet, at some point, the solver crashes with these messages:
Code:
Time = 1.189


Solving for fluid region inner
DILUPBiCG:  Solving for Ux, Initial residual = 0.008097846421495124, Final residual = 1.691752979096075e-06, No Iterations 2
DILUPBiCG:  Solving for Uy, Initial residual = 0.01202702721211336, Final residual = 4.67365575791039e-06, No Iterations 2
DILUPBiCG:  Solving for Uz, Initial residual = 0.006397124599835598, Final residual = 4.510605145494105e-06, No Iterations 2
DILUPBiCG:  Solving for h, Initial residual = 0.007301157391312279, Final residual = 4.435109962802407e-06, No Iterations 4
Min/max T:-12.32577060925731 535.8323171660503
GAMG:  Solving for p_rgh, Initial residual = 0.01418968895726693, Final residual = 0.0001296874831464765, No Iterations 17
time step continuity errors : sum local = 0.08093283579305911, global = -0.006680036867943988, cumulative = 17.0641256372114
Min/max rho:998.21 998.21

Solving for fluid region outer
DILUPBiCG:  Solving for Ux, Initial residual = 0.008011336199895795, Final residual = 3.491116546908557e-06, No Iterations 2
DILUPBiCG:  Solving for Uy, Initial residual = 0.009841596835628913, Final residual = 2.399052759444415e-07, No Iterations 3
DILUPBiCG:  Solving for Uz, Initial residual = 0.005885879944786529, Final residual = 7.480876455413755e-08, No Iterations 3
DILUPBiCG:  Solving for h, Initial residual = 0.0099630601584084, Final residual = 7.906802165940321e-06, No Iterations 4
Min/max T:81.79784497198106 631.2266884469128
GAMG:  Solving for p_rgh, Initial residual = 0.01235827895320395, Final residual = 0.0001215156797075635, No Iterations 18
time step continuity errors : sum local = 0.1279884342953329, global = 0.0148764476852957, cumulative = 17.0790020848967
Min/max rho:998.21 998.21
ExecutionTime = 246.96 s  ClockTime = 248 s

Time = 1.19


Solving for fluid region inner
DILUPBiCG:  Solving for Ux, Initial residual = 0.008105661650416348, Final residual = 1.693579077882211e-06, No Iterations 2
DILUPBiCG:  Solving for Uy, Initial residual = 0.01204669200529919, Final residual = 4.699218819825913e-06, No Iterations 2
DILUPBiCG:  Solving for Uz, Initial residual = 0.006395075395368484, Final residual = 4.432119799919217e-06, No Iterations 2
DILUPBiCG:  Solving for h, Initial residual = 0.007377178229246799, Final residual = 4.29591370137443e-06, No Iterations 4


--> 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 /local/brf/OpenFOAM/OpenFOAM-2.2.0/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 76.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#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 at ??:?
#3  Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::rhoConst<Foam::specie> >, Foam::sensibleEnthalpy> > > >::calculate() at ??:?
#4  Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::rhoConst<Foam::specie> >, Foam::sensibleEnthalpy> > > >::correct() at ??:?
#5  
 at ??:?
#6  __libc_start_main in "/lib64/libc.so.6"
#7  
 at /home/abuild/rpmbuild/BUILD/glibc-2.17/csu/../sysdeps/x86_64/start.S:126
Aborted
The reported min/max temperatures at the beginning of this log snippet don't look reasonable at all. What can be possible reasons for that? Is it possible that the baffle patches are not coupled correctly? This is how I coupled them with a createPatchDict:

Code:
pointSync false;

// Patches to create.
patches
(
  {
    // Name of new patch
    name inner_top_to_outer_bottom;

    // Dictionary to construct new patch from
    patchInfo
    {
      sampleRegion outer;
      samplePatch outer_bottom_to_inner_top;
      type mappedWall;
      sampleMode nearestPatchFaceAMI;
      offsetMode uniform;
      offset (0 0 0);
    }

    // How to construct: either from 'patches' or 'set'
    constructFrom set;

    // If constructFrom = set : name of faceSet
    set wallTopFaces;
  }
  {
    // Name of new patch
    name inner_bottom_to_outer_top;

    // Dictionary to construct new patch from
    patchInfo
    {
      sampleRegion outer;
      samplePatch outer_top_to_inner_bottom;
      type mappedWall;
      sampleMode nearestPatchFaceAMI;
      offsetMode uniform;
      offset (0 0 0);
    }

    // How to construct: either from 'patches' or 'set'
    constructFrom set;

    // If constructFrom = set : name of faceSet
    set wallBottomFaces;
  }
);
Any ideas what could be wrong?

Best regards
buffi is offline   Reply With Quote

Old   July 10, 2015, 15:25
Default
  #2
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22
zfaraday will become famous soon enough
Only two fluid regions are defined in your case? Maybe I cannot help you too much becuase I don't know if the patch creation process is correct or not. However, as a quick advice, try decreasing the relaxation factor for h for the region inner, which the one that crashes. Otherwise, try reducing both relaxation factors and run the solver again.

Hope it helps a bit.

Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   July 13, 2015, 04:58
Default
  #3
Member
 
Join Date: Jan 2011
Posts: 45
Rep Power: 15
buffi is on a distinguished road
I reduced the relaxation factor for equations->h to 0.1 in both regions, now it crashes in region "outer" with the same message, and temperatures in both regions are far off (inner min/max T:53.20372142006549 1117.386976095008). There's still something wrong, and I think it's related to the boundary conditions.
buffi is offline   Reply With Quote

Old   July 13, 2015, 07:43
Default
  #4
Member
 
Join Date: Jan 2011
Posts: 45
Rep Power: 15
buffi is on a distinguished road
it turned out that this was related to an error in my BCs for U. One of them was not a no-slip BC, but zeroGradient. I should have posted my whole case instead of just those parts which I thought contained the error.
buffi is offline   Reply With Quote

Old   July 13, 2015, 11:57
Default
  #5
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22
zfaraday will become famous soon enough
I think that zeroGradient and no slip BC do exactly tha same... The problem you experience may be related to the coupling boundaries, have you tried to check which cells provoke the crash with paraview?
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   July 14, 2015, 08:27
Default
  #6
Member
 
Join Date: Jan 2011
Posts: 45
Rep Power: 15
buffi is on a distinguished road
No, no-slip and zeroGradient don't do the same thing. Consider a uniform flow that would go through a wall, like this:
Code:
-----> | (----->)
-----> | (----->)
-----> | (----->)
The zeroGradient BC would allow that. The no-slip BC wouldn't, because it forces the velocity to be zero at the wall.
buffi is offline   Reply With Quote

Old   October 5, 2016, 02:35
Default
  #7
Member
 
Join Date: Jul 2013
Posts: 39
Rep Power: 13
cfdsolver1 is on a distinguished road
Quote:
Originally Posted by zfaraday View Post
I think that zeroGradient and no slip BC do exactly tha same... The problem you experience may be related to the coupling boundaries, have you tried to check which cells provoke the crash with paraview?
is there any easy way to do this zfaraday?
cfdsolver1 is offline   Reply With Quote

Old   November 18, 2016, 11:13
Default
  #8
Senior Member
 
Laurent DASTUGUE
Join Date: May 2014
Location: Chartres, France
Posts: 122
Rep Power: 12
laurentD is on a distinguished road
Hi,
i have the same problem but with the solver : chtMultiRegionFoam.
Any explanations on this topic ?

Because in a transient case, i can't play with the relaxation factor to not break the continuity.
__________________
Laurent D.
laurentD 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
Shadow Wall and temperature norger FLUENT 10 September 28, 2019 12:43
fluid flow but temperature raises from nowhere? mxcfd STAR-CCM+ 5 September 16, 2014 06:46
How to get free stream temperature in boundary condition saharesobh FLUENT 0 October 9, 2012 18:12
where is the calculation of the temperature field Tobi OpenFOAM 1 July 30, 2012 11:40
monitoring point of total temperature rogbrito FLUENT 0 June 21, 2009 18:31


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