Boundary Layer Surface Mesh Can't Be Swept

Hello,

I’m trying to prepare a mesh for CFD and need to add boundary layers to a fluid volume. I have attached the geometry I’m trying to mesh below.

test_fluid.cub5 (200.8 KB)

When you open it, we have a single volume with boundary layers already defined:

This volume seems pretty well suited to meshing a face and then sweeping, so let’s try that:

surface 7 size 1.25
mesh surface 7

At this point we are looking pretty good:

But when I try to sweep the volume, I get errors:

Cubit>volume 1  redistribute nodes off
Journaled Command: volume 1 redistribute nodes off

Cubit>volume 1  scheme Sweep  source surface 7   target surface 8   sweep transform least squares
WARNING: Autoscheme can not verify that Surface 9 will successfully mesh with scheme submap, but is setting it to that scheme anyway because only map and submap are allowed here.
WARNING: Autoscheme can not verify that Surface 12 will successfully mesh with scheme submap, but is setting it to that scheme anyway because only map and submap are allowed here.
WARNING: Autoscheme can not verify that Surface 13 will successfully mesh with scheme submap, but is setting it to that scheme anyway because only map and submap are allowed here.
Journaled Command: volume 1 scheme Sweep source surface 7 target surface 8 sweep transform least squares

Cubit>volume 1  autosmooth target on  fixed imprints off  smart smooth off
Journaled Command: volume 1 autosmooth target on fixed imprints off smart smooth off

Cubit>mesh vol 1
Finding Sweep Dependent Volumes...
Grouping Mesh Dependent Volumes Completed...
Matching intervals successful.
Meshing Linking Surfaces!

WARNING: >>>>Poor Quality Shape Face Generated!<<<< on Surface 9
    (For example, the Shape metric for Face 550 is 0.18791 .)
    The threshold for a Face is 0.2


WARNING: >>>>Poor Quality Shape Face Generated!<<<< on Surface 12
    (For example, the Shape metric for Face 1504 is 0.0378479 .)
    The threshold for a Face is 0.2


WARNING: >>>>Poor Quality Shape Face Generated!<<<< on Surface 13
    (For example, the Shape metric for Face 1974 is 0.0200462 .)
    The threshold for a Face is 0.2

Meshed All Linking Surfaces!
WARNING: Encountered invalid boundary layer patch nodes (Vertex 12 Surface 7).
ERROR: Unable to process boundary layers for sweeping.
ERROR: Volume 1 meshing unsuccessful using scheme: sweep
ERROR: 1 volume did not mesh : Volume 1

Although some entities failed to mesh, Cubit will log the command in the journal file anyway, for future use.
Journaled Command: mesh volume 1

It appears that everything meshes except for the target surface. Any ideas on why this happening; or more importantly, what I can do to get this to mesh?

For additional information, here are the commands I use to generate the boundary layers on this volume:

undo group begin
create boundary_layer 2
modify boundary_layer 2 uniform height 0.1 growth 1.2 layers 4
modify boundary_layer 2 add surf 10 vol 1 surf 11 vol 1
modify boundary_layer 2 continuity on
undo group end
undo group begin
create boundary_layer 4
modify boundary_layer 4 uniform height 0.1 growth 1.2 layers 4
modify boundary_layer 4 add surf 14 vol 1 surf 15 vol 1
modify boundary_layer 4 continuity on
undo group end

Hi James,

Give me some time to look at this. I can get a mesh, but I don’t love what the sweeper does to the boundary layer.

Karl

Hi James,

I don’t love this method either, but it creates the boundary mesh through the rotation correctly. The sweep is deforming the mesh as it sweeps around the axis.

This method takes the quads on the meshed surface and does a 180 degree extrusion of the mesh through 30 intervals.

open "C:/Users/karl/Downloads/test_fluid.cub5"
mesh surface 7
create element revolve face in surface 7 axis location center curve 15 location center curve 16 angle 180 layers 30 
create mesh geom hex all
draw vol 2
delete vol 1

The image below shows a cross section of the mesh at 90 degrees. The boundary layers look correct.

