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/)
-   -   Foam::error::printStack(Foam::Ostream&) with interFoam -parallel (https://www.cfd-online.com/Forums/openfoam-solving/188437-foam-error-printstack-foam-ostream-interfoam-parallel.html)

lethu May 30, 2017 04:22

Foam::error::printStack(Foam::Ostream&) with interFoam -parallel
 
Hello everyone !

I am trying to simulate water coming into a chamber. So I have one inlet, two outlets, walls and an atmospherical top.
According to the amount of the flow, water will go to one exit rather than the other.



I got this error message but I don't really understand it.
I guess it comes from my BC but I don't know if my outlets BC are good or not...

Can anyone help ?

Thanks !

Code:

nProcs : 4
Slaves :
3
(
"4cf27cc75c68.1683"
"4cf27cc75c68.1684"
"4cf27cc75c68.1685"
)

Pstream initialized with:
    floatTransfer      : 0
    nProcsSimpleSum    : 0
    commsType          : nonBlocking
    polling iterations : 0
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

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

Create mesh for time = 0


PIMPLE: Operating solver in PISO mode

Reading field p_rgh

Reading field U

Reading/calculating face flux field phi

Reading transportProperties

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Selecting turbulence model type RAS
Selecting RAS turbulence model kOmegaSST
Selecting patchDistMethod meshWave
kOmegaSSTCoeffs
{
    alphaK1        0.85;
    alphaK2        1;
    alphaOmega1    0.5;
    alphaOmega2    0.856;
    gamma1          0.555556;
    gamma2          0.44;
    beta1          0.075;
    beta2          0.0828;
    betaStar        0.09;
    a1              0.31;
    b1              1;
    c1              10;
    F3              false;
}


Reading g

Reading hRef
Calculating field g.h

No MRF models present

No finite volume options present

DICPCG:  Solving for pcorr, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0, global = 0, cumulative = 0
Courant Number mean: 0 max: 0

Starting time loop

Courant Number mean: 0 max: 0
Interface Courant Number mean: 0 max: 0
deltaT = 0.00024
Time = 0.00024

PIMPLE: iteration 1
smoothSolver:  Solving for alpha.water, Initial residual = 0, Final residual = 0, No Iterations 0
Phase-1 volume fraction = 0  Min(alpha.water) = 0  Max(alpha.water) = 0
MULES: Correcting alpha.water
MULES: Correcting alpha.water
Phase-1 volume fraction = 0  Min(alpha.water) = 0  Max(alpha.water) = 0
[0] #0  Foam::error::printStack(Foam::Ostream&)[1] #0  Foam::error::printStack(Foam::Ostream&)[2] #0  Foam::error::printStack(Foam::Ostream&)[3] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
[2] #1  Foam::sigFpe::sigHandler(int) at ??:?
[3] #1  Foam::sigFpe::sigHandler(int) at ??:?
 at ??:?
[2] #2  ? at ??:?
[0] #1  Foam::sigFpe::sigHandler(int)[1] #1  Foam::sigFpe::sigHandler(int) in "/lib/x86_64-linux-gnu/libc.so.6"
[2] #3  Foam::variableHeightFlowRateInletVelocityFvPatchVectorField::updateCoeffs() at ??:?
[3] #2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
[3] #3  Foam::variableHeightFlowRateInletVelocityFvPatchVectorField::updateCoeffs() at ??:?
[1] #2  ? at ??:?
[0] #2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
 in "/lib/x86_64-linux-gnu/libc.so.6"
[1] #3  Foam::variableHeightFlowRateInletVelocityFvPatchVectorField::updateCoeffs()[0] #3  Foam::variableHeightFlowRateInletVelocityFvPatchVectorField::updateCoeffs() at ??:?
[2] #4  Foam::fvMatrix<Foam::Vector<double> >::fvMatrix(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) at ??:?
[2] #5  at ??:?
[3] #4  ?Foam::fvMatrix<Foam::Vector<double> >::fvMatrix(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) at ??:?
[2] #6  ? at ??:?
[3] #5  at ??:?
[2] #7  __libc_start_main at ??:?
[1] #4  ? in "/lib/x86_64-linux-gnu/libc.so.6"
[2] #8  ? at ??:?
[3] #6  at ??:?
[4cf27cc75c68:01684] *** Process received signal ***
[4cf27cc75c68:01684] Signal: Floating point exception (8)
[4cf27cc75c68:01684] Signal code:  (-6)
[4cf27cc75c68:01684] Failing at address: 0x3e800000694
[4cf27cc75c68:01684] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x354b0)[0x7f29017e64b0]
[4cf27cc75c68:01684] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7f29017e6428]
[4cf27cc75c68:01684] [ 2] /lib/x86_64-linux-gnu/libc.so.6(+0x354b0)[0x7f29017e64b0]
[4cf27cc75c68:01684] [ 3] /opt/openfoam4/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so(_ZN4Foam53variableHeightFlowRateInletVelocityFvPatchVectorField12updateCoeffsEv+0x719)[0x7f2904b4cf59]
[4cf27cc75c68:01684] [ 4] interFoam(_ZN4Foam8fvMatrixINS_6VectorIdEEEC1ERKNS_14GeometricFieldIS2_NS_12fvPatchFieldENS_7volMeshEEERKNS_12dimensionSetE+0x5af)[0x4716df]
[4cf27cc75c68:01684] [ 5] interFoam[0x4718ad]
[4cf27cc75c68:01684] [ 6] interFoam[0x439955]
[4cf27cc75c68:01684] [ 7] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f29017d1830]
[4cf27cc75c68:01684] [ 8] interFoam[0x441db9]
[4cf27cc75c68:01684] *** End of error message ***
Foam::fvMatrix<Foam::Vector<double> >::fvMatrix(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&)? at ??:?
[0] #4  at ??:?
[3] #7  __libc_start_main at ??:?
[1] #5  in "/lib/x86_64-linux-gnu/libc.so.6"
[3] #8  Foam::fvMatrix<Foam::Vector<double> >::fvMatrix(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&)?? at ??:?
[0] #5  at ??:?
[4cf27cc75c68:01685] *** Process received signal ***
[4cf27cc75c68:01685] Signal: Floating point exception (8)
[4cf27cc75c68:01685] Signal code:  (-6)
[4cf27cc75c68:01685] Failing at address: 0x3e800000695
[4cf27cc75c68:01685] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x354b0)[0x7f2f95be64b0]
[4cf27cc75c68:01685] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7f2f95be6428]
[4cf27cc75c68:01685] [ 2] /lib/x86_64-linux-gnu/libc.so.6(+0x354b0)[0x7f2f95be64b0]
[4cf27cc75c68:01685] [ 3] /opt/openfoam4/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so(_ZN4Foam53variableHeightFlowRateInletVelocityFvPatchVectorField12updateCoeffsEv+0x719)[0x7f2f98f4cf59]
[4cf27cc75c68:01685] [ 4] interFoam(_ZN4Foam8fvMatrixINS_6VectorIdEEEC1ERKNS_14GeometricFieldIS2_NS_12fvPatchFieldENS_7volMeshEEERKNS_12dimensionSetE+0x5af)[0x4716df]
[4cf27cc75c68:01685] [ 5] interFoam[0x4718ad]
[4cf27cc75c68:01685] [ 6] interFoam[0x439955]
[4cf27cc75c68:01685] [ 7] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f2f95bd1830]
[4cf27cc75c68:01685] [ 8] interFoam[0x441db9]
[4cf27cc75c68:01685] *** End of error message ***
? at ??:?
[0] #6  at ??:?
[1] #6  ? at ??:?
[0] #7  __libc_start_main? in "/lib/x86_64-linux-gnu/libc.so.6"
[0] #8  ? at ??:?
[1] #7  __libc_start_main at ??:?
[4cf27cc75c68:01682] *** Process received signal ***
[4cf27cc75c68:01682] Signal: Floating point exception (8)
[4cf27cc75c68:01682] Signal code:  (-6)
[4cf27cc75c68:01682] Failing at address: 0x3e800000692
[4cf27cc75c68:01682] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x354b0)[0x7f537893e4b0]
[4cf27cc75c68:01682] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7f537893e428]
[4cf27cc75c68:01682] [ 2] /lib/x86_64-linux-gnu/libc.so.6(+0x354b0)[0x7f537893e4b0]
[4cf27cc75c68:01682] [ 3] /opt/openfoam4/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so(_ZN4Foam53variableHeightFlowRateInletVelocityFvPatchVectorField12updateCoeffsEv+0x719)[0x7f537bca4f59]
[4cf27cc75c68:01682] [ 4] interFoam(_ZN4Foam8fvMatrixINS_6VectorIdEEEC1ERKNS_14GeometricFieldIS2_NS_12fvPatchFieldENS_7volMeshEEERKNS_12dimensionSetE+0x5af)[0x4716df]
[4cf27cc75c68:01682] [ 5] interFoam[0x4718ad]
[4cf27cc75c68:01682] [ 6] interFoam[0x439955]
[4cf27cc75c68:01682] [ 7] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f5378929830]
[4cf27cc75c68:01682] [ 8] interFoam[0x441db9]
[4cf27cc75c68:01682] *** End of error message ***
 in "/lib/x86_64-linux-gnu/libc.so.6"
