# Pointwise to Foam - cyclic BC points order

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

 October 16, 2014, 09:35 Pointwise to Foam - cyclic BC points order #1 Member   Luca Join Date: Mar 2013 Posts: 68 Rep Power: 4 Hi everybody I'm trying to run a case containing a cyclic BC using a mesh prepared with PointWise. I'm facing some problem with the correct exportation of the two cyclic boundaries patch. I created the periodic faces (or domains in Pointwise language) in Pointwise using the create > periodic > translate command. Then I exported the mesh as OpenFoam mesh and ran the command foamUpgradeCyclics to upgrade the cyclic definition to the "new" format. When i run checkMesh it warns me: Code: ``` **Error in coupled point location: 1 faces have their 0th or consecutive vertex not opposite their coupled equivalent. Average mismatch 0.``` To better understand the problem I prepared two 1-by-1-by-1 meshes (a mesh with only one cell) with a cyclic BC on two opposite faces both with Pointwise and blockMesh. I figured that the problem is in the way Pointwise orders the points of the faces of the periodic boundaries. To make an example lets say that I want to cycle the face 1-2-3-4 to the face 1'-2'-3'-4'. BlockMesh create two faces: face 1: (1 2 3 4) face 2: (1' 4' 3' 2') that is to say that: -the two face start with the "same" point -the points are take once clockwise and once counter-clockwise (this way the normal is always pointing inside the volume) Pointwise create two faces: face 1: (1 2 3 4) face 2: (4' 3' 2' 1') that is to say that: -the two face DOESN'T start with the "same" point -the points are take once clockwise and once counter-clockwise (this way the normal is always pointing inside the volume) As I said: checkMesh returns the error I copied above with the Pointwise version, while it accepts the checkMesh version. I link a tar file containing the test case with the pointwise .pw file, the blockMesh dict and two polyMesh folders, one with the mesh generated by Pointwise (PW) and the one generated by blockMesh (BM). https://www.dropbox.com/s/6y0iba661m...ST.tar.gz?dl=0 How can I solve this problem (on a way more complex mesh of course)? Thank you very much, Luca

 October 16, 2014, 12:21 #2 Member   Luca Join Date: Mar 2013 Posts: 68 Rep Power: 4 Using a script I modified the face file reordering each face belonging to the secondary cyclic patch from (1 2 3 4) to (4 1 2 3) and now checkMesh returns no error. This is however a very "rude" solution prone to a lot of errors. Is there a way to fix this before exporting the mesh? Is this a Pointwise exportation bug?

 October 16, 2014, 12:50 #3 Senior Member   Chris Sideroff Join Date: Mar 2009 Location: Ottawa, ON, CAN Posts: 368 Rep Power: 12 It's not a bug, just a limitation exporting periodic (aka cyclic) patches to OpenFOAM. As you've found it, it doesn't maintain the face ordering that OpenFOAM requires. To my knowledge, of the solvers that support periodic patches, OpenFOAM might be the only one that requires strict ordering of the patch faces. Someone will correct me if I'm wrong in this regard. Fortunately, there is a relatively easy way to recover it. Use the 'createPatch' utility. In fact, the provided example 'createPatchDict' in \$FOAM_UTILITIES/mesh/manipulation/createPatch/ is setup to do just that. I've successfully used it many times for both rotational and translational periodic patches. Try it and let me know if you have any troubles or questions.

 October 17, 2014, 03:24 #4 Member   Luca Join Date: Mar 2013 Posts: 68 Rep Power: 4 Hi Chris. Honestly the boundary between "bug" and "unsupported feature" seams pretty weak in this case to me. Openfoam ask for two conditions: - the two faces must retain the "same" (in terms of patch coordinates) first point - the faces' points must be ordered clockwise looking from outside the domain I don't argue that these conditions could be stricter than other softwares, but I don't see the problem respecting them. As I told you, I've been able to correct the bug using a Matlab script wrote in 10 min that simply does: Code: ```for in = circolar_shift(,1) ``` The problem is that it took me 4 hours to fully understand which was the problem and which was the correct solution. I don't think that this script would be difficult to implement in the Pointwise code. Moreover, if this is a know limit of Pointwise, it could at least warn the user of it when it sees that I'm exporting a cyclic patch to openFoam. Thank for your help and I'm not mad with you but honestly I'm quite disappointed of this Pointwise behaviour.

 October 17, 2014, 08:47 #5 Senior Member   Chris Sideroff Join Date: Mar 2009 Location: Ottawa, ON, CAN Posts: 368 Rep Power: 12 Couple of things. First you have to realize that Pointwise is not an "OpenFOAM" mesher, it is a general "CFD" mesher. It supports around 50 different CFD solvers so they likely choose features that affect the majority. On top of that, OpenFOAM is relatively new compared to other supported solvers so they're likely still learning about its specific needs. Second, as a customer, request the feature (or as you feel, a bug) directly to them rather than making a comment on forum, which may go unnoticed. In particular since you have a interim solution I'm sure they'd welcome your knowledge in guiding the development of the feature.

 Thread Tools Display Modes Linear Mode

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

 Similar Threads Thread Thread Starter Forum Replies Last Post Madeleine P. Vincent OpenFOAM Native Meshers: blockMesh 43 February 18, 2014 03:42 hiuluom OpenFOAM Paraview & paraFoam 12 February 4, 2014 06:46 nennbs OpenFOAM Native Meshers: blockMesh 7 April 17, 2013 05:42 daniel_mills OpenFOAM Running, Solving & CFD 44 February 17, 2011 18:08 Cyril FLUENT 0 June 7, 2006 05:56

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