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

Divergent temperature in chtMultiRegion(Simple)Foam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 29, 2014, 05:43
Default Divergent temperature in chtMultiRegion(Simple)Foam
  #1
New Member
 
akrasemann
Join Date: Dec 2013
Posts: 17
Rep Power: 12
akrasemann is on a distinguished road
Hi,

first of all a summary of my installed software:
Ubuntu 13.10
OpenFOAM 2.2.2
ParaView 3.12.0
enGrid 1.4.0

What I would like to achieve is a set up capable of assessing both heat transfer (conduction, convection and radiation) and flow in a rather complex structure. In best case a 3D steady state model as well as a 3D transient model will be achieved.

Starting from both the tutorial cases 'multiRegionHeater' for the transient and steady state version of the chtMultiRegion-solver, I'm in the process of adapting the set up to my own needs, but useing a plane wall (and neglecting radiation) in order to link results to analytical solutions in a first step. By doing that I face the issue that my temperatures do not converge and causes the solver to stop with the following error:

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
[3]
[3]
[3] --> FOAM FATAL ERROR:
[3] Maximum number of iterations exceeded
[3]
[3]     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
[3]     in file /home/opencfd/OpenFOAM/OpenFOAM-2.2.2/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 76.
[3]
FOAM parallel run aborting
By using the search function within this forum I got several hints on solving this issue:
  • Mesh quality
  • Boundary and initial conditions
  • Changing the number of iterations within the called function (not recommended)
In the following a description of what I was doing:
https://www.dropbox.com/s/x7b35dsaj6ao6r7/Geometry.pdf

As I set it up as a 3D case, although I am aware that for this problem a 2D case is sufficient, apart from the depicted patches (in red) there are <regionname>_front and <regionname>_back patches.

Regarding the mesh:
The mesh is generated in enGrid (1.4.0) and then exported to OpenFOAM using the OpenFOAM (polyhedral) export function. My mesh related questions were already answered by wyldckat: http://www.cfd-online.com/Forums/eng...gion-case.html
I am aware that a mesh generated by the blockMesh utility would suit that problem very well, but as I would like to go to a more complex structure, I try using the same process of setting up the case as I would do for future application. Due to the straightforward boundary layer refinement implemented in enGrid I would like to follow that path.
What is important to note is that by using the enGrid export function, the OpenFOAM set up does not follow the process of splitMeshRegions and changeDictionaryDict to account for multiple regions.

Regarding Boundary and initial conditions:

As I'm using a k-epsilon turbulence model, I had a look at http://www.cfd-online.com/Tools/turbulence.php, the referred explanations on the single entities that are used for calculating k and epsilon as well as the OpenFOAM user guide, which explains on these within section 2.1.8 (Lid driven cavity flow tutorial).
I ended up with the following equations:
k = 3/2*(sqrt(U_x^2 + U_y^2 + U_z^2)*I)^2, where U_i are the mean flow velocities and I is the turbulence intensity
epsilon = (C_mu^(0.75)*k^(1.5))/(l_t), where C_mu is a constant (0.09) and l_t is the turbulent length scale, which needs to be estimated.
For the plane wall case I use l_t = L_char * 0.4*delta, where L_char is a characteristic length (1.5m x-dimension) and delta the boundary layer thickness (4.91*L_char/sqrt(Re_x))

I then set up the case using the derived k and epsilon values, according to the geometry, fluid properties and individual flow. Interestingly I face the reported error in the laminar region (U=0.1, U=1), but a turbulent case (U=10) works fine:
https://www.dropbox.com/s/si9y50brwc...ady_U10.tar.gz
Increasing the velocity to U=50 causes again troubles.
None of the transient settings worked out:
https://www.dropbox.com/s/gj62ozuik5...ent_U10.tar.gz

To resolve that i had a closer look at http://openfoamwiki.net/index.php/Ge..._-_planeWall2D and the OF2.2 case. I ran the provided case (U0.1) without any troubles. Even U=1 without changing k and epsilon worked fine. Switching to a turbulent scenario (U=10) and applying the above mentioned equations to the scenario produced a solution.
By the way I adapted the tutorial for running it in parallel. Please check the ChangeLog:
https://www.dropbox.com/s/wwxv9y7zzi...arallel.tar.gz