[1] #8  ? at ??:?
[4cf27cc75c68:01683] *** Process received signal ***
[4cf27cc75c68:01683] Signal: Floating point exception (8)
[4cf27cc75c68:01683] Signal code:  (-6)
[4cf27cc75c68:01683] Failing at address: 0x3e800000693
[4cf27cc75c68:01683] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x354b0)[0x7f673c4c14b0]
[4cf27cc75c68:01683] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7f673c4c1428]
[4cf27cc75c68:01683] [ 2] /lib/x86_64-linux-gnu/libc.so.6(+0x354b0)[0x7f673c4c14b0]
[4cf27cc75c68:01683] [ 3] /opt/openfoam4/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so(_ZN4Foam53variableHeightFlowRateInletVelocityFvPatchVectorField12updateCoeffsEv+0x719)[0x7f673f827f59]
[4cf27cc75c68:01683] [ 4] interFoam(_ZN4Foam8fvMatrixINS_6VectorIdEEEC1ERKNS_14GeometricFieldIS2_NS_12fvPatchFieldENS_7volMeshEEERKNS_12dimensionSetE+0x5af)[0x4716df]
[4cf27cc75c68:01683] [ 5] interFoam[0x4718ad]
[4cf27cc75c68:01683] [ 6] interFoam[0x439955]
[4cf27cc75c68:01683] [ 7] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f673c4ac830]
[4cf27cc75c68:01683] [ 8] interFoam[0x441db9]
[4cf27cc75c68:01683] *** End of error message ***
--------------------------------------------------------------------------
mpirun noticed that process rank 2 with PID 1684 on node 4cf27cc75c68 exited on signal 8 (Floating point exception).
--------------------------------------------------------------------------


