CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

topoSetDict using stl file

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

Like Tree13Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 19, 2022, 09:12
Default
  #21
New Member
 
Megan
Join Date: May 2022
Posts: 11
Rep Power: 2
mega1 is on a distinguished road
Dear Yann,

After running surfaceCheck this is what it gives;

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Reading surface from "constant/triSurface/geom90degarc.stl" ...

Statistics:
Triangles : 0
Vertices : 0
Bounding Box : (1.79769e+307 1.79769e+307 1.79769e+307) (-1.79769e+307 -1.79769e+307 -1.79769e+307)

Region Size
------ ----


Surface has no illegal triangles.

Triangle quality (equilateral=1, collapsed=0):
0 .. 0.05 : #0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 ? in "/opt/openfoam9/platforms/linux64GccDPInt32Opt/bin/surfaceCheck"
#4 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#5 ? in "/opt/openfoam9/platforms/linux64GccDPInt32Opt/bin/surfaceCheck"
Floating point exception (core dumped)

-----------------------------------------------------------------------
I don't understand what it is.
mega1 is offline   Reply With Quote

Old   May 19, 2022, 10:22
Default
  #22
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 603
Rep Power: 20
Yann will become famous soon enough
It seems there is something going on with your STL.
What software did you use to create it?
Is it binary or ASCII? If it's binary, maybe try to export it in ASCII format and try again.

Yann
Yann is online now   Reply With Quote

Old   May 19, 2022, 10:29
Default
  #23
New Member
 
Megan
Join Date: May 2022
Posts: 11
Rep Power: 2
mega1 is on a distinguished road
Quote:
Originally Posted by Yann View Post
It seems there is something going on with your STL.
What software did you use to create it?
Is it binary or ASCII? If it's binary, maybe try to export it in ASCII format and try again.

Yann
Dear Yann,
Yes I think so. I made the geometry with the blockMesh file, then imported it through Paraview in .pvd format and then changed the extension to .stl. I think it's not the right way. Is there any other way to do the .stl file? Are we supposed to use solid edge only to do the .stl?

Thanks a lot!
mega1 is offline   Reply With Quote

Old   May 19, 2022, 11:12
Default
  #24
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 603
Rep Power: 20
Yann will become famous soon enough
You can create the geometry in any CAD software and then export the geometry as STL. You should be able to do this with Solid Edge indeed.

If you want to create a STL from blockMesh, you should load it into paraView, then use the "extract surface" filter to extract only the mesh boundaries and then file/save data/ and choose stl format. But this is quite an unusual and tedious process.

Yann
Yann is online now   Reply With Quote

Old   May 19, 2022, 14:20
Default
  #25
New Member
 
Megan
Join Date: May 2022
Posts: 11
Rep Power: 2
mega1 is on a distinguished road
Okay, I will try this way. Thank you very much Yann for your help!
Yann likes this.
mega1 is offline   Reply With Quote

Old   May 24, 2022, 05:09
Default
  #26
New Member
 
Megan
Join Date: May 2022
Posts: 11
Rep Power: 2
mega1 is on a distinguished road
Dear Yann,

I made the geometry with AutoCAD and imported it into OpenFoam as .stl file. Finally it gives me the shape of the porous zone which I needed but the geometry isn't perfect when opened in paraview. Any suggestions how I could improve the geometry? Thank you.
Attached Images
File Type: jpg paraview.jpg (30.6 KB, 9 views)
Attached Files
File Type: txt surface Check.txt (1.3 KB, 1 views)
mega1 is offline   Reply With Quote

Old   May 24, 2022, 06:08
Default
  #27
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 603
Rep Power: 20
Yann will become famous soon enough
Hi Megan,

Could you also display your STL file on the screenshot so we can see what is wrong?

Also please note topoSet does not modify the mesh, it only assigns some cells or faces to different zones/patches, etc... The expected result is to get a porousBlockage cellZone made out of all the cells contained inside the volume of the STL file.

Yann
Yann is online now   Reply With Quote

Old   May 24, 2022, 06:28
Default
  #28
