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

[mesh manipulation] Second air inlet within the mesh

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By zfaraday

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 25, 2015, 13:08
Question Second air inlet within the mesh
  #1
New Member
 
Join Date: Jan 2015
Location: Germany
Posts: 13
Rep Power: 11
Flexi1095 is on a distinguished road
Hi,
I'am searching for a possibility to create a second air inlet within my box (now just a normal rectangle with an inlet on the one side and an outlet on the other side).
In the best case it should be only a very small circle with a second air inlet on a specific position inside the box.
Any idea how I can realize that / is this even possible?

Thank you in advance
Flexi1095
Flexi1095 is offline   Reply With Quote

Old   May 25, 2015, 15:04
Default
  #2
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Try createPatch utility.
__________________
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   May 29, 2015, 11:42
Question
  #3
New Member
 
Join Date: Jan 2015
Location: Germany
Posts: 13
Rep Power: 11
Flexi1095 is on a distinguished road
Hi zfaraday,
thanks for your reply.

As I am not so experienced with OpenFoam could you (or anyone else) maybe help me a bit more. Which method do I have to use from createPatch to change a certain cell to an inlet?
(-overwrite, -parallel, -roots "(DIR1 [...DIRN])", -region NAME, -case DIR, -noFunctionObjects)?

Flexi1095
Attached Images
File Type: jpg aadasfesfewfw.jpg (15.9 KB, 35 views)
Flexi1095 is offline   Reply With Quote

Old   May 29, 2015, 12:07
Default
  #4
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Well, first of all, whenever you need some information about the usage of a utility try the following command:

Code:
 grep -ri "utility name" $FOAM_TUTORIALS
With this you will find all the files where the utility is called in the tutorials directory. Otherwise, you may also try this other command
Code:
 find $FOAM_TUTORIALS -name "utility name*"
With this one you will be able to find all the files with the name of the utility ended with "Dict" (it is important to use * after the utility name! Otherwise you won't find anything), since many of the utilities use entries coming from dictionaries with its own name ended with "Dict". It is important to study these files in order to be able to run many of the utilities!

Besides that, I wil give you some information about the use of createPatch utility, since today I have use it for the first time! I would need more information about your geometry in order to give you more accurate help. However, as a quick guide, I will tell you that first you need to create a faceSet with the patch faces you want to convert into your new inlet patch. I recomend you to do it by making use of topoSet utility. Once you have created your faceSet with the faces that you want to be in a new patch you can run createPatch, after having set up correctly the createPatchDict, of course...

Hope it helps! Regards,

Alex
Flexi1095 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!

Last edited by zfaraday; May 29, 2015 at 12:10. Reason: corrected [/CODE] tag
zfaraday is offline   Reply With Quote

Old   June 4, 2015, 17:31
Default
  #5
New Member
 
Join Date: Jan 2015
Location: Germany
Posts: 13
Rep Power: 11
Flexi1095 is on a distinguished road
Hi zfaraday,
thank you so much for your help so far!
With the commands I found some informations, but when I want to create a cellSet it returns an error.
My topoSetDict looks like this:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      topoSetDict;
}
actions
(
   {
     name    Einlass;
     type    cellSet;

     action  new;
     source  cellToFace;

  source nearestToCell;
    {
       points ((0.992718405535614, 0.00241252922952359, 0.0319775971417239) );
    }

  }
)
An the eror:
Code:
michael@michael-Lenovo-G510:~/OpenFOAM/michael-2.3.0/run/AutoWF2014$ topoSet
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.0-f5222ca19ce6
Exec   : topoSet
Date   : Jun 04 2015
Time   : 23:16:12
Host   : "michael-Lenovo-G510"
PID    : 5154
Case   : /home/michael/OpenFOAM/michael-2.3.0/run/AutoWF2014
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Create polyMesh for time = 0

Reading topoSetDict



--> FOAM FATAL IO ERROR: 
"ill defined primitiveEntry starting at keyword 'actions' on line 16 and ending at line 34"

