CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[mesh manipulation] cellSet: command not found

Register Blogs Community New Posts Updated Threads Search

Like Tree8Likes
  • 4 Post By wyldckat
  • 1 Post By Shawn_A
  • 1 Post By stephie
  • 1 Post By stephie
  • 1 Post By alexeym

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 12, 2011, 16:28
Default cellSet: command not found
  #1
Member
 
Shawn
Join Date: Oct 2011
Posts: 56
Rep Power: 14
Shawn_A is on a distinguished road
I'm trying to execute the cellSet command, but get the error "command not found." I'm new to Ubuntu and OpenFOAM, however, the limited number of other commands I've used seem to be accessible. Perhaps it was something I did (or didn't do) when I installed OpenFOAM.

Ultimately, my goal is to simulate a vertical axis wind turbine. So far I have converted my .msh meshes (stator and rotor) to openfoam successfully, and I'm now trying to use cellSet to define my rotating region.

Regards, and thanks,
Shawn
Shawn_A is offline   Reply With Quote

Old   October 12, 2011, 16:38
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Shawn and welcome to the forum!

As of OpenFOAM 2.0, all "*Set" applications have been all merged into setSet. Here is an example of how to use: http://openfoamwiki.net/index.php/SetSet

For even more examples, the following command will show you which tutorials make use of setSet:
Code:
find $FOAM_TUTORIALS | xargs grep 'setSet' -sl
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 12, 2011, 17:30
Default
  #3
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
Maybe it is good to also point on topoSet
Bernhard is offline   Reply With Quote

Old   October 13, 2011, 13:15
Default
  #4
Member
 
Shawn
Join Date: Oct 2011
Posts: 56
Rep Power: 14
Shawn_A is on a distinguished road
Thanks for the tips and feedback! Greatly appreciated. I'm working off a case setup 'cheat sheet' that someone else in our department did a little over a year ago, so that would explain why some of the commands/instructions are out of date.

Regards,
Shawn
Shawn_A is offline   Reply With Quote

Old   October 13, 2011, 14:46
Default
  #5
Member
 
Shawn
Join Date: Oct 2011
Posts: 56
Rep Power: 14
Shawn_A is on a distinguished road
Well, setSet and topoSet are definitely available, but I can't figure out how to use them. With the cellSet command, all I needed to specify was my case: "-case rotor", and cellSet would reference my cellSetDict file which contained:

// Name of set to operate on
name movingCells;

// One of clear/new/invert/add/delete|subset/list
action new;

// Actions to apply to cellSet. These are all the topoSetSource's ending
// in ..ToCell (see the meshTools library).

topoSetSources
(
// Cells with cell centre within box
boxToCell
{
box (-0.025 -0.025 -0.005) (0.025 0.025 0.005);

name movingCells; // name of cellZone
}

);


With setSet (topoSet), I have copied and renamed cellSetDict to setSetDict (topoSetDict), but the command failed to execute with the error "no times selected" ("keyword actions is undefined in dictionary "./rotor/system/topoSetDict" ").

What I am trying to do is create a set of cells(?) (or am I creating a zone?) that defines my moving mesh region, the rotor. Perhaps there is a different way I need to do this.
Shawn_A is offline   Reply With Quote

Old   October 16, 2011, 04:32
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings!

Shawn, the tutorial "$FOAM_TUTORIALS/incompressible/windSimpleFoam/turbineSiting" has two files that are relevant to your problem:
  • Allrun - shows how to use setSet and setsToZones.
  • makeZones - shows the commands to be used by setSet.
"setSetDict" will not work, since that dictionary strategy is incompatible with the batch/script system used by setSet.

As for topoSet, you can see the tutorial "$FOAM_TUTORIALS/multiphase/MRFInterFoam/mixerVessel2D/":
  • Allrun calls makeMesh, which in turn calls simply topoSet.
  • topoSet will then use "system/topoSetDict". This dictionary implies that a predefined "zone" be used to convert to "cellSet".
  • In this case, the zone "rotor" has been defined in "blockMeshDict" as a patch of type "wall".
  • Note: this tutorial makes use of m4, a macro processor used in many OpenFOAM tutorials for it's power for programatically generating "blockMeshDict" files.
