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

rhoCentralFoam sensible internal energy error?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 11, 2021, 00:47
Default rhoCentralFoam sensible internal energy error?
  #1
New Member
 
Matthew
Join Date: May 2021
Posts: 10
Rep Power: 5
Tegdlemat is on a distinguished road
Hi guys,

Currently I am running a double wedge case with rhoCentralFoam and faced an issue while running a case.

Before running the case, I did some validations and grid convergences beforehand so the initial BCs and thermoproperties is not a problem I think. However once I moved onto the actual case, the calculation crashed at a certain timestep, which I have tried to change the relTol etc in fvsolution, reconstruct a few time interval ahead and run it, restart Ubuntu, lower the CFL number. Yet nothing worked out.

At the time when the calculation crashed, before listing out the residual of e, which is internal energy, the message showed as below:

Code:
Mean and max Courant Numbers = 0.0318184 0.190774
deltaT = 1e-09
Time = 0.0005743518088784423

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal:  Solving for rhoUx, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal:  Solving for rhoUy, Initial residual = 0, Final residual = 0, No Iterations 0
DICPBiCGStab:  Solving for Ux, Initial residual = 4.40828e-07, Final residual = 4.26965e-12, No Iterations 1
DICPBiCGStab:  Solving for Uy, Initial residual = 4.85822e-07, Final residual = 5.35129e-12, No Iterations 1
diagonal:  Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0

Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpiexec detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:

  Process name: [[18653,1],2]
  Exit code:    144
--------------------------------------------------------------------------
I think there is something to do with internal energy, but I am unable to tackle. Hope I can can some help from u guys. Thanks a lot. I have been stuck on this for 3 days.
Tegdlemat is offline   Reply With Quote

Old   October 11, 2021, 07:53
Default
  #2
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Hi,


we need your BCs, fvSchemes and CFL-Number in order to help you.
shock77 is offline   Reply With Quote

Old   October 12, 2021, 22:01
Default
  #3
New Member
 
Matthew
Join Date: May 2021
Posts: 10
Rep Power: 5
Tegdlemat is on a distinguished road
Sorry for the late reply. Here are the info:
U
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       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform (1972 0 0);

boundaryField
{
    inlet
    {
        type            fixedValue;
        value           uniform (1972 0 0);
    }

    outlet
    {
        type            inletOutlet;
        inletValue	uniform (1972 0 0);
        value	uniform (1972 0 0);	
    }

    top
    {
        type            supersonicFreestream;
        pInf            391;
        TInf            191;
        UInf           (1972 0 0);
        gamma           1.4;
        value           uniform (1972 0 0);
    }

    obstacle
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    defaultFaces
    {
        type            empty;
    }
}


// ************************************************************************* //
p
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      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 391;

boundaryField
{
    inlet
    {
        type           fixedValue;
        value          uniform 391;
    } 

    outlet
    {
        type            waveTransmissive;
        field           p;
        psi             thermo:psi;
        gamma           1.4;
        fieldInf        391;
        lInf            1;
        value          uniform 391;
    }

    top
    {
        type           zeroGradient;
    }

    obstacle
    {
        type            zeroGradient;
    }

    defaultFaces
    {
        type            empty;
    }
}


// ************************************************************************* //
T
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 191;

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

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

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

    obstacle
    {
        type            fixedValue;
        value           uniform 300;
    }

    defaultFaces
    {
        type            empty;
    }
}


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

fluxScheme      Kurganov;

ddtSchemes
{
    default         backward;
}

gradSchemes
{
    default         cellLimited Gauss linear 1;
    grad(p)         cellLimited Gauss linear 0.333;
    grad(e)         cellLimited Gauss linear 0.333;
}

divSchemes
{
    default         Gauss vanLeer;
    div(phi,U)      Gauss vanLeerV;
    div(phi,K)      Gauss vanLeer;
    div(phi,e)      Gauss vanLeer;
    div(phi,T)      Gauss vanLeer;
    div(phid,p)      Gauss vanLeer;
    div((nuEff*dev2(t(grad(U)))))     Gauss linear;
    div(tauMC)      Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear limited 1;
}

interpolationSchemes
{
    default         vanLeer pos;
    reconstruct(rho) vanLeer;
    reconstruct(U)  vanLeerV;
    reconstruct(T)  vanLeer;
    flux(rhoU) vanLeer pos;
    dotInterpolate(S,tauMC) vanLeer pos;
    interpolate(muEff) vanLeer pos;
    interpolate(rho) vanLeer;
}

snGradSchemes
{
    default         limited 1;
}

// ************************************************************************* //
The CFL number I have controlled it at 0.4 since it crashes once it reaches 0.5. So by lowering the CFL number, somehow it means I lowered the max.dT.
Tegdlemat is offline   Reply With Quote

Old   October 14, 2021, 03:59
Default
  #4
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Hi,


here are some hints that might work:


1. CFL of 0.5 or 0.4 is quite high, you should rather use 0.2 or 0.3 with vanLeer. Even 0.1 is sometime necessary.



