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

[blockMesh] Removing interior cells

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread 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: 15
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: 15
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
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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: 15
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


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
install OF 2.3 without removing OF 2.2 skuznet OpenFOAM Installation 2 May 17, 2014 13:31
removing flactuation in pressureCoeffient figure s.m OpenFOAM Post-Processing 2 July 7, 2013 03:19
[ICEM] Surfaces intersecting after removing o-grid block rich85 ANSYS Meshing & Geometry 3 April 26, 2011 11:05
Question about "Domain removing component" therockyy FLOW-3D 1 December 22, 2010 11:58


All times are GMT -4. The time now is 06:26.