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

[Other] mergePatchPairs for a meshing with fixed interface

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 13, 2010, 05:01
Default mergePatchPairs for a meshing with fixed interface
  #1
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
Hi everybody

I am trying to simulate a liquid film flow along a vertical wall and the mass exchange with the motionless vapor phase.

For that purpose, I created a geometry composed by two rectangular block linked by an interface.

When I lunch the blockMesh utility, I have a error message which said " Trying to specify a boundary face 4(3 8 7 0) on the face on cell 0 which is either an internal face or already belongs to some other patch". According to this warning, I understand I need to specify a mergePatchPairs. However, I haven't succeed in the configuration of mergePatchPairs (the documentation is not very clear about that).

Does someone can help me ?
Thank you.





PS : my blockMeshDict file is the following :

\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.1;

vertices
(
(0 0 0) // #0
(3 0 0) // #1
(3 10 0) // #2
(0 10 0) // #3
(-1 10 0) // #4
(-1 0 0) // #5
(-1 0 -0.1) // #6
(0 0 -0.1) // #7
(0 10 -0.1) // #8
(-1 10 -0.1) // #9
(3 10 -0.1) // #10
(3 0 -0.1) // #11
);

blocks
(
hex (7 11 10 8 0 1 2 3) (10 10 1) simpleGrading (1 1 1)
hex (6 7 8 9 5 0 3 4) (5 5 1) simpleGrading (1 1 1)
);

edges
(
);

patches
(
patch inlet
(
(3 8 9 4)
)

patch outlet
(
(5 6 7 0)
)

wall leftWall
(
(5 4 9 6)
)

wall rightWall
(
(2 1 11 10)
)

wall bottomWall
(
(0 7 11 1)
)

wall topWall
(
(3 2 10 8)
)

patch interface
(
(3 8 7 0)
)

empty frontAndBack
(
(7 8 10 11)
(6 9 8 7)
(0 3 4 5)
(0 1 2 3)
)
);

mergePatchPairs
(
);

// ************************************************** *********************** //
Cyp is offline   Reply With Quote

Old   April 13, 2010, 06:03
Default
  #2
New Member
 
Sebastian W
Join Date: Nov 2009
Location: Germany
Posts: 16
Rep Power: 16
naval is on a distinguished road
Hi Cyprien,

as far as I know you need duplicate vertices to create a mergePatchPair instead of using the existing ones. These duplicates need to be included in one of the two blocks and subsequently all its patches.
And of course you actually need two patches to be merged to a pair.


Your example might look like this:

...

vertices
(
...

(0 10 0) // #3=12
(0 10 -0.1) // 8=13
(0 0 -0.1) // #7=14
(0 0 0) // #0=15

);

blocks
(
hex (7 11 10 8 0 1 2 3) (10 10 1) simpleGrading (1 1 1)
hex (6 14 13 9 5 15 12 4) (5 5 1) simpleGrading (1 1 1)
);

edges
(
);

patches
(
patch inlet
(
(12 13 9 4)
)

patch outlet
(
(5 6 14 15)
)

wall leftWall
(
(5 4 9 6)
)

wall rightWall
(
(2 1 11 10)
)

wall bottomWall
(
(0 7 11 1)
)

wall topWall
(
(3 2 10 8)
)

patch interface1
(
(3 8 7 0)
)
patch interface2
(
(12 13 14 15)
)

empty frontAndBack
(
(7 8 10 11)
(6 9 13 14)
(15 12 4 5)
(0 1 2 3)
)
);

mergePatchPairs
(
(interface1 interface2)
);




Good luck,
naval
naval is offline   Reply With Quote

Old   April 13, 2010, 09:11
Default
  #3
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
Hi naval !

Thank you very much for your help. It works well now.
Cyp is offline   Reply With Quote

Old   April 13, 2010, 09:33
Default
  #4
New Member
 
Sebastian W
Join Date: Nov 2009
Location: Germany
Posts: 16
Rep Power: 16
naval is on a distinguished road
You're welcome.
naval is offline   Reply With Quote

Old   April 13, 2010, 11:01
Default
  #5
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
I have another question.

I attempt to patch a region of my geometry in order to apply a non-uniform concentration field c_g. The region I need to patch correspond to the block 1. So, I use the setFields utility with the following setFieldsDict but nothing happened.

Do you have any idea ??


FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

defaultFieldValues
(
volScalarFieldValue c_g 0
);

regions
(
boxToCell
{
box (-1 0 0) (0 10 -0.1);
fieldValues
(
volScalarFieldValue c_g 0
);
}
);


// ************************************************** *********************** //

Last edited by Cyp; April 13, 2010 at 11:40.
Cyp is offline   Reply With Quote