New Member
 
Megan
Join Date: May 2022
Posts: 11
Rep Power: 2
mega1 is on a distinguished road
Hello Yann,
Attached is the screenshot of stl file.
Attached Images
File Type: png stl screenshot.PNG (48.1 KB, 4 views)
mega1 is offline   Reply With Quote

Old   May 24, 2022, 10:18
Default
  #29
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 603
Rep Power: 20
Yann will become famous soon enough
OK then since your STL file seems to be fine, something must be going on with topoSetDict.

Could you post your whole case here? It would be easier to debug if I can have a look at the file and run few tests.

Yann
Yann is online now   Reply With Quote

Old   May 24, 2022, 10:45
Default
  #30
New Member
 
Megan
Join Date: May 2022
Posts: 11
Rep Power: 2
mega1 is on a distinguished road
Hello Yann,

I have attached the blockMeshDict and topoSetDict files here. Thanks again!
Attached Files
File Type: txt blockMeshDict.txt (5.0 KB, 0 views)
File Type: txt topoSetDict.txt (1.5 KB, 3 views)
mega1 is offline   Reply With Quote

Old   May 24, 2022, 10:56
Default
  #31
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 603
Rep Power: 20
Yann will become famous soon enough
Thanks, but can you send your whole case in a zip file? I cannot test anything without the STL file and I have to rebuild a case around your files if I want to be able to test it.
Yann is online now   Reply With Quote

Old   May 24, 2022, 11:14
Default
  #32
New Member
 
Megan
Join Date: May 2022
Posts: 11
Rep Power: 2
mega1 is on a distinguished road
Hello Yann, sorry about that. I have attached the zip file here.
Attached Files
File Type: zip try.zip (8.2 KB, 1 views)
mega1 is offline   Reply With Quote

Old   May 24, 2022, 11:45
Default
  #33
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 603
Rep Power: 20
Yann will become famous soon enough
Thank you!

I changed 2 parameters in the topoSetDict:
  • outsidePoints: it's not a good idea to use the origin as an outside point. Better using any coordinate located inside the domain but outside the STL volume and not on any patch.
  • nearDistance: I deactivated this parameter by setting it to "-1" since it does not seem appropriate for your case. It allows topoSet to select cells located at a certain distance of the surface and it is used in combination with the curvature parameter (some additional information in this thread: how surfaceToCell works?). I think this was the the main reason for your issue.

Code:
    // porousBlockage
    {
        name    porousBlockageCellSet;
        type    cellSet;
        action  new;
        source  surfaceToCell;
        sourceInfo
        {
			file	"constant/triSurface/Drawing4.stl";
			
			outsidePoints
			(
				(0.011 0.011 17.551) 
			);
        
			includeCut  true;
			includeInside  false;
			includeOutside  false;
			nearDistance	-1;
			curvature	1;
			
			// Optional entries
    			useSurfaceOrientation false;
    			fileType        stl;
    			scale           1.0;
		}
    }
This seems to have solved the issue and to give a proper cellZone.
Let me know if this is the result your were expecting!

Cheers,
Yann
Yann is online now   Reply With Quote

Old   May 24, 2022, 12:00
Default
  #34
New Member
 
Megan
Join Date: May 2022
Posts: 11
Rep Power: 2
mega1 is on a distinguished road
Hello Yann,
This is exactly what I needed. I can't thank you enough for your timely help!! God bless you!
Yann likes this.
mega1 is offline   Reply With Quote

Reply

Tags
openfoam, stl file, toposetdict

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
Using PengRobinsonGas EoS with sprayFoam Jabo OpenFOAM Running, Solving & CFD 35 April 29, 2022 16:35
how to calculate mass flow rate on patches and summation of that during the run? immortality OpenFOAM Post-Processing 104 February 16, 2021 09:46
what is swap4foam ?? AB08 OpenFOAM 28 February 2, 2016 02:22
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 Seroga OpenFOAM Community Contributions 9 June 12, 2015 18:18
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08


All times are GMT -4. The time now is 05:46.