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

Oscillatory Issues with 2nd Order Schemes

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

Like Tree4Likes
  • 1 Post By physicsunited
  • 1 Post By alireza94
  • 1 Post By physicsunited
  • 1 Post By Santiago

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 5, 2018, 05:21
Question Oscillatory Issues with 2nd Order Schemes
  #1
New Member
 
physicsunited's Avatar
 
Pi-Man
Join Date: Feb 2018
Posts: 10
Rep Power: 8
physicsunited is on a distinguished road
Dear Fellow CFD Enthusiasts,

I am currently attempting a mesh independence study on a simple 2D rectangular channel. I am using a modified icoFoam application that solves the transport of a passive tracer at every time step. My issue is, is that I have realized how diffusive the first order divergence schemes can be (thus requiring extreme mesh refinement), and so I am trying my mesh independence study using 2nd order accurate differential operators. However, it seems that my simulation's performance indicator (some mixing coefficient calculated) shows unrealistic oscillatory behavior when attempting simulations using these 2nd order operators.

Please find attached an image that shows some of the case tests I have run, and screenshots of the fvSchemes and fvSolution used on Test 5. Test 1, Test 2 and Test 3 have their mesh sizes refined and they are using 1st order operators. Test 4 is the same as Test 3 but has a smaller time step. Test 5 uses the same mesh and time step as Test 3 but is using 2nd order accurate differential operators. I am sure the behavior is unphysical in Test 5 because of the extremely steep time responses and the negative values along the ordinate.

Any advice on how to use these 2nd order operators and yield stable results would be highly appreciated.

Best,
Kris
Attached Images
File Type: png convergencestudy.png (94.6 KB, 210 views)
File Type: png fvSchemes.png (38.9 KB, 140 views)
File Type: png fvSolution.png (28.8 KB, 96 views)
physicsunited is offline   Reply With Quote

Old   April 5, 2018, 06:07
Default Additional information
  #2
New Member
 
physicsunited's Avatar
 
Pi-Man
Join Date: Feb 2018
Posts: 10
Rep Power: 8
physicsunited is on a distinguished road
By the way, the value "mu" as seen on the graph's ordinate displays some inherent oscillatory behavior that should be differentiated from the numerical oscillations. This inherent behavior is due to my choice of inlet boundary conditions (necessary to my study).
physicsunited is offline   Reply With Quote

Old   June 11, 2018, 08:24
Default
  #3
New Member
 
Alireza Maleki
Join Date: Aug 2017
Location: United State
Posts: 20
Rep Power: 9
alireza94 is on a distinguished road
yep. i have this problem to. but not at mesh independence study.as you can see there are some waveLike oscillation in my domain. i need to eliminate them but i dont know exactly why i have them in my simulation. my guess is, they are due my second order scheme but i dont know how eliminate them.
any tip would be appreciated.
Attached Images
File Type: png Screenshot from 2018-06-11 15-03-21.png (104.6 KB, 147 views)
alireza94 is offline   Reply With Quote

Old   June 11, 2018, 08:44
Default
  #4
New Member
 
physicsunited's Avatar
 
Pi-Man
Join Date: Feb 2018
Posts: 10
Rep Power: 8
physicsunited is on a distinguished road
Dear Ali,

I actually solved this problem

The issue is most definitely with the 2nd order schemes being used. I'm not sure what type of physics you're simulating, but make sure the scheme chosen is non-oscillatory. I bounded my solvers and it removed all the ugly and strong oscillations in the problem.

If you would like some more details, let me know.

Best,
K
physicsunited is offline   Reply With Quote

Old   June 11, 2018, 12:46
Default
  #5
New Member
 
Alireza Maleki
Join Date: Aug 2017
Location: United State
Posts: 20
Rep Power: 9
alireza94 is on a distinguished road
thank you for your fast replay. actually i'm working on a step simulation as the picture. i have this wavelike as you see and i want eliminate them. my guess is that they are due the second order scheme, because they are oscillating.
you said that " I bounded my solvers . . . " how exactly did you do that?
as you see my scheme are linear.


what do you recommend ?
Attached Images
File Type: png Screenshot from 2018-06-11 15-03-21.png (104.6 KB, 59 views)
File Type: png Screenshot from 2018-06-11 20-14-45.png (27.5 KB, 105 views)
File Type: png Screenshot from 2018-06-11 20-14-27.png (36.9 KB, 108 views)

Last edited by alireza94; June 12, 2018 at 04:55.
alireza94 is offline   Reply With Quote

Old   June 11, 2018, 14:27
Default
  #6
New Member
 
physicsunited's Avatar
 