Here are my BCs

Code:

object      alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    dev_wall
    {
        type            zeroGradient;
    }
       
    dev_top
    {
        type            inletOutlet;
        inletValue      $internalField;
        value          $internalField;
    }
       
    dev_inlet
    {
        type            variableHeightFlowRate;
        lowerBound      0;
        upperBound      1;
        value          uniform 1;
    }
   
    dev_outletConserve
    {
        type            zeroGradient;
    }

    dev_outletDeverse
    {
        type            zeroGradient;
    }
   
    "proc.*"
    {
        type            processor;
        value          $internalField;
    }
}

Code:

object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform (0 0 0);

boundaryField
{
    dev_wall
    {
        type            noSlip;
    }

        dev_top
    {
        type            pressureInletOutletVelocity;
        value          uniform (0 0 0);
    }
       
    dev_inlet
    {
        type            variableHeightFlowRateInletVelocity;
        flowRate        2.6; // en m3/s
        alpha          alpha.water;
        value          uniform (0 0 0);
    }
   
    dev_outletConserve
    {
        type            inletOutlet;
        inletValue      $internalField;
        value          $internalField;
    }

    dev_outletDeverse
    {
        type            inletOutlet;
        inletValue      $internalField;
        value          $internalField;
    }
   
    "proc.*"
    {
        type            processor;
        value          $internalField;
    }
}

Code:

    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 0;

boundaryField
{
    dev_wall
    {
        type            zeroGradient;
    }

        dev_top
    {
        type            totalPressure;
        p0              uniform 0;
    }
       
    dev_inlet
    {
        type            zeroGradient;
    }
   
    dev_outletConserve
    {
        type            fixedFluxPressure;
        value          uniform 0;
    }

    dev_outletDeverse
    {
        type            fixedFluxPressure;
        value          uniform 0;
    }
   
    "proc.*"
    {
        type            processor;
        value          $internalField;
    }
}


Code:

    object      nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 0.001;