I realized that the k and epsilon values for the laminar region differs enormously from mine, so I used these values for my own set up, but again the solver crashes due to divergent temperature solutions, as stated above.

So I really am confused about how to set the case. I also do not see big differences in the boundary and initial conditions after looking at them for two days. All fvSolution and fvSchemes are exactly the same.

Sorry for the lengthy explanation, but I'm happy to share my documentation with the community after I resolved these issues.

Greetings,

Andreas
akrasemann is offline   Reply With Quote

Old   January 29, 2014, 06:48
Default
  #2
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
hello,
Did you check where your temperature drop rise to the limit ?
Because i suspect that you get bad temperature value at wall boundary, using turbulence k-e model.

If this is the case, you may try to check / modify your wall BC (turbulence, mut, T).
In some case, switching to another (adapted) turbulence model may solve your trouble. Another way is to switch back to 1order upwind for turbulence and temperature, and use limiter.

Anyway, if you find a better solution, don't hesitate to post here.

Regards,
olivier
olivierG is offline   Reply With Quote

Old   January 29, 2014, 12:05
Default
  #3
New Member
 
akrasemann
Join Date: Dec 2013
Posts: 17
Rep Power: 12
akrasemann is on a distinguished road
Hi Oliver,

thank you very much for your hints. Indeed the issues occur within the boundary layer. What I am surprised about is that in the 2D Wiki cases everything works fine. As soon as I use my mesh (3D) and the same settings as in the 2D Wiki cases including the front and back faces as symmetryPlane the solver crashes in all cases except when U=10.
Does the additional dimension influence the turbulence model that much? I am aware that turbulent flows are much more complex in 3D but I thought the model could handle that.

You are suggesting to switch to another turbulence model. What exactly are you thinking of? A k-omega-STT model?

Andreas
akrasemann is offline   Reply With Quote

Old   January 29, 2014, 12:35
Default
  #4
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
Hello,

I faced once this use, but i don't remember how i solved this. This clearly come from the boundary layer, which i suspect to not behave well with temperature gradient, thus viscosity/density gradient.
Try to switch from k-e realizable to RNG or the opposite, or kwSST.

Check also your mut BC (? try the mutSpaldingWallFunction).

Anyway if you find the root of this issue, post it.

regards,
olivier
olivierG is offline   Reply With Quote

Old   January 30, 2014, 10:55
Default
  #5
New Member
 
akrasemann
Join Date: Dec 2013
Posts: 17
Rep Power: 12
akrasemann is on a distinguished road
Hi,

I've tried now the following turbulence models:
  1. kEpsilon
  2. kOmegaSST
  3. RNGkEpsilon
  4. realizableKE
neither of them could produce a solution. Critical cells are within the boundary layer close to the outlet.

Additionally I tried both mutUWallFunction and mutUSpaldingWallFunction, but both were unsuccessful.


I really wonder that there is no solution to this issue as I see several threads in this forum discussing this particular error. Unfortunately all provided tutorials run in a laminar case. But I assume that a lot of heat transfer problems are related to turbulent flows. So I guess more people would have faced this before.
akrasemann is offline   Reply With Quote

Old   January 30, 2014, 11:12
Default
  #6
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
hello,

Did you check if you have T oscillation in this boundary layer ? or temperature just rise ?

- What is your Y+ ?
- try to relax more T eq.
- try to initialise with constant properties (density, viscosity, ...)
- try SA turbulence model.

What is you outlet BC (T and velocity/pressure). if you got a spot in pressure at outlet, this can explain the instability.

regards,
olivier
olivierG is offline   Reply With Quote

Old   January 31, 2014, 05:44
Default
  #7
New Member
 
akrasemann
Join Date: Dec 2013
Posts: 17
Rep Power: 12
akrasemann is on a distinguished road
Hi Olivier,

thanks again for your input!

By looking at the minT values within the log file, I see that that value is oscillating but dropping in a general trend. What is interesting: the amplitude is in the beginning not that big (at most 50K) but right before the solver crashes the temperature value drops by more than 250K.

To answer the Y+ question: I used the formulas given on http://www.cfd-online.com/Wiki/Y_plu...nce_estimation but rearranged the last equation for y+. For the y input I used the height of the very first cell at the wall boundary. So I get a y+ = 46. I'm not sure whether my understanding here is right.

