|
[Sponsors] |
May 25, 2015, 23:00 |
Problem with topoSet
|
#1 |
New Member
wangtianjian
Join Date: Dec 2014
Location: Beijing, China
Posts: 13
Rep Power: 12 |
Hi all,
I am meshing a tube with a glass cover outside the tube, and I use the topoSetDIct to set the region of the air and the tube.But there is a bug when running topoSet. Code:
--> FOAM FATAL IO ERROR: attempt to read beyond EOF file: /home/wtj/OpenFOAM/wtj-2.3.1/run/tube1/system/topoSetDict.actions at line 34. Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object topoSetDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // actions ( // Air { name air; type cellSet; action new; source cylinderToCell; sourceInfo { p1(0 0 0); p2(0 0 0.5); radius 0.017; } } { name air; type cellZoneSet; action new; source setToCellZone; sourceInfo { set air; } } // Tube { name tube; type cellZoneSet; action clear; } { name tube; type cellSet; action add; source cellToCell; sourceInfo { set air; } } { name tube; type cellZoneSet; action new; source setToCellZone; sourceInfo { set tube; } } ); // ************************************************************************* // |
|
May 27, 2015, 07:54 |
|
#2 |
Member
Nicole Andrew
Join Date: Sep 2014
Location: Pretoria, South Africa
Posts: 58
Rep Power: 12 |
Hi,
I have not seen your error message before. Are you by any chance using blockMesh to mesh your domain? |
|
May 27, 2015, 09:22 |
|
#3 |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22 |
I'm not sure what this error means, although I think I had to face it in the past. However, by reading your topoSetDict file I saw something weird that can be causing the problem, or maybe can cause another problem instead. First of all, you are creating a cellSet named air which is a cylinder. After that it is converted into a cellZone. The next step consists in the creation of another cellSet called tube with the same cells that make up the air cellSet, next you convert it into another cellZone with the result of two diferents cellZones made up with the same cells... I'm not sure if it can be done...I think that if a cell already belongs to a cellZone it cannot be part of another cellZone.
As per my experience I think you may have missed a step in your topoSetDict, namenly the step when you invert your selection in odrer to select all the cells that don't belong to the air cellSet to create the tube cellSet. Am I right? Hope it helps. Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in! |
|
May 27, 2015, 22:01 |
|
#4 | |
New Member
wangtianjian
Join Date: Dec 2014
Location: Beijing, China
Posts: 13
Rep Power: 12 |
Quote:
This is my new topoSetDict, is there still problems there? Code:
actions ( // Air { name air; type cellSet; action new; source cylinderToCell; sourceInfo { p1(0 0 0); p2(0 0 0.5); radius 0.017; } } { name air; type cellZoneSet; action new; source setToCellZone; sourceInfo { set air; } } // Tube { name tube; type cellZoneSet; action clear; } { name tube; type cellSet; action invert; } { name tube; type cellZoneSet; action new; source setToCellZone; sourceInfo { set tube; } } ); |
||
May 27, 2015, 22:08 |
|
#5 |
New Member
wangtianjian
Join Date: Dec 2014
Location: Beijing, China
Posts: 13
Rep Power: 12 |
||
May 28, 2015, 05:57 |
|
#6 | |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22 |
Quote:
Code:
actions ( // Air { name air; type cellSet; action new; source cylinderToCell; sourceInfo { p1(0 0 0); p2(0 0 0.5); radius 0.017; } } { name air; type cellZoneSet; action new; source setToCellZone; sourceInfo { set air; } } // Tube { name tube; type cellZoneSet; action clear; } { name tube; type cellSet; action add; source cellToCell; sourceInfo { set air; } } { name tube; type cellSet; action invert; } { name tube; type cellZoneSet; action new; source setToCellZone; sourceInfo { set tube; } } ); BTW, you should be more accurate in your questions in order to make it easy for the other users to help you, for instance you may have added the error message in your last post. Regarding the question that @Nicole is pointing out, it's easy to understand, he/she is only asking if you created your mesh using blockMesh. However, if you didn't understand the question you may not even know what blockMesh is, so we can deduce that you meshed your geometry with other tool, did you? Regards, Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in! |
||
May 28, 2015, 06:12 |
|
#7 | |
New Member
wangtianjian
Join Date: Dec 2014
Location: Beijing, China
Posts: 13
Rep Power: 12 |
Quote:
I created my mesh using blockMesh, and it was posted in my first thread. I didn't post the error message for it was the same with the one I posted in my first thread. I am sorry for not claimed it. The error message is Code:
--> FOAM FATAL IO ERROR: attempt to read beyond EOF file: /home/wtj/OpenFOAM/wtj-2.3.1/run/tube/system/topoSetDict.actions at line 34. From function ITstream::read(token&) in file db/IOstreams/Tstreams/ITstream.C at line 83. FOAM exiting Best Regards. And thanks again. |
||
May 28, 2015, 06:22 |
|
#8 |
Member
Nicole Andrew
Join Date: Sep 2014
Location: Pretoria, South Africa
Posts: 58
Rep Power: 12 |
Hi,
I am definitely not as skilled with this as Alex, so I can't help you with the invert, but we found a really simple way to do this using blockmesh. Firstly, when you define your hex blocks in blockMeshDict you simply define the "zone name" for example: Code:
hex (1 0 9 12 16 15 24 27) Air (10 10 10) simpleGrading (1 1 1) //0 Code:
// air { name Air; type cellSet; action new; source zoneToCell; sourceInfo { name "Air"; } } { name Air; type cellZoneSet; action new; source setToCellZone; sourceInfo { set Air; } } Regards, Nicole |
|
May 28, 2015, 06:42 |
|
#9 |
Senior Member
|
Hi,
Maybe I am late but the problem is in missing space between p1 and (0 0 0). You see, p1 is a label and it should be separated from the vector it labels The same thing with p2. |
|
May 28, 2015, 07:19 |
|
#10 | |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22 |
Quote:
I totally agree with you with the first part of your post, defining your regions in blockMesh can ease the topology definition of your geometry. However, I don't get the second part... when you define your regions by naming the blocks in blockMesh you don't need to use topoSet because both actions have the same aim: to create cellZones. Thus, it makes no sense to me what you suggested because after you have named the blocks in blockMesh, the cells within the blocks become cellZones with the same name. Then, if you look at the topoSetDict you proposed, what you are doing is taking the cellZones created with blockMesh so as to create a cellSet and, after that, you take this cellSet to convert it AGAIN into a cellZone!! Btw, is it correct to use quotation marks to encolse the name within when you define the name of the zone to be converted into a cellSet? Just asking... I'm not sure about it.. @alexeym: Thanks to point out that it only was a dumb mistake! :P Typical when you are new in this world, all of us have passed through it! I didn't even realised about this "little" mistake... Regards, Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in! |
||
May 28, 2015, 07:26 |
|
#11 |
Member
Nicole Andrew
Join Date: Sep 2014
Location: Pretoria, South Africa
Posts: 58
Rep Power: 12 |
Hi Alex,
Thanks for the advice. I did this a while ago and it worked pretty well. Next time I work on a multiregion system I'll try without topoSet. Thanks! |
|
May 28, 2015, 22:19 |
|
#12 |
New Member
wangtianjian
Join Date: Dec 2014
Location: Beijing, China
Posts: 13
Rep Power: 12 |
What a silly mistake I have made... Thank you for your help! It confused me a lot for a long time!
|
|
May 28, 2015, 22:20 |
|
#13 | |
New Member
wangtianjian
Join Date: Dec 2014
Location: Beijing, China
Posts: 13
Rep Power: 12 |
Quote:
|
||
May 28, 2015, 23:23 |
|
#14 | |
New Member
wangtianjian
Join Date: Dec 2014
Location: Beijing, China
Posts: 13
Rep Power: 12 |
Quote:
|
||
May 29, 2015, 03:13 |
|
#15 |
Senior Member
|
In fact I would not call it "silly mistake" but "shitty, useless error message". Instead of limiting search range by sourceInfo sub-dictionary and failing with "p1 was not found", OpenFOAM decides to read till the end of the file.
|
|
October 3, 2019, 07:01 |
Another "silly mistake"
|
#16 |
Member
Rasmus Iwersen
Join Date: Jan 2019
Location: Denmark
Posts: 81
Rep Power: 9 |
Holy moly...
My error was somewhat the same as most recently suggested- Missing ";" in the end of each line (except sourceInfo) caused the same problem for me. I know the post is hold, however this hopefully helps whoever might have the same problems. /Rasmus |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF compiling problem | Wouter | Fluent UDF and Scheme Programming | 6 | June 6, 2012 05:43 |
Gambit - meshing over airfoil wrapping (?) problem | JFDC | FLUENT | 1 | July 11, 2011 06:59 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 07:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 20:13 |
Is this problem well posed? | Thomas P. Abraham | Main CFD Forum | 5 | September 8, 1999 15:52 |