Like I said in my previous post, you could have used the find command to search for tutorials on how to use setSet, which could also have been used to look for topoSet! This is how I found out about these two tutorials!

Best regards and good luck!
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 18, 2011, 15:44
Default
  #7
Member
 
Shawn
Join Date: Oct 2011
Posts: 56
Rep Power: 14
Shawn_A is on a distinguished road
Hi Bruno,

Once I got into the tutorials, things started making a lot more sense.

The original reference material I was working suggested:

cellSet -case rotor
setsToZones -noFlipMap -case rotor

From what I understand this first creats a cellSet then converts it to a Zone. I see now that I can perform these same operations by calling:
topoSet
and specifying the actions in the topoSetDict file or alternately by calling:
setSet -batch filename
and specifying the actions in filename.

One thing that I don't understand is the specifiers you have used for the search terms, like "xargs" "grep" and "-sl". Do you know where I can find documentation of what specifiers are available and what they do?

Regards,
Shawn
Shawn_A is offline   Reply With Quote

Old   October 18, 2011, 16:52
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Shawn,

Quote:
Originally Posted by Shawn_A View Post
One thing that I don't understand is the specifiers you have used for the search terms, like "xargs" "grep" and "-sl". Do you know where I can find documentation of what specifiers are available and what they do?
Paraphrasing a somewhat known expression - «and then men made man»:
Code:
man xargs
man grep
man find
In Linux, when in doubt about some commands, simply type man and the command. Although some other commands might be part of the shell, so in those cases, you'll probably have to "man bash" in case bash is the shell being used.
I believe this dates back to Un*x and is short for manual See wikipedia for some historic details: http://en.wikipedia.org/wiki/Man_page

Searching online with the same commands will also give you an online version of each command:
As for the long combo for searching, I found after searching for this very specific reason: finding files that have a keyword, text or expression. Here we go, probably this is where I learned it from: http://www.liamdelahunty.com/tips/li...ring_files.php

Ironically, wikipedia also talks a bit about the combo of find/xargs/grep: http://en.wikipedia.org/wiki/Xargs

Best regards,
Bruno
__________________

Last edited by wyldckat; October 18, 2011 at 16:53. Reason: missing word...
wyldckat is offline   Reply With Quote

Old   November 16, 2011, 10:47
Default
  #9
New Member
 
Caroline Vandame
Join Date: Aug 2010
Posts: 26
Rep Power: 15
CaroVandame is on a distinguished road
Hi all,

thanks for your help, this thread was actually very helpful!

I have a small question:
I'm using snappyHexMesh to create my mesh around a wind turbine stl file. In this case, when topoSetDict asks for a sourceInfo name, I should give the cellZone name of my refinementSurfaces from SnappyHM?
And do I need to call my new cellSet the same way?
And are we going to use the faceZone defined as well in Snappy?


Thanks to all of you for your help
Sincerely
Caroline
CaroVandame is offline   Reply With Quote

Old   November 16, 2011, 16:24
Default
  #10
Member
 
Shawn
Join Date: Oct 2011
Posts: 56
Rep Power: 14
Shawn_A is on a distinguished road
I suppose it would depend what you are trying to define. For my setup, I wanted to define a bunch of cells as my rotation domain, so I needed to create them as a cellSet within topoSetDict:

actions
(
{
name movingCells;
type cellSet;
action new;
source boxToCell;
sourceinfo
{
box (x1 y1 z1) (x2 y2 z2);
}
}
)

So this worked for me because it just drew a large box around my rotating domain (after which I merged my rotor and stator). To make my cellSet and convert it into a zone I called:

topoSet -case rotor
setsToZones -noFlipMap -case rotor

There are other types of sources:

