CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

pimpleDyMFoam with AMI - high-frequency pressure changes

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By JNSN

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 22, 2014, 13:50
Default pimpleDyMFoam with AMI - high-frequency pressure changes
  #1
New Member
 
chubb87
Join Date: May 2011
Posts: 21
Rep Power: 14
chubb87 is on a distinguished road
Hello,

there is an issue with high-frequency pressure oscillations for simulations with pimpleDyMFoam and transientSimpleDyMFoam (for rotating machinery), which was confirmed by independent research groups.
These oscillations are unphysical and are definitely connected to the AMI interface (correlate with circumferential number of cells of stator & with rotor-frequency).
After detailed examination of a simplified testcase (see attachment) we are sure about that.
This problem was examined primarily with OpenFOAM 2.1.x, but occurs also with OpenFOAM 2.3.x.

Has anyone noticed this phenomenon and/or has a solution?

Thanks a lot in advance.
Martin


Attachments with links:
Modelpump-pimpleDyMFoam-OF-2.1.x: transient set-up including the initial solution, https://dl.dropboxusercontent.com/u/...F-2.1.x.tar.gz
turboPerformance-OF2.1: functionObject for the head evaluation, https://dl.dropboxusercontent.com/u/...e-OF2.1.tar.gz
chubb87 is offline   Reply With Quote

Old   September 28, 2014, 13:01
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 Martin,

I was curious and took a quick look at the mesh in your case, as well as to the "fvSolution" and "fvSchemes" files.

What I can see is that:
  1. The "correctPhi" line is missing from the "PIMPLE" block at "fvSolution". Although I'm not certain how important it might be.
  2. The relaxation factors in "fvSolution" look very strange to me... 0.9 seems too relaxed.
  3. Attached are a couple of images that show the surface mesh on the AMI patches. The images and respective files names should be self-explanatory.
    The problem is that they seem to reveal bad surface mesh interface between the two mesh regions, because those very thin mesh slivers are most likely the ones responsible for the high-frequency you're seeing the graphs.
From past cases I've seen, where the mesh is more important than people give it credit: OpenFOAM: Interesting cases of bad meshes and bad initial conditions, the "Case two" on that blog post refers to an example of how bad mesh refinement transitions can be if created in the wrong place.


To conclude, I strongly suggest that you try either using an identical mesh resolution in the inside and outside regions; or at least use a 2:1 proportion. In addition, it might be better to use a fixed deltaT, which is a multiple that correlates the location of the cell faces on the AMI patches with the rotation speed, so that you can avoid getting sliver-like face interfaces.

Best regards,
Bruno
Attached Images
File Type: jpg overlapped.jpg (56.4 KB, 91 views)
File Type: jpg side-by-side.jpg (90.2 KB, 88 views)
wyldckat is offline   Reply With Quote

Old   September 29, 2014, 07:28
Default
  #3
New Member
 
chubb87
Join Date: May 2011
Posts: 21
Rep Power: 14
chubb87 is on a distinguished road
Dear Bruno,

thank you very much for investigating my case.

Regarding your comments, I can say the following:
1. CorrectPhi is not the reason for the oscillations. I also ran the calculations with that option activated and the oscillations were still present.
2. The same applies to different relaxation factors.
3. Shouldn’t the AMI interface be able to handle small jumps in mesh resolution. A transition from 60 to 72 cells in circumferential direction is not a bad transition, and in axial direction it is even a 1:1 match. I do not consider it satisfactory if the AMI cannot cope with that. For our real-world cases it is not possible to always make sure the mesh is 1:1 or 2:1.

Kind regards,
Martin
chubb87 is offline   Reply With Quote

Old   September 30, 2014, 07:31
Default
  #4
Senior Member
 
JNSN's Avatar
 
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 137
Rep Power: 19
JNSN is on a distinguished road
Hi Martin,

have you tried to tighten the tolerance for p, e.g. 1e-8? Sometimes this helps to reduce such oscillations.
Or may change linearUpwind to something like blended 0.8 linear upwind. Should be slightly more diffusive, but also may reduce the oscillations.

Best regards,
Jan
wyldckat likes this.
JNSN is offline   Reply With Quote

Old   October 4, 2014, 11:22
Default
  #5
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 to all!

To add to Jan's answer, there is also the presentation "OFW09.0005 How grid quality affects solution accuracy" at http://openfoam-extend.sourceforge.n.../download.html - which should give some more ideas.

In addition, in OpenFOAM 2.3.0 were introduced a few more features which might solve a bit these issues: http://www.openfoam.org/version2.3.0/ami.php


Quote:
Originally Posted by chubb87 View Post
3. Shouldn’t the AMI interface be able to handle small jumps in mesh resolution. A transition from 60 to 72 cells in circumferential direction is not a bad transition, and in axial direction it is even a 1:1 match. I do not consider it satisfactory if the AMI cannot cope with that. For our real-world cases it is not possible to always make sure the mesh is 1:1 or 2:1.
The presentation I mentioned above should shed some lights on this, since AMI is not a silver bullet; it should still be susceptible to the usual mesh related issues that OpenFOAM has got, hence my comment of 1:1 and 2:1. You might also want to try out the GGI feature currently in foam-extend 3.1, which was initially implemented a few years earlier in the Extend variant 1.4-dev (I think), than the AMI implementation in the official OpenFOAM version.


