|
[Sponsors] |
August 20, 2016, 11:16 |
topoSet Dictionary Problem
|
#1 |
Member
anonymous
Join Date: Mar 2016
Location: Canada
Posts: 93
Rep Power: 10 |
Dear Foamers,
I am trying to create a circle in the center of XY-plane using topoSetDict. But it does not grab any cell with given information in the file. Could you please find the error? The code is given below. blockMeshDict: Code:
convertToMeters 1; vertices ( (0 0 0) (1 0 0) (1 1 0) (0 1 0) (0 0 1) (1 0 1) (1 1 1) (0 1 1) ); blocks ( hex (0 1 2 3 4 5 6 7) (200 200 1) simpleGrading (1 1 1) ); Code:
FoamFile { version 2.0; format ascii; class dictionary; object topoSetDict; } actions ( { name s8; type cellSet; action new; source sphereToCell; sourceInfo { centre (0.5 0.5 0); radius 0.2; } } ); Code:
Create time Create polyMesh for time = 0 Reading topoSetDict Time = 0 mesh not changed. Created cellSet s8 Applying source sphereToCell Adding cells with centre within sphere, with centre = (0.5 0.5 0) and radius = 0.2 cellSet s8 now size 0 End |
|
August 23, 2016, 15:17 |
|
#2 |
Member
anonymous
Join Date: Mar 2016
Location: Canada
Posts: 93
Rep Power: 10 |
Any suggestion .......
|
|
August 24, 2016, 02:59 |
|
#3 | |
Member
Join Date: Mar 2014
Posts: 39
Rep Power: 12 |
Hello,
it looks like you have a z-resolution of a single cell. That means that the centre of your cells is located in z = 0.5 ! Right now you do not overlap the cell centre with your current topoSet sphere because you just reach z = 0.2 ! The regarding sphereToCell.H source file says that sphereToCell is .... Quote:
|
||
August 24, 2016, 12:08 |
|
#4 |
Member
anonymous
Join Date: Mar 2016
Location: Canada
Posts: 93
Rep Power: 10 |
Thanks for the explanation.
So Is it possible to have only two dimensions in OpenFoam? Or how can we make two dimensional case ignoring 3rd dimension. |
|
August 24, 2016, 12:48 |
|
#5 |
Senior Member
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18 |
To have a two-dimensional case you should use empty boundary condition in the third direction. However you cannot have more than one cell in that direction or your solution diverges.
I think setting the boundary condition to empty does not solve your problem, you gotta change centre (0.5 0.5 0); to centre (0.5 0.5 0.5); |
|
August 24, 2016, 13:01 |
|
#6 |
Member
anonymous
Join Date: Mar 2016
Location: Canada
Posts: 93
Rep Power: 10 |
Thanks Mahdi, setting center at (0.5, 0.5, 0.5) solved the problem.
|
|
September 2, 2016, 03:34 |
|
#7 |
Member
carno
Join Date: Mar 2009
Posts: 70
Rep Power: 17 |
I have similar problem. I already have created mesh with SHM. Now I want to put cells in the cylinder region in one cell set.
topoSetDIct is: Code:
FoamFile { version 2.0; format ascii; class dictionary; object topoSetDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // actions ( { name arotating; type cellSet; action new; source cylinderToCell; sourceInfo { p1 (70 100 60); p2 (90 100 60); radius 40; } } ); Code:
Date : Sep 02 2016 Time : 08:28:54 Host : "ASHSSP" PID : 8112 Case : nProcs : 1 fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create polyMesh for time = 1 Reading topoSetDict Time = 1 mesh not changed. Created cellSet arotating Applying source cylinderToCell Adding cells with centre within cylinder, with p1 = (70 100 60), p2 = (90 100 60) and radius = 40 cellSet arotating now size 43125 End |
|
September 2, 2016, 11:14 |
|
#8 |
Member
Join Date: Mar 2014
Posts: 39
Rep Power: 12 |
What do you exactly mean by you "are not able to see that cellSet" ?
Your log seems to be ok. The cellSet should be located in your constant directory. If you want to postProcess the field in paraview you can use the foamToVTK utility for example. |
|
September 3, 2016, 05:50 |
|
#9 |
Member
carno
Join Date: Mar 2009
Posts: 70
Rep Power: 17 |
I am sorry. I posted half the topoSetDict. Full one is here.
Code:
FoamFile { version 2.0; format ascii; class dictionary; object topoSetDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // actions ( { name c0; type cellSet; action new; source cylinderToCell; sourceInfo { p1 (70 100 60); p2 (90 100 60); radius 40; } } { name arotating; type cellZoneSet; action new; source setToCellZone; sourceInfo { set c0; } } ) Code:
Time = 1 Mesh stats points: 1220821 faces: 3085221 internal faces: 2830773 cells: 935095 faces per cell: 6.3266235 boundary patches: 5 point zones: 0 face zones: 1 cell zones: 1 I am trying to generate cellZones by both the methods. 1. By SHM 2. topoSet, I am not succeeding in either. |
|
September 3, 2016, 06:07 |
|
#10 |
Member
carno
Join Date: Mar 2009
Posts: 70
Rep Power: 17 |
The problem seems solved... thanks...
|
|
September 6, 2016, 02:28 |
|
#11 |
Member
carno
Join Date: Mar 2009
Posts: 70
Rep Power: 17 |
I solved the problem by creating cellZones in the SHM. Like below,
Code:
rad { level (2 2); faceZone rad; cellZone rad; cellZoneInside inside; } Another thing was that I was not able to view the cellZones in the Paraview. This is because it was my confusion that the cellzones will showup like regions in Paraview. I confirmed the cellZone creation by CheckMesh command. Thanks for the help... |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with interFoam; Wave/wiggle alpha1 behavior | JonW | OpenFOAM | 10 | February 4, 2023 07:27 |
Problem writing to dictionary | MrAndersson | OpenFOAM Programming & Development | 4 | September 12, 2017 15:46 |
UDF compiling problem | Wouter | Fluent UDF and Scheme Programming | 6 | June 6, 2012 04:43 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 06:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 19:13 |