Old   April 15, 2010, 07:34
Default
  #6
New Member
 
Sebastian W
Join Date: Nov 2009
Location: Germany
Posts: 16
Rep Power: 16
naval is on a distinguished road
Well, it looks like the c_g you are trying to set for the specified region is equal to the default value (for the whole domain) specified above. (c_g=0).
My guess is, that you get an uniform c_g = 0 and no error message.

Just set it to the desired value(s) an see what happens.

Good luck,
naval
naval is offline   Reply With Quote

Old   April 15, 2010, 07:37
Default
  #7
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
hi!

Indeed there is an error in my quote.

In fact, I haven't understand that the value in the setFieldsDict must be precise in meter et not in the format of the blockMeshDict (without "convert to meter")..
Cyp is offline   Reply With Quote

Old   April 15, 2010, 09:28
Default
  #8
New Member
 
Sebastian W
Join Date: Nov 2009
Location: Germany
Posts: 16
Rep Power: 16
naval is on a distinguished road
The same thing happened to me, too.
naval is offline   Reply With Quote

Old   December 6, 2010, 10:41
Red face problem like the first post, but with wedge
  #9
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 17
T.D. is on a distinguished road
HI,
i am facing the same problem as first post , but i am doing a wedge geometry.

i did as in second reply : mergepatchpairs but it is not working still this error:
Trying to specify a boundary face 4(2 5 9 6) on the face on cell 0 which is either an internal face or already belongs to some other patch. This is face 0 of patch 4 named interface1.


my code is the following:

*********************************************
FoamFile
{
version 2.0;
format ascii;

root "";
case "";
instance "";
local "";

class dictionary;
object blockMeshDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
(0 0 0)
(0 0 0.03)
(0.013995202549657802 0.00036647727631022409 0)
(0.023991775799413376 0.00062824675938895564 0)
(0.023991775799413376 0.00062824675938895564 0.03)
(0.013995202549657802 0.00036647727631022409 0.03)
(0.013995202549657802 -0.00036647727631022409 0)
(0.023991775799413376 -0.00062824675938895564 0)
(0.023991775799413376 -0.00062824675938895564 0.03)
(0.013995202549657802 -0.00036647727631022409 0.03)

(0.013995202549657802 0.00036647727631022409 0)
(0.013995202549657802 0.00036647727631022409 0.03)
(0.013995202549657802 -0.00036647727631022409 0.03)
(0.013995202549657802 -0.00036647727631022409 0)
);

blocks
(
hex (0 2 5 1 0 6 9 1) (20 20 1) simpleGrading (1 1 1)
hex (2 3 4 5 6 7 8 9) (5 5 1) simpleGrading (1 1 1)
);

edges
(
);

patches
(
wedge front1
(
(0 1 5 2)
)
wedge front2
(
(2 5 4 3)
)
wedge back1
(
(0 1 9 6)
)
wedge back2
(
(6 9 8 7)
)
patch interface1
(
(2 5 9 6)
)
patch interface2
(
(10 11 12 13)
)
patch out
(
(3 4 8 7)
)
patch up1
(
(1 9 5 1)
)
patch up2
(
(5 9 8 4)
)
patch down1
(
(0 6 2 0)
)
patch down2
(
(2 6 7 3)
)
empty axis
(
(0 1 1 0)
)
);

mergePatchPairs
(
(interface1 interface2)
);
********************************************

any ideas, help please ?

Thanks
T.D. is offline   Reply With Quote

Old   December 14, 2010, 14:47
Default
  #10
Senior Member
 
Mirko Vukovic
Join Date: Mar 2009
Posts: 159
Rep Power: 17
mirko is on a distinguished road
Quote:
Originally Posted by Cyp View Post
Hi naval !

Thank you very much for your help. It works well now.
Cyp,

what did you specify as a boundary condition for your internal patches?

I am getting "keyword interface1 is undefined in ..." the 0/T boundaryField dictionary.

Thanks,

Mirko
mirko is offline   Reply With Quote

Old   February 25, 2011, 08:11
Default
  #11
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 17
T.D. is on a distinguished road
hi i solved the mesh problem, but now i am facing a problem at the BC on the interface, i defined in 0 folder the BC for the interface1, but still give me error: keyword inerface1 is undefined in dictionary.../0 Folder.
this is my mesh