2. I have never used the supersonicFreeStream BC, what does it do excactly?


3. I think the main problem is the pressure, you are close to 0. You certainly will have some numerical oscillations and as soon as you reach a negative value the simulation will crash.



4. Also on the pressure: Why is it so low? This is basically vacuum. In vacuum you dont have a continuum.


5. What is vanLeer pos? First time I am seeing this.
shock77 is offline   Reply With Quote

Old   October 15, 2021, 00:44
Default
  #5
New Member
 
Matthew
Join Date: May 2021
Posts: 10
Rep Power: 5
Tegdlemat is on a distinguished road
Thanks for your reply!

1. I use such a high CFL number since the time step I am using is just 1e-9s, and for my validation case, which has a much aggressive phenomena, was working perfectly with a even higher CFL number.

2. For the supersonicFreeStream BC, according to OpenFOAM, it stated as:

Quote:
supersonic inflow is assumed to occur according to the Prandtl-Meyer expansion process.
subsonic outflow is applied via a zero-gradient condition from inside the domain.
I think it is fine cause I checked the farfield and nth is wrong with that.

3&4.The magnitude of the pressure is fixed as I am more or less likely replicating the hypersonic wedge cases done by Austin.

5. That's actually something weird for me at first. Cause I was unable to use vanLeer solely for those interpolations, then I looked into the source code:

Code:
 surfaceVectorField rhoU_pos
        (
            fvc::interpolate(rhoU, pos, "reconstruct(U)")
        );
        surfaceVectorField rhoU_neg
        (
            fvc::interpolate(rhoU, neg, "reconstruct(U)")
        );
where pos and neg indication can be read from:

RhoCentralFoam detail
Tegdlemat is offline   Reply With Quote

Old   October 15, 2021, 04:37
Default
  #6
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
I dont know what agressive phenomena are, but this might be the reason why vanLeer crashes. You are on the edge of stability, usually you need Co numbers of 0.1 to 0.3 for flows with high gradients. You have to chose between high accuracy or low calculation time.


You cant just use the vanLeer pos, because flux needs to be evaluated in both directions. I have just made some suggestions how those dicts may look like in here: Can rhoCentralFoam resolve turbulence?
Please always look into the tutorials!


Have you checked the knudsen number? If the flow is not a continuum, you cant use the navier stokes equations.
shock77 is offline   Reply With Quote

Old   October 15, 2021, 06:27
Default
  #7
New Member
 
Matthew
Join Date: May 2021
Posts: 10
Rep Power: 5
Tegdlemat is on a distinguished road
However, I am unable to proceed without defining the direction of flux. My advisor has stated that I must use full vanLeer or Minmod for interpolation and divschemes.

The designed flow I am using is a laminar flow, so I dont think turbulence plays a big part of the issue.

And again, I am replicating the case done by Austin, which I am directly copying all initial boundaries which have been proved perfectly fine since 2012.
Tegdlemat is offline   Reply With Quote

Old   October 15, 2021, 07:02
Default
  #8
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Briefly said: Prescribing the direction is wrong. In compressible flow also backflow can occure.


I am not saying you should refer to his turbulence problem, just look at the schemes I am suggesting... At least read it when I am trying to help you.


"Case by Austin" - you are not proving any information besides that an austin has calculated something. How am I supposed to know what exactly he was doing or if it was a peer reviewed journal article or just a youtube video? And if you would exactly replicate his case this error would not occure.
shock77 is offline   Reply With Quote

Old   October 15, 2021, 11:50
Default
  #9
New Member
 
Matthew
Join Date: May 2021
Posts: 10
Rep Power: 5
Tegdlemat is on a distinguished road
Sorry for my attitude, I didnt mean to sound rude and I do really appreciate your help. Plus its nice to discuss with people about rhoCentralFoam as I am extremely new to CFD.

I did take some of your advices and currently running the case again and seeing how it goes. I hope it will work till the end but I also would like your help if anything happens in the future.
Tegdlemat is offline   Reply With Quote

Old   October 16, 2021, 00:55
Default
  #10
New Member
 
Matthew
Join Date: May 2021
Posts: 10
Rep Power: 5
Tegdlemat is on a distinguished road
Also I have a question, what is the difference between phid and phiv and phi? I cant really find a good explanation atm.
Tegdlemat is offline   Reply With Quote

Old   October 18, 2021, 04:20
Default
  #11
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Different solver use different implementations of phi. I dont know the definition of those, but you can look that up in the C++ guide:
https://cpp.openfoam.org/v9/
shock77 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
Building OpenFOAM1.7.0 from source ata OpenFOAM Installation 46 March 6, 2022 13:21
DPM udf error haghshenasfard FLUENT 0 April 13, 2016 06:35
[OpenFOAM] Native ParaView Reader Bugs tj22 ParaView 270 January 4, 2016 11:39
CGNS lib and Fortran compiler manaliac Main CFD Forum 2 November 29, 2010 06:25
Installation OF1.5-dev ttdtud OpenFOAM Installation 46 May 5, 2009 02:32


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