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

Removing interior cells

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 28, 2010, 08:46
Default Removing interior cells
  #1
New Member
 
Steve Duncan
Join Date: Dec 2010
Posts: 3
Rep Power: 6
shd01 is on a distinguished road
Hi all,

Please would a seasoned openFOAMer give me a few words of advice on my mesh?

Using interFoam and groovyBC in OF 1.6.x, I would like to create a ship in a wave tank via blockMesh. A the moment it is a rectangular log, but in future I want to use a form that I can generate from a script.

My (newbie) approach has been to generate the ship as an interior block in blockMeshDict. This is all well and good, and the geometry looks ok:



I had supposed that I could add boundary conditions to the "hull" patches that effectively turn them into walls of the domain. Of course, the flow goes straight through the patches as if the ship wasn't there. I've tried a number of different boundary conditions and patch configurations but I suspect my approach is fundamentally wrong, and I need to completely remove the interior cells of the ship from the domain.

I see that snappyHexMesh is able to remove interior cells, and I am wondering whether there might be a simpler utility or trick that I can run on my mesh to remove the interior cells. Or maybe there is a mode in which I can use sHM to do what I want (without having to generate a STL file), but to be honest, I have no idea where to start with that.

Any pointers you could give me would be very gratefully received.

Best regards,

Steve Duncan


Code:
/*---------------------------------------------------------------------------*
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.3                                   |
|   \\  /    A nd           | Web:      http://www.openfoam.org               |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/

FoamFile
{
    version         2.0;
    format          ascii;

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

    class           dictionary;
    object          blockMeshDict;
}

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

convertToMeters 1;

vertices
(
    (0.000000 0.000000 -2.500000)
    (0.000000 4.000000 -2.500000)
    (20.000000 0.000000 -2.500000)
    (20.000000 4.000000 -2.500000)
    (0.000000 0.000000 1.500000)
    (0.000000 4.000000 1.500000)
    (20.000000 0.000000 1.500000)
    (20.000000 4.000000 1.500000)
    (5.000000 1.000000 -1.500000)
    (5.000000 3.000000 -1.500000)
    (15.000000 1.000000 -1.500000)
    (15.000000 3.000000 -1.500000)
    (5.000000 1.000000 0.500000)
    (5.000000 3.000000 0.500000)
    (15.000000 1.000000 0.500000)
    (15.000000 3.000000 0.500000)
);

blocks
(
    hex (0 2 3 1 4 6 7 5)         (200 40 40) simpleGrading (1 1 1)   // bounding box
    hex (8 10 11 9 12 14 15 13)    (100 20 20) simpleGrading (1 1 1)  // ship
);

edges
(
);

patches                      
(                            
    patch inlet              
    (                        
        (0 1 5 4)            
                             
    )                        
    wall fixedwalls          
    (                        
        (0 2 3 1)            
    )                        
                             
    patch atmosphere         
    (                        
        (4 5 7 6)            
    )                        
    wall front               
    (                        
        (1 3 7 5)            
                             
    )                        
    wall back                
    (                        
        (2 0 4 6)            
                             
    )                        
                             
    patch outlet             
    (                        
        (7 6 2 3)            
    )                        
                             
    patch hull            
    (                        
                             
        (8 10 11 9)        
        (8 9 13 12)        
        (10 14 15 11)        
        (9 11 15 13)        
        (12 13 15 14)        
        (10 8 12 14)                
    )                        
                             
);                                   
mergePatchPairs
(
);

// ************************************************************************* //
shd01 is offline   Reply With Quote

Old   January 14, 2011, 13:39
Default
  #2
New Member
 
Steve Duncan
Join Date: Dec 2010
Posts: 3
Rep Power: 6
shd01 is on a distinguished road
I'd still be grateful for some help with this.

Thanks.
shd01 is offline   Reply With Quote

Old   January 14, 2011, 17:33
Default
  #3
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,301
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Steve and welcome to the forum!

Disclaimer: I only have some limited experience with OpenFOAM. But since people are either very busy this time of the year, or are still on vacations, or stuck in some blizzard or flood... so I'll try to give you some suggestions.

I've never removed cells from inside meshes, but I know some tutorials that might get you in the right direction:
  • "multiphase/interDyMFoam/ras/floatingObject" - this tutorial shows you how to select the zones of the mesh that are assigned to the floating object. Study the "Allrun" script and "*Dict" files present inside the folder "system".
  • for programmable "blockMeshDict"s generated with m4, run these commands to get a list of the tutorial folders:
    Code:
    tut
    find . -name "makeMesh" | xargs grep "m4" -sl
    find . -name "Allrun" | xargs grep "m4" -sl
  • you can find all of the tutorials that use cellSet by running:
    Code:
    find . -name "cellSetDict"
Other than this, you'll have to continue looking for suspicious looking OpenFOAM applications in the folder "$FOAM_APPBIN" and search for other dictionary files "*Dict" in the "$FOAM_APP" folder. To see what folders I'm talking about, echo them like this:
Code:
echo $FOAM_APP
echo $FOAM_APPBIN
find $FOAM_APP -name "*Dict"
Other places you can search for more information:
Best regards and good luck!
Bruno
wyldckat is offline   Reply With Quote

Old   January 16, 2011, 11:11
Default
  #4
New Member
 
Steve Duncan
Join Date: Dec 2010
Posts: 3
Rep Power: 6
shd01 is on a distinguished road
Many thanks for your time, wyldckat. I hadn't noticed this tutorial until you pointed it out.

I see the floatingObject described in blockMeshDict as a patch with no faces, and then it looks like it's modified by a subsequent call to subsetMesh in the Allrun file. I think I should be able to do something similar.

I shall play with this tutorial and post the results of my endeavours.

Thanks again.
shd01 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
Question about "Domain removing component" therockyy FLOW-3D 1 December 22, 2010 11:58
Removing bad cell using subsetmesh-good???? nileshjrane OpenFOAM Mesh Utilities 0 September 4, 2010 15:49
Removing Invalid Cells? syd STAR-CCM+ 5 July 6, 2010 09:45
[ICEM] C Gridding and removing the triangular blocks brissyben ANSYS Meshing & Geometry 8 June 4, 2009 11:13
Removing lines from partitions Josh FLUENT 7 July 27, 2007 10:33


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