How to create a cellZone from a list of cells?
So I've extracted a list of cell IDs from paraview after meshing. I want to create a cellZones file that contains a list of all these cells for use in simplePorousFoam.
Any ideas? |
Quote:
Code:
// Define a cellZoneMesh of size 0. What i find interesting is that the Code:
cellZone Code:
cellZoneMesh Code:
cellZone Hope this is of any help... T. |
Hi T,
Thanks for this reply. I'm still relatively new to programming in openFoam. I tried to splice your code into some tutorials that I've done, but when I compile I get the following error: Code:
myZones.C:42:30: error: createFields.H: No such file or directory Thanks for helping out a newbie. |
1 Attachment(s)
Quote:
Btw, don't worry about being new to the code, without proper documentation everybody is new to the code, especially if they step out of their "comfort zone". :) Best regards, Tomislav |
Thanks again T.
When I compile your application (wmake) from my $FOAM_RUN/myCellZone, I get the following error: Code:
Making dependency list for source file myCellZone.C |
And then if I add: #include "OFstream.H" in the main, I get this error:
Code:
Making dependency list for source file myCellZone.C |
Which OF version are you using? I'm on 1.6-ext.
Quote:
|
Hmmm,
I'm on 2.0.1. Don't know why I keep upgrading.. it's nothing but trouble :) |
Quote:
That's where the problem lies.... updates are evil. :D I think the only thing differences are in the Make/options file, I haven't used some new fancy functionality or a backward incompatible class... :) |
Maybe it's possible that you can just post your cellZones file created from the program and I can use it as a template and replace the values for the cell Ids?
|
I found a whole pdf on porous Zones. Click here
It says: "Many porous zones can be added to the case. The number of porous zones is limited to the number of cell zones in the mesh. 1 ( <cellZoneName> { Defintions. } ) 2 ( <anotherCellZoneName> { Defintions. } ) " So my questions is how do you replace "Definitions." with a list of cell IDs to define a zone? Or can you even define a zone with a list of cell IDs? |
1 Attachment(s)
Here's the 2.0 app. It's in the attachment.
Look at the cellZone constructor: it needs a label list naturally, because the cellZone --> zone --> labelList (check out the doxygen). So, basically, cellZone is a kind of labelList. How will you populate the lists is up to you of course. :D Have fun! |
create a cellZone from a list of cells
A very delayed answer; I think the people in the post don't need the code. But I have such a problem, and I found a way to solve it. I hope it is helpful. Please contact me if anyone wants to discuss this.
Code:
// Initialise OF case |
All times are GMT -4. The time now is 00:07. |