With respect to the BC for the cold region:
alphat
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.2                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "0";
    object      alphat;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [1 -1 -1 0 0 0 0];

value        0;
internalField   uniform  $value;

boundaryField
{
    c_left
    {
        type            calculated;
        value           uniform  $value;
    }
    c_right
    {
        type            calculated;
        value           uniform  $value;
    }
    s_bottom_cold
    {
        type            compressible::alphatWallFunction;
        Prt             0.85;
        value           uniform $value;
    }
    c_front
    {
        type            symmetryPlane;
    }
    c_back
    {
        type            symmetryPlane;
    }
    c_bottom
    {
        type            symmetryPlane;
    }
}

// ************************************************************************* //
epsilon
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.2                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 2 -3 0 0 0 0];

value        19.09;
internalField   uniform  $value;

boundaryField
{
    c_left
    {
        type            inletOutlet;
        inletValue      uniform  $value;
        value           uniform  $value;
    }
    c_right
    {

        type            fixedValue;
        value           uniform  $value;
    }
    s_bottom_cold
    {
        type            compressible::epsilonWallFunction;
        Cmu             0.09;
        kappa           0.41;
        E               9.8;
        value           uniform  $value;
    }
    c_front
    {
        type            symmetryPlane;
    }
    c_back
    {
        type            symmetryPlane;
    }
    c_bottom
    {
        type            symmetryPlane;
    }
}

// ************************************************************************* //
k
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.2                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 2 -2 0 0 0 0];

value        0.375;
internalField   uniform $value;

boundaryField
{
    c_left
    {
        type            inletOutlet;
        inletValue      uniform $value;
        value           uniform $value;

    }
    c_right
    {
        type            fixedValue;
        value           uniform $value;
    }
    s_bottom_cold
    {
        type            compressible::kqRWallFunction;
        value           uniform $value;
    }
    c_front
    {
        type            symmetryPlane;
    }
    c_back
    {
        type            symmetryPlane;
    }
    c_bottom
    {
        type            symmetryPlane;
    }
}


// ************************************************************************* //
mut
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.2                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "0";
    object      mut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [1 -1 -1 0 0 0 0];

value        0;
internalField   uniform  $value;

boundaryField
{
    c_left
    {
        type            calculated;
        value           uniform  $value;
    }
    c_right
    {
        type            calculated;
        value           uniform  $value;
    }
    s_bottom_cold
    {
        type            mutUSpaldingWallFunction;//mutUWallFunction;
        value           uniform $value;
    }
    c_front
    {
        type            symmetryPlane;
    }
    c_back
    {
        type            symmetryPlane;
    }
    c_bottom
    {
        type            symmetryPlane;
    }
}

// ************************************************************************* //
p
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.2                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [1 -1 -2 0 0 0 0];

value           1e5;
internalField   uniform $value;

boundaryField
{
    ".*"
    {
        type            calculated;
        value           uniform $value;
    }
    c_front
    {
        type            symmetryPlane;
    }
    c_back
    {
        type            symmetryPlane;
    }
    c_bottom
    {
        type            symmetryPlane;
    }
}

// ************************************************************************* //
p_rgh
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.2                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [1 -1 -2 0 0 0 0];

value           1e5;
internalField   uniform $value;

boundaryField
{
    c_left
    {
        type            fixedValue;
        value           uniform $value;
    }
    c_right
    {
        type            fixedFluxPressure;
        value           uniform $value;
    }
    s_bottom_cold
    {
        type            fixedFluxPressure;
        value           uniform $value;
    }
    c_bottom
    {
    type            symmetryPlane;
    }
    c_front
    {
    type            symmetryPlane;
    }
    c_back
    {
    type            symmetryPlane;
    }
}
// ************************************************************************* //
T
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.2                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

value           293.15;
internalField   uniform $value;

boundaryField
{
    c_left
    {
        type            fixedValue;
        value           uniform $value;
    }
    c_right
    {
        type            zeroGradient;
    }
    s_bottom_cold
    {
            type            compressible::turbulentTemperatureCoupledBaffleMixed;
                neighbourFieldName T;
                kappa           fluidThermo;
                kappaName       none;
                value           uniform 293.15;

    }
    c_bottom
    {
    type            symmetryPlane;
    }
    c_front
    {
    type            symmetryPlane;
    }
    c_back
    {
    type            symmetryPlane;
    }
}


// ************************************************************************* //
U
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.2                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

value           (50 0 0);
internalField   uniform (50 0 0);

boundaryField
{
    c_left
    {
        type            fixedValue;
        value           uniform $value;
    }
    c_right
    {
        type            inletOutlet;
        inletValue      uniform (50 0 0);
        value           uniform (50 0 0);
    }
    s_bottom_cold
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    c_bottom
    {
    type            symmetryPlane;
    }
    c_front
    {
    type            symmetryPlane;
    }
    c_back
    {
    type            symmetryPlane;
    }
}

// ************************************************************************* //
For the shell region:
p
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.2                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [1 -1 -2 0 0 0 0];

value        1e5;
internalField   uniform $value;

boundaryField
{
    s_left
    {
        type            calculated;
        value           uniform $value;
    }
    s_right
    {
        type            calculated;
        value           uniform $value;
    }
    s_top_shell
    {
        type            calculated;
        value           uniform $value;
    }
    s_bottom_shell
    {
        type            calculated;
        value           uniform $value;
    }
    s_front
    {
        type            symmetryPlane;
    }
    s_back
    {
        type            symmetryPlane;
    }
}

// ************************************************************************* //
T
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.2                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

value           443.15;
internalField   uniform $value;

boundaryField
{
    s_left
    {
        type            zeroGradient;
    }
    s_right
    {
        type            zeroGradient;
    }
    s_top_shell
    {
        type            compressible::turbulentTemperatureCoupledBaffleMixed;
        value           uniform $value;
        neighbourFieldName T;
        kappa           solidThermo;
        kappaName       none;
    }
    s_bottom_shell
    {
        type            compressible::turbulentTemperatureCoupledBaffleMixed;
        value           uniform $value;
        neighbourFieldName T;
        kappa           solidThermo;
        kappaName       none;
    }
    s_front
    {
    type            symmetryPlane;
    }
    s_back
    {
    type            symmetryPlane;
    }
}
// ************************************************************************* //
The hot region is just like the cold but the wall is on opposite side.

By setting the thermophysicalProperties as follows, I thought I would end up with constant properties:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.2                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant/bottomAir";
    object      thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleEnthalpy;
}

mixture
{
    specie
    {
        nMoles          1;
        molWeight       28.9;
    }
    thermodynamics
    {
        Cp              1000;
        Hf              0;
    }
    transport
    {
        mu              1.8e-05;
        Pr              0.7;
    }
}


// ************************************************************************* //
In fact my flow in the end should include temperature dependent properties as I will heat air from 600 to 1000K and density changes are quite big in that region.

What I have been trying yesterday was to extrude the mesh at the inlet to account for a developed boundary layer as soon as the flow hits the shell interface. I did this because I thought that it might be that I get a transition zone at the outlet. But unfortunately this didn't help.

I will now take a look at the SA turbulence model and relaxation factors.

Regards,

Andreas
akrasemann is offline   Reply With Quote

Old   February 1, 2014, 12:01
Default
  #8
Member
 
Michael Page
Join Date: Mar 2009
Location: Quebec, Canada
Posts: 36
Rep Power: 17
micpage18 is on a distinguished road
Hi,

I got a problem similar than yours.

To get convergence, I started the simulation with laminar model. After 50 iterations, I copied new turbulence files (k, omega, mut, etc...) in the time folder a I activated my turbulence model. The model converge after that.

Good luck,
__________________
Michael Page
michael.page@simu-k.com
Simu-K inc.
www.simu-k.com
micpage18 is offline   Reply With Quote

Old   February 3, 2014, 04:12
Default
  #9
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
hello,

Seem that your trouble came from your BCs.
You use fixedValue for both velocity and pressure. You should _never_ do that.

Regards,
olivier
olivierG is offline   Reply With Quote

Old   February 4, 2014, 04:06
Default
  #10
New Member
 
akrasemann
Join Date: Dec 2013
Posts: 17
Rep Power: 12
akrasemann is on a distinguished road
Hi Michael,
Hi Olivier,

