CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] inlet patch with snappyHexMesh (https://www.cfd-online.com/Forums/openfoam-meshing/234842-inlet-patch-snappyhexmesh.html)

shogan50 March 20, 2021 20:59

inlet patch with snappyHexMesh
 
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;
    }
);


shogan50 March 22, 2021 11:08

Solved
 
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 ..


shogan50 March 23, 2021 09:25

Not totally solved
 
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


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