CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

createbaffles with internalfaces=true gives a floating point error...

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 20, 2023, 13:07
Default createbaffles with internalfaces=true gives a floating point error...
  #1
zog
New Member
 
Jacques
Join Date: Jul 2019
Posts: 11
Rep Power: 6
zog is on a distinguished road
I am trying to make a test case for a very very simple problem : i have an internal surface in a 3D mesh, exported as a wall. I want to convert this surface into a baffle and the use fan BC. it fails... badly.


So the setup : a box (wall names : sides) and a disk inside it (wall name ventilfan). fluent3DMeshtoFoam or whatever works, and creates the follwing boundary file :


Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2212                                  |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    arch        "LSB;label=32;scalar=64";
    class       polyBoundaryMesh;
    location    "constant/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

2
(
    ventilfan
    {
        type            wall;
        inGroups        1(wall);
        nFaces          2966;
        startFace       651850;
    }
    sides
    {
        type            wall;
        inGroups        1(wall);
        nFaces          8478;
        startFace       654816;
    }
)

// ************************************************************************* //
I then run topoSet with success :

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2112                                 |
|   \\  /    A nd           | Website:                                        |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

actions
(
    // Generate faceZones for the createBaffles step
    //  a) Generate a faceSet from a patch
    //  b) Generate a faceZoneSet from the faceSet
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    // a) Create faceSet using patch interfaceInner
    {
        name    interface1FaceSet;
        type    faceSet;
        action  new;
        source  patchToFace;
        sourceInfo
        {
            patch    ventilfan;
        }
    }
    // b) Create faceZoneSet using face set
    {
        name    interface1FaceZone;
        type    faceZoneSet;
        action  new;
        source  setToFaceZone;
        sourceInfo
        {
            faceSet interface1FaceSet;
        }
    }

);
resulting in



Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Overriding OptimisationSwitches according to controlDict
    fileHandler (unregistered)
Overriding fileHandler to uncollated
I/O    : uncollated
Create polyMesh for time = 0

Reading topoSetDict

Time = 0
    mesh not changed.
Created faceSet interface1FaceSet
    Applying source patchToFace
    Adding all faces of patches (ventilfan) ...
    Found matching patch ventilfan with 2966 faces.
    faceSet interface1FaceSet now size 2966
Created faceZoneSet interface1FaceZone
    Applying source setToFaceZone
    Adding all faces from faceSet interface1FaceSet ...
    faceZoneSet interface1FaceZone now size 2966

End
I setup the createbaffledict :

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2112                                 |
|   \\  /    A nd           | Website:                                        |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      createBafflesDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// Whether to convert internal faces only (so leave boundary faces intact).
// This is only relevant if your face selection type can pick up boundary
// faces.
internalFacesOnly false;


// Baffles to create.
baffles
{
    // NOTE: cyclicAMI patches MUST BE defined PRIOR to their associted
    //       blockage patches

    cyclicFaces1
    {
        //- Use predefined faceZone to select faces and orientation.
        type        faceZone;
        zoneName    interface1FaceZone;

        patches
        {
            master
            {
                //- Master side patch

                name            fan_half0;
                type            cyclic;
                neighbourPatch  fan_half1;


            }
            slave
            {
                //- Slave side patch

                name            fan_half1;
                type            cyclic;
                neighbourPatch  fan_half0;


            }

        }
    }


}
and when i run it... boom


Code:
/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Overriding OptimisationSwitches according to controlDict
    fileHandler (unregistered)
Overriding fileHandler to uncollated
I/O    : uncollated
Create mesh for time = 0

Reading baffle criteria from createBafflesDict

Reading geometric fields

Reading volScalarField: AIR GAZ T Ydefault alphat k nut p p_rgh
Reading volVectorField: U
Created zone cyclicFaces1 at index 2 with 2966 faces
--> FOAM Warning : 
     From void createFaces(bool, const Foam::fvMesh&, const  Foam::faceZone&, const labelList&, const labelList&,  Foam::polyTopoChange&, Foam::bitSet&, Foam::label&)
    in file createBaffles.C at line 402
    Found boundary face (in patch ventilfan) in faceZone cyclicFaces1 to convert to baffle patches fan_half0/fan_half1
    Set internalFacesOnly to true in the createBaffles control dictionary if you don't wish to convert boundary faces.
Converted 2966 faces into boundary faces in patches 2(fan_half0 fan_half1)

