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

rhoSimpleFoam and externalWallHeatFluxTemperature issue

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 12, 2021, 11:16
Default rhoSimpleFoam and externalWallHeatFluxTemperature issue
  #1
New Member
 
Matt
Join Date: Sep 2016
Posts: 7
Rep Power: 9
mattmirsad is on a distinguished road
Dear FOAMers,

I am trying to solve a simple internal flow case in a pipe with rhoSimpleFoam where an external heat flux is specified using "externalWallHeatFluxTemperature" as shown in the code below:

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

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 300;

boundaryField
{
    Inlet
    {
        type            fixedValue;
        value           $internalField;
    }

    outlet
    {
        type            inletOutlet;
        value           $internalField;
        inletValue      $internalField;
    }

    sides
    {

        type            externalWallHeatFluxTemperature;
		mode            coefficient;
        Ta              constant 700.0;
        h               constant 1000.0;
        thicknessLayers (0.001 0.002);
        kappaLayers     (1 2.5);
        kappaMethod     fluidThermo;
        value           $internalField;

    }
}

// ************************************************************************* //
The solver runs smoothly without any problem and the results are reasonable. But if I only change the "sides" boundary condition to uniform heat flux (as shown below), the solver stops in the first iteration without any error message!


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

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 300;

boundaryField
{
    
Inlet
    
{
        
type            fixedValue;
        
value           $internalField;
    }

    
outlet
    
{
        
type            inletOutlet;
        
value           $internalField;
        
inletValue      $internalField;
    }

    
sides
    
{
        
type            externalWallHeatFluxTemperature;
        
mode            flux;
        
q               uniform 111// W/m^2
        
value           $internalField;
        
kappaMethod     fluidThermo;
        
kappa           none;
        
Qr              none;
    }
}

// ************************************************************************* // 
In a nutshell, mode "coefficient" works perfectly but mode "flux" cause the solver to crash without any error message. Here is how the solver stops:
PHP Code:
Time 1

GAMG
:  Solving for UxInitial residual 1, Final residual 0.0495507No Iterations 2
GAMG
:  Solving for UyInitial residual 1, Final residual 0.0551383No Iterations 2
GAMG
:  Solving for UzInitial residual 1, Final residual 0.0278211No Iterations 1 
Could you please share your thoughts on the possible root causes for this?

Cheers,
Matt
mattmirsad is offline   Reply With Quote

Old   April 13, 2021, 02:04
Default
  #2
Member
 
Roman
Join Date: Sep 2013
Posts: 83
Rep Power: 12
Roman1 is on a distinguished road
One of the possible reason is unbalance between heat flux from gas media to solid wall and fixed heat flux that you have written as boundary condition. For example, cell size, temperature, gas speed can not provide desired 111 w/sq.m from gas phase to solid. So heat flux from gas becomes unequal to heat flux from surface into solid, continuity becomes broken, program stops.
Roman1 is offline   Reply With Quote

Old   April 13, 2021, 08:24
Default
  #3
New Member
 
Matt
Join Date: Sep 2016
Posts: 7
Rep Power: 9
mattmirsad is on a distinguished road
Quote:
Originally Posted by Roman1 View Post
One of the possible reason is unbalance between heat flux from gas media to solid wall and fixed heat flux that you have written as boundary condition. For example, cell size, temperature, gas speed can not provide desired 111 w/sq.m from gas phase to solid. So heat flux from gas becomes unequal to heat flux from surface into solid, continuity becomes broken, program stops.
Thanks for your response.

I just did some more tests with this case:
For the case described above, I am using "OpenFOAM-v2012-windows10".
if I transfer it to a LINUX system I get more information when it crashes:

PHP Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2012                                  |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  79e353b8-20201222 OPENFOAM=2012
Arch   
"LSB;label=32;scalar=64"
Exec   rhoSimpleFoam
Date   
Apr 13 2021
Time   
13:24:16
Host   
xxxxxxxxxxxxxxxxxxxx
PID    
2462
I
/O    uncollated
Case   : /home/matt/OpenFOAM_ESI/rhoSF/squareBend_To_Pipe
nProcs 
1
trapFpe
Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking Monitoring run-time modified files using timeStampMaster (fileModificationSkew 5maxFileModificationPolls 20)
allowSystemOperations Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh 
for time 0


SIMPLE
convergence criteria
    field p tolerance 0.001
    field U tolerance 0.0001
    field e tolerance 0.001
    field 
"(k|epsilon)" tolerance 0.001

Reading thermophysical properties

Selecting thermodynamics package
{
    
type            heRhoThermo;
    
mixture         pureMixture;
    
transport       sutherland;
    
thermo          hConst;
    
equationOfState perfectGas;
    
specie          specie;
    
energy          sensibleInternalEnergy;
}

Reading field U

Reading
/calculating face flux field phi

pressureControl
    pMax 220000
    pMin 11000

Creating turbulence model

Selecting turbulence model type RAS
Selecting RAS turbulence model kEpsilon
RAS
{
    
RASModel        kEpsilon;
    
turbulence      on;
    
printCoeffs     on;
    
Cmu             0.09;
    
C1              1.44;
    
C2              1.92;
    
C3              0;
    
sigmak          1;
    
sigmaEps        1.3;
}

No MRF models present

No finite volume options present

Starting time loop

wallHeatFlux wallHeatFlux1
:
    
processing wall patches:
        
sides

Time 
1

GAMG
:  Solving for UxInitial residual 1, Final residual 0.0495507No Iterations 2
GAMG
:  Solving for UyInitial residual 1, Final residual 0.0551383No Iterations 2
GAMG
:  Solving for UzInitial residual 1, Final residual 0.0278211No Iterations 1
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in /lib/x86_64-linux-gnu/libpthread.so.0
#3  Foam::heThermo<Foam::rhoThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::he(Foam::Field<double> const&, Foam::Field<double> const&, int) const at ??:?
#4  Foam::mixedEnergyFvPatchScalarField::updateCoeffs() at ??:?
#5  Foam::fvMatrix<double>::fvMatrix(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) in /usr/lib/openfoam/openfoam2012/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam
#6  Foam::tmp<Foam::fvMatrix<double> > Foam::fv::optionList::operator()<double>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::word const&) in /usr/lib/openfoam/openfoam2012/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam
#7  ? in /usr/lib/openfoam/openfoam2012/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam
#8  __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#9  ? in /usr/lib/openfoam/openfoam2012/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam
Floating point exception (core dumped

The interesting point is that if I use openFOAM foundation on a LINUX system this problems runs smoothly without any problem!

Any more thoughts on this are appreciated.

Cheers,
Matt
mattmirsad is offline   Reply With Quote

Reply

Tags
rhosimplefoam error


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
transsonic nozzle with rhoSimpleFoam Unseen OpenFOAM Running, Solving & CFD 8 July 1, 2022 06:54
rhoSimpleFoam and externalWallHeatFluxTemperature issue mattmirsad OpenFOAM Running, Solving & CFD 0 April 12, 2021 11:11
rhoSimpleFoam Spalart Allmaras simulation issue mariloo OpenFOAM Running, Solving & CFD 0 December 4, 2019 11:09
rhoSimpleFoam convergence issue fxzf OpenFOAM Running, Solving & CFD 2 August 28, 2017 04:37
rhoSimpleFoam angledDuctExplicitFixedCoeff tutorial fails in parallel donQi OpenFOAM Running, Solving & CFD 1 February 22, 2016 19:47


All times are GMT -4. The time now is 18:07.