CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

BC on internal patch in laplaceFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   December 14, 2010, 18:30
Default BC on internal patch in laplaceFoam
  #1
Senior Member
 
Mirko Vukovic
Join Date: Mar 2009
Posts: 159
Rep Power: 8
mirko is on a distinguished road
Hi,

I have a geometry that consists of two blocks that I build and mesh using blockMesh. I have defined two interface patches, and merged them.

I want to solve for the temperature distribution using laplaceFoam.

I get an error because laplaceFoam needs a boundary condition on the interface patch. I typed in `xyz' in the 0/T boundaryField dictionary, and I saw a list of available boundary conditions. I did not see anything that would give me a continuous heat flux across the boundary.

Do I need to implement my own boundary condition, or am I missing a boundary that can do the job?

Thanks,

Mirko
mirko is offline   Reply With Quote

Old   December 15, 2010, 09:34
Default
  #2
Senior Member
 
David Boger
Join Date: Mar 2009
Location: Penn State Applied Research Laboratory
Posts: 146
Rep Power: 8
boger is on a distinguished road
Do you need the interface? In other words, having "merged" the two blocks together (using stitchMesh or mergeMesh), shouldn't the interface patches vanish altogether?
__________________
David A. Boger
boger is offline   Reply With Quote

Old   December 15, 2010, 11:53
Default
  #3
Senior Member
 
Mirko Vukovic
Join Date: Mar 2009
Posts: 159
Rep Power: 8
mirko is on a distinguished road
Quote:
Originally Posted by boger View Post
Do you need the interface? In other words, having "merged" the two blocks together (using stitchMesh or mergeMesh), shouldn't the interface patches vanish altogether?
I use mergePatchPairs in the blockMeshDict. I was following the discussion in Section 5.3.2 of the user manual.

Mirko
mirko is offline   Reply With Quote

Old   December 15, 2010, 12:44
Default
  #4
Senior Member
 
David Boger
Join Date: Mar 2009
Location: Penn State Applied Research Laboratory
Posts: 146
Rep Power: 8
boger is on a distinguished road
The discussion in 5.3.2 says "if all the faces of a patch are merged, then the patch itself will contain no faces and is removed", so it sounds to me like something went wrong with the merge.
__________________
David A. Boger
boger is offline   Reply With Quote

Old   December 15, 2010, 13:31
Default
  #5
Senior Member
 
Mirko Vukovic
Join Date: Mar 2009
Posts: 159
Rep Power: 8
mirko is on a distinguished road
Quote:
Originally Posted by boger View Post
The discussion in 5.3.2 says "if all the faces of a patch are merged, then the patch itself will contain no faces and is removed", so it sounds to me like something went wrong with the merge.
Hm, you are right. Not sure where my mistake is. Here are parts of the file.

here are the point definitions for the internal patches. They are identical:

Code:
    (0 0 4.0) // 4
    (1 0 4.0) // 5
    (1 1 4.0) // 6
    (0 1 4.0) // 7
    (0 0 4.0) // 8
    (1 0 4.0) // 9
    (1 1 4.0) // 10
    (0 1 4.0) // 11
The block definitions:
Code:
blocks          
(
    hex (0 1 2 3 4 5 6 7) (1 1 20) simpleGrading (1 1 1)
    hex (8 9 10 11 12 13 14 15) (1 1 100) simpleGrading (1 1 1)
);
The patch definitions:
Code:
   patch interface1
    (
        (4 5 6 7)
    )
    patch interface2
    (
        (11 10 9 8)
    )
and the merging:

Code:
mergePatchPairs
(
    (
        interface1
        interface2
    )
)
No idea where the error would be. I've attached the full blockMeshDict file.

Thanks,

Mirko
Attached Files
File Type: txt blockMeshDict.txt (1.6 KB, 17 views)
mirko is offline   Reply With Quote

Old   December 15, 2010, 14:32
Default
  #6
Senior Member
 
Mirko Vukovic
Join Date: Mar 2009
Posts: 159
Rep Power: 8
mirko is on a distinguished road
I am adding the mesh view.

One block is with a coarse mesh, and the other with a fine mesh along z
(this is a 1D geometry)

The merged patch is shown by the diagonal lines. Not sure why that is so.

I also built the mesh with the blocks not touching, and faces unmerged, to make sure that the blocks are defined OK. Things looked fine.

Mirko
Attached Images
File Type: jpg wireframe.jpg (36.1 KB, 27 views)
mirko is offline   Reply With Quote

Old   December 15, 2010, 14:46
Default
  #7
Senior Member
 
David Boger
Join Date: Mar 2009
Location: Penn State Applied Research Laboratory
Posts: 146
Rep Power: 8
boger is on a distinguished road
Without having checked the rules, what if you specify interface2 as (8 11 10 9), so that both interfaces begin from the same point in space?
__________________
David A. Boger
boger is offline   Reply With Quote

Old   December 15, 2010, 16:29
Default
  #8
Senior Member
 
Mirko Vukovic
Join Date: Mar 2009
Posts: 159
Rep Power: 8
mirko is on a distinguished road
No difference.

For what it's worth, I think that the mesh is valid. If I specify the slip boundary condition on the interface, the calculation runs, and I get an answer that makes sense: the temperature is uniform in each block, the value corresponding to the boundary condition on the far wall.

See attached picture.
Attached Images
File Type: jpg temp-jump-w-slip.jpg (15.2 KB, 18 views)
mirko is offline   Reply With Quote

Old   December 15, 2010, 16:43
Default
  #9
Senior Member
 
Mirko Vukovic
Join Date: Mar 2009
Posts: 159
Rep Power: 8
mirko is on a distinguished road
I think I found the problem:

I am solving a 1D problem and I set the mesh size in the ignored directions to be 1x1. If I change that to 1x2, 2x1, or 2x2, the internal patch is removed, and I get a temperature ramp as expected.

Mirko
Attached Images
File Type: jpg 2x1-block-temperature-profile.jpg (18.8 KB, 25 views)
mirko is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cyclic BC's: Possible face ordering problem? (Channel flow) sega OpenFOAM Native Meshers: blockMesh 3 September 28, 2010 12:46
Using createPatch in place of couplePatches sripplinger OpenFOAM Mesh Utilities 8 November 13, 2009 08:14
CheckMeshbs errors ivanyao OpenFOAM Running, Solving & CFD 2 March 11, 2009 03:34
Import gmsh msh to Foam adorean Open Source Meshers: Gmsh, Netgen, CGNS, ... 24 April 27, 2005 08:19
Multicomponent fluid Andrea CFX 2 October 11, 2004 05:12


All times are GMT -4. The time now is 11:38.