#0   Foam::error::printStack(Foam::Ostream&) in  /clust/softs/OpenFOAM/OpenFOAM-v2212/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
#1  Foam::sigFpe::sigHandler(int) in /clust/softs/OpenFOAM/OpenFOAM-v2212/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
#2  ? in /lib64/libpthread.so.0
#3    Foam::cyclicPolyPatch::getCentresAndAnchors(Foam::PrimitivePatch<Foam::SubList<Foam::face>,  Foam::Field<Foam::Vector<double> > const&>  const&, Foam::PrimitivePatch<Foam::SubList<Foam::face>,  Foam::Field<Foam::Vector<double> > const&>  const&, Foam::Field<Foam::Vector<double> >&,  Foam::Field<Foam::Vector<double> >&,  Foam::Field<Foam::Vector<double> >&,  Foam::Field<double>&) const in  /clust/softs/OpenFOAM/OpenFOAM-v2212/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
#4   Foam::cyclicPolyPatch::order(Foam::PstreamBuffers&,  Foam::PrimitivePatch<Foam::SubList<Foam::face>,  Foam::Field<Foam::Vector<double> > const&>  const&, Foam::List<int>&, Foam::List<int>&)  const in  /clust/softs/OpenFOAM/OpenFOAM-v2212/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so
#5   Foam::polyTopoChange::reorderCoupledFaces(bool, Foam::polyBoundaryMesh  const&, Foam::UList<int> const&, Foam::UList<int>  const&, Foam::UList<int> const&,  Foam::Field<Foam::Vector<double> > const&) in  /clust/softs/OpenFOAM/OpenFOAM-v2212/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so
#6   Foam::polyTopoChange::compactAndReorder(Foam::polyMesh const&,  Foam::UList<int> const&, bool, bool, bool, int&,  Foam::Field<Foam::Vector<double> >&,  Foam::List<int>&, Foam::List<int>&,  Foam::List<Foam::objectMap>&,  Foam::List<Foam::objectMap>&,  Foam::List<Foam::objectMap>&,  Foam::List<Foam::objectMap>&,  Foam::List<Foam::objectMap>&,  Foam::List<Foam::objectMap>&,  Foam::List<Foam::objectMap>&,  Foam::List<Foam::objectMap>&,  Foam::List<Foam::Map<int> >&,  Foam::List<int>&, Foam::List<int>&,  Foam::List<Foam::Map<int> >&) in  /clust/softs/OpenFOAM/OpenFOAM-v2212/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so
#7   Foam::polyTopoChange::changeMesh(Foam::polyMesh&,  Foam::UList<int> const&, bool, bool, bool, bool) in  /clust/softs/OpenFOAM/OpenFOAM-v2212/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so
#8   Foam::polyTopoChange::changeMesh(Foam::polyMesh&, bool, bool, bool,  bool) in  /clust/softs/OpenFOAM/OpenFOAM-v2212/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so
#9  ? in /clust/softs/OpenFOAM/OpenFOAM-v2212/platforms/linux64GccDPInt32Opt/bin/createBaffles
#10  __libc_start_main in /lib64/libc.so.6
#11  ? in /clust/softs/OpenFOAM/OpenFOAM-v2212/platforms/linux64GccDPInt32Opt/bin/createBaffles
Exception en point flottant
What is even weirder (maybe) is that if i run it with internalfacesonly =true, it doesn't fail. But it keeps the initial wall (ventilfan) and creates the two cyclyc faces with 0 cells...



So i am sure I am doing something very wrong very wrongly as it is a very very simple test and should just work out of the blue, but i can't figure out what... looking forward to have the dumb face when I understand it by readin your answers




[edit] I failed the title : it fails with internalfacesonly = false, which i need I think otherwise I will have a wall in my doimain and also the two cyclic faecs have 0 cells...

[edit2] I tried with a full tetra mesh, or even a full hexcore, same issue... so not related to poly I think ?
zog 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
[blockMesh] blockMesh with double grading. spwater OpenFOAM Meshing & Mesh Conversion 92 January 12, 2019 09:00
long error when using make-install SU2_AD. tomp1993 SU2 Installation 3 March 17, 2018 06:25
Errors in UDF shashank312 Fluent UDF and Scheme Programming 6 May 30, 2013 20:30
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50
Compiling problems with hello worldC fw407 OpenFOAM Installation 21 January 6, 2008 17:38


All times are GMT -4. The time now is 08:15.