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

[mesh manipulation] topoSet for stl files

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Owais Shabbir
  • 1 Post By Owais Shabbir

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 24, 2019, 10:55
Default topoSet for stl files
  #1
Member
 
Owais Shabbir
Join Date: May 2019
Posts: 48
Rep Power: 6
Owais Shabbir is on a distinguished road
Dear All,

I am starting to work with topoSet and it is slightly confusing when it comes to using .stl files in it.
My goal is bring set of batteries generating heat due to charging in chtMultiRegion solver.

I have few questions that if someone could answer, it will be highly appreciated.

1) In snappyHexMeshDict when I set
Code:
  refinementSurfaces
    {
	batteries_c3  {	level (2 2);	
	faceZone batt1;
        cellZone batt1;
        cellZoneInside inside;
		}
    }
Is this cellZone that I created called batt1, be mentioned anywhere in topoSetDict file?

2) My geometry composes of 32 rectangular boxes, but when I try topoSet using
Code:
        name 	battCellSet;
	type 		cellSet;
	action	new;
	source	surfaceToCell;
	sourceInfo
	{	
		file "/mnt/...../refined1x_cht_toposet/constant/triSurface/batteries_c3.stl";
		useSurfaceOrientation false;
		
		outsidePoints	((0.46 0.0345 -0.1445183)); //vector chosen from ASCII stl file line 18
		
		includeCut	true;
		includeInside true;
		includeOutside false;
		nearDistance -1;
		curvature 0.9;
	}
	}
	    {
        name    batt;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        sourceInfo
        {
            set battCellSet;
        }
    }
It creates cells only at the boundary of stl which are assigned to battCellSet. Which makes sense from the choice. But is there a way to chose even the cells inside? Because when I want to use the option of invert later to assign the remaing domain to fluid region, the hollow volume inside batteries creates cellSetZone together with the outer cellSetZone.

3) I would highly appreciate if someone could explain nearDistance and curvature values to me, what are the ranges of the values, etc. I tried reading through the topoSet.C file but my knowledge of understanding it is very low.

Attaching my *Dict files.
Thanks
Owais - new to OFv6
Attached Files
File Type: c surfaceFeatureExtractDict.c (1,001 Bytes, 47 views)
File Type: c topoSetDict.c (4.7 KB, 110 views)
File Type: c snappyHexMeshDict.c (5.1 KB, 61 views)
Owais Shabbir is offline   Reply With Quote

Old   July 25, 2019, 04:13
Red face Resolved but splitMeshRegions gives a fatal error
  #2
Member
 
Owais Shabbir
Join Date: May 2019
Posts: 48
Rep Power: 6
Owais Shabbir is on a distinguished road
Hi all,
I was able to resolve it. I figured out all the cells saved through SHMDict were saved in constant/polyMesh/cellZones
so the right settings for topoSet to utilise were these:
Code:
{
name	battCellSet;
type	cellSet;
action	new;
source	zoneToCell;
sourceInfo
{	name 	"batt1"; //name assigned in SHMDict
}
}
    {
        name    batteries;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        sourceInfo
        {
            set batteriesCellSet;
        }
    }
This works fine when seen through paraview.
Problem is when I use splitMeshRegions I get a Fatal Error!
Create time

Create mesh for time = 0

Using current faceZones to divide inter-region interfaces into multiple patches.
Code:
--> FOAM FATAL ERROR:
Cell 0 with cell centre (-0.026349986 -0.0021249995 -0.17876937) is multiple zones. This is not allowed.
It is in zone batt1 and in zone fluid

    From function void getZoneID(const Foam::polyMesh&, const cellZoneMesh&, Foam::labelList&, Foam::labelList&)
    in file splitMeshRegions.C at line 1225.

FOAM exiting
I have tried different options but this is something I can't get rid of.
Any help!

Thanks
Owais
dasith0001 likes this.
Owais Shabbir is offline   Reply With Quote

Old   July 25, 2019, 05:46
Talking Solution
  #3
Member
 
Owais Shabbir
Join Date: May 2019
Posts: 48
Rep Power: 6
Owais Shabbir is on a distinguished road
Dear All,

So I figured out the error (well not really an error) was due to polyMesh/cellZones.
There were 3 regions instead of 2.
1st cellzone: batt1 defined by SHMDict
2nd cellzone: defined by topoSet called batteries
3rd cellzone: also defined by topoSet called fluid

learning: So just don't have additional names and it should be simple. Chose batt1 for both SHMDict and topoSet.

Have a nice day.
dasith0001 likes this.
Owais Shabbir is offline   Reply With Quote

Old   October 21, 2020, 11:04
Default request
  #4
New Member
 
faramarz
Join Date: Feb 2012
Location: tehran
Posts: 10
Rep Power: 14
aerospace1365 is on a distinguished road
Send a message via Yahoo to aerospace1365
Dear Sir,

Would you please contact me by aerospace1365@gmail.com.
Sincerely yours,
Hosein Faramarzpour
aerospace1365 is offline   Reply With Quote

Old   November 8, 2020, 17:42
Default
  #5
Senior Member
 
Farzad Faraji
Join Date: Nov 2019
Posts: 204
Rep Power: 7
farzadmech is on a distinguished road
Dear Owais Shabbir
I have a problem with my STL file. it must be binary or ascii? where should I put as external point? exactly at the surface?



Thanks,
Farzad



Quote:
Originally Posted by Owais Shabbir View Post
Dear All,

So I figured out the error (well not really an error) was due to polyMesh/cellZones.
There were 3 regions instead of 2.
1st cellzone: batt1 defined by SHMDict
2nd cellzone: defined by topoSet called batteries
3rd cellzone: also defined by topoSet called fluid

learning: So just don't have additional names and it should be simple. Chose batt1 for both SHMDict and topoSet.

Have a nice day.
farzadmech is offline   Reply With Quote

Reply

Tags
chtmultiregion, toposet, toposet.c, toposetdict


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
problem compiling with header files jreiter164 Fluent UDF and Scheme Programming 2 August 14, 2015 17:31
attaching trn files hossein_sml CFX 1 August 5, 2015 19:17
How to call FORTRAN files as UDF? Ehsan-F Fluent UDF and Scheme Programming 6 September 11, 2012 11:03
Writing Case and Data Files Using Journal/Scheme Files svp Fluent UDF and Scheme Programming 0 April 5, 2011 11:04
Problems with result files Kasper CFX 5 December 14, 2006 02:41


All times are GMT -4. The time now is 23:00.