CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

createBafflesDict creates nfaces 0

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 1 Post By latvietis
  • 1 Post By zfaraday
  • 1 Post By latvietis
  • 2 Post By SimonStar

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 9, 2014, 11:14
Default createBafflesDict creates nfaces 0
  #1
Member
 
Martin
Join Date: Dec 2011
Location: Latvia
Posts: 54
Rep Power: 15
latvietis is on a distinguished road
Greetings!

I have returned to do some CFD. Problem is that I need to use internal boundaries. A year ago I used this command line
Code:
"createBaffles -overwrite facezone "(patch1 patch2)"
Everything worked fine - I got 2 boundaries where I used one boundary condition on one side and "mapped" on other. I guess some things have changed with new OF version. Now I have to create "createBafflesDict" file. Of course that is no big deal, but sadly, after I run this it creates boundary with nFaces 0 which in my opinion is the reason why nothing works now. For example, createBafflesDict file looks like this:

Code:
baffles
{
    baffleFaces
    {
        type        faceZone;
        zoneName    some_name;


        patches
        {
            master
            {
                name            patch_from_some_name_1;
                type            patch;
            }
            slave
            {
                name            patch_from_some_name_2;
                type            patch;
            }
        }
    }
}
When I run this I get this

Code:
Reading baffle criteria from createBafflesDict

Not converting faces on non-coupled patches.

Reading geometric fields

Reading volScalarField X

Created zone baffleFaces at index 6 with 120 faces
Converted 0 faces into boundary faces in patches 
2
(
 patch_from_some_name_1
 patch_from_some_name_2
)


--> FOAM Warning : 
    From function createBaffles
    in file createBaffles.C at line 773
    Setting field on boundary faces to zero.
You might have to edit these fields.
Writing mesh to 0
End
The problem is that when I go to boundaries file, createBaffles has created 2 new patches empty

Code:
    patch_from_some_name_1
    {
        type            patch;
        inGroups        1(baffleFaces);
        nFaces          0;
        startFace       69238;
    }
    patch_from_some_name_2
    {
        type            patch;
        inGroups        1(baffleFaces);
        nFaces          0;
        startFace       69238;
    }
What could be the possible reasons for this? The faceZone I used should have 120 faces in this scenario.

Yours sincerely,
Martin
vs1 likes this.

Last edited by latvietis; October 9, 2014 at 11:17. Reason: better reading
latvietis is offline   Reply With Quote

Old   October 10, 2014, 09:24
Default
  #2
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22
zfaraday will become famous soon enough
Hello Martin,