thank you for your advice. Olivier was right. The pressure BC caused the trouble. The hint, to start off a laminar solution will be useful soon.

Still all the investigating the root cause of the error taught me a lot on how to deal with OF and CFD itself. Thanks again for all your input.

I ran a few test cases and for now it seems that a k-epsilon RNG model is the most stable one.

Greetings,
Andreas
akrasemann is offline   Reply With Quote

Old   March 19, 2014, 14:21
Default
  #11
New Member
 
Pam
Join Date: Feb 2011
Posts: 15
Rep Power: 15
prameelar is on a distinguished road
Quote:
Originally Posted by akrasemann View Post
Hi Michael,
Hi Olivier,

thank you for your advice. Olivier was right. The pressure BC caused the trouble. The hint, to start off a laminar solution will be useful soon.

Still all the investigating the root cause of the error taught me a lot on how to deal with OF and CFD itself. Thanks again for all your input.

I ran a few test cases and for now it seems that a k-epsilon RNG model is the most stable one.

Greetings,
Andreas
Hi Andreas,

I am also facing the same problem with chtMultiRegionSimpleFoam and Laminar case. Could you please share your BC files if possible for my reference.

Thank you,
__________________
Pam
prameelar is offline   Reply With Quote

Old   March 20, 2014, 05:15
Default
  #12
New Member
 
akrasemann
Join Date: Dec 2013
Posts: 17
Rep Power: 12
akrasemann is on a distinguished road
Hi Pam,

here are my changeDictionaryDict files:

region cold:
Code:
/*--------------------------------*- C++ -*----------------------------------*\ 
| =========                 |                                                 | 
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           | 
|  \\    /   O peration     | Version:  2.2.2                                 | 
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      | 
|    \\/     M anipulation  |                                                 | 
\*---------------------------------------------------------------------------*/ 
FoamFile 
{ 
    version     2.0; 
    format      ascii; 
    class       dictionary; 
    object      changeDictionaryDict; 
} 
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 
 