boundaryField
{
    dev_wall
    {
        type            nutkWallFunction;
        value          uniform 0;
    }
       
        dev_top
    {
        type            calculated;
        value          uniform 0.001;     
    }

    dev_inlet
    {
        type            calculated;
        value          uniform 0.001;     
    }
   
    dev_outletConserve
    {
        type            calculated;
        value          uniform 0.001;
    }

    dev_outletDeverse
    {
        type            calculated;
        value          uniform 0.001;
    }
   
    "proc.*"
    {
        type            processor;
        value          $internalField;
    }
}

Code:

object      k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 0.1;

boundaryField
{
    dev_wall
    {
        type            kqRWallFunction;
        value          $internalField;
    }
       
        dev_top
    {
        type            inletOutlet;
        inletValue      $internalField;
        value          $internalField;
    }
     
    dev_inlet
    {
        type            fixedValue;
        value          uniform 0.1;   
    }
   
    dev_outletConserve
    {
        type            inletOutlet;
        inletValue      $internalField;
        value          $internalField;
    }

    dev_outletDeverse
    {
        type            inletOutlet;
        inletValue      $internalField;
        value          $internalField;
    }
   
    "proc.*"
    {
        type            processor;
        value          $internalField;
    }
}

Code:

object      omega;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 0.003;

boundaryField
{
    dev_wall
    {
        type            omegaWallFunction;
        value          $internalField;
    }
       
        dev_top
    {
        type            inletOutlet;
        inletValue      $internalField;
        value          $internalField;
    }
       
    dev_inlet
    {
        type            fixedValue;
        value          uniform 0.001;
    }

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

    dev_outletDeverse
    {
        type            inletOutlet;
        inletValue      $internalField;
        value          $internalField;
    }
   
    "proc.*"
    {
        type            processor;
    //  inletValue      $internalField;
        value          $internalField;
    }
}


alexeym May 30, 2017 05:08

Hi,

Let's decompose your error message. To do this let's collect printStack output with the same processor number:

Code:

[0] #0  Foam::error::printStack(Foam::Ostream&)
[0] #1  Foam::sigFpe::sigHandler(int)
[0] #2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
[0] #3 Foam::variableHeightFlowRateInletVelocityFvPatchVectorField::updateCoeffs() at ??:?
[0] #4  Foam::fvMatrix<Foam::Vector<double> >::fvMatrix(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) at ??:?
...

From these messages we get 2 thing:

1. The error is FPE (Floating Point Exception)
2. Reason for the error is located in variableHeightFlowRateInletVelocityFvPatchVectorFi eld::updateCoeffs()

Since you are running Opt build, there are no line numbers (just ??:?).

If you open variableHeightFlowRateInletVelocityFvPatchVectorFi eld.C in editor, go to updateCoeffs method and look for the line that can cause FPE, you find this one:

Code:

scalar avgU = -flowRate/gSum(patch().magSf()*alphap);
If alphap is zero, you get division by zero. And alphap is zero if there is no liquid near the boundary.

To solve the problem, change the way you decompose your domain.

lethu May 30, 2017 06:12

Thanks a lot Alexey !

I tried to initialize all the domain with water and the problem has been solved.
Now calculations have started !
Let's wait and see if results are good !

Many many thanks !

I have been trying all different kind of BC for my outlets yesterday, thinking that this was where the problem was coming from !

RayJohn February 1, 2018 23:30

Lethu:
I recently encountered the same problem. Can you elaborate on how to solve this problem?

alexeym February 4, 2018 08:00

@RayJohn

I am not lethu but will try to answer you. For variableHeightFlowRate boundary condition to work, you need fluid in cells (at least in one) adjacent to the boundary using this BC. Why you do not have fluid in adjacent cells? It depends on your setup.

One possibility, which I assumed, when answered initial question, is parallel decomposition, i.e. fluid-containing region is cut-off by decomposition. Yet, there are LOTS of other variants.

RayJohn February 6, 2018 09:30

Quote:

Originally Posted by alexeym (Post 680399)
@RayJohn

I am not lethu but will try to answer you. For variableHeightFlowRate boundary condition to work, you need fluid in cells (at least in one) adjacent to the boundary using this BC. Why you do not have fluid in adjacent cells? It depends on your setup.

One possibility, which I assumed, when answered initial question, is parallel decomposition, i.e. fluid-containing region is cut-off by decomposition. Yet, there are LOTS of other variants.

