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

[snappyHexMesh] Creating multi region mesh for chtMultiregionFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 10, 2019, 15:31
Default Creating multi region mesh for chtMultiregionFoam
  #1
New Member
 
Nakos
Join Date: Jul 2019
Posts: 1
Rep Power: 0
tclph is on a distinguished road
Hello,

I am trying to create a simple case where a pipe with a wall thickness is heated while a fluid is passing through it. I would like to use STL file(s), snappyhexmesh, a solid and fluid region, and have layers in one side of the wetted wall. I am happy using snappyhexmesh for a single region, but for this case I am having problems and cannot figure out how to properly do things.

I would some help with setting up my case and STL files so that I can follow the procedure below as done with the shellAndTubeHeatExchanger tutorial. Firstly without addLayers turned on, run:
Code:
blockMesh
snappyHexMesh -overwrite
Then turn on addLayers (turn castellate and snap off) and run:
Code:
createBaffles -overwrite
mergeOrSplitBaffles -split -overwrite
rm -rf processor*/constant/polyMesh/pointLevel

 snappyHexMesh -overwrite
splitMeshRegions -cellZones -overwrite
My geometry and names for the solid regions in the STL file(s) can be seen in the attached diagram.


Issue 1:
I am not sure what is the best way to organise my STL surfaces in files. One option is to have two watertight STL files, one for the solid domain and one for the fluid domain. This would mean having the wetted wall surface included in both files, and these would contain the following surfaces as per diagram.

domain_solid.stl containing:
Code:
solid_outer
solid_xc_inlet
solid_xc_outlet
wetted_wall_to_solid
and the domain_fluid.stl containing:
Code:
fluid_inlet
fluid_outlet
 wetted_wall_to_fluid
Is this OK? The other option is to have three non-watertight STL files with the following surfaces.

domain_solid.stl containing:
Code:
solid_outer
solid_xc_inlet
solid_xc_outlet
domain_fluid.stl containing:
Code:
fluid_inlet
fluid_outlet
wetted_wall.stl containing:
Code:
wetted_wall
The wetted_wall, wetted_wall_to_fluid, and wetted_wall_to_solid are all the same surface, just with different names.





Issue 2:
Can you please have a look at the snappyHexMeshDict and also createBafflesDict sections below to see what I am doing wrong? Currently my mesh is only created for the solid part eventhough the locationInMesh is inside the fluid region. I am have tried several things but I always get the wrong results in mesh, region names. I've not got far yet to try layer addition.


snappyHexMeshDict:

Code:
geometry
{
    fluid_region_name
    {
        type triSurfaceMesh;
        file "domain_fluid.stl";
        regions
        {
            fluid_inlet          { name fluid_inlet_name; }
            fluid_outlet         { name fluid_outlet_name; }
            wetted_wall_to_fluid { name ww_fluid_name; }
        }
    }
    solid_region_name
    {
        type triSurfaceMesh;
        file "domain_solid.stl";
        regions
        {
            solid_outer          { name solid_outer_name;  }
            solid_xc_inlet       { name solid_xc_inlet_name; }
            solid_xc_outlet      { name solid_xc_outlet_name; }
            wetted_wall_to_solid { name ww_solid_name; }
        }
    }
}
castellatedMeshControls
{
    maxLocalCells   100000;
    maxGlobalCells  1000000;
    minRefinementCells 10;
    maxLoadUnbalance 0.1;
    nCellsBetweenLevels 2;
    resolveFeatureAngle 15;
    allowFreeStandingZoneFaces true;
    features        ( );
    refinementSurfaces
    {
        fluid_region_name
        {
            level           ( 1 1 );
            regions
            {
                fluid_inlet_name  { level ( 1 1 ); patchInfo { type patch; } }
                fluid_outlet_name { level ( 1 1 ); patchInfo { type patch; } }
                ww_fluid_name     { level ( 2 2 ); patchInfo { type wall; } }
            }
        }
        solid_region_name
        {
             level ( 1 1 );
             regions
             {
                 solid_outer_name     { level ( 1 1 ); patchInfo { type patch; } }
                 solid_xc_inlet_name  { level ( 1 1 ); patchInfo { type patch; } }
                 solid_xc_outlet_name { level ( 1 1 ); patchInfo { type patch; } }
                 ww_solid_name        { level ( 2 2 ); patchInfo { type patch; } }
             }
        }
    }
    refinementRegions
    {
    }
    locationInMesh  ( 0.1 0 0 );
}
createBafflesDict:
Code:
internalFacesOnly true;

baffles
{
    baffles1
    {
        type        faceZone;
        zoneName    ww_fluid_name;

        patches
        {
            master
            {
                name         wetted_wall_to_fluid;
                type         mappedWall;
                sampleMode   nearestPatchFace;
                sampleRegion fluid_region_name;
                samplePatch  wetted_wall_to_solid;
            }
            slave
            {
                name         ww_solid_name;
                type         mappedWall;
                sampleMode   nearestPatchFace;
                sampleRegion solid_region_name;
                samplePatch  wetted_wall_to_solid;
            }
        }
    }
}
I have attached the whole OF case directory if you would like to look further.




Any help would be much appreciated.


Many thanks,
Nakos
Attached Images
File Type: jpg diagram.jpg (47.2 KB, 142 views)
Attached Files
File Type: gz pipe.layers.snappy.tar.gz (177.0 KB, 16 views)
File Type: gz separate-STL-surfaces.tar.gz (113.1 KB, 15 views)

Last edited by tclph; July 11, 2019 at 05:44.
tclph is offline   Reply With Quote

Old   December 8, 2020, 16:25
Default
  #2
New Member
 
Diego
Join Date: Dec 2020
Posts: 1
Rep Power: 0
DIOD is on a distinguished road
Hi, were you able of fixing this issue? I am having the same questions right now.

If not, hopefully, some of the pros can take a look at this.

Best,
Diego
DIOD is offline   Reply With Quote

Reply

Tags
chtmultiregionfoam, snapphhexmesh, stl file


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
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
Problem with chtMultiregionFoam radiation boundary condition baran_foam OpenFOAM Running, Solving & CFD 10 December 17, 2019 18:36
Multi Region Mesh Issues - Star CCM+ Hammerson99 STAR-CCM+ 3 September 27, 2018 00:25
[ANSYS Meshing] Creating a region of fine mesh within 3D fluid domain raven ANSYS Meshing & Geometry 1 August 13, 2014 12:11
[snappyHexMesh] Layers:problem with curvature giulio.topazio OpenFOAM Meshing & Mesh Conversion 10 August 22, 2012 10:03


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