CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ...

Usage of createPatchDict

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 1 Post By Bombolati
  • 2 Post By blacksquirrel

Reply
 
LinkBack Thread Tools Display Modes
Old   October 3, 2012, 11:55
Default Usage of createPatchDict
  #1
New Member
 
Francesco
Join Date: Jun 2012
Location: Rome, Italy
Posts: 23
Rep Power: 4
Bombolati is on a distinguished road
Hi, yesterday I opened a thread with a problem with the utility foamToVTK, and this shows me a new problem about my mesh. Bruno Santos (the moderator) gives me a valuable advice to check my mesh with checkMesh utility. And for my particular boundary condition says me to looking for a thread useful for me with the keywords foam3DMeshToFluent cyclic.
Now I've read the forum with this keywords but in every thread with cyclicle boundary condition problems the problem is not solved. I'm unlucky!
So I want to summarize the problem.
I convert the mesh with fluent3DMeshToFoam. ok.
I run the checkMesh utility and there isn't a problem yet. ok.
Now I need to change some patch from type patch to type cyclic.
The first time I have changed directly the boundary file with this keywords for the patch 1:
matchTolerance 0.0001; neighbourPatch patch 2; transform rotational; rotationAxis (0 0 1); rotationCentre (0 0 0);
for the patch 2:
matchTolerance 0.0001; neighbourPatch patch 1; transform rotational; rotationAxis (0 0 1); rotationCentre (0 0 0);
This attempt give the error above when I run the checkMesh utility.
Now I'm trying to use the createPatch utility but I don't understand which is its behaviour. I have find the example between the OF file but it isn't clear.
I try to explain what I have understand. This is the createPatchDict that I have done.

{
name patch1 (The patch name that I want change);
patchInfo (this is the section in which i set the new patch features)
{
type cyclic;
neighbourPatch patch2;
transform rotational;
rotationAxis (0 0 1);
rotationCentre (0 0 0);
}
constructForm patches (I have no idea what is this keyword);
patches (periodic1) (I have no idea);
}
{
name patch2 (The patch name that I want change);
patchInfo (this is the section in which i set the new patch features)
{
type cyclic;
neighbourPatch patch1;
transform rotational;
rotationAxis (0 0 1);
rotationCentre (0 0 0);
}
constructForm patches (I have no idea what is this keyword);
patches (periodic1) (I have no idea);
}

If I run the utility it starts and have finish with a warning that says:in file meshes/polymesh/polyBoundaryMesh/polyboundaryMesh.c at line 573 OF can't find any patch names matching periodic1
This error occurs two times. The funny things is that this utility doesn't convert any patch in my boundary file, but create a directory named 1e-07 (as the value of deltaT in the controlDict file) in which there is an other polyMesh directory that contains the same file of that one in the constant directory.

Please help me, I'm looking for a solution all day in the forum, please forgive any grammatical errors I'm so tired. Thanks a lot.
Chandsome likes this.
Bombolati is offline   Reply With Quote

Old   October 4, 2012, 05:00
Default
  #2
Member
 
Join Date: Jun 2011
Posts: 46
Rep Power: 5
blacksquirrel is on a distinguished road
Hello Bombolati,

After using fluent3DMeshtoFoam you have two patches ("patchA" and "patchB") which should be cyclic but are labeled with "patch" or "wall".
Then you can use the createPatch utility.

In the createPatchDict you write
name patch1;
this is the new name of your cyclic patch

patchInfo (this is the section in which i set the new patch features)
{
type cyclic;
neighbourPatch patch2;
transform rotational;
[...]

constructFrom patches;
which means, that there are existing patches that are used to create the new patches. (It is possible to create patches from faces, then you have to write construct from faceSet)
and
patches (patchA)
which means, your new cyclic patch "patch1" is constructed from "patchA" (it is possible to construct a new patch from two or more existing patches)

and the same then for patch2:
constructFrom patches;
patches (patchB) ;
wyldckat and menonshyam like this.

Last edited by blacksquirrel; October 5, 2012 at 08:21.
blacksquirrel is offline   Reply With Quote

Old   October 4, 2012, 06:52
Default
  #3
New Member
 
Francesco
Join Date: Jun 2012
Location: Rome, Italy
Posts: 23
Rep Power: 4
Bombolati is on a distinguished road
Thank you very much blacksquirrel, the conversion is ok and the checkMesh utility gives no error.
Bombolati is offline   Reply With Quote

Old   October 5, 2012, 15:59
Default
  #4
Senior Member
 
sivakumar selvaraju
Join Date: Mar 2009
Location: Cape Town - South Africa
Posts: 186
Rep Power: 7
sivakumar is on a distinguished road
Send a message via Skype™ to sivakumar
Hi there,
I have converted the .msh in to foam.
I got 2 errors,
firstly as follows,

--> FOAM FATAL ERROR:
face 6439 area does not match neighbour by 0.0103693% -- possible face ordering problem.
patch:OLR0 my area:0.000199448 neighbour area:0.000199427 matching tolerance:0.0001
Mesh face:1370739 fc0.0966635 -0.0215988 0.729129)
Neighbour fc0.0967883 -0.5304 0.500736)
If you are certain your matching is correct you can increase the 'matchTolerance' setting in the patch dictionary in the boundary file.
Rerun with cyclic debug flag set for more information.

