|
[Sponsors] |
MRFSimpleFoam: what's the point of running setSets…? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 5, 2012, 12:47 |
MRFSimpleFoam: what's the point of running setSets…?
|
#1 | |
Senior Member
|
Hi all;
I'm trying to simulate a spinning wheel in a free stream. The tyre was set as a rotating wall and then I set a rotating reference frame for the spokes of the rim. What I did was basically to enclose these within a cylindrical surface that I called "rotating" and I stated this in my snappyHexMeshDict: Code:
geometry { rotating.stl { type triSurfaceMesh; name rotating; } … … … Quote:
Code:
1 ( rotating_cell { // Fixed patches (by default they 'move' with the MRF zone) nonRotatingPatches (); origin origin [0 1 0 0 0 0 0] (0 0 0.2); axis axis [0 0 0 0 0 0 0] (0 -1 0); omega omega [0 0 -1 0 0 0 0] 100; patches 1 ( rotating_cell ) ; faceZoneName rotating_cell; } ) So, what's the point of these commands in MRFSimpleFoam? Thank you! |
||
April 6, 2012, 09:53 |
|
#2 |
Senior Member
|
Also: what is the point of having both SimpleFoam and MRFSimpleFoam solvers since the latter includes the first?
You could just have MRFSimpleFoam which could check for the file MRFZones to exist and trigger or not the multi reference frame functionality… |
|
April 6, 2012, 16:13 |
|
#3 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hello again lovecraft22,
I haven't looked deep enough into this, but here's my deduction based on what I already know and briefly can see:
Bruno
__________________
Last edited by wyldckat; April 6, 2012 at 16:15. Reason: see "edit:" |
|
April 6, 2012, 16:45 |
|
#4 |
Senior Member
|
Thank you Bruno. Your answer is really clear: I can run MRFSimple foam without the need of setSet or topoSet.
Thank you again. One day I hope I'll understand what these commands are for… |
|
April 6, 2012, 17:19 |
|
#5 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quote:
The first example I've seen for setSet was this: http://openfoamwiki.net/index.php/SetSet Basically it's a command sequence that creates a new selection of the "sets" created by checkMesh and then inverts the selection to select all of the mesh except the previous selection. The inverted selection is then used for extracting only the cells that you really want to use, namely with subsetMesh. In other words, you have at the end a mesh without the bad cells. FYI: the name "bubu" is used in the sense of "mistake". Googling for it's meaning can be a bit daunting... apparently the technical wording should be "booboo" Anyway, this example can be a bit dangerous, since removing damaged cells can lead to unbounded zones in the mesh, or simply creates obstacles where they shouldn't be. I hope this is now clearer to you and any other reader Best regards, Bruno
__________________
|
||
April 6, 2012, 17:39 |
|
#6 |
Senior Member
|
Thanks again Bruno… I need to reflect a little bit on what you wrote to make things clearer in my head…
I think I'll also have a look at the propeller tutorial (PimpleDyMFoam) to try and understand what's going on there too… |
|
April 7, 2012, 07:37 |
|
#7 |
Senior Member
|
So, looking at the wiki page you linked:
Code:
cellSet bubu new cellToCell underdeterminedCells any Code:
cellSet bubu add faceToCell concaveFaces any Code:
cellSet bubu invert But something still doesn't add up then… because with the commands you set a set of cells called bubu which are the bad cells. The with invert you invert the cells and so at this point you should have the good cells in your set. But then, with Code:
cellSet bubu subset So, where's my mistake here? Thank you again for your help, I really appreciate that! |
|
April 7, 2012, 09:11 |
|
#8 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi lovecraft22,
setSet has a live help system. Examples: Code:
help Code:
cellSet help Code:
cellSet bananas Quote:
Code:
cellSet c0 new faceToCell f0 bananas Code:
Usage: faceToCell <faceSet> neighbour|owner|any|all Select cells that are the owner|neighbour|any of the faces in the faceSet or where all faces are in the faceSet Bruno
__________________
|
||
April 7, 2012, 09:53 |
|
#9 |
Senior Member
|
Thanks Bruno, I'll have a look at the help!
|
|
January 17, 2013, 05:46 |
|
#10 |
Member
Join Date: Sep 2012
Posts: 30
Rep Power: 14 |
Hey all!
I was reading this interesting and useful thread about setSet and topoSet. I have been playing around with both, and I was wondering if it was possible to avoid to type the commands of setSet in the command line. The reason I ask, is because I want to include it in a shell script, so I can do things such as: runScript.sh: Code:
blockMesh setSet cellSet thenameoftheset new boxToCell (xmin ymin zmin) (xmax ymax zmax) . . . interFoam I would rather not use dict files, because I want to automate this, i.e. refine the mesh in a box, and then repeat several times. In other words, I want to select cells on a refined mesh, update the cell set, refine and so on... Apparently the refineMesh utility will refine only dividing cells in 4 (for a 2D case), and it is not possible to refine more by using it. ;-) Thanks! |
|
January 17, 2013, 10:09 |
|
#11 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings Emirust,
Take a look at the tutorial "heatTransfer/chtMultiRegionFoam/multiRegionHeater" and check the files "makeCellSets.setSet" and "Allrun" in that folder. You can find more examples by running: Code:
find $FOAM_TUTORIALS -name "*.set*" Bruno
__________________
|
|
January 17, 2013, 15:11 |
|
#12 |
Member
Join Date: Sep 2012
Posts: 30
Rep Power: 14 |
Awesome! Thanks!
I was also wondering, if there is a way to select cells, after the mesh is refined. What I mean is I want to: 1-Select cells 2-Refine Mesh in selected cells (i.e. dividing cells in 4, for a 2D case) and overwrite current mesh 3-Reselect other cells on the new mesh for further refinement I can't seem to think of a way to automate this, and my current investigation seem to say that refineMesh need to be called on "manually" selected cellSets. Any trick or other way to do this? More at the end of the following post: http://www.cfd-online.com/Forums/ope...efinemesh.html Cheers! E. |
|
January 19, 2013, 16:55 |
|
#13 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Emirust,
I guess you already got your answer at http://www.cfd-online.com/Forums/ope...tml#post402605 post #15. Best regards, Bruno
__________________
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFX Post: Problems with moving point cloud for changing time steps | spatialtime | CFX | 0 | December 7, 2009 05:56 |
Replacing mesh while running a simulation | akultane | CFX | 1 | November 15, 2009 14:46 |
Monitor a point in a rotating domain | taichijulie | CFX | 0 | August 12, 2009 17:25 |
What do you CFD guys do during a long simulation running? | bearcat | Main CFD Forum | 5 | July 23, 2009 09:08 |
Kubuntu uses dash breaks All scripts in tutorials | platopus | OpenFOAM Bugs | 8 | April 15, 2008 08:52 |