View Issue Details

IDProjectCategoryView StatusLast Update
0004130OpenFOAMBugpublic2024-08-07 10:34
Reporteranicusan Assigned Towill  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSOtherOS Version(please specify)
Product Version12 
Fixed in Version12 
Summary0004130: NCC crashes with CrankNicolson integration
DescriptionFirst, thank you very much for developing the NCC scheme.
It seems that it is currently incompatible with CrankNicolson integration; setting any example tutorial using NCC (e.g. incompressibleFluid/propeller) to use CrankNicolson integration (`system/fvSchemes/ddtSchemes` to `default CrankNicolson 0.7`) results in the following hard-to-trace error:

```
[3] --> FOAM FATAL ERROR:
[3] Attempt to cast type calculated to type conformed
[3]
[3] From function To& Foam::refCast(From&) [with To = conformedFvsPatchField<double>; From = fvsPatchField<double>]
[3] in file /home/ubuntu/OpenFOAM/OpenFOAM-12/src/OpenFOAM/lnInclude/typeInfo.H at line 137.
[3]
FOAM parallel run aborting
```

I see all NCC tutorials are using Euler integration - I also have a few related questions if that's okay:
1) Is this a known bug?
2) Is there a specific reason to always use Euler integration in NCC cases?
3) As the error message is very different to the actual source of error (I searched boundaries and nut files for calculated types for hours...), would it be possible to advertise CrankNicolson integration with NCC as being broken for the time being?

Thank you.
Steps To ReproduceTake any tutorial case using NCC and set the time integration scheme to CrankNicolson. For example:
```
> foamCloneCase $FOAM_TUTORIALS/incompressibleFluid/propeller ncc_ddt
> cd ncc_ddt
> foamDictionary system/fvSchemes -entry "ddtSchemes/default" -set "CrankNicolson 0.7"
> ./Allrun
```
Additional InformationThis was tested on:
- A Mac M3 with Multipass Ubuntu 24.04 LTS aarch64 and apt-get installation of OpenFOAM 12.
- A RHEL 8.8 cluster with Intel Sapphire Rapids x86_64 CPUs with a self-compiled OpenFOAM 12, without ParaView.

I attached the foamRun log.
TagsNo tags attached.

Activities

anicusan

2024-08-07 00:40

reporter  

log.foamRun (12,991 bytes)   
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  12
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 12-c59e5ce98388
Exec   : foamRun -parallel
Date   : Aug 06 2024
Time   : 18:22:36
Host   : "openfoam"
PID    : 199411
I/O    : uncollated
Case   : /Users/anicusan/Prog/CFD/Tutorials/propeller
nProcs : 8
Slaves : 
7
(
"openfoam.199412"
"openfoam.199413"
"openfoam.199414"
"openfoam.199415"
"openfoam.199416"
"openfoam.199417"
"openfoam.199419"
)

Pstream initialised with:
    floatTransfer      : false
    nProcsSimpleSum    : 0
    commsType          : nonBlocking
    polling iterations : 0
sigFpe : Floating point exception trapping - not supported on this platform
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

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

Create mesh for time = 0

patchToPatch: Calculating couplings between 22416 source faces and 22416 target faces
    Source min/average/max coverage = 1/1.0001/1.45271
    Target min/average/max coverage = 0.999392/1/1
    Source average openness/error/depth/angle = 7.57202e-17/0.000305357/7.12782e-06/0.000277608
    Source max openness/error/depth/angle = 6.1543e-16/0.781097/0.0776058/2.07293
    45172 couplings calculated in 1.67926s
fvMeshStitcher: Connecting
    Cell min/avg/max openness = 0/6.2118e-17/2.61019e-16
Selecting fvMeshMover motionSolver
Selecting motion solver: solidBody
Selecting solid-body motion function rotatingMotion
    - selecting cells using cellZone innerCylinder