then I have increased the matchTolerance 0.0001 to 0.001
then executed paraFoam

after that I am getting the error as follows,



--> FOAM FATAL ERROR:
More than six unsigned transforms detected:
6(((0 0 0) (1 1.57813e-06 -0.000193506 -0.000137946 0.707107 -0.707107 0.000135714 0.707107 0.707107) 1) ((0 0 0) (0.999999 3.64383e-05 -0.00152133 -0.00110151 0.707109 -0.707104 0.00104998 0.707105 0.707108) 1) ((0 0 0) (0.999996 7.7863e-05 -0.00275828 -0.00200544 0.707113 -0.707098 0.00189536 0.7071 0.707111) 1) ((0 0 0) (0.999992 0.000140037 -0.00401223 -0.00293604 0.70712 -0.707087 0.00273811 0.707093 0.707115) 1) ((0 0 0) (1 -0.000137946 0.000135714 1.57813e-06 0.707107 0.707107 -0.000193506 -0.707107 0.707107) 1) ((0 0 0) (0.999999 -0.00110151 0.00104998 3.64383e-05 0.707109 0.707105 -0.00152133 -0.707104 0.707108) 1))

From function void Foam::globalIndexAndTransform::determineTransforms ()
in file primitives/globalIndexAndTransform/globalIndexAndTransform.C at line 225.

can you guys help me.

Thanks,
Siva
sivakumar is offline   Reply With Quote

Old   December 18, 2012, 12:43
Default
  #5
New Member
 
Qiang Zhou
Join Date: May 2010
Location: Tongji University, Shanghai, China
Posts: 27
Rep Power: 6
michael1023 is on a distinguished road
Quote:
Originally Posted by blacksquirrel View Post
Hello Bombolati,

After using fluent3DMeshtoFoam you have two patches ("patchA" and "patchB") which should be cyclic but are labeled with "patch" or "wall".
Then you can use the createPatch utility.

In the createPatchDict you write
name patch1;
this is the new name of your cyclic patch

patchInfo (this is the section in which i set the new patch features)
{
type cyclic;
neighbourPatch patch2;
transform rotational;
[...]

constructFrom patches;
which means, that there are existing patches that are used to create the new patches. (It is possible to create patches from faces, then you have to write construct from faceSet)
and
patches (patchA)
which means, your new cyclic patch "patch1" is constructed from "patchA" (it is possible to construct a new patch from two or more existing patches)

and the same then for patch2:
constructFrom patches;
patches (patchB) ;
Hi, blacksquirrel.
As you said, I have changed the createPatchDict. But there is also have a error as below:


--> FOAM FATAL ERROR:
Attempt to cast type patch to type cyclic

From function refCast<To>(From&)
in file lnInclude/typeInfo.H at line 114.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::error::abort() in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 Foam::cyclicPolyPatch::neighbPatchID() const in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#3 Foam::cyclicPolyPatch::calcGeometry(Foam::PstreamB uffers&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4 Foam:olyBoundaryMesh::calcGeometry() in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#5 Foam:olyMesh::addPatches(Foam::List<Foam:olyPa tch*> const&, bool) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#6
in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/createPatch"
#7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8
in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/createPatch"
Aborted

Could you give me some advice for this error? Thank you.
michael1023 is offline   Reply With Quote

Old   December 19, 2012, 06:35
Default
  #6
Member
 
Join Date: Jun 2011
Posts: 46
Rep Power: 5
blacksquirrel is on a distinguished road
Ok, have you checked your "boundary" file in constant/polyMesh after using fluentMeshToFoam?
What is the type of your patchA/patchB? Do you have two separate patches?

This error is strange and I've never encountered it. Maybe it helps if you change the type of your patches A and B in the boundary file to "wall" instead of patch and try again.
blacksquirrel is offline   Reply With Quote

Old   December 19, 2012, 07:14
Default
  #7
New Member
 
Qiang Zhou
Join Date: May 2010
Location: Tongji University, Shanghai, China
Posts: 27
Rep Power: 6
michael1023 is on a distinguished road
Hi, blacksquirrel.

Thank you for your reply. I made a mistake in createPatchDict. With help of Maddalena, I solve this problem as the link below.
Cyclic boundaries in OF 21x
michael1023 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Monitor memory usage CKH OpenFOAM Running, Solving & CFD 1 March 9, 2012 10:51
BoF-Group: interFoam - documentation and usage unnikrsn OpenFOAM Running, Solving & CFD 0 November 12, 2011 23:39
How to max the CPU usage? Christoph_84 Hardware 2 June 8, 2011 16:45
OpenFOAM Solver/BC usage description murrayjc OpenFOAM 3 August 25, 2009 05:48
Swap usage on parallel run nikhilesh OpenFOAM Bugs 1 April 30, 2009 05:42


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