dictionaryReplacement 
{ 
     boundary 
     { 
          c_front 
          { 
                type      symmetryPlane; 
          } 
          c_back 
          { 
                type      symmetryPlane; 
          } 
          c_bottom 
          { 
                type      symmetryPlane; 
          } 
     } 
 
     U 
     { 
          internalField      uniform (0.0099585 0 0); 
 
          boundaryField 
          { 
               c_left 
               { 
                    type      fixedValue; 
                    value      uniform (0.0099585 0 0); 
               } 
               c_right 
               { 
                    type      inletOutlet; 
                    inletValue      uniform (0 0 0); 
                    value      uniform (0.0099585 0 0); 
               } 
               cold_to_shell 
               { 
                    type      fixedValue; 
                    value      uniform (0 0 0); 
               } 
               c_front 
               { 
                    type      symmetryPlane; 
               } 
               c_back 
               { 
                    type      symmetryPlane; 
               } 
               c_bottom 
               { 
                     type      symmetryPlane; 
               } 
               ce_top 
               { 
                     type      slip; 
               } 
          } 
     } 
 
     T 
     { 
          internalField      uniform 293.15; 
 
          boundaryField 
          { 
               c_left 
               { 
                    type      fixedValue; 
                    value      uniform 293.15; 
               } 
               c_right 
               { 
                    type      zeroGradient; 
               } 
               cold_to_shell 
               { 
                    type      compressible::turbulentTemperatureCoupledBaffleMixed; 
                    neighbourFieldName      T; 
                    kappa      fluidThermo; 
                    kappaName      none; 
                    value      uniform 293.15; 
               } 
               c_front 
               { 
                    type      symmetryPlane; 
               } 
               c_back 
               { 
                    type      symmetryPlane; 
               } 
               c_bottom 
               { 
                     type      symmetryPlane; 
               } 
               ce_top 
               { 
                     type      zeroGradient; 
               } 
          } 
     } 
 
     epsilon 
     { 
          internalField      uniform 0.01; 
 
          boundaryField 
          { 
               c_left 
               { 
                    type      fixedValue; 
                    value      uniform 0.01; 
               } 
               c_right 
               { 
                    type      inletOutlet; 
                    inletValue      uniform 0.01; 
                    value      uniform 0.01; 
               } 
               cold_to_shell 
               { 
                    type      compressible::epsilonWallFunction; 
                    Cmu      0.09; 
                    kappa      0.41; 
                    E      9.8; 
                    value      uniform 0.01; 
               } 
               c_front 
               { 
                    type      symmetryPlane; 
               } 
               c_back 
               { 
                    type      symmetryPlane; 
               } 
               c_bottom 
               { 
                     type      symmetryPlane; 
               } 
               ce_top 
               { 
                     type      zeroGradient; 
               } 
          } 
     } 
 
     k 
     { 
          internalField      uniform 0.1; 
 
          boundaryField 
          { 
               c_left 
               { 
                    type      fixedValue; 
                    value      uniform 0.1; 
               } 
               c_right 
               { 
                    type      inletOutlet; 
                    inletValue      uniform 0.1; 
                    value      uniform 0.1; 
               } 
               cold_to_shell 
               { 
                    type      compressible::kqRWallFunction; 
                    value      uniform 0.1; 
               } 
               c_front 
               { 
                    type      symmetryPlane; 
               } 
               c_back 
               { 
                    type      symmetryPlane; 
               } 
               c_bottom 
               { 
                     type      symmetryPlane; 
               } 
               ce_top 
               { 
                     type      zeroGradient; 
               } 
          } 
     } 
 
     p 
     { 
          internalField      uniform 1e5; 
 
          boundaryField 
          { 
               ".*" 
               { 
                    type      calculated; 
                    value      uniform 1e5; 
               } 
               c_front 
               { 
                    type      symmetryPlane; 
               } 
               c_back 
               { 
                    type      symmetryPlane; 
               } 
               c_bottom 
               { 
                     type      symmetryPlane; 
               } 
          } 
     } 
 
     p_rgh 
     { 
          internalField      uniform 1e5; 
 
          boundaryField 
          { 
               c_left 
               { 
                    type      zeroGradient; 
               } 
               c_right 
               { 
                    type      fixedValue; 
                    value      uniform 1e5; 
               } 
               cold_to_shell 
               { 
                    type      fixedFluxPressure; 
                    value      uniform 1e5; 
               } 
               c_front 
               { 
                    type      symmetryPlane; 
               } 
               c_back 
               { 
                    type      symmetryPlane; 
               } 
               c_bottom 
               { 
                     type      symmetryPlane; 
               } 
               ce_top 
               { 
                    type      fixedFluxPressure; 
                    value      uniform 1e5; 
               } 
          } 
     } 
 
} 
// ************************************************************************* //
region shell

Code:
/*--------------------------------*- C++ -*----------------------------------*\ 
| =========                 |                                                 | 
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           | 
|  \\    /   O peration     | Version:  2.2.2                                 | 
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      | 
|    \\/     M anipulation  |                                                 | 
\*---------------------------------------------------------------------------*/ 
FoamFile 
{ 
    version     2.0; 
    format      ascii; 
    class       dictionary; 
    object      changeDictionaryDict; 
} 
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 
 
dictionaryReplacement 
{ 
     boundary 
     { 
          s_front 
          { 
                type      symmetryPlane; 
          } 
          s_back 
          { 
                type      symmetryPlane; 
          } 
     } 
 
     T 
     { 
          internalField      uniform 443.15; 
 
          boundaryField 
          { 
               s_left 
               { 
                    type      zeroGradient; 
               } 
               s_right 
               { 
                    type      zeroGradient; 
               } 
               shell_to_hot 
               { 
                    type      compressible::turbulentTemperatureCoupledBaffleMixed; 
                    neighbourFieldName      T; 
                    kappa      solidThermo; 
                    kappaName      none; 
                    value      uniform 443.15; 
               } 
               shell_to_cold 
               { 
                    type      compressible::turbulentTemperatureCoupledBaffleMixed; 
                    neighbourFieldName      T; 
                    kappa      solidThermo; 
                    kappaName      none; 
                    value      uniform 443.15; 
               } 
               s_front 
               { 
                    type      symmetryPlane; 
               } 
               s_back 
               { 
                    type      symmetryPlane; 
               } 
          } 
     } 
 
     p 
     { 
          internalField      uniform 1e5; 
 
          boundaryField 
          { 
               s_left 
               { 
                    type      calculated; 
                    value      uniform 1e5; 
               } 
               s_right 
               { 
                    type      calculated; 
                    value      uniform 1e5; 
               } 
               shell_to_hot 
               { 
                    type      calculated; 
                    value      uniform 1e5; 
               } 
               shell_to_cold 
               { 
                    type      calculated; 
                    value      uniform 1e5; 
               } 
               s_front 
               { 
                    type      symmetryPlane; 
               } 
               s_back 
               { 
                    type      symmetryPlane; 
               } 
          } 
     } 
 
} 
// ************************************************************************* //
region hot