First of all I'm not an expert creating baffles and I'm not aware of all the posible ways to create them, I actually created baffles only once in a case I'm currently working. This is the implementation I'm using in my case, which differs a little from yours (I don't know if yours is correct or not...):

Code:
baffles
{
    heaterBaffle1D //baffle name. Master and slave are created afterwards according to this name
    {
        //- Use predefined faceZone to select faces and orientation.
        type        faceZone;
        zoneName    heater;


        patchPairs
        {
            type            wall;
            patchFields
            {
                #include "./0/include/wallBafflePatches_heater"
                #include "./0/include/1DBaffle/1DTemperatureMasterBafflePatches_heater"
            }
        }
    }
I don't know if your use of the patches list is wrong but you could try patchPairs instead of patches just to test if it works better for you. As I said I'm not an expert but maybe my tip can help you.

Regards,

Alex
the_ichthyologist likes this.
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   October 14, 2014, 06:00
Default
  #3
Member
 
Martin
Join Date: Dec 2011
Location: Latvia
Posts: 54
Rep Power: 15
latvietis is on a distinguished road
Thank you for responding, Alex!

Sadly this is not the solution. The problem, in my opinion, lies in creating this patch in first place.

I use gmsh, my case is really simple - lets say a small box in a larger box. Each face of my smaller box is created as a physical boundary in gmsh. After using gmshToFoam I use topoSet. Lets say one of my faces is called "front_patch" in gmsh. Then I use this code to create front zone that I could use in createBaffles.

Code:
actions
(
//front
    {
        name   front_set;
        type    faceSet;
        action  new;
        source  patchToFace;
        sourceInfo
        {
            name    front_patch;
            option  all;
        }
    }
    {
        name    front;
        type    faceZoneSet;
        action  new;
        source  setToFaceZone;
        sourceInfo
        {
            faceSet front_set;
        }
    }
)
The sad part is that I get this warning

Code:
    Found boundary face (in patch front_patch) in faceZone front to convert to baffle patch front_master
    Run with -internalFacesOnly option if you don't wish to convert boundary faces.
In the end I get a created master baffle with face count = used patch, but the slave baffle is with 0 faces. It seems that createBaffles somehow doesn't allow to create two sided boundary from one sided boundary if that patch was already defined as internal boundary. Any hints how I could create 2 sided internal boundary from 1 sided internal boundary which is created in gmsh?

__________________________________________________ _______________________

Edit: I found the "solution". If anyone gets similar problem using gmsh it just might be because of incomplete meshing process. I had some small flaws in my .geo (a small nuance I had forgotten). createBafflesDict works great!

Sincerely,
Martin
vs1 likes this.

Last edited by latvietis; October 16, 2014 at 03:25. Reason: found a solution which doesn't deserve a new reply
latvietis is offline   Reply With Quote

Old   May 8, 2020, 06:49
Default
  #4
Member
 
SimonStar's Avatar
 
Simon
Join Date: Sep 2019
Location: Germany
Posts: 51
Rep Power: 7
SimonStar is on a distinguished road
Hello everyone.

I know its a long time since the thread was started but now I have the same challange.
The difference is that I am not using GMSH. What I am trying is to do is the the tutorial about 'ReactingParticleFoam' that is recommended at openfoam.com. It is only using blockMesh.

If you want to see the specific files: https://develop.openfoam.com/Develop...celFoam/filter I am am trying to use the filter tutorial.

I did some syntax-changes in 'topoSetDict' to run it because it seemd to be in an older version. For changed example I changed:

Code:
        source  boxToCell;
        box     (1.5 -10 -10) (2 10 10);
to
Code:
        
    source    boxToCell;
    sourceInfo
    {
        box (1.5 -10 -10) (2 10 10);
    }
But like I sad now there is the same problem:
Code:
Reading baffle criteria from createBafflesDict

Not converting faces on non-coupled patches.

Created zone cycLeft at index 0 with 20 faces
Created zone cycRight at index 1 with 20 faces
Converted 40 faces into boundary faces in patches 
4
(
cycLeft_half0
cycLeft_half1
cycRight_half0
cycRight_half1
)

--> FOAM Warning : 
    From function int main(int, char**)
    in file createBaffles.C at line 827
    Setting field on boundary faces to zero.
You might have to edit these fields.
Writing mesh to 0
End
Create Baffles is looking lithe this. Its quite the same than Martin had.
Code:
baffles
{
    cycLeft
    {
        //- Use predefined faceZone to select faces and orientation.
        type        faceZone;
        zoneName    cycLeft;

        patches
        {
            master
            {
                //- Master side patch

                name            cycLeft_half0;
                type            cyclic;
                neighbourPatch  cycLeft_half1;
            }
            slave
            {
                //- Slave side patch

                name            cycLeft_half1;
                type            cyclic;
                neighbourPatch  cycLeft_half0;
            }
        }
    }
...
The boundary-file is looking like this:
Code:
8
(
    walls
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          172;
        startFace       3294;
    }
    inlet
    {
        type            patch;
        nFaces          20;
        startFace       3466;
    }
    outlet
    {
        type            patch;
        nFaces          20;
        startFace       3486;
    }
    frontAndBack
    {
        type            empty;
        inGroups        List<word> 1(empty);
        nFaces          3440;
        startFace       3506;
    }
    cycLeft_half0
    {
        type            cyclic;
        inGroups        List<word> 
2
(
cyclic
cycLeft
)
;
        nFaces          20;
        startFace       6946;
        matchTolerance  0.0001;
        transform       unknown;
        neighbourPatch  cycLeft_half1;
    }
    cycLeft_half1
    {
        type            cyclic;
        inGroups        List<word> 
2
(
cyclic
cycLeft
)
;
        nFaces          20;
        startFace       6966;
        matchTolerance  0.0001;
        transform       unknown;
        neighbourPatch  cycLeft_half0;
    }
    cycRight_half0
    {
        type            cyclic;
        inGroups        List<word> 
2
(
cyclic
cycRight
)
;
        nFaces          20;
        startFace       6986;
        matchTolerance  0.0001;
        transform       unknown;
        neighbourPatch  cycRight_half1;
    }
    cycRight_half1
    {
        type            cyclic;
        inGroups        List<word> 
2
(
cyclic
cycRight
)
;
        nFaces          20;
        startFace       7006;
        matchTolerance  0.0001;
        transform       unknown;
        neighbourPatch  cycRight_half0;
    }
)
Because I am sill new to OpenFoam I am not so sure if the boundaries are right. Especially at the end of the file. Maybe it is another syntax-issue with older/newer versions like it was at the 'topoSetDict'.
In contrast to that the tutorial was uploaded just 4 month ago, so shouldn't it be a compatible with the latest version of OpenFOAM?


What could be reasons for this?

Thank you
Simon
SimonStar is offline   Reply With Quote

Old   July 16, 2021, 11:00
Default
  #5
New Member
 
hirota tomohiro
Join Date: Jun 2021
Posts: 16
Rep Power: 5
hirota is on a distinguished road
Hi Simon, did you solve this problem?
I'm facing this problem now.
hirota is offline   Reply With Quote

Reply

Tags
createbaffles, nfaces 0


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
[CGNS] CGNS converters available mbeaudoin OpenFOAM Meshing & Mesh Conversion 137 December 14, 2018 05:20
Simulation of Radial Fan with simpleFoam MRF nash OpenFOAM Running, Solving & CFD 2 November 5, 2015 11:12
CyclicAMI BC preservePatches Parallel Run - again!?! hxaxtma OpenFOAM Pre-Processing 4 August 31, 2015 18:47
Floating Point Exception - wrong boundaries or general PC problem? – OF 1.6 extend - A.Wendy OpenFOAM 0 February 27, 2013 05:50
MRFSimpleFoam Tutorial bastil OpenFOAM Running, Solving & CFD 48 August 1, 2012 11:00


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