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

Cyclic boundary conditions rotated 180 deg

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 21, 2015, 17:37
Default
  #21
New Member
 
Join Date: Aug 2015
Posts: 17
Rep Power: 11
ajonuz is on a distinguished road
Hi Bruno,

Quote:
Technically, the 180 rotation cannot be used, because it will always make the flow non-physical. Either way, only one transformation can be done, i.e. either it's one rotation or one translation.

Technically in this case, only a translation can be used.
I quite don't understand why a rotation around the x-axis isn't possible? Since for me it looks like the only logic rotation to make the flow physical. ('Correct' velocity profile as sketch in the previous attachement).

If I perform a translation the velocity profile would not be correct, hence a wrong solution will be obtained.

So I tried rotating the outlet flow around the x-axis, and the thing I notice when createPatch is executed, is that I get the following message:

Code:
Cannot find point in pts1 matching point 60 coord:(0.01212 0.00500556 0) in pts0 when using tolerance 5.00031e-08
Searching started from:149 in pts1
    Compared coord: (0 0.00699167 0) at index 149 with difference to point 0.0122817
Cannot find point in pts1 matching point 61 coord:(0.01212 0.00501667 0) in pts0 when using tolerance 5.00031e-08
Searching started from:149 in pts1
    Compared coord: (0 0.00699167 0) at index 149 with difference to point 0.0122799
Cannot find point in pts1 matching point 62 coord:(0.01212 0.00502778 0) in pts0 when using tolerance 5.00031e-08
Searching started from:149 in pts1
    Compared coord: (0 0.00699167 0) at index 149 with difference to point 0.0122781
Cannot find point in pts1 matching point 63 coord:(0.01212 0.00503889 0) in pts0 when using tolerance 5.00031e-08
Searching started from:149 in pts1
    Compared coord: (0 0.00699167 0) at index 149 with difference to point 0.0122763
Cannot find point in pts1 matching point 64 coord:(0.01212 0.00505 0) in pts0 when using tolerance 5.00031e-08
Searching started from:149 in pts1
I'm still able to carry out the simulation and convergence is reached after 4108 iterations as shown on the residual plot attached. However the final results are still not satisfying. I suspect that the warnings above can have a impact on the result.

Quote:
1. The "cyclic" type cannot be used, because the faces are not identical when the translation is used.
2. Instead the "cyclicAMI" should be used, but the problem with that is that you will loose a bit of numerical precision because of how the flow has to change between different cell resolutions.
Finally I have also tried using cyclicAMI with a rotation, but when rotating around the x-axis I get the warning:

Code:
AMI: Creating addressing and weights between 150 source faces and 150 target faces
--> FOAM Warning : 
    From function AMIMethod<SourcePatch, TargetPatch>::checkPatches()
    in file lnInclude/AMIMethod.C at line 57
    Source and target patch bounding boxes are not similar
    source box span     : (0 0.002 0.001)
    target box span     : (0 0.002 0.001)
    source box          : (0 0 -0.0005) (0 0.002 0.0005)
    target box          : (0.01212 0 -0.0005) (0.01212 0.002 0.0005)
    inflated target box : (0.0120082 -0.000111803 -0.000611803) (0.0122318 0.0021118 0.000611803)

--> FOAM FATAL ERROR: 
Unable to find initial target face
How is the initial target face set?

Best regards
Admir
Attached Images
File Type: jpg residualPlot.jpg (62.7 KB, 28 views)
ajonuz is offline   Reply With Quote

Old   September 21, 2015, 18:26
Default
  #22
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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 Admir,

Quote:
Originally Posted by ajonuz View Post
I quite don't understand why a rotation around the x-axis isn't possible?
Mmm... OK, now I'm getting the idea, although... well, the problem is that the transformation is meant to be used for transforming the position of one patch onto the position of the other patch. That is why I had defined this transformation:
Code:
rotationAxis (0 0 1);
rotationCentre (6.06e-3 3.5e-3 0);
Simply rotating around the x-axis results in the patch overlaying itself.

If I understand your idea correctly, what you want is to rotate over X for switching over the geometrical perspective; but you will also need the translation that will move the position from one side to the other, so that the positions are transformed onto the same locations on the other patch. Problem is that such a two or more steps transformation is not possible with the current capabilities that OpenFOAM provides for cyclic patches.

As far as I can figure out, there are at least three possible solutions that come to mind:
  1. To use groovyBC for mapping the values from one patch onto the other... although I've never done something like this, i.e. something that requires such a transformation. Either way, an example along these lines is provided here: http://openfoamwiki.net/index.php/Co...ing_of_patches
  2. To implement a new class that uses a generic transformation, preferably using a single 4x4 transformation matrix, which has the ability to cumulatively handle several transformations in a single matrix. This should actually already exist in OpenFOAM, but I guess it doesn't exist yet because it's not very practical...
  3. There is a group of boundary conditions with the prefix "mapped", problem is that I've never managed to use them properly. But they are meant to be able to map values from patch onto another. You can find some more information from here:
    • http://foam.sourceforge.net/docs/cpp/
      • Use the link "Boundary Conditions" at the bottom of the page.
        • Use the link "Coupled boundary Conditions".
          • The following two might do what you want: "mappedFieldFvPatchField" and "mappedFixedValueFvPatchField".


And I guess that the "cyclicAMI" is useless for your case, given that a 2 step transformation is needed, which isn't available.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Reply

Tags
cyclic, cyclicami, rotate


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
Low torque values on Screw Turbine Shaun Waters CFX 34 July 23, 2015 09:16
Waterwheel shaped turbine inside a pipe simulation problem mshahed91 CFX 3 January 10, 2015 12:19
Overflow Error in Multiphase Modelling with Two Continuous Fluids ashtonJ CFX 6 August 11, 2014 15:32
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 08:00
cyclic boundary conditions for airfoil A.Wendy OpenFOAM Pre-Processing 2 October 8, 2012 07:36


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