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

[snappyHexMesh] inlet patch with snappyHexMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By shogan50

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 20, 2021, 19:59
Default inlet patch with snappyHexMesh
  #1
New Member
 
Scott Hogan
Join Date: Mar 2010
Location: Washington State, USA
Posts: 12
Rep Power: 16
shogan50 is on a distinguished road
I have an .stl volume which represents features outside the fluid domain. Fluid, for the most part is flowing around it. I have an .stl disk shaped surface, which represents and inlet patch. The outlet is one of the walls in the blockMesh, but this isn't convenient for the inlet. This is a decomposed case. I have successfully created an inlet patch using topoSet and createPatch, but it only applies to the pre decomposed case. It appears to be grabbing faces from the block mesh. Further, RecostructParMesh warns that it is experimental and not recommended except...

What is the preferred method to generate the inlet patch from .stl? I've tried to included it in Snappy... but it is really external to the snapped geometry and it ignores it. The .stl's are created in Solidworks if that matters. I'm relatively proficient at editing/combing .stl's.

topo snippet:
Code:
(
	{
		name fz_inlet;
		type faceZoneSet;
		action new;
		source searchableSurfaceToFaceZone;
		sourceInfo
		{
			surface searchableDisk;
			origin (0 0 -0.037);
			normal (0 0 -1);
			radius .05;
			//name inlet.stl;
		}
	}
);
createPatchDict snippet:
Code:
patches
(
    {
        // Name of new patch
        name inlet;

        // Type of new patch
        patchInfo
        {
            type patch;
        }

        // How to construct: either from 'patches' or 'set'
        constructFrom set;

        // If constructFrom = patches : names of patches. Wildcards allowed.
        //patches ("periodic.*");

        // If constructFrom = set : name of faceSet
        set fz_inlet;
    }
);
allanZHONG likes this.
shogan50 is offline   Reply With Quote

Old   March 22, 2021, 10:08
Default Solved
  #2
New Member
 
Scott Hogan
Join Date: Mar 2010
Location: Washington State, USA
Posts: 12
Rep Power: 16
shogan50 is on a distinguished road
I figured out that you have to apply whatever utility you are using to each processor folder.
Code:
#!/bin/sh
cd ${0%/*} || exit 1    # Run from this directory
...
...
runApplication surfaceFeatures
runApplication blockMesh
runApplication decomposePar
foamJob -parallel -screen snappyHexMesh -overwrite
FOLDERS=./processor*/
for f in $FOLDERS
do
	echo "adding inlet patch to $f"
	cd $f
	surfaceToPatch ../constant/triSurface/inlet.stl
	cd ..
done
cd ..

Last edited by shogan50; March 22, 2021 at 10:10. Reason: made more concise
shogan50 is offline   Reply With Quote

Old   March 23, 2021, 08:25
Default Not totally solved
  #3
New Member
 
Scott Hogan
Join Date: Mar 2010
Location: Washington State, USA
Posts: 12
Rep Power: 16
shogan50 is on a distinguished road
This doesn't totally solve my problem. The utility doesn't seem to have an -overwrite option, so this script creates timesteps where it finds matching faces, leaving the processors out of sync in their timestamps. My initial question still stands. What is best practice here?

Thanks
shogan50 is offline   Reply With Quote

Reply

Tags
patch, snappyhexmesh, toposet


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
[Commercial meshers] Fluent3DMeshToFoam simvun OpenFOAM Meshing & Mesh Conversion 50 January 19, 2020 15:33
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 19:43
[Commercial meshers] Using starToFoam clo OpenFOAM Meshing & Mesh Conversion 33 September 26, 2012 04:04
[Other] StarToFoam error Kart OpenFOAM Meshing & Mesh Conversion 1 February 4, 2010 04:38
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 06:51


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