file: /home/michael/OpenFOAM/michael-2.3.0/run/AutoWF2014/system/topoSetDict at line 34.

    From function primitiveEntry::readEntry(const dictionary&, Istream&)
    in file lnInclude/IOerror.C at line 132.

FOAM exiting
Any idea? Is my topoSet wrong?

If you are interested in the geometry have a look at the attachment. It's like a small F1 car I want to create the second outlet (1 cell would be enough) at the left end of car in the mid of the cylinder.
Best regards,
Flexi1095
Attached Images
File Type: png Bild11.png (64.3 KB, 19 views)
Flexi1095 is offline   Reply With Quote

Old   June 5, 2015, 07:07
Default
  #6
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
You missed a semicolon behind the last bracket!
__________________
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   June 9, 2015, 16:45
Post
  #7
New Member
 
Join Date: Jan 2015
Location: Germany
Posts: 13
Rep Power: 11
Flexi1095 is on a distinguished road
Thank you zfaraday! Searched over 1 hour and in the end only one semicolon was missing. >.<
Now I have created the cellSet and with that the faceSet.

If I understood correctly I can now run createPatch?
My createPatchDict looks like:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      createPatchDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
pointSync false;

patches
(
    {
        // Name of new patch
        name Einlassluft;

        // Type of new patch
        patchInfo
        { 
	type patch;
        }
       
        // How to construct: either from 'patches' or 'set'
        constructFrom set;

	// If constructFrom = set : name of faceSet
        set Einlassface;
    }
);

// ************************************************************************* //
But it returns:
Code:
michael@michael-Lenovo-G510:~/OpenFOAM/michael-2.3.0/run/AutoWF2014$ createPatch
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.0-f5222ca19ce6
Exec   : createPatch
Date   : Jun 09 2015
Time   : 22:25:44
Host   : "michael-Lenovo-G510"
PID    : 3949
Case   : /home/michael/OpenFOAM/michael-2.3.0/run/AutoWF2014
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Create polyMesh for time = 0

Reading createPatchDict

Adding new patch Einlassluft as patch 7 from 
{
    type            patch;
}


Read 119 faces from faceSet Einlassface


--> FOAM FATAL ERROR: 
Face 68824 specified in set Einlassface is not an external face of the mesh.
This application can only repatch existing boundary faces.

    From function createPatch
    in file createPatch.C at line 727.

FOAM exiting

If I interpret it right a new patch can only created when the faces are not already part of the mesh.
So do I first have to delete the relevant faces (with setSet??) and then run createPatch or is there another way?

Best regards and thank you so much for the help so far.
Flexi1095
Flexi1095 is offline   Reply With Quote

Old   June 10, 2015, 07:09
Default
  #8
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Ok, this problem has an easy diagnostic. The faceSet you created contains internal faces instead of only contain external faces, which is a requirement when you use createPatch since it can only convert external faces into patch faces but it cannot handle internal faces.

Rebuild your faceSet in order to make it only contain external faces.
__________________
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   June 10, 2015, 14:13
Question
  #9
New Member
 
Join Date: Jan 2015
Location: Germany
Posts: 13
Rep Power: 11
Flexi1095 is on a distinguished road
Hi zfaraday,
can you maybe give me a hint how to create the faceSet with only external faces? Do I have to use another utility?

I've tried to add the invert command within topoSet, but it occurs the same error.
- Flexi1095
Flexi1095 is offline   Reply With Quote

Old   June 10, 2015, 15:21
Default
  #10
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Well, I always do it with topoSet. My advice is to select the whole existing wall patch where you want to add the new inlet patch and convert it into a faceSet. Once you have the existing patch in a faceSet, delete the surplus faces until you get only the needed faces in the faceSet. Then you can use it so as to create the the patch properly!

Hope it helps,

Alex
__________________
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

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
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 06:09
massflow inlet on cooling plate definition inside the ambient air box farianka FLUENT 0 March 21, 2017 06:27
Gambit problems Althea FLUENT 22 January 4, 2017 03:19
Mesh motion with Translation & Rotation Doginal CFX 2 January 12, 2014 06:21
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 21:11


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