@alexeym
Thank you very much. I successfully solved this problem.

in_sebas June 25, 2018 06:59

Good morning,
I'm completely new is the area of cfd.
I'm having a subject in the university where one of the works is to analyse a venturi.
The projects consists in doing the geometry and mesh in ansys and then export it and do all the rest in openFoam.
Given this fact, the part of export is going ok, but i need to use the comand os "makeAxiaMesh -overwrite". The problem apears here, because it gives ame a lot of errors because of segmentation fault.
I already saw and the files U,etc and boudary are in agreement.
I also saw tons of posts here and in other places and everyting that I did, incluing making the mesh in a different way in ansys don't result.
I'm in this for three days, desesperatly need help.
the error is this one
Revolving nodes
Radius to axis: min = 0 max = 2.12867
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigSegv::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 ? at ??:?
#4 ? at ??:?
#5 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#6 ? at ??:?
Segmentation fault

ps: When I do the command checkMesh it always says that is ok

Thanks a lot :)

alexeym June 28, 2018 04:20

Hi,

Your printStack lacks all useful information (since OpenFOAM was built without debugging information). Also your post lacks LOTS of relevant information (OpenFOAM version, makeAxialMesh version, etc, etc). So answer will be generic.

If you take a look at header comment in makeAxialMesh.C:

Code:

    Assumes the following about the grid:
    - 2D-Grid (just one cell thick)
    - parallel to the XY-plane
    - the boundary that is the symmetry axis is a straight line
    - the "front" and "back" are one patch

    Afterwards: use the collapseEdges utility to remove the faces at the symmetry axis

Does your Ansys mesh conform to the requirements?

in_sebas June 28, 2018 04:27

Hi,

I'm sorry I'm still new in this "World".
My version of openFoam is 3.0.1 and of ansys is 18.1.
I'm working with the solver simpleFoam and just making half of the geometry.
How do I know if the mesh is according with the requirements?

Thanks a lot

alexeym June 28, 2018 04:31

Hi,

Let's start with checkMesh output. Import mesh from Ansys, run checkMesh in case folder. Post output as a CODE section in a post, of as a txt attachment.

in_sebas June 28, 2018 04:51

1 Attachment(s)
Quote:

Originally Posted by alexeym (Post 697525)
Hi,

Let's start with checkMesh output. Import mesh from Ansys, run checkMesh in case folder. Post output as a CODE section in a post, of as a txt attachment.

Attachment 64272

This is what I got

in_sebas June 28, 2018 05:00

1 Attachment(s)
Attachment 64274
Sorry the other file was really confuse and disorganised.

alexeym June 28, 2018 05:06

Well...

- Grid is 2D
- Grid is parallel to XY plane

Yet, the rest is difficult to deduce from checkMesh output. So could you also post rotationDict (or if you invoke utility with just command line switches, post command line)?

I was not able to find version of makeAxialMesh for OpenFOAM 3.0.x. The last version is for 2.x.

in_sebas June 28, 2018 06:19

Quote:

Originally Posted by alexeym (Post 697531)
Well...

- Grid is 2D
- Grid is parallel to XY plane

Yet, the rest is difficult to deduce from checkMesh output. So could you also post rotationDict (or if you invoke utility with just command line switches, post command line)?

I was not able to find version of makeAxialMesh for OpenFOAM 3.0.x. The last version is for 2.x.

Here's my rotationDict
Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  1.0                                  |
|  \\  /    A nd          | Web:      http://www.openfoam.org              |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/

FoamFile
{
    version        2.0;
    format          ascii;

    root            ".";
    case            "test";
    instance        "system";
    local          "";

    class          dictionary;
    object          radialBCDict;
}


// Use the same parameters as from the command line
// makeAxialOldMode 1;

// used in old and in new mode
makeAxialAxisPatch  axis;
makeAxialWedgePatch frontAndBackPlanes;

// used only in old mode
//makeAxialOffset 0.05;

// used only in new mode
rotationVector (1 0 0);
originVector (0 0 0); //offset
// originVector (0 0 0); // origin

wedgeAngle 5;

// revolve option
// 0 = old and default mode, points are projected on wedges
// 1 = points are revolved
revolve 1;

// ************************************************************************* //