Code:
/*--------------------------------*- C++ -*----------------------------------*\ 
| =========                 |                                                 | 
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           | 
|  \\    /   O peration     | Version:  2.2.2                                 | 
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      | 
|    \\/     M anipulation  |                                                 | 
\*---------------------------------------------------------------------------*/ 
FoamFile 
{ 
    version     2.0; 
    format      ascii; 
    class       dictionary; 
    object      changeDictionaryDict; 
} 
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 
 
dictionaryReplacement 
{ 
     boundary 
     { 
          h_front 
          { 
                type      symmetryPlane; 
          } 
          h_back 
          { 
                type      symmetryPlane; 
          } 
          h_top 
          { 
                type      symmetryPlane; 
          } 
     } 
 
     U 
     { 
          internalField      uniform (0.0099585 0 0); 
 
          boundaryField 
          { 
               h_left 
               { 
                    type      fixedValue; 
                    value      uniform (0.0099585 0 0); 
               } 
               h_right 
               { 
                    type      inletOutlet; 
                    inletValue      uniform (0 0 0); 
                    value      uniform (0.0099585 0 0); 
               } 
               hot_to_shell 
               { 
                    type      fixedValue; 
                    value      uniform (0 0 0); 
               } 
               h_front 
               { 
                    type      symmetryPlane; 
               } 
               h_back 
               { 
                    type      symmetryPlane; 
               } 
               h_top 
               { 
                     type      symmetryPlane; 
               } 
               he_bottom 
               { 
                     type      slip; 
               } 
          } 
     } 
 
     T 
     { 
          internalField      uniform 593.15; 
 
          boundaryField 
          { 
               h_left 
               { 
                    type      fixedValue; 
                    value      uniform 593.15; 
               } 
               h_right 
               { 
                    type      zeroGradient; 
               } 
               hot_to_shell 
               { 
                    type      compressible::turbulentTemperatureCoupledBaffleMixed; 
                    neighbourFieldName      T; 
                    kappa      fluidThermo; 
                    kappaName      none; 
                    value      uniform 593.15; 
               } 
               h_front 
               { 
                    type      symmetryPlane; 
               } 
               h_back 
               { 
                    type      symmetryPlane; 
               } 
               h_top 
               { 
                     type      symmetryPlane; 
               } 
               he_bottom 
               { 
                     type      zeroGradient; 
               } 
          } 
     } 
 
     epsilon 
     { 
          internalField      uniform 0.01; 
 
          boundaryField 
          { 
               h_left 
               { 
                    type      fixedValue; 
                    value      uniform 0.01; 
               } 
               h_right 
               { 
                    type      inletOutlet; 
                    inletValue      uniform 0.01; 
                    value      uniform 0.01; 
               } 
               hot_to_shell 
               { 
                    type      compressible::epsilonWallFunction; 
                    Cmu      0.09; 
                    kappa      0.41; 
                    E      9.8; 
                    value      uniform 0.01; 
               } 
               h_front 
               { 
                    type      symmetryPlane; 
               } 
               h_back 
               { 
                    type      symmetryPlane; 
               } 
               h_top 
               { 
                     type      symmetryPlane; 
               } 
               he_bottom 
               { 
                     type      zeroGradient; 
               } 
          } 
     } 
 
     k 
     { 
          internalField      uniform 0.1; 
 
          boundaryField 
          { 
               h_left 
               { 
                    type      fixedValue; 
                    value      uniform 0.1; 
               } 
               h_right 
               { 
                    type      inletOutlet; 
                    inletValue      uniform 0.1; 
                    value      uniform 0.1; 
               } 
               hot_to_shell 
               { 
                    type      compressible::kqRWallFunction; 
                    value      uniform 0.1; 
               } 
               h_front 
               { 
                    type      symmetryPlane; 
               } 
               h_back 
               { 
                    type      symmetryPlane; 
               } 
               h_top 
               { 
                     type      symmetryPlane; 
               } 
               he_bottom 
               { 
                     type      zeroGradient; 
               } 
          } 
     } 
 
     p 
     { 
          internalField      uniform 1e5; 
 
          boundaryField 
          { 
               ".*" 
               { 
                    type      calculated; 
                    value      uniform 1e5; 
               } 
               h_front 
               { 
                    type      symmetryPlane; 
               } 
               h_back 
               { 
                    type      symmetryPlane; 
               } 
               h_top 
               { 
                     type      symmetryPlane; 
               } 
          } 
     } 
 
     p_rgh 
     { 
          internalField      uniform 1e5; 
 
          boundaryField 
          { 
               h_left 
               { 
                    type      zeroGradient; 
               } 
               h_right 
               { 
                    type      fixedValue; 
                    value      uniform 1e5; 
               } 
               hot_to_shell 
               { 
                    type      fixedFluxPressure; 
                    value      uniform 1e5; 
               } 
               h_front 
               { 
                    type      symmetryPlane; 
               } 
               h_back 
               { 
                    type      symmetryPlane; 
               } 
               h_top 
               { 
                     type      symmetryPlane; 
               } 
               he_bottom 
               { 
                    type      fixedFluxPressure; 
                    value      uniform 1e5; 
               } 
          } 
     } 
 
} 
// ************************************************************************* //
From my experience, the laminar case is much more complex as one would assume. It is true that the physics are less complex in terms of eddies and vortices, but assigning 'laminar' in OpenFOAM implies that there is no turbulence model used for the viscous parts of the Navier-Stokes equations. This also means that the quality of the mesh is most important. I can recommend 'Boundary Layer Theory' by Schlichting and 'Turbulence Modelling for CFD' by Wilcox as a reference for getting an idea what happens there.

