CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Why topoSet does work incorrectly?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By crubio.abujas

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 31, 2021, 13:49
Default Why topoSet does work incorrectly?
  #1
New Member
 
Join Date: Sep 2020
Posts: 28
Rep Power: 5
Reptider is on a distinguished road
Hello!
There is mesh created by cartesianMesh (meshDict) with surfaceMeshRefinement. I need to assign cells restricted by "obj_2.stl" to cellZone using topoSetDict (picture1.png). It must be done by surfaceToCell. But I've got the case that works incorrectly. Two outside points noticed in the piece of code should show the outside of stl file. So it must assign internal cells in cellZone (red points, picture0.png). However, this operation is done only boundary cells (picture2.png). Internal zone is ignored. I don't understand what's wrong. Could you help me?
picture0.png

picture1.jpg

picture2.jpg
The file can be downloaded from the cloud:

https://drive.google.com/file/d/1xT4...ew?usp=sharing

Code:
actions
(
    {
    name    supportCellSet_1;
    type    cellSet;
    action  new;
    source  surfaceToCell;
    file    "obj_2.stl";
    outsidePoints
    (
        (-27.755749702453613 -14.90625 0.1956501007080078)
        (4.457550048828125 -6.677660942077637 15.221670150756836)
    );
    includeCut      true;
    includeInside   true;
    includeOutside  false;
    nearDistance    -1;
    curvature       -100;     
    }

    {
        name    cellZone_1;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        sourceInfo
        {
            set supportCellSet_1;
        }
    } 
);
I think it occurs due to either bad stl or mesh.
Reptider is offline   Reply With Quote

Old   April 1, 2021, 03:38
Default Try useSurfaceOrientation
  #2
Senior Member
 
Carlos Rubio Abujas
Join Date: Jan 2018
Location: Spain
Posts: 127
Rep Power: 9
crubio.abujas is on a distinguished road
Hi Reptider,

It seems that the program get confused by the inside/outside definition. I had success using the option "useSurfaceOrientation" to automatically detect inside/outside regions instead of explicitly define the outsidePoints. Let me know if that works for you as well.

Code:
actions
(
    {
	name    supportCellSet_1;
	type    cellSet;
	action  new;
	source  surfaceToCell;
	file    "obj_2.stl";
	outsidePoints ();
        useSurfaceOrientation true;
	includeCut      false;
	includeInside   true;
	includeOutside  false;
	nearDistance    -1;
	curvature       -1;     
    }

    {
        name    cellZone_1;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        sourceInfo
        {
            set supportCellSet_1;
        }
    } 
);
crubio.abujas is offline   Reply With Quote

Old   April 1, 2021, 04:39
Default
  #3
New Member
 
Join Date: Sep 2020
Posts: 28
Rep Power: 5
Reptider is on a distinguished road
Quote:
Originally Posted by crubio.abujas View Post
Hi Reptider,

It seems that the program get confused by the inside/outside definition. I had success using the option "useSurfaceOrientation" to automatically detect inside/outside regions instead of explicitly define the outsidePoints. Let me know if that works for you as well.
Hey, crubio. I appreciate your attention for my problem. I know about this method of topoSet. It requires normals to be directed from stl, right?
Can I avoid this?
Reptider is offline   Reply With Quote

Old   April 1, 2021, 06:04
Default
  #4
Senior Member
 
Carlos Rubio Abujas
Join Date: Jan 2018
Location: Spain
Posts: 127
Rep Power: 9
crubio.abujas is on a distinguished road
You're using OFv1912, right? I've tried it into OF v7 and your approach works fine, so maybe there is a bug ig OFv1912 with this app. If so it is not corrected into v2012 (also tried) so you may consider to report this issue.

I think your options right know are:
a) switch to openFoam Foundation version (at least to do the topoSet, then you can use the defined sets into whatever version you use)
b) Use the useSurfaceOrientation approach.
c) Dig into the source code and find what is wrong.

Quote:
It requires normals to be directed from stl, right?
Can I avoid this?
Yes, it uses the stl normals to it. I don't see how this add any further complexity, why are you willing to avoid this?
Reptider likes this.
crubio.abujas is offline   Reply With Quote

Old   April 1, 2021, 07:44
Default
  #5
New Member
 
Join Date: Sep 2020
Posts: 28
Rep Power: 5
Reptider is on a distinguished road
Quote:
Originally Posted by crubio.abujas View Post
You're using OFv1912, right? I've tried it into OF v7 and your approach works fine, so maybe there is a bug ig OFv1912 with this app. If so it is not corrected into v2012 (also tried) so you may consider to report this issue.

I think your options right know are:
a) switch to openFoam Foundation version (at least to do the topoSet, then you can use the defined sets into whatever version you use)
b) Use the useSurfaceOrientation approach.
c) Dig into the source code and find what is wrong.



Yes, it uses the stl normals to it. I don't see how this add any further complexity, why are you willing to avoid this?
I know that I can get stl that has problems with orientation of normals. For example, some triangle has "wrong" placement of his vertices, so it leads normal of this triangle is directed inside.
Reptider is offline   Reply With Quote

Old   April 1, 2021, 09:25
Default
  #6
New Member
 
Join Date: Sep 2020
Posts: 28
Rep Power: 5
Reptider is on a distinguished road
It works if I use the useSurfaceOrientation approach. But I see that insideCut is not necessary. How can I easily tell the topoSet in order to cutted cells at boundaries belong only one cellSet?
Reptider is offline   Reply With Quote

Reply


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
[mesh manipulation] TopoSet cellset is not deleting from stl cellZone sunagra27 OpenFOAM Meshing & Mesh Conversion 0 March 9, 2021 01:50
bug : topoSet STOP RESPONDING while trying to make cellzones near to a surface. sk11 OpenFOAM Bugs 0 March 1, 2021 11:49
Does CX_Interpret_String work in parallel? 86lolo Fluent UDF and Scheme Programming 2 June 30, 2014 04:36
Companies that lease software & hardware for cloud-based work? Catthan ANSYS 0 June 18, 2014 10:53
Do all CFD analysts have to do some hands-on work except PhDs? e13drd Main CFD Forum 2 March 17, 2014 14:56


All times are GMT -4. The time now is 14:54.