A friend of mine (who's a little bit more confident with linux) is trying to help me, below you can find his report on the issue.
We are using makeAxialMesh from openfoam-extend, more specifically the Breeder_2.0 version.
You can check it out using
Code:

svn checkout https://svn.code.sf.net/p/openfoam-extend/svn/trunk/Breeder_2.0/utilities/mesh/manipulation/MakeAxialMesh
I recompiled OpenFOAM 3.0.x and the utility itself using WM_COMPILE_OPTION=Debug, now when I run
Code:

makeAxialMesh -overwrite
I get some hints about what's causing the segfault:
Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  3.0.x                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 3.0.x-221b8ab77307
Exec  : makeAxialMesh -overwrite
Date  : Jun 28 2018
Time  : 12:12:13
Host  : "debvbox"
PID    : 9225
Case  : /home/pepito/OpenFOAM/pepito-3.0.x/run/venturi
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

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

Create mesh for time = 0

Plane of the grid: (0 0 1) (1.06469 0.0189437 -4.39627e-20)

The rotation-axis: ((0 0 0) (1 0 0))

Creating wedge with an opening angle of 5 degrees

Revolving nodes
Radius to axis: min = 0 max = 0.039


--> FOAM FATAL ERROR:
index -1 out of range 0 ... 6

    From function UList<T>::checkIndex(const label)
    in file /home/pepito/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude/UListI.H at line 109.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at /opt/OpenFOAM/OpenFOAM-3.0.x/src/OSspecific/POSIX/printStack.C:218
#1  Foam::error::abort() at /opt/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude/error.C:249
#2  Foam::Ostream& Foam::operator<< <Foam::error>(Foam::Ostream&, Foam::errorManip<Foam::error>) at ~/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude/errorManip.H:85 (discriminator 4)
#3  Foam::UList<Foam::polyPatch*>::checkIndex(int) const at ~/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude/UListI.H:109
#4  Foam::UList<Foam::polyPatch*>::operator[](int) const at ~/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude/UListI.H:200
#5  Foam::PtrList<Foam::polyPatch>::operator[](int) const at ~/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude/PtrListI.H:156
#6  ? at ~/OpenFOAM/pepito-3.0.x/applications/utilities/MakeAxialMesh/makeAxialMesh/makeAxialMesh.C:580 (discriminator 1)
#7  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8  ? at ??:?

I've gone through some basic debugging (editing the source code and printing messages) I figured out it crashes at makeAxialMesh/makeAxialMesh.c:580
Here's the snippet
Code:

const polyPatch &axisPatch=patches[patches.findPatchID(axisName)];
Digging a little bit deeper it seems like patches.findPatchID returns -1, that causes the segfault.
axisName is axis (as specified in the rotationDict).
That's how far I can get not knowing a single thing about CFD...
Hope it helps, antipatico.

alexeym June 28, 2018 11:19

Your friend explained the reason for the problem: you set axisName to non-existent patch. Set it to the name of patch you would like to convert into axis.

in_sebas June 29, 2018 03:29

I did it and now it works!
One more question, for the post-processing, to plot the variables in function with time, is there another way, besides paraView?
and while in paraView, which are te best options?

Thanks a lot,
Inês Sebastião

alexeym June 29, 2018 17:14

I am not quite sure, I got your question right. If you would like to visualise your case, there are (to name a few):
- ParaView
- VisIt
- EnSight
- Tecplot

Also you can use sets/surfaces function objects to sample your flow fields as a raw/gnuplot/whatever files and then you can use anything you'd like to visualise your fields.

in_sebas June 30, 2018 03:19

To visualize my case I know how to do it .
My problem is when i want to plot for example the pressure or the velocity

alexeym June 30, 2018 11:05

"Plot for example the pressure" is rather vague description of what you are trying to achieve. Do you need to plot evolution of a pressure value at a given point? Do you need to plot 2D iso-contours of a pressure field?

in_sebas June 30, 2018 13:37

3 Attachment(s)
I'm a little bit lost with the post processing.
About the question that I did i already found information and got cleared about it!
the problem now it's in the residuals parts.
I don't understand that much about this topic, so I tried to do different simulations (change the end time, the relaxation factors (because my teacher advised it).
The graphics that i got were the ones above, however according to what I have read I think they are not that good.
What us your opinion?
Thanks a lot for the help!

Attachment 64305
Attachment 64306
Attachment 64307


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