Pi-Man
Join Date: Feb 2018
Posts: 10
Rep Power: 8
physicsunited is on a distinguished road
I'm honestly not quite sure what is causing your pressure waves because I don't know what exactly you're doing, but maybe you should try more stable schemes. You should definitely test out multiple schemes, and check the change in the strength of these oscillations USING GRAPHS and not a paraview snapshot.

Check out the solvers I used for my problem, maybe they can help you start with the testing.
Attached Images
File Type: png Screenshot from 2018-06-11 19-27-13.png (35.5 KB, 277 views)
alireza94 likes this.
physicsunited is offline   Reply With Quote

Old   June 11, 2018, 16:18
Smile
  #7
New Member
 
Alireza Maleki
Join Date: Aug 2017
Location: United State
Posts: 20
Rep Power: 9
alireza94 is on a distinguished road
thank you for your scheme.


i will give it a shot, and search more on the internet
physicsunited likes this.
alireza94 is offline   Reply With Quote

Old   June 11, 2018, 17:29
Default
  #8
New Member
 
physicsunited's Avatar
 
Pi-Man
Join Date: Feb 2018
Posts: 10
Rep Power: 8
physicsunited is on a distinguished road
Best of luck Ali,

Just make sure as well that the waves aren't part of the actual physics involved if you're working on a compressible system, these waves might be physical and not only numerical.

Peace,
K
HBetta likes this.
physicsunited is offline   Reply With Quote

Old   June 12, 2018, 02:13
Default
  #9
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,286
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by alireza94 View Post
yep. i have this problem to. but not at mesh independence study.as you can see there are some waveLike oscillation in my domain. i need to eliminate them but i dont know exactly why i have them in my simulation. my guess is, they are due my second order scheme but i dont know how eliminate them.
any tip would be appreciated.



this is an example of checkerboarding. If you run the same thing with refined mesh you are unlikely to see it. So try it out. If you don't see the issue on refined mesh then it was checkerboarding due to lack of pressure velocity de-coupling.
arjun is offline   Reply With Quote

Old   June 12, 2018, 04:54
Default
  #10
New Member
 
Alireza Maleki
Join Date: Aug 2017
Location: United State
Posts: 20
Rep Power: 9
alireza94 is on a distinguished road
Quote:
Originally Posted by arjun View Post
this is an example of checkerboarding. If you run the same thing with refined mesh you are unlikely to see it. So try it out. If you don't see the issue on refined mesh then it was checkerboarding due to lack of pressure velocity de-coupling.
frankly speaking, I'm not much familiar with checkerboarding.could you expane it more?

moreover my professor got good result with fluent and I wanna get those in openfoam, additionally I got probe pressure too.

a probe at cavity shows steady oscillation completely , the things that before was gatten in fluent. but I got some noise behiver too at my probe pressure, that's problem
alireza94 is offline   Reply With Quote

Old   June 12, 2018, 05:04
Default
  #11
Member
 
Hosein
Join Date: Nov 2011
Location: Germany
Posts: 94
Rep Power: 15
einstein_zee is on a distinguished road
Quote:
Originally Posted by physicsunited View Post
Dear Ali,

I actually solved this problem

The issue is most definitely with the 2nd order schemes being used. I'm not sure what type of physics you're simulating, but make sure the scheme chosen is non-oscillatory. I bounded my solvers and it removed all the ugly and strong oscillations in the problem.

If you would like some more details, let me know.

Best,
K
Hi there,

Just for curiosity, have you tried the same simulation (with 2nd order schemes) but with Euler for time instead of CN 0.9 ? was the behaviour again oscillatory?
einstein_zee is offline   Reply With Quote

Old   June 12, 2018, 05:42
Default
  #12
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,286
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by alireza94 View Post
frankly speaking, I'm not much familiar with checkerboarding.could you expane it more?

moreover my professor got good result with fluent and I wanna get those in openfoam, additionally I got probe pressure too.

a probe at cavity shows steady oscillation completely , the things that before was gatten in fluent. but I got some noise behiver too at my probe pressure, that's problem

Yaa you are right it could be something else too. I overlooked the fact that you said that second order calculation has this issues.





PS: Fluent is different solver though, so there might be other reasons to this issue. I hope someone more knowledgeable of openfoams helps you out here.
arjun is offline   Reply With Quote

Old   June 12, 2018, 06:08
Default
  #13
New Member
 
Alireza Maleki
Join Date: Aug 2017
Location: United State
Posts: 20
Rep Power: 9
alireza94 is on a distinguished road
Attachment 63958Attachment 63958
Quote:
Originally Posted by arjun View Post
Yaa you are right it could be something else too. I overlooked the fact that you said that second order calculation has this issues.





PS: Fluent is different solver though, so there might be other reasons to this issue. I hope someone more knowledgeable of openfoams helps you out here.



i,m not completely sure about the reason but second order is my best guess.


