CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Gmsh] Creating 2 baffles in geometry

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 6, 2018, 05:37
Default Creating 2 baffles in geometry
  #1
New Member
 
Petar Cajic
Join Date: Jul 2018
Location: City of Nis, Serbia
Posts: 5
Rep Power: 8
caja94 is on a distinguished road
Send a message via Skype™ to caja94
Hello guys, I am a beginner at using OpenFoam and Gmsh, and I have one problem.


For my master thesis, I wanted to create an air duct with heat source, and 2 plates that partially close air duct's cross-section. I used Gmsh for creating geometry, and everything works fine, except baffles. Here's what I want to get:





Plate1 is there, but it's invisible from this point of view. This is done in PHOENICS.


Now, I created geometry in Gmsh, and then I created a mesh. After that, I imported that mesh file in OpenFoam, and I tried to create 2 baffles that I need. For that I followed this youtube tutorial:
https://www.youtube.com/watch?v=7Ex1RHDQqIc


I have 2 plates, named Plate1 and Plate2. Here is my baffleDict file:


Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      createBafflesDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

internalFacesOnly true;

baffles
{
    baffleFaces
    {
        type        faceZone;
        zoneName    Plate1;
        flip        false;
    
        patches
        {
            master
            {
                name            Plate1;
                type            wall;
            }
            slave { ${..master} }
        }
    }
}

baffles
{
    baffleFaces
    {
        type        faceZone;
        zoneName    Plate2;
        flip        false;
    
        patches
        {
            master
            {
                name            Plate2;
                type            wall;
            }
            slave { ${..master} }
        }
    }
}
Also, here's my boundary file:


Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       polyBoundaryMesh;
    location    "constant/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

9
(
    Front
    {
        type            empty;
        physicalType    empty;
        nFaces          1380;
        startFace       2662;
    }
    Bottom
    {
        type            patch;
        physicalType    patch;
        nFaces          50;
        startFace       4042;
    }
    Plate1
    {
        type            wall;
        physicalType    wall;
        nFaces          0;
        startFace       4092;
    }
    HeatSource
    {
        type            patch;
        physicalType    patch;
        nFaces          32;
        startFace       4092;
    }
    Back
    {
        type            empty;
        physicalType    empty;
        nFaces          1380;
        startFace       4124;
    }
    Outlet
    {
        type            patch;
        physicalType    patch;
        nFaces          18;
        startFace       5504;
    }
    Inlet
    {
        type            patch;
        physicalType    patch;
        nFaces          16;
        startFace       5522;
    }
    Plate2
    {
        type            wall;
        physicalType    wall;
        nFaces          0;
        startFace       5538;
    }
    Top
    {
        type            patch;
        physicalType    patch;
        nFaces          80;
        startFace       5538;
    }
)
After I run createBaffles command, I get this:


Code:
createBaffles -case proba1 -dict system/baffleDict -overwrite
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 6-e05f780ebc87
Exec   : createBaffles -case proba1 -dict system/baffleDict -overwrite
Date   : Oct 06 2018
Time   : 10:21:12
Host   : "Petar"
PID    : 14881
I/O    : uncollated
Case   : ./proba1
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

Reading baffle criteria from createBafflesDict

Not converting faces on non-coupled patches.

Created zone baffleFaces at index 2 with 12 faces
Patch 'Plate2' already exists.  Only moving patch faces - type will remain the same
Patch 'Plate2' already exists.  Only moving patch faces - type will remain the same
Converted 12 faces into boundary faces in patches 1(Plate2)

--> FOAM Warning : 
    From function int main(int, char**)
    in file createBaffles.C at line 854
    Setting field on boundary faces to zero.
You might have to edit these fields.

Removing zero-sized patches:
    Plate1 type wall at position 2

Writing mesh to 0
End
Now, when I run paraFoam, I see the problem that shows at the line "Removing zero-sized patches: Plate1 type wall at position 2"





Then, I tried changing startFace for Plate1 to the last face, as said in tutorial, but I get this error:


Code:
Create time

Create mesh for time = 0

Reading baffle criteria from createBafflesDict

Not converting faces on non-coupled patches.

Created zone baffleFaces at index 2 with 12 faces
Patch 'Plate2' already exists.  Only moving patch faces - type will remain the same
Patch 'Plate2' already exists.  Only moving patch faces - type will remain the same


--> FOAM FATAL ERROR: 
Problem : Patch Plate1 starts at 5618
Current face counter at 4092
Are patches in incremental order?

    From function void Foam::polyTopoChange::addMesh(const Foam::polyMesh&, const labelList&, const labelList&, const labelList&, const labelList&)
    in file polyTopoChange/polyTopoChange/polyTopoChange.C at line 2451.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::polyTopoChange::addMesh(Foam::polyMesh const&, Foam::List<int> const&, Foam::List<int> const&, Foam::List<int> const&, Foam::List<int> const&) at ??:?
#3  Foam::polyTopoChange::polyTopoChange(Foam::polyMesh const&, bool) at ??:?
#4  ? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/createBaffles"
#5  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#6  ? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/createBaffles"
Aborted (core dumped)
I also tried matching startFaces for Plate1 and Plate2, but the only time i can actually run createBaffles command successfully is when Plate1 startFace matches that from the first file.

I also uploaded entire case file here: https://ufile.io/8qi1z


fvSchemes, fvSolutions etc. are there just because I couldn't export from Gmsh to OF without them, I didn't work on them yet.


I hope you guys can help me, it would be much appreciated. Thank you in advance.

caja94 is offline   Reply With Quote

Old   October 7, 2018, 05:05
Default Update
  #2
New Member
 
Petar Cajic
Join Date: Jul 2018
Location: City of Nis, Serbia
Posts: 5
Rep Power: 8
caja94 is on a distinguished road
Send a message via Skype™ to caja94
Hi guys, I managed to resolve this problem by going back to gmsh and putting both plates in 1 physical group, thus making my problem a lot easier. Before this thread is closed, can anyone tell me if solving this problem the way I did will have any effect when I try to get my case to work?



Thanks a lot.
caja94 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
[ICEM] Creating mesh for fluid - solid geometry tmu ANSYS Meshing & Geometry 1 March 5, 2016 07:14
[ICEM] Question about creating lateral surface for a specific geometry lnk ANSYS Meshing & Geometry 2 July 12, 2012 07:14
Creating geometry from .def file az_f ANSYS Meshing & Geometry 1 June 29, 2011 08:27
Loosing baffles while creating a volume mesh Susanne Siemens 0 May 9, 2006 03:52
Creating 2D geometry with ICEM TobiasZ CFX 4 April 13, 2006 05:32


All times are GMT -4. The time now is 06:57.