I will enter the sweeping failure as a bug. I think you should be able to mesh surface 7 and just sweep it without needing to specify the other boundary layers. I think there is also a bug in boundary layers where the target surface cannot have boundary layers defined even if they match the boundary layers in the source surface. That may be a difficult problem to solve generally.

Karl

Awesome. This does seem to work on this individual geometry, but this is a subset of a webcut fluid volume geometry. I think I understand how to extend this to all of the volumes that can be swept, but there are a few central “plug” type geometries I cut out in order to get the volumes able to be swept that this method doesn’t seem to play well with. I’ve included another cub5 file as an example.

test_fluid2.cub5 (163.6 KB)

Let’s try to mesh this. As before, I mesh surface 7, but at this point I have a couple of options. I could use your command to sweep this 360 and save myself the hassle of needing two volumes to model the two volumes that make up the “saucer” section. However there will be mismatching geometry between the “plug” and “saucers.” Leading to needing to imprint the split cylindrical surface of the plug onto the total single piece saucer.

So let’s try to replicate the half “saucers” as they currently exist using the method @karl described.

draw volume 1
surface 3 size 1.5
mesh surface 3
create element revolve face in surface 3 axis location center curve 15 location center curve 16 angle 180 layers 15
create mesh geom hex all
delete volume 1

Looks good so far! But the new geometry is not merged with the existing geometry. I again have a few options: I can try to imprint and merge all of the geometry:

Cubit>imprint all
ERROR: Performing IMPRINT with volumes containing geometry
from different modeling engines is not allowed.
Delete uncommon geometry on these volumes before operation.

ERROR: IMPRINT operation failed

Maybe the merge will go better since I did replicate as closely as possible the original geometry.

Cubit>merge all
Preserving undo information...done

...Merging all features in the model

...Merging all Surfaces in the model
ERROR: Unexpected Error Encountered at /Users/core/builds/common/0/trelis/SimMesh/cubitclaro/cubitcomp/cubit/MeshMergeTool.cpp 353.WARNING: Will not delete node 66. It is still referenced.
ERROR: Unexpected Error Encountered at /Users/core/builds/common/0/trelis/SimMesh/cubitclaro/cubitcomp/cubit/MeshMergeTool.cpp 353.WARNING: Will not delete node 108. It is still referenced.
Consolidated 1 pair of surfaces

...Merging all Curves in the model
ERROR: Unexpected Error Encountered at /Users/core/builds/common/0/trelis/SimMesh/cubitclaro/cubitcomp/cubit/MeshMergeTool.cpp 353.WARNING: Will not delete node 124. It is still referenced.
ERROR: Unexpected Error Encountered at /Users/core/builds/common/0/trelis/SimMesh/cubitclaro/cubitcomp/cubit/MeshMergeTool.cpp 353.WARNING: Will not delete node 2. It is still referenced.
ERROR: Unexpected Error Encountered at /Users/core/builds/common/0/trelis/SimMesh/cubitclaro/cubitcomp/cubit/MeshMergeTool.cpp 353.WARNING: Additional delete node warnings suppressed.
Consolidated 4 pairs of curves 

...Merging all Vertices in the model
Consolidated 0 pairs of vertices
All detected matches successfully merged
Journaled Command: merge all

Looks like it picked up that the plug shares a surface with this half of the saucer, but those errors and warnings in conjunction with the GUI not rendering that shared surface when just drawing the new volume doesn’t inspire confidence.

Let’s go back to before the imprint/merge. Maybe sweeping the other half of the saucer is a viable approach. Since we want shared surfaces between the two saucer sections, let’s sweep the already meshed surface

Cubit>create element revolve face in surface 3 axis location center curve 23 location center curve 29 angle 180 layers 15
ERROR: element creation failed

Well, that didn’t go so well.

At this point, I’m not really sure what the path forward is. Any help would be greatly appreciated!

Hi @jbtompkins,

I wanted to give you an update on this problem. I don’t have a simple fix or an elegant work-around yet.

I am debugging the root cause problem to diagnose why the sweeper fails on this case. I would like to give you a real solution.

Karl

Hi James,

Here is a little more elegant solution. Part of the issue that I discovered is that sweeping boundary layers through 180 degrees is not sufficiently robust. Working on a quarter section worked much better.

