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

[surface handling] Regular expression in surfaceFeatureExtractDict

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

Like Tree3Likes
  • 1 Post By HakikiCanakkaleli
  • 2 Post By olesen

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 17, 2015, 22:11
Default Regular expression in surfaceFeatureExtractDict
  #1
Member
 
Join Date: Nov 2009
Posts: 65
Rep Power: 16
waku2005 is on a distinguished road
Dear All,

In order to specify many STL files, I'd like to use regular expression as bellow, but got error after sFE command.
Does sFEDict allow regular expression ?

Sincerely,
waku2005


Code:
"(wing.*.stl)"   // I want to specitfy  wing0.stl, wing1.stl, .....
{
        // How to obtain raw features (extractFromFile || extractFromSurface)
    extractionMethod    extractFromSurface;
    extractFromSurfaceCoeffs
    {
        // Mark edges whose adjacent surface normals are at an angle less
        // than includedAngle as features
        // - 0  : selects no edges
        // - 180: selects all edges
        includedAngle   180;
    }
    subsetFeatures
    {
        // Keep nonManifold edges (edges with >2 connected faces)
        nonManifoldEdges       no;
        // Keep open edges (edges with 1 connected face)
        openEdges       yes;
    }
    // Write options
        // Write features to obj format for postprocessing
        writeObj                yes;
}
waku2005 is offline   Reply With Quote

Old   December 7, 2017, 07:47
Default
  #2
Member
 
Lennart
Join Date: Feb 2016
Posts: 46
Rep Power: 10
elmo555 is on a distinguished road
I'd also be interested in this...
elmo555 is offline   Reply With Quote

Old   December 9, 2017, 12:37
Default
  #3
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 13
HakikiCanakkaleli is on a distinguished road
Mentioning in Regular Expressions in OF Config Files:

Quote:
By what I can see, OpenFOAM uses POSIX regular expressions, but it only applies to OpenFOAM's keywords; doesn't work for files.
Yet for patches and patch relevant occasions, the story is different: https://bugs.openfoam.org/view.php?id=527 & https://www.cfd-online.com/Forums/op...tml#post631374

So, this may mean that the usage of regular expressions is currently not possible in surfaceFeatureExtractDicts for geometry file names.
elmo555 likes this.
HakikiCanakkaleli is offline   Reply With Quote

Old   December 21, 2017, 05:15
Default
  #4
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 13
HakikiCanakkaleli is on a distinguished road
To update those who had an interest on this thread. I have raised a feature request:

Feature: Possibility for Regular Expressions in snappyHexMeshDict, surfaceFeatureExtractDict etc. for File Names
HakikiCanakkaleli is offline   Reply With Quote

Old   January 4, 2018, 11:20
Default
  #5
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,684
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by HakikiCanakkaleli View Post
So, this may mean that the usage of regular expressions is currently not possible in surfaceFeatureExtractDicts for geometry file names.

At least for surfaceFeatureExtract, this was already in the OpenFOAM-1706 release.
However, the regular expressions are not given via the keyword, but as a list of wordRe.
For example,
Code:
// Self intersection (single or multiple surfaces).
// - Use 'surfaces' entry (a wordRe list) if it exists.
// - If the dictionary name does not have an extension, 'surfaces' is mandatory.
outputName1
{
    extractionMethod    none;

    surfaces            (surface1.stl surface2.nas "foo.*stl" );

    // mm -> m scaling
    // scale               0.001;

    // Generate additional intersection features (none | self | region)
    intersectionMethod  self;

    // Tolerance for surface intersections
    // tolerance           1e-3;
}
applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtractDict contains more information. The 'self' intersection was also new for 1706. It lets you load a bunch of surfaces and extract a feature line equivalent to the intersections, which makes it behave a bit like surfaceBooleanFeatures but with potentially less fiddling.

BTW: for OpenFOAM-1712 stitchMesh also got much better. Can now process multiple stitching via a dictionary. See the tutorials/mesh/stitchMesh/simple-cube1
HakikiCanakkaleli and DaveD! like this.
olesen is offline   Reply With Quote

Reply

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
Outlet boundary condition in interFoam Andrea_85 OpenFOAM Running, Solving & CFD 51 July 20, 2017 13:31
writing execFlowFunctionObjects immortality OpenFOAM Post-Processing 30 September 15, 2013 06:16
How to install CGNS under windows xp? lzgwhy Main CFD Forum 1 January 11, 2011 18:44
CGNS lib and Fortran compiler manaliac Main CFD Forum 2 November 29, 2010 06:25
ParaView Compilation jakaranda OpenFOAM Installation 3 October 27, 2008 11:46


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