Apart from the mesh it happened also to me that due to the very slow flow in my domain, the buoyancy has a much bigger influence on the solution. Therefore consider switching off gravity by setting the gravity vector to (0 0 0) in constant/<fluidregions>/g

Andreas
akrasemann is offline   Reply With Quote

Old   March 20, 2014, 13:26
Default
  #13
New Member
 
Pam
Join Date: Feb 2011
Posts: 15
Rep Power: 15
prameelar is on a distinguished road
Quote:
Originally Posted by akrasemann View Post
Hi Pam,

here are my changeDictionaryDict files:
----
----
----
From my experience, the laminar case is much more complex as one would assume. It is true that the physics are less complex in terms of eddies and vortices, but assigning 'laminar' in OpenFOAM implies that there is no turbulence model used for the viscous parts of the Navier-Stokes equations. This also means that the quality of the mesh is most important. I can recommend 'Boundary Layer Theory' by Schlichting and 'Turbulence Modelling for CFD' by Wilcox as a reference for getting an idea what happens there.

Apart from the mesh it happened also to me that due to the very slow flow in my domain, the buoyancy has a much bigger influence on the solution. Therefore consider switching off gravity by setting the gravity vector to (0 0 0) in constant/<fluidregions>/g

Andreas
Thank you for your reply Andreas, I have tried all the options and was able to run for more timesteps then before but not the complete problem. I am attaching the log file of my simulation. Please have a look if you get chance.

Thanks again,
Kind regards,
Pam.
Attached Files
File Type: txt log.txt (58.7 KB, 19 views)
__________________
Pam
prameelar is offline   Reply With Quote

Old   March 24, 2014, 03:54
Default
  #14
New Member
 
akrasemann
Join Date: Dec 2013
Posts: 17
Rep Power: 12
akrasemann is on a distinguished road
The log file doesn't include an error output. But your density min and max value are probably at the maximum that is allowed. This indicates some issues there.
akrasemann 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
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 13 March 24, 2021 08:15
Static Temperature / Opening Temperature JulianP CFX 12 April 10, 2019 19:00
Problem with zeroGradient wall BC for temperature - Total temperature loss cboss OpenFOAM 12 October 1, 2018 07:36
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 07:27
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 02:27


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