and this is my probe output. actually i need to eliminate this kind of noise behavior in my solution.
Attached Images
File Type: png p.png (10.1 KB, 90 views)
alireza94 is offline   Reply With Quote

Old   June 12, 2018, 06:58
Default
  #14
New Member
 
physicsunited's Avatar
 
Pi-Man
Join Date: Feb 2018
Posts: 10
Rep Power: 8
physicsunited is on a distinguished road
Dear Ali,

I strongly suggest you run a test with different solvers, and with different mesh sizes. Have you tried running first order schemes? They're usually diffusive and very stable. Next you can start testing different types of available schemes. Also try to run at least two different mesh sizes for this problem, and check to see whether there is a significant difference in the noise produced.

Best,
K
physicsunited is offline   Reply With Quote

Old   June 12, 2018, 07:03
Default
  #15
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 16
Santiago is on a distinguished road
Your case, as described, seems too simple to require all the rather "complex" schemes you're using. The first thing to note is that the "gauss linear orthogonal" scheme assumes your grid to be orthonormal. Meaning that mesh is uniform and orthogonal. The wiggles you see are a clear sign that the interpolation schemes are failing to accurately collocate the controvariant fluxes to the faces of the mesh. The discretization of the convective term is secondary here, compared to the LAPLACIAN.
physicsunited likes this.
Santiago is offline   Reply With Quote

Old   June 12, 2018, 07:03
Default
  #16
New Member
 
physicsunited's Avatar
 
Pi-Man
Join Date: Feb 2018
Posts: 10
Rep Power: 8
physicsunited is on a distinguished road
Dear Einstein,

I have thoroughly tested this problem of mine as I am attempting to write a research paper on the subject.

The issue turned out to be coming from the high Peclet numbers in the system, and that not all the solvers I was trying were "numerically incompatible" with my system. Some solvers gave me such large gradients in my field "c" (the scalar field being simulated) that they would result in negative scalar magnitudes, which was completely nonphysical. This ended up translating into an extremely noisy "mu" behavior (as can be seen in my original images.

It had nothing to do with my time scheme (as far as I can tell).

Best,
K
physicsunited is offline   Reply With Quote

Old   June 12, 2018, 07:40
Default
  #17
New Member
 
Alireza Maleki
Join Date: Aug 2017
Location: United State
Posts: 20
Rep Power: 9
alireza94 is on a distinguished road
Quote:
Originally Posted by Santiago View Post
Your case, as described, seems too simple to require all the rather "complex" schemes you're using. The first thing to note is that the "gauss linear orthogonal" scheme assumes your grid to be orthonormal. Meaning that mesh is uniform and orthogonal. The wiggles you see are a clear sign that the interpolation schemes are failing to accurately collocate the controvariant fluxes to the faces of the mesh. The discretization of the convective term is secondary here, compared to the LAPLACIAN.



dear Santiago


what do you suggest for my situation?


my mesh is completely orthogonal so can i use "Gauss linear orthogonal" and "orthogonal"??


do you think the noise behavior is due the schemes or something else?
alireza94 is offline   Reply With Quote

Old   June 12, 2018, 08:09
Default
  #18
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 16
Santiago is on a distinguished road
Quote:
Originally Posted by alireza94 View Post
dear Santiago


what do you suggest for my situation?


my mesh is completely orthogonal so can i use "Gauss linear orthogonal" and "orthogonal"??


do you think the noise behavior is due the schemes or something else?
You are solving a compressible flow, maybe an entropy preserving scheme would better serve your needs. Anyway, im not an expert in hllc or roe schemes.
Santiago is offline   Reply With Quote

Old   June 16, 2018, 07:29
Talking
  #19
New Member
 
Alireza Maleki
Join Date: Aug 2017
Location: United State
Posts: 20
Rep Power: 9
alireza94 is on a distinguished road
just for the record:


after changing most of the scheme in fvscheme i noticed that by changing

div(phi,U) linear;


to


div(phi,U) linearUpwind grad(U)


the problem will solve and the noise behavior vanish completely.
Attached Images
File Type: png p.png (6.1 KB, 98 views)
alireza94 is offline   Reply With Quote

Reply

Tags
accuracy, divergence schemes, mesh independency

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
kEpsilon and RNGkEpsilon not converging with second order schemes alpha23 OpenFOAM Running, Solving & CFD 1 September 2, 2015 11:47
2nd order upwind vs 2nd order upwind!!! Far Main CFD Forum 7 March 14, 2013 13:29
hypersonic HLLC/AUSM 2nd order melrose SU2 1 January 31, 2013 01:22
first and second order schemes Thomashoffmann Main CFD Forum 3 January 22, 2013 08:50
2nd order (convection) schemes Ford Prefect Main CFD Forum 5 January 18, 2012 07:38


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