CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (http://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   topoSet-cylinderToCell (http://www.cfd-online.com/Forums/openfoam-pre-processing/130893-toposet-cylindertocell.html)

pechwang March 5, 2014 14:01

topoSet-cylinderToCell
 
Hello everyone,

Right now I'm using MRFSimpleFoam to run a very simple lubrication model. So I need topoSet to select a cellset and put it into the rotating MRFzone. I use cylinderToCell to select the cells. Part of the code is like this

name rotor;
type cellset;
action new;
source cylinderToCell;
sourceInfo
{
P1 (0 0 0);
P2 (0 0 0.127)
radius 104.4;
}

In this situation, I can select all the cells (I have 10 cell layers in the z direction) in the domain and it works perfect. However, right now I want to put part of the cells (maybe 5 layers or less) in the rotating reference frame. And I change the position of P2. Unfortunately, it cannot give me a correct answer. It gives me either 0 or 5400. 5400 is total number of cells in my domain. This really drives me crazy. I want to know whether you have any experience with MRFsolvers or topoSet utilities. Can you give me a hand?
Thanks

Prosper March 6, 2014 18:03

I have a similar problem with cylinderToCell and I also wanna know the answer.

Best,

Quote:

Originally Posted by pechwang (Post 478363)
Hello everyone,

Right now I'm using MRFSimpleFoam to run a very simple lubrication model. So I need topoSet to select a cellset and put it into the rotating MRFzone. I use cylinderToCell to select the cells. Part of the code is like this

name rotor;
type cellset;
action new;
source cylinderToCell;
sourceInfo
{
P1 (0 0 0);
P2 (0 0 0.127)
radius 104.4;
}

In this situation, I can select all the cells (I have 10 cell layers in the z direction) in the domain and it works perfect. However, right now I want to put part of the cells (maybe 5 layers or less) in the rotating reference frame. And I change the position of P2. Unfortunately, it cannot give me a correct answer. It gives me either 0 or 5400. 5400 is total number of cells in my domain. This really drives me crazy. I want to know whether you have any experience with MRFsolvers or topoSet utilities. Can you give me a hand?
Thanks


pechwang March 10, 2014 10:44

Hi Prosper,

It seems like I have found the answer. The unit of my mesh file is in mm. So in blockMeshDict file, I use convertToMeters at the very beginning. And I do the same thing in topoSetDict file. However, it seems like convertToMeters does not work in topoSetDict. After I change the unit to m, everything is OK. Since you have the same problem, maybe you also use other units instead of meters. So I think the problem now becomes why convertToMeters does not work in topoSetDict file. What do you think?

Thanks,
Pengchuan

Prosper March 10, 2014 11:37

Quote:

Originally Posted by pechwang (Post 479152)
Hi Prosper,

It seems like I have found the answer. The unit of my mesh file is in mm. So in blockMeshDict file, I use convertToMeters at the very beginning. And I do the same thing in topoSetDict file. However, it seems like convertToMeters does not work in topoSetDict. After I change the unit to m, everything is OK. Since you have the same problem, maybe you also use other units instead of meters. So I think the problem now becomes why convertToMeters does not work in topoSetDict file. What do you think?

Thanks,
Pengchuan

Thank you for your reply!

I see. Maybe I'll need to change all the units in my problem and try it again.

Best,


All times are GMT -4. The time now is 18:52.