I deleted all of your initial boundary layers and recreated it on just one surface.

I was able to control the mesh on the target surface better by copying the initial surface mesh to the target surfaces of each volume. I was then able to mesh all the volumes and retain the boundary layers correctly.

We acknowledge that boundary layers need more development and I have created several new bugs while working on this problem.

Thanks,
Karl

reset
open "./test_fluid2.cub5"

delete boundary_layer all

composite create curve 29 28
webcut vol 1 3 plane xplane 
imprint all 
merge all

create boundary_layer 1
modify boundary_layer 1 uniform height .1 growth 1.2 layers 4 
modify boundary_layer 1 add curve 36 surface 19 curve 35 surface 19 curve 32 surface 19 curve 33 surface 19 
modify boundary_layer 1 continuity on

surf 19 size 1.5
mesh surf 19
copy mesh surface 19  onto  surface 4  source curve 31  source vertex 17  target curve 11  target vertex 13  
copy mesh surface 19  onto  surface 35  source curve 31  source vertex 17  target curve 65  target vertex 31  
copy mesh surface 19  onto  surface 3  source curve 31  source vertex 17  target curve 5  target vertex 2  

volume 1 3 4 5  redistribute nodes on 
volume 1  scheme Sweep  source surface 19    target surface 4   sweep transform translate propagate bias 
volume 3  scheme Sweep  source surface 4    target surface 35   sweep transform translate propagate bias   
volume 5  scheme Sweep  source surface 35    target surface 3  sweep transform translate propagate bias 
volume 4  scheme Sweep  source surface 3    target surface 19   sweep transform translate propagate bias   
volume 1 3 4 5 autosmooth target off 
mesh volume 1 3 4 5

mesh vol 2

#topology check coincident node node all tolerance 1.0e-4 draw brief 

image

Sorry for the delayed response, I was out of the office at the end of last week. This did the trick for me! I really appreciate the effort @karl went to to help me get a boundary layer mesh working for this geometry!

Hi James,

One more follow-up on this problem. It looks to me like the bug is somewhere in deleting boundary layers, or maybe the combination of deleting boundary layers and merging. I was trying to simplify the case and I found that by writing out an ACIS sat file and then starting from that point, I was able to mesh the part in the manner that I should work normally. Using the quarter section is also crucial to this problem.

The following works without having to dig into the rest of Cubit’s meshing toolkit. I have attached the sat file that I used.

Karl

reset
import acis "./boundary_layer_bug.sat"

compress
webcut volume 1 3  with plane xplane offset 0 
imprint all
merge all

undo group begin
create boundary_layer 1
modify boundary_layer 1 uniform height .1 growth 1.2 layers 4 
modify boundary_layer 1 add surface 25 volume 1 surface 26 volume 1 surface 29 volume 1 surface 30 volume 1 
modify boundary_layer 1 continuity off
undo group end

undo group begin
create boundary_layer 2
modify boundary_layer 2 uniform height .1 growth 1.2 layers 4 
modify boundary_layer 2 add surface 36 volume 4 surface 37 volume 4 surface 33 volume 4 surface 32 volume 4 
modify boundary_layer 2 continuity off
undo group end

undo group begin
create boundary_layer 3
modify boundary_layer 3 uniform height .1 growth 1.2 layers 4 
modify boundary_layer 3 add surface 49 volume 5 surface 48 volume 5 surface 53 volume 5 surface 52 volume 5 
modify boundary_layer 3 continuity off
undo group end

undo group begin
create boundary_layer 4
modify boundary_layer 4 uniform height .1 growth 1.2 layers 4 
modify boundary_layer 4 add surface 42 volume 3 surface 41 volume 3 surface 45 volume 3 surface 46 volume 3 
modify boundary_layer 4 continuity off
undo group end

Surface 2 size 1.5
volume 1  redistribute nodes off 
volume 1  scheme Sweep  source surface 2    target surface  23   sweep transform least squares 
volume 1  autosmooth target on  fixed imprints off  smart smooth off 
mesh vol 1 3 4 5

mesh vol 2

boundary_layer_bug.sat (49.2 KB)