Yet another example of how significant is the mesh, is if when running a transient simulation, even without any dynamic meshing, there is a very small cell that has fluid passing through it at a very high speed, where the Courant Number will sky rocket for that very small cell, and/or forcing the deltaT step to reduce to very small values. There are several possible workarounds, but the best solution is to try and improve the mesh in that particular location; any workaround will very likely be suboptimal.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   October 7, 2014, 12:25
Default
  #6
New Member
 
chubb87
Join Date: May 2011
Posts: 21
Rep Power: 14
chubb87 is on a distinguished road
@Jan:
Unfortunately tightening the tolerances does not reduce the oscillations.
I also tried more diffusive schemes, even pure upwind does not yield less oscillations.

@Bruno:
Thanks for the links.
I tested the option "lowWeightCorrection" (the only new feature I have influence on that might help), but that does not reduce the oscillations, nor does the variation of "meshTolerance".
I actually tried the GGI-feature in foam-extend-3.1, but without improvement. In that regard the two interface methods behave equivalently.
The geometry is very simple and the mesh is fairly clean, we have made sure of that (also tried different conversion mechanisms). I appreciate your advice regarding the mesh, but in my opinion that it is not the reason for the oscillations.

Best regards,
Martin
chubb87 is offline   Reply With Quote

Old   October 9, 2014, 15:54
Default
  #7
New Member
 
Join Date: Apr 2010
Posts: 10
Rep Power: 16
Bandfrosch is on a distinguished road
Hello all,
after having a look in my dirty tricks chamber , I found :

modifying point coordinates on both interfaces reduces these wiggles.
Just twist each interface about one cell's angle , variing angle from z = 0 to z = 0.1,
so that ami weights ( or cell faces overlap ) do not have sudden jumps while rotating.

Too sad that the wiggles do not disappear completley ...

Please find attached a "twisted" points file.

Attachment 34303

Attachment 34304

Attachment 34305

Attachment 34306

Attachment 34307



This twisting was done via a super ugly shell script :
assuming constant/polyMesh/points.gz was backed up to constant/polyMesh/pointsOrig.gz

# do some sed awk magic, find points with distance 0.05 from z axis, apply diferential rotation to them, write back to polyMesh dir

cp constant/polyMesh/pointsOrig.gz .
gunzip -f pointsOrig.gz

cat pointsOrig \
| sed 's/(/( /' \
| sed 's/)/ )/' \
| awk '/\(/ {
x=$2;y=$3;z=$4;
r2=$2*$2+$3*$3;
if( sqrt((r2 - 0.0025)*(r2 - 0.0025)) < 1e-6)
{
if( NR >= 7149 ) angle=atan2(1,0)*4*0.013 * z / 0.1 * 2.0;
else angle=atan2(1,0)*4*0.013 * z / 0.1 * -1.0;
xDash= x*cos(angle)+y*sin(angle) ;
yDash=-x*sin(angle)+y*cos(angle);
{ printf "/*"x" "y " "z"*/" "("xDash" "yDash" "z" )\n" ; next }
}
}
{
print $0
}' > points

# zip the processed points file
gzip -f points

# put back to polyMesh dir
cp points.gz constant/polyMesh/





I am sure ,there are several tricks like this out in the wild ...

Bandfrosch
Bandfrosch is offline   Reply With Quote

Old   October 10, 2014, 13:46
Default
  #8
New Member
 
Join Date: Apr 2010
Posts: 10
Rep Power: 16
Bandfrosch is on a distinguished road


Sorry , links do not work ...

Mesh view from above :

mesh1.png

Mesh view from below :

mesh2.png

twisted AMI patches :

mesh3.png


Volume flow comparison :

vDot.png

points.gz file :


points.gz




Hope it works this time ....

Bandfrosch
Bandfrosch is offline   Reply With Quote

Old   October 14, 2014, 07:52
Default
  #9
New Member
 
chubb87
Join Date: May 2011
Posts: 21
Rep Power: 14
chubb87 is on a distinguished road
Hello Bandfrosch,

thanks very much for providing this idea and script. It really reduces the oscillations a bit. I have applied it from the middle (axial direction), such that the cells get twisted 2 cells in circumferential direction with the same total twist at both endings.

I doubt though, whether this trick is practical for real pumps and testing this right now. In order to reduce the oscillations completely, I guess this trick has to be combined with mesh refinement and/or 1:a matching interfaces, where 'a' is an integer.
Hopefully in future OF versions there will be a more useful AMI-implementation.

Regards,
Martin
chubb87 is offline   Reply With Quote

Old   October 26, 2014, 07:03
Default
  #10
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 to all!

FYI: A few days a similar report was filled on the official bug tracker for OpenFOAM, which seems to shed some more light on the source of this problem: http://www.openfoam.org/mantisbt/view.php?id=1421

Best regards,
Bruno
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
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 04:13
high pressure boundary condition fragzilla CFX 5 September 14, 2012 02:40
Tutorial problem: "rhopSonicFoam - shockTube" with high pressure shangzung OpenFOAM 0 November 1, 2009 13:07
Does star cd takes reference pressure? monica Siemens 1 April 19, 2007 11:26
Hydrostatic pressure in 2-phase flow modeling (long) DS & HB Main CFD Forum 0 January 8, 2000 15:00


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