FoamFile
{
version 2.0;
format ascii;

root "";
case "";
instance "";
local "";

class dictionary;
object blockMeshDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//original in cm
convertToMeters 0.01;


//geometry Couette with gap up on top =0.3
//couette wedge 5°

//Ri=1.4 cm R=1.45 cm Ht=3.3 cm Hi=3 cm

vertices
(

(1.448619921 0.063248112 0)
(1.448619921 -0.063248112 0)
(1.39866751 0.061067142 3)
(1.39866751 -0.061067142 3)
(1.448619921 0.063248112 3.3)
(1.448619921 -0.063248112 3.3)
(1.39866751 0.061067142 3.3)
(1.39866751 -0.061067142 3.3)


(1.39866751 0.061067142 0)
(1.39866751 -0.061067142 0)
(1.448619921 0.063248112 3)
(1.448619921 -0.063248112 3)

(1.39866751 0.061067142 3)
(1.448619921 0.063248112 3)
(1.448619921 -0.063248112 3)
(1.39866751 -0.061067142 3)


(1.448619921 0.063248112 3.3)
(1.448619921 -0.063248112 3.3)
(1.39866751 0.061067142 3.3)
(1.39866751 -0.061067142 3.3)


);

blocks
(

hex (9 1 0 8 3 11 10 2) (1 1 100) simpleGrading (1 1 1)
hex (15 14 13 12 7 5 4 6) (1 1 1) simpleGrading (1 1 1)

);

edges
(
);

patches
(

wedge front
(
(8 2 10 0)
(12 6 4 13)
)

wedge back
(
(9 3 11 1)
(15 7 5 14)
)
patch in
(
(8 2 3 9)
(12 6 7 15)
)
patch out
(
(0 10 11 1)
(13 4 5 14)
)

patch up
(
(6 4 5 7)
)

patch down
(
(8 0 1 9)
)

patch inerface1
(
(2 10 11 3)
)
patch interface2
(
(12 13 14 15)
)


);

mergeParchPairs
(
(interface1 interface2)
);

Any ideas
Thanks a lot...
T.D. is offline   Reply With Quote

Old   February 25, 2011, 08:20
Default
  #12
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
Hi!

what do you mean by "i defined in 0 folder the BC for the interface1" ?

do you have specified "interface1" for all your fields (U, p ,T, Y...) ?

@++
Cyp

PS : I am glad to see other french guys using OF!
Cyp is offline   Reply With Quote

Old   February 25, 2011, 08:34
Default
  #13
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 17
T.D. is on a distinguished road
salut,
enchanté, oui biensur i've already defined "interface1" BC in all fields (U,p,T,..)
but i always get that error, however it starts by the first field "p" in 0 folder.
any ideas ?

merci bien
amicalement,

T.D.
T.D. is offline   Reply With Quote

Old   February 25, 2011, 08:49
Default
  #14
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
and what have you defined in this pressure file ?
Cyp is offline   Reply With Quote

Old   February 25, 2011, 11:34
Default
  #15
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 17
T.D. is on a distinguished road
i defined a zeroGradient BC type for the "interface1"
T.D. is offline   Reply With Quote

Old   February 27, 2011, 17:47
Default
  #16
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
I did not exactly remember what I done. But in my case I needed a continuity equation. I think I defined nothing:
Code:
Interface1
(
);
Are you sure zeroGradient fits with what you are looking for ?
Cyp is offline   Reply With Quote

Old   February 28, 2011, 03:09
Default
  #17
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 17
T.D. is on a distinguished road
Even if i give a fixedValue BC at the interface1, it did not take it, that's crazy, i don't know what is going on with this interface1 ! ?
Anyway, i cancelled the interface1 and i figured out a new way to do the calculations, it worked.
Thank you a lot, and i hope that we'll stay in contact.
sincerely yours,

T.D.
T.D. is offline   Reply With Quote

Old   May 22, 2014, 09:34
Post
  #18
New Member
 
ali
Join Date: Feb 2013
Posts: 8
Rep Power: 13
barati is on a distinguished road
hi fomers
i want to simulation air curtain device
this device should be to work in the room and other room T parameter and U parameter should be report
i try to mesh this device but mesh was error please help me to define error this file is attach
plz help me thanks a lot
Attached Files
File Type: zip blockMeshDict.zip (1.5 KB, 2 views)
barati 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
[ANSYS Meshing] spaceclaim CFD meshing zone interface setting yzhyan ANSYS Meshing & Geometry 1 October 12, 2018 06:00
Interface Creation For Sliding Mesh Using Cutcell Meshing Sot FLUENT 0 January 9, 2016 05:34
[Gmsh] Vertex numbering is dense KateEisenhower OpenFOAM Meshing & Mesh Conversion 7 August 3, 2015 10:49
MRF model - Meshing and Interface set-up supermanks FLUENT 9 January 31, 2014 05:36
Radiation interface hinca CFX 15 January 26, 2014 17:11


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