pointToCell
boxToCell
zoneToPoint
surfaceToCell
nearestToCell
zoneToCell
cellToFace
pointToFace
normalToFace
boxToFace
rotatedBoxToCell
fieldToCell
cellToPoint
zoneToFace
nbrToCell
patchToFace
labelToCell
pointToPoint
faceToCell
boxToPoint
labelToPoint
boundaryToFace
faceToPoint
labelToFace
shapeToCell
faceToFace
cellToCell
surfaceToPoint
(there may be more, just type it in incorrectly and OF should tell you what's available)

The correct one to use would depend on how you've defined things in your case, and what you want as the outcome. I needed a "movingCells" (it has to be called movingCells to work) zone to make a rotating domian with the ggi interface. If you have a zone defined and want the zone in cells, use zoneToCell as the source and the name of your zone as the sourceinfo.

If you want to add a few items to the same cellSet (or other type of set) you can use "add" instead of "new" for the action.
kiddmax likes this.
Shawn_A is offline   Reply With Quote

Old   April 6, 2012, 09:54
Default
  #11
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 460
Rep Power: 18
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
I opened a similar discussion to this here:
http://www.cfd-online.com/Forums/ope...g-setsets.html

and then I found this topic… so, is really necessary to use setSet when running a MRF or a moving mesh or this can be avoided by defining the zones in the snappyHexMeshDict?

Thank you!
lovecraft22 is offline   Reply With Quote

Old   April 6, 2012, 15:01
Default
  #12
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi lovecraft22, I'll answer you on your other thread.
__________________
wyldckat is offline   Reply With Quote

Old   April 9, 2015, 03:58
Default
  #13
Member
 
Stephanie
Join Date: Feb 2015
Location: Magdeburg, Germany
Posts: 71
Rep Power: 11
stephie is on a distinguished road
Hello everyone,

since some days I trie to solve a tutorial called: A pimpleFoam tutorial for channel flow. I created the mesh and now I should run the commend "cellSet".
In the cellSetDict I find these informations:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// Name of set to operate on
name c0;

// One of clear/new/invert/add/delete|subset/list
action new;

// Actions to apply to cellSet. These are all the topoSetSource's ending
// in ..ToCell (see the meshTools library).

topoSetSources
(

// Cells with cell centre within box
boxToCell
{
box (0.1 0.05 0) (0.4 0.15 0.005);
}
);


// ************************************************** *********************** //

The instruction say:

To make use of refineMesh, one first need to define a region on which the refinement shall be performed. This is done in $CASE_DIR/system/setCellDict. The cellSetDict is then executed by running cellSet in $CASE_DIR.

Unfortunately it didn't work, when I type "cellSet". There is allways the mistake "command not found" I had a look in your discussion and I tried the following command:

< cellSet c0 new boxToCell (0.4 0.005 0) (0.4 0.15 0.2) >

but it also does not work.. there is now the mistake: bash: Syntaxfehler beim unerwarteten Wort »(« --> bash: syntax error when unexpected word "("

Maybe one of you might help me.. I would be very grateful.

Thank you so much, and nice regards,

Stephie
bghp likes this.
stephie is offline   Reply With Quote

Old   April 9, 2015, 04:26
Default
  #14
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

@stephie: guess you are using OpenFOAM? As in foam-extend 3.1 there is cellSet (http://sourceforge.net/p/openfoam-ex...ation/cellSet/).

To create cellSet in OpenFOAM you can use topoSet utility.
alexeym is offline   Reply With Quote

Old   April 9, 2015, 05:09
Default
  #15
Member
 
Stephanie
Join Date: Feb 2015
Location: Magdeburg, Germany
Posts: 71
Rep Power: 11
stephie is on a distinguished road
Hello Alexey,

yes you are right - I use OpenFoam and I am quite new.

Perhaps it is a stupid question.. but might you explain how toposet works? I really don't understand it. What do I have to do?
I read cellSet was repaced by setSet. And toposet can used instead of it.

nice regards and thank you for your help
bghp likes this.
stephie is offline   Reply With Quote

Old   April 9, 2015, 05:24
Default
  #16
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hello,

The cellSet dictionary you have posted can be translated into topSet dictionary like this:

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      topoSetDict;
}

actions
(
    {
        name c0;
        type cellSet;
        action new;
        source boxToCell;
        sourceInfo
        {
            box (0.1 0.05 0) (0.4 0.15 0.005);
        }
    }
);
I.e. topoSet is just generalization of cellSet utility.
bghp likes this.
alexeym is offline   Reply With Quote

Old   April 9, 2015, 07:12
Default
  #17
Member
 
Stephanie
Join Date: Feb 2015
Location: Magdeburg, Germany
Posts: 71
Rep Power: 11
stephie is on a distinguished road
Okay, I include a file with the content of your post and type in "topoSet" and I think it worke.. this was the output:
stephanie@stephanie:~/OpenFOAM/stephanie-2.3.1/run/smagorinsky_mini$ topoSet
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.3.1-262087cdf8db
Exec : topoSet
Date : Apr 09 2015
Time : 11:42:59
Host : "stephanie"
PID : 7978
Case : /home/stephanie/OpenFOAM/stephanie-2.3.1/run/smagorinsky_mini
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Reading topoSetDict

Time = 0
mesh not changed.
Created cellSet c0
Applying source boxToCell
Adding cells with center within boxes 1((0.1 0.05 0) (0.4 0.15 0.005))
cellSet c0 now size 1184

End

Now I will try to refine the mesh.

I thank you so much for your patience and you help,

nice regards,

Stephie
stephie is offline   Reply With Quote

Old   June 9, 2015, 06:47
Default
  #18
Member
 
Howar
Join Date: Mar 2015
Posts: 53
Rep Power: 11
Howard is on a distinguished road
Quote:
Originally Posted by Shawn_A View Post
Well, setSet and topoSet are definitely available, but I can't figure out how to use them. With the cellSet command, all I needed to specify was my case: "-case rotor", and cellSet would reference my cellSetDict file which contained:

// Name of set to operate on
name movingCells;

// One of clear/new/invert/add/delete|subset/list
action new;

// Actions to apply to cellSet. These are all the topoSetSource's ending
// in ..ToCell (see the meshTools library).

topoSetSources
(
// Cells with cell centre within box
boxToCell
{
box (-0.025 -0.025 -0.005) (0.025 0.025 0.005);

name movingCells; // name of cellZone
}

);


With setSet (topoSet), I have copied and renamed cellSetDict to setSetDict (topoSetDict), but the command failed to execute with the error "no times selected" ("keyword actions is undefined in dictionary "./rotor/system/topoSetDict" ").

What I am trying to do is create a set of cells(?) (or am I creating a zone?) that defines my moving mesh region, the rotor. Perhaps there is a different way I need to do this.
Hi Friend, I would like to ask what 'box (0.5 0 0)(0.6 1 0.5)' stand for exactly, are they two points or vectors?
Howard is offline   Reply With Quote

Old   June 12, 2015, 18:16
Default
  #19
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by Howard View Post
I would like to ask what 'box (0.5 0 0)(0.6 1 0.5)' stand for exactly
Quick answer: It's a bounding box:
  1. Minimum point: (0.5 0 0)
  2. Maximum point: (0.6 1 0.5)
wyldckat is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Gmsh] Insatlling gmsh from the source code-issue? CFD-Lover OpenFOAM Meshing & Mesh Conversion 20 June 12, 2018 06:39
8x icoFoam speed up with Cufflink CUDA solver library kmooney OpenFOAM Running, Solving & CFD 42 November 6, 2012 11:37
Problems in compiling paraview in Suse 10.3 platform chiven OpenFOAM Installation 3 December 1, 2009 07:21
Problems Installing OF 1.6 32 bit bucksfan OpenFOAM Installation 19 August 4, 2009 01:36
Installation OF1.5-dev ttdtud OpenFOAM Installation 46 May 5, 2009 02:32


All times are GMT -4. The time now is 20:47.