CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (http://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   mergePatchPairs for a meshing with fixed interface (http://www.cfd-online.com/Forums/openfoam-meshing/74959-mergepatchpairs-meshing-fixed-interface.html)

Cyp April 13, 2010 05:01

mergePatchPairs for a meshing with fixed interface
 
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
(
);

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

naval April 13, 2010 06:03

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

Cyp April 13, 2010 09:11

Hi naval !

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

naval April 13, 2010 09:33

You're welcome.

Cyp April 13, 2010 11:01

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
);
}
);


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

naval April 15, 2010 07:34

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

Cyp April 15, 2010 07:37

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")..

naval April 15, 2010 09:28

The same thing happened to me, too.

T.D. December 6, 2010 11:41

problem like the first post, but with wedge
 
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

mirko December 14, 2010 15:47

Quote:

Originally Posted by Cyp (Post 254432)
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

T.D. February 25, 2011 09:11

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...

Cyp February 25, 2011 09:20

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!

T.D. February 25, 2011 09:34

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.

Cyp February 25, 2011 09:49

and what have you defined in this pressure file ?

T.D. February 25, 2011 12:34

i defined a zeroGradient BC type for the "interface1"

Cyp February 27, 2011 18:47

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 ?

T.D. February 28, 2011 04:09

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.

barati May 22, 2014 09:34

1 Attachment(s)
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


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