Simple manual cell deleting question
Hi, I am very new to CFD and the use of open foam.
I would like to be able to create a hex mesh over the whole bounding box of a geometry using blockMesh and then to go and remove all cells the lie outside the geometry.* The reason being is that I have a complex geometry that is difficult to block and can live with the CFD geometry being a stair-stepped approximation of the real geometry.* I want to automate the process so don't want to rely on a 3rd party mesher or snappyHexMesh * Has anyone done something similar?* Currently I am using a very simple geometry of one block and a 3x1x1 cell configuration just to see a method of how I could automate this. So I have 3 cells adjacent to each other (012). What I am trying to do is delete cell 1 the middle cell of this system. The procedure I am following is: 1. Editing the boundary file, subtracting off 2 faces because I have removed four faces but two of the internal faces have no become boundary faces. And setting the start to 0 (no more internal faces) 2. Editing the faces file to reflect the changed I have made of deleting the faces 3. Setting the neighbour file 0( ) as we have no neighbours now? 4. Deleting the in the owners file the owner associated with the faces I have deleted. After all this is done when I open this in paraFoam, the internal mesh I am given is just weird it doesn't seem to reflect the changes I have made, Sometimes faces are missing and point join up in weird ways making weird and wonderful shapes. Two things to note are: 1. All these changes are made after the command blockMesh is ran 2. I ran checkMesh on my edited geometry and obviously it crashed. However I did notice that it was expecting there to be 9 cells present, but I want 8 because I am trying to delete one. One would assume that paraFoam would be expecting 9 and not 8 so hence my weird shapes. But I don't know what file to edit to change the number of cells in my geometry. Does anyone know? or does checkMesh work it out from your blockMeshDict? Apologies if anything I have mentioned is confusing I would be more than happy to clarify any of the points I have made. Thanks in advance James |
Greetings James and welcome to the forum!
I started to read you post and didn't finish reading it, sorry :(... so basically I'll answer only the first couples of questions:
Bruno |
thanks very much Bruno, I'll give that a go! see what I can do.
Thanks again James |
Thanks for linking me to those posts Bruno but, some of them talk about inverting selection, what does this mean? and how do I do it?
thanks in advance James |
Hi James,
I forgot about another link that might help explain this a bit better: http://www.cfd-online.com/Forums/ope...tml#post353511 post #5 Keep reading the thread from that point onward and hopefully your questions will be answered :) Best regards, Bruno |
Hi Burno,
I have read through the links I am still at a little loss at what to do. Here is what I think I should do. I am working in a simple geometry of one block divided into 2 cells (adjacent to each other). I think I should do the following to the remove a cell: 1. create a set which includes one of the cells (I am not entirely sure how to do this) 2. Invert the new cell set 3 subSet the new set 4. subsetMesh the new set to remove the cell I am thinking of the correct method to do this? Or can you only use setSet after checkMesh has flagged up any errors in the mesh? Many thanks James |
I am basically having an issue with having trying to setup a set which include my current cells and faces
|
Hi James,
The idea is simple:
If you're not understanding how to use setSet, you can also try topoSet, which is in essence the same thing, but using a dictionary! Check the links I posted before, where I explained how to find out more about each application... or more specifically, how to search for "*Dict" files, which in topoSet's case is "topoSetDict". Best regards, Bruno |
Hi Burno,
Thanks for all your help so far. I was being a spanner and not being able to figure out step 2. However this is what I have tried and setSet seems to work ok but it doesn't remove a cell for me: Code:
This doesn't actually seem to do anything and I am not sure where entirely I am going wrong. One thing I am worried about is that my bounding box min or max coordinates seem to be the same, but I don't know why. Also if I know the index of the cell I want to remove could I not just do the following: Code:
Apologies for all the questions, but I can't exactly seem what I am doing wrong Many thanks James |
Hi Bruno managed to figure it out.
Thanks again for all your time, it has been most helpful |
All times are GMT -4. The time now is 22:29. |