CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

creating new Patches using topoSetDict

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 19, 2016, 15:09
Default creating new Patches using topoSetDict
  #1
Member
 
Lorenzo
Join Date: Oct 2015
Location: Graz
Posts: 49
Rep Power: 10
Lorenzo92 is on a distinguished road
Hello everyone,

I need to create a patch from a given mesh. I can visualize the mesh in paraview and I can keep trace of the cells label ( or number ) in this enviroment, which afterwards I'd like to use to generate the new patch.
My problem is then how to implement that in openFoam by using the topoSetDict.
Can anyone suggest me ho to set the dictionary? My only mean is the list of the cells , which are going to make up the patch.

Thanks
Lorenzo92 is offline   Reply With Quote

Old   April 19, 2016, 15:53
Default
  #2
Senior Member
 
Alex
Join Date: Jan 2014
Posts: 126
Rep Power: 12
Kina is on a distinguished road
Hi Lorenzo,
maybe this is useful for you!

http://www.cfd-online.com/Forums/ope...reate-new.html

Cheers
Alex
Kina is offline   Reply With Quote

Old   April 20, 2016, 02:11
Default
  #3
Member
 
Lorenzo
Join Date: Oct 2015
Location: Graz
Posts: 49
Rep Power: 10
Lorenzo92 is on a distinguished road
Thnaks for the suggestion, I followed the entries in the dictionary you pointed me out , in particular :
{ name jetCells; type cellSet; action new; source cylinderToCell; sourceInfo { p1 (0 0 0); p2 (0 0 1); radius 0.0018; } } { name jetFaces; type faceSet; action new; source cellToFace; sourceInfo { set jetCells; option all; } }and I costumized it according to my needs :I just changed the name of each set (jetCells --> c0 and jetFaces --> f0) and using labelToCell instead of cylinderToCell for the first set , specifying in this entry the cell labels I got through paraview .
When I type topoSet in the command line I would expect as a result the creation of a folder "sets" under constant/polymesh/sets . Within this folder "sets" only the cellSet c0 is present , while f0, ( that should have been created as faceSet from the cellSet c0 ) is missing.
This brings about problems when I run createPatch since the patch I would like to create need the missing faceSet f0.
I can show you my topoSetDict for more clearness:


/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object topoSetDict;
}

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

actions
(
{
name c0;
type cellSet;
action new;
source labelToCell;
sourceInfo
{
value ( 0 1 2 3)
}
}

{
name f0;
type faceSet;
action add;
source cellToFace;
sourceInfo
{
set c0;
option all;
}
}

);

Can you find out where I wrong?
Lorenzo92 is offline   Reply With Quote

Old   April 20, 2016, 02:17
Default
  #4
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi,

For the faceSet, is there a reason why the action is "add" instead of "new"? I don't see a previous definition for "f0", so am curious as to why the action stated is "add".

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   April 20, 2016, 02:32
Default
  #5
Member
 
Lorenzo
Join Date: Oct 2015
Location: Graz
Posts: 49
Rep Power: 10
Lorenzo92 is on a distinguished road
Hi Antimony,

I think it was my mistake, btw I changed it in new as mentioned. Still the problem is there. It seems the action on f0 is not being read at all .
Lorenzo92 is offline   Reply With Quote

Old   April 20, 2016, 02:41
Default
  #6
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi,

You are missing a semi-colon after "value (0 1 2 3)"...

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   April 20, 2016, 16:06
Default
  #7
Member
 
Lorenzo
Join Date: Oct 2015
Location: Graz
Posts: 49
Rep Power: 10
Lorenzo92 is on a distinguished road
Ok, fixed .The semi-colon was missing.

Thanks a lot!!!
Lorenzo92 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
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 91 December 21, 2022 04:50
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) cfdonline2mohsen OpenFOAM 3 October 21, 2013 09:28
Cyclic boundaries in OF 21x morard OpenFOAM 25 May 13, 2013 22:35
Courant number, patches, etc oort OpenFOAM 1 July 24, 2009 18:05


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