Selecting solver incompressibleFluid
Selecting viscosity model constant
Selecting turbulence model type RAS
Selecting RAS turbulence model kEpsilon
RAS
{
    model           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

Courant Number mean: 2.49584e-05 max: 0.0556567

PIMPLE: No convergence criteria found


PIMPLE: No corrector convergence criteria found
        Calculations will do 2 corrections


PIMPLE: Operating solver in transient mode with 2 outer correctors


Reading surface description:
    zNormal
    isoQ
    propeller

forcesBase forces:
    Not including porosity effects
forces forces:
    Not including porosity effects

Starting time loop

forces forces write:
    sum of forces:
        pressure : (0 0 0)
        viscous  : (0 0 0)
        porous   : (0 0 0)
    sum of moments:
        pressure : (0 0 0)
        viscous  : (0 0 0)
        porous   : (0 0 0)

Constructing face momentum Uf
Courant Number mean: 2.49584e-05 max: 0.0556567
fvMeshStitcher: Disconnecting
    Cell min/avg/max openness = 0/6.00751e-17/2.10182e-16
deltaT = 1.19048e-05
Time = 1.19048e-05s

PIMPLE: Iteration 1
patchToPatch: Calculating couplings between 22416 source faces and 22416 target faces
    Source min/average/max coverage = 0.996015/0.999999/1
    Target min/average/max coverage = 0.996983/0.999999/1
    Source average openness/error/depth/angle = 1.48088e-16/3.25687e-07/0.0010887/0.0987975
    Source max openness/error/depth/angle = 8.02448e-16/0.00299478/0.00746153/2.22572
    198164 couplings calculated in 0.627131s
fvMeshStitcher: Connecting
    smoothSolver:  Solving for MeshPhi, Initial residual = 1, Final residual = 0.00941561, No Iterations 19
[3] 
[3] 
[3] --> FOAM FATAL ERROR: 
[3] Attempt to cast type calculated to type conformed
[3] 
[3]     From function To& Foam::refCast(From&) [with To = conformedFvsPatchField<double>; From = fvsPatchField<double>]
[3]     in file /home/ubuntu/OpenFOAM/OpenFOAM-12/src/OpenFOAM/lnInclude/typeInfo.H at line 137.
[3] 
FOAM parallel run aborting
[3] 
[3] #0  Foam::error::printStack(Foam::Ostream&)[5] 
[5] 
[5] --> FOAM FATAL ERROR: 
[5] Attempt to cast type calculated to type conformed
[5] 
[5]     From function To& Foam::refCast(From&) [with To = conformedFvsPatchField<double>; From = fvsPatchField<double>]
[5]     in file /home/ubuntu/OpenFOAM/OpenFOAM-12/src/OpenFOAM/lnInclude/typeInfo.H at line 137.
[5] 
FOAM parallel run aborting
[5] 
[7] 
[5] #0  Foam::error::printStack(Foam::Ostream&)[7] 
[7] --> FOAM FATAL ERROR: 
[7] Attempt to cast type calculated to type conformed
[7] 
[7]     From function To& Foam::refCast(From&) [with To = conformedFvsPatchField<double>; From = fvsPatchField<double>]
[7]     in file /home/ubuntu/OpenFOAM/OpenFOAM-12/src/OpenFOAM/lnInclude/typeInfo.H at line 137.
[7] 
FOAM parallel run aborting
[6] 
[6] 
[6] --> FOAM FATAL ERROR: 
[6] Attempt to cast type calculated to type conformed
[6] 
[6]     From function To& Foam::refCast(From&) [with To = conformedFvsPatchField<double>; From = fvsPatchField<double>]
[6]     in file /home/ubuntu/OpenFOAM/OpenFOAM-12/src/OpenFOAM/lnInclude/typeInfo.H at line 137.
[6] 
FOAM parallel run aborting
[6] 
[7] [0] 
[0] [4] 
[4] 
[4] --> FOAM FATAL ERROR: 
[4] Attempt to cast type calculated to type conformed
[4] 
[4]     From function To& Foam::refCast(From&) [with To = conformedFvsPatchField<double>; From = fvsPatchField<double>]
[4]     in file /home/ubuntu/OpenFOAM/OpenFOAM-12/src/OpenFOAM/lnInclude/typeInfo.H at line 
[0] --> FOAM FATAL ERROR: 
[0] Attempt to cast type calculated to type conformed137.
[4] 
FOAM parallel run aborting
[4] 
[2] 
[2] 
[2] --> FOAM FATAL ERROR: 
[2] Attempt to cast type calculated to type conformed
[2] 
[2]     From function To& Foam::refCast(From&) [with To = conformedFvsPatchField<double>; From = fvsPatchField<double>]
[2]     in file /home/ubuntu/OpenFOAM/OpenFOAM-12/src/OpenFOAM/lnInclude/typeInfo.H at line 137.
[2] 
FOAM parallel run aborting
[2] 

[0] 
[0]     From function To& Foam::refCast(From&) [with To = conformedFvsPatchField<double>; From = fvsPatchField<double>]
[0]     in file /home/ubuntu/OpenFOAM/OpenFOAM-12/src/OpenFOAM/lnInclude/typeInfo.H at line 137.
[0] 
FOAM parallel run aborting
[0] 

[6] [2] #0  Foam::error::printStack(Foam::Ostream&)[7] #0  Foam::error::printStack(Foam::Ostream&)[0] #0  Foam::error::printStack(Foam::Ostream&)[4] #0  Foam::error::printStack(Foam::Ostream&)#0  Foam::error::printStack(Foam::Ostream&)[1] 
[1] 
[1] --> FOAM FATAL ERROR: 
[1] Attempt to cast type calculated to type conformed
[1] 
[1]     From function To& Foam::refCast(From&) [with To = conformedFvsPatchField<double>; From = fvsPatchField<double>]
[1]     in file /home/ubuntu/OpenFOAM/OpenFOAM-12/src/OpenFOAM/lnInclude/typeInfo.H at line 137.
[1] 
FOAM parallel run aborting
[1] 
[1] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
[1] #1  Foam::error::abort() at ??:?
[3] #1  Foam::error::abort() at ??:?
[0] #1  Foam::error::abort() at ??:?
[7] #1  Foam::error::abort() at ??:?
[5] #1  Foam::error::abort() at ??:?
[2] #1  Foam::error::abort() at ??:?
[4] #1  Foam::error::abort() at ??:?
[6] #1  Foam::error::abort() at ??:?
[3] #2  Foam::conformedFvsPatchField<double>::unconform(Foam::GeometricBoundaryField<double, Foam::fvsPatchField, Foam::surfaceMesh>&) at ??:?
[5] #2  Foam::conformedFvsPatchField<double>::unconform(Foam::GeometricBoundaryField<double, Foam::fvsPatchField, Foam::surfaceMesh>&) at ??:?
[0] #2  Foam::conformedFvsPatchField<double>::unconform(Foam::GeometricBoundaryField<double, Foam::fvsPatchField, Foam::surfaceMesh>&) at ??:?
[7] #2  Foam::conformedFvsPatchField<double>::unconform(Foam::GeometricBoundaryField<double, Foam::fvsPatchField, Foam::surfaceMesh>&) at ??:?
[2] #2  Foam::conformedFvsPatchField<double>::unconform(Foam::GeometricBoundaryField<double, Foam::fvsPatchField, Foam::surfaceMesh>&) at ??:?
[4] #2  Foam::conformedFvsPatchField<double>::unconform(Foam::GeometricBoundaryField<double, Foam::fvsPatchField, Foam::surfaceMesh>&) at ??:?
[3] #3  Foam::fvMeshStitcher::postUnconformSurfaceFields() at ??:?
[6] #2  Foam::conformedFvsPatchField<double>::unconform(Foam::GeometricBoundaryField<double, Foam::fvsPatchField, Foam::surfaceMesh>&) at ??:?
 at ??:?
[5] #3  Foam::fvMeshStitcher::postUnconformSurfaceFields()[1] #2  Foam::conformedFvsPatchField<double>::unconform(Foam::GeometricBoundaryField<double, Foam::fvsPatchField, Foam::surfaceMesh>&) at ??:?
[2] #3  Foam::fvMeshStitcher::postUnconformSurfaceFields() at ??:?
[0] #3  Foam::fvMeshStitcher::postUnconformSurfaceFields() at ??:?
[7] #3  Foam::fvMeshStitcher::postUnconformSurfaceFields() at ??:?
[4] #3  Foam::fvMeshStitcher::postUnconformSurfaceFields() at ??:?
[2] #4  Foam::fvMeshStitcher::connectThis(bool, bool, bool) at ??:?
[5] #4  Foam::fvMeshStitcher::connectThis(bool, bool, bool) at ??:?
[3] #4  Foam::fvMeshStitcher::connectThis(bool, bool, bool) at ??:?
[6] #3  Foam::fvMeshStitcher::postUnconformSurfaceFields() at ??:?
[0] #4  Foam::fvMeshStitcher::connectThis(bool, bool, bool) at ??:?
[1] #3  Foam::fvMeshStitcher::postUnconformSurfaceFields() at ??:?
[2] #5  Foam::fvMeshStitcher::connect(bool, bool, bool) at ??:?
[5] #5  Foam::fvMeshStitcher::connect(bool, bool, bool) at ??:?
[7] #4  Foam::fvMeshStitcher::connectThis(bool, bool, bool) at ??:?
[0] #5  Foam::fvMeshStitcher::connect(bool, bool, bool) at ??:?
[4] #4  Foam::fvMeshStitcher::connectThis(bool, bool, bool) at ??:?
[1] #4  Foam::fvMeshStitcher::connectThis(bool, bool, bool) at ??:?
 at ??:?
[5] #6  Foam::fvMesh::move()[6] #4  Foam::fvMeshStitcher::connectThis(bool, bool, bool) at ??:?
[2] #6  Foam::fvMesh::move() at ??:?
[7] #5  Foam::fvMeshStitcher::connect(bool, bool, bool) at ??:?
[4] #5  Foam::fvMeshStitcher::connect(bool, bool, bool) at ??:?
[3] #5  Foam::fvMeshStitcher::connect(bool, bool, bool) at ??:?
[0] #6  Foam::fvMesh::move() at ??:?
[7] #6  Foam::fvMesh::move() at ??:?
[2] #7   at ??:?
[5] #7  ? at ??:?
[6] #5  Foam::fvMeshStitcher::connect(bool, bool, bool)? in "/opt/openfoam12/platforms/linuxArm64GccDPInt32Opt/bin/foamRun"
[5] #8  ? at ??:?
[4] #6  Foam::fvMesh::move() at ??:?
[1] #5  Foam::fvMeshStitcher::connect(bool, bool, bool) in "/usr/lib/aarch64-linux-gnu/libc.so.6"
[5] #9  __libc_start_main at ??:?
[0] #7   in "/opt/openfoam12/platforms/linuxArm64GccDPInt32Opt/bin/foamRun"
[2] #8  ? in "/usr/lib/aarch64-linux-gnu/libc.so.6"
[5] #10  ? in "/opt/openfoam12/platforms/linuxArm64GccDPInt32Opt/bin/foamRun"
[0] #8  ? at ??:?
[3] #6  Foam::fvMesh::move()? at ??:?
[7] #7   in "/usr/lib/aarch64-linux-gnu/libc.so.6"
[2] #9  __libc_start_main at ??:?
[4] #7  ? in "/opt/openfoam12/platforms/linuxArm64GccDPInt32Opt/bin/foamRun"
 in "/usr/lib/aarch64-linux-gnu/libc.so.6"
[0] #9  __libc_start_main--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 5 in communicator MPI COMMUNICATOR 3 SPLIT FROM 0
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
? in "/usr/lib/aarch64-linux-gnu/libc.so.6"
[0] #10  ? in "/opt/openfoam12/platforms/linuxArm64GccDPInt32Opt/bin/foamRun"
[4] #8  ? in "/opt/openfoam12/platforms/linuxArm64GccDPInt32Opt/bin/foamRun"
 in "/opt/openfoam12/platforms/linuxArm64GccDPInt32Opt/bin/foamRun"
[7] #8  ? in "/usr/lib/aarch64-linux-gnu/libc.so.6"
[7] #9  __libc_start_main in "/usr/lib/aarch64-linux-gnu/libc.so.6"
[7] #10  ? in "/opt/openfoam12/platforms/linuxArm64GccDPInt32Opt/bin/foamRun"
 at ??:?
[3] #7  ? in "/opt/openfoam12/platforms/linuxArm64GccDPInt32Opt/bin/foamRun"
[3] #8  ? in "/usr/lib/aarch64-linux-gnu/libc.so.6"
[3] #9  __libc_start_main in "/usr/lib/aarch64-linux-gnu/libc.so.6"
[3] #10  ? in "/usr/lib/aarch64-linux-gnu/libc.so.6"
[2] #10  ? in "/opt/openfoam12/platforms/linuxArm64GccDPInt32Opt/bin/foamRun"
 at ??:?
[1] #6  Foam::fvMesh::move() at ??:?
[1] #7  ? in "/opt/openfoam12/platforms/linuxArm64GccDPInt32Opt/bin/foamRun"
[1] #8  ? in "/usr/lib/aarch64-linux-gnu/libc.so.6"
[1] #9  __libc_start_main at ??:?
[6] #6  Foam::fvMesh::move() at ??:?
[6] #7  ? in "/opt/openfoam12/platforms/linuxArm64GccDPInt32Opt/bin/foamRun"
[6] #8  ? in "/usr/lib/aarch64-linux-gnu/libc.so.6"
[6] #9  __libc_start_main in "/usr/lib/aarch64-linux-gnu/libc.so.6"
[6] #10  ? in "/opt/openfoam12/platforms/linuxArm64GccDPInt32Opt/bin/foamRun"
 in "/usr/lib/aarch64-linux-gnu/libc.so.6"
[4] #9  __libc_start_main in "/usr/lib/aarch64-linux-gnu/libc.so.6"
[4] #10  ? in "/opt/openfoam12/platforms/linuxArm64GccDPInt32Opt/bin/foamRun"
[openfoam:199408] 5 more processes have sent help message help-mpi-api.txt / mpi-abort
[openfoam:199408] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages
log.foamRun (12,991 bytes)   

will

2024-08-07 10:34

manager   ~0013358

This was resolved shortly after release of v12. Please update. Ubuntu packs with the fix are now available.

https://github.com/OpenFOAM/OpenFOAM-12/commit/65b4d33620a218b1e8a69e0dcc1619ec45bf6823
https://github.com/OpenFOAM/OpenFOAM-dev/commit/1d0f414054b979a24df3b9bc6d67c15ce0d46e69

Issue History

Date Modified Username Field Change
2024-08-07 00:40 anicusan New Issue
2024-08-07 00:40 anicusan File Added: log.foamRun
2024-08-07 10:34 will Assigned To => will
2024-08-07 10:34 will Status new => resolved
2024-08-07 10:34 will Resolution open => fixed
2024-08-07 10:34 will Fixed in Version => 12
2024-08-07 10:34 will Note Added: 0013358