Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element must be a fixed size using foamToCGNS (CGNSOO::cgns_exception) #6

Open
Reptider opened this issue May 15, 2023 · 4 comments
Open

Comments

@Reptider
Copy link

Reptider commented May 15, 2023

Hello!
I have installed OpenFOAM-5.x and cgnsToFromFoam for Ubuntu 22.04 LTS. The utility cgnsToFoam works correctly, however foamToCGNS gives me the error "Element must be a fixed size" when I try to convert all cases in OF5.x tutorial folder. By the way, suggested case2 with cycle type of perio1 boundary is outdated, but changing "cycle" type to "patch" helps to blockMesh. Log of using foamToCGNS in standard simpleFoam case is presented below:

/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5.x                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 5.x-7f7d351b741b
Exec   : foamToCGNS
Date   : May 15 2023
Time   : 22:38:39
Host   : "ubuntu"
PID    : 119097
I/O    : uncollated
Case   : /home/nick/OpenFOAM/OpenFOAM-5.x/tutorials/incompressible/simpleFoam/airFoil2D
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

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

Create mesh for time = 0

Default value for rho: 1

Warning : log file not found. No convergence history will be included.
Time = 0
CGNS output file : "/home/nick/OpenFOAM/OpenFOAM-5.x/tutorials/incompressible/simpleFoam/airFoil2D/ConversionCGNS/0.cgns"
Processing the mesh: 21812 nodes, 10720 cells
Processing mesh connectivity: 10720 cells of type: "MIXED"
terminate called after throwing an instance of 'CGNSOO::cgns_exception'
  what():  CGNS error in Zone_t::writeElements while calling cg_section_write
Element must be a fixed size
Aborted (core dumped)

I have added -I/usr/include/hdf5/serial/ to EXE_INC in 2 options files in applications for including necessary headers of hdf5 and copied libhdf5_cpp.so from /usr/lib/x86_64-linux-gnu/hdf5/serial and libcgns.so from /usr/lib/x86_64-linux-gnu to /home/nick/OpenFOAM/cgnsToFromFoam/src/libcgnsoo_3.0/platforms/linux64GccDPInt32Opt/lib folder.
Maybe the utility was compilled with problems (i didn't get any errors) or 22.04 is very new for it? I tried docker with Ubuntu 14.04, but i couldn't compile it due to troubles with Makefiles there.

@wyldckat
Copy link
Owner

I've opened two new issues, one for the case and another for compiling/linking.

As for the central issue here, namely the fixed size elements, I'm guessing it has to do with certain cell types that are not supported by the converter.

Have you tried the simpler meshes in the tutorials folders, such as for the cavity case?

@Reptider
Copy link
Author

Reptider commented May 16, 2023

Thanks for answer!
Yep, mesh of cavity also doesn't allow to use foamToCGNS.

/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5.x                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 5.x-7f7d351b741b
Exec   : foamToCGNS
Date   : May 16 2023
Time   : 12:15:49
Host   : "ubuntu"
PID    : 3800
I/O    : uncollated
Case   : /home/nick/OpenFOAM/OpenFOAM-5.x/tutorials/incompressible/icoFoam/cavity/cavity
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

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

Create mesh for time = 0

Default value for rho: 1

Warning : log file not found. No convergence history will be included.
Time = 0
CGNS output file : "/home/nick/OpenFOAM/OpenFOAM-5.x/tutorials/incompressible/icoFoam/cavity/cavity/ConversionCGNS/0.cgns"
Processing the mesh: 882 nodes, 400 cells
Processing mesh connectivity: 400 cells of type: "MIXED"
terminate called after throwing an instance of 'CGNSOO::cgns_exception'
  what():  CGNS error in Zone_t::writeElements while calling cg_section_write
Element must be a fixed size

In addition, the behavior of simpleFoam/pitzDaily and case2 in your tutorial (after some changes) is similar.

@wyldckat
Copy link
Owner

Mmm... from the commits, the last time I looked into this was in July 2018. Back then I was either using Ubuntu 16.04 or 18.04.
The mention to 14.04, must be because it was the oldest I was able to somewhat test.

It is also possible that the CGNS libraries that are being provided in Ubuntu 22.04 are either not working properly due to modern GCC issues as well, or something else entirely.
From a quick search online for the "libcgnsoo" library, it seems that it is being dropped entirely in some situations: https://bugs.gentoo.org/755728

Right now, I'm not able to look further into this, at least not in my free time.

@Reptider
Copy link
Author

Okay, thanks for the answers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants