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

[snappyHexMesh] Multiple meshed components missing

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 24, 2020, 19:31
Default Multiple meshed components missing
  #1
New Member
 
Carl Reilly
Join Date: Aug 2010
Posts: 26
Rep Power: 16
carl_r is on a distinguished road
Hi,
I'm new to OpenFoam and snappyHexMesh and am trying to learn it via online tutorials and other sources. I have experience with other commercial packages.

I am trying to mesh a relatively simple geometry which contains multiple bodies in snappyHexMesh. I have started to play with the snappyHexMeshDict and surfaceFeatureExtractDict to understand what each parameter does.

At some point in my 'playing' I did something which means that instead of all components getting meshed, only one component is meshed at the end. Initially all components were being meshed.

Attached is an image of the geometry (as defined after the surface extract step).

Also attached is an image of the final mesh, as you can see it is only 1 of the 4 components that make up the geometry. (There are additional .stl files) to define the some of the surfaces where I want to apply patches/boundary conditions.

If I redefine the "locationInMesh" variable then the part that is meshed is changed to the one containing the coordinate. I tried including multiple locationInMesh variables, but this does not work, only the last one is used.

I have set debug to 1. This means I can view the meshing steps. At 0.012 all the mesh is present (see image), but at 0.013 only a single component is left.

When looking in the log.mpirun file (running on 4cpu) I see that between 0.012 and 0.013 a step titled "Remove unreachable sections of mesh" is undertaken. (line 2512 of log.mpirun).

I assume that for some reason snappy is removing the mesh from the other volumes. But i'm not sure why and how to resolve this. I know I should be able to mesh multiple volumes (as it did it initially).

I think that the mesh is of high enough resolution to resolve the components adequately.

Any help in resolving this would be appreciated, I have tried to attach all the relevant cast files.
Attached Images
File Type: jpg Geometry.jpg (30.4 KB, 54 views)
File Type: jpg finalMesh.jpg (88.2 KB, 50 views)
File Type: jpg All mesh at 0.012.jpg (108.7 KB, 56 views)
Attached Files
File Type: zip caseFiles.zip (104.1 KB, 5 views)
carl_r is offline   Reply With Quote

Old   February 25, 2020, 08:13
Default
  #2
Member
 
Join Date: Sep 2018
Location: France
Posts: 62
Rep Power: 8
john myce is on a distinguished road
Hi carl,

Did you try with this function activated:

Code:
multiRegionFeatureSnap true;
cheers,
john myce is offline   Reply With Quote

Old   February 25, 2020, 12:44
Default
  #3
New Member
 
Carl Reilly
Join Date: Aug 2010
Posts: 26
Rep Power: 16
carl_r is on a distinguished road
Thanks for the reply. I checked my snappyHexMeshDict and found multiRegionFeatureSnap was set to false. I tried changing it to true but the results seem the same.

Any further thoughts?
carl_r is offline   Reply With Quote

Old   February 25, 2020, 13:36
Default
  #4
Member
 
Join Date: Sep 2018
Location: France
Posts: 62
Rep Power: 8
john myce is on a distinguished road
Another hint, by looking at the tutorial in heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/snappyHexMeshDict,

you can try :

Code:
    locationsInMesh 
    (
        (( 0.005 0.005  0.005) heater)
        (( 0.05  0.005  0.005) rightSolid)
        ...
    );


    // Whether any faceZones (as specified in the refinementSurfaces)
    // are only on the boundary of corresponding cellZones or also allow
    // free-standing zone faces. Not used if there are no faceZones.
    allowFreeStandingZoneFaces false;
so you specify all the locationsInMesh of your parts.

Cheers,
john myce is offline   Reply With Quote

Old   February 25, 2020, 14:41
Default
  #5
New Member
 
Carl Reilly
Join Date: Aug 2010
Posts: 26
Rep Power: 16
carl_r is on a distinguished road
I have just tried locationsInMesh and locationInMesh with multiple regions defined. With both I get an error from snappyHexMesh.

I think one issue is that I am using OpenFoam V7, not OpenFoam V1912 (OpenFoam.com). I know the solvers are slightly different, but had assumed (wrongly?) that sHM was the same.

Am I correct in thinking that snappyHexMesh has no evolved to be different in the two versions of OpenFoam?

If so, is this the correct forum for support with OpenFoam V7, and is there a commonly used way of specifying the OpenFoam release being used, or should I just have put Version: OpenFoam V7 in my initial post to clarify the version used?

There is a tutorial in OpenFoam7 which appears to use multiple .stl files and regions in the domain. I'll try and understand this tutorial to see if it offers any insight to my issue.

Code:
openfoam7\tutorials\heatTransfer\chtMultiRegionFoam\shellAndTubeHeatExchanger
If anyone has any further suggestions they'd be appreciated.
carl_r is offline   Reply With Quote

Old   February 25, 2020, 14:58
Default
  #6
Member
 
Join Date: Sep 2018
Location: France
Posts: 62
Rep Power: 8
john myce is on a distinguished road
Yes this is the correct forum for both version don’t worry. You can mention your version on your first post for instance it is better for the other prople to know it. And yes there is on the last both versions some differences with some functions on the ESI versions (v1912, ...) for snappyHexMesh that are not implemented in the fundation versions (5, 6, ...). But mostly these are advanced functions so I don’t if there is some differences for chtMultiRegionFoam.

Cheers,
john myce is offline   Reply With Quote

Old   February 25, 2020, 14:58
Default
  #7
New Member
 
Carl Reilly
Join Date: Aug 2010
Posts: 26
Rep Power: 16
carl_r is on a distinguished road
This is an example of the error, it seems that it does not like the definition of
locationInMesh. The error for locationsInMesh says that it does not recognize the variable locationsInMesh.


Code:
[3] Selecting decompositionMethod hierarchical
[3] 
[3] 
[3] --> FOAM FATAL IO ERROR: 
[3] keyword locationInMesh is undefined in dictionary "IOstream.castellatedMeshControls"
[0] 
[0] 
[0] --> FOAM FATAL IO ERROR: 
[0] keyword locationInMesh is undefined in dictionary "/home/carl/OpenFOAM/carl-7/run/castTest/system/snappyHexMeshDict.castellatedMeshControls"
[0] 
[0] file: /home/carl/OpenFOAM/carl-7/run/castTest/system/snappyHexMeshDict.castellatedMeshControls from line 81 to line 165.
[0] 
[0]     From function const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, bool, bool) const
[0]     in file db/dictionary/dictionary.C at line [3] 
[3] file: IOstream.castellatedMeshControls from line 0 to line 0.
[3] 
[3]     From function const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, bool, bool) const
[3]     in file db/dictionary/dictionary.C at line 573.
[3] 
FOAM parallel run exiting
carl_r is offline   Reply With Quote

Old   November 10, 2021, 01:14
Default
  #8
Senior Member
 
Desh
Join Date: Mar 2021
Location: Sydney
Posts: 118
Rep Power: 5
dasith0001 is on a distinguished road
Probably too late now but ''locationInMesh'' should be ''locationsInMesh''.
dasith0001 is offline   Reply With Quote

Reply

Tags
bodies, multiple volumes, snappyhesmesh

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[General] Extracting ParaView Data into Python Arrays Jeffzda ParaView 30 November 6, 2023 22:00
Velocity components residuals are missing when running with interDyMFoam vsammartano OpenFOAM Running, Solving & CFD 13 October 24, 2022 13:23
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
[ICEM] Multiple edges asal ANSYS Meshing & Geometry 2 March 22, 2013 11:10
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 13:21


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