CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Black box testing

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

Like Tree1Likes
  • 1 Post By LuckyTran

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 31, 2015, 13:33
Default Black box testing
  #1
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
Hey,

If I have an incompressible black box code that gives good results compared to existing benchmarks, how can I verify that the solution method produces a divergence free flow?

There is no information as to which solver and/or method (FD,FV,FE) is being used in the code.

Would you say that if the incompressible code preforms well with regards to benchmarks it is likely that those solutions are divergence free?
Simbelmynė is offline   Reply With Quote

Old   September 1, 2015, 15:33
Default
  #2
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
So I ran a test with a guessed residual R = (U_w - U_e + V_n - V_s) and ended up with an average L1 norm of the residual vector of about 1e-6

Should I normalize the velocities before the analysis?
Simbelmynė is offline   Reply With Quote

Old   September 1, 2015, 15:40
Default
  #3
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,764
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
but you should know what discrete divergence operator is used in your black-box code... otherwise what you are testing is not what is resolved...
FMDenaro is offline   Reply With Quote

Old   September 1, 2015, 17:02
Default
  #4
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,666
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Wouldn't a true incompressible code have to guarantee that the flow is divergence free? Else, how do you know it is an incompressible code?

However, I second the previous statement.

You're dealing with a discrete numerical solution. You can't discuss whether your discrete solution is divergence free without discretizing the divergence operation. If your code is a black box, you wouldn't know this discretization and therefore can't talk about divergence. You need to know the discretization scheme used by the code to test this.

You can arbitrarily define your own method to evaluate whether the numerical solution is divergence free, but you have the risk that your discretization is not the same scheme as the one used by the solver and is therefore inconsistent. A field may be divergence free in one discretization scheme and not another.
FMDenaro likes this.
LuckyTran is offline   Reply With Quote

Old   September 2, 2015, 01:46
Default
  #5
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
Wouldn't a true incompressible code have to guarantee that the flow is divergence free? Else, how do you know it is an incompressible code?

However, I second the previous statement.

You're dealing with a discrete numerical solution. You can't discuss whether your discrete solution is divergence free without discretizing the divergence operation. If your code is a black box, you wouldn't know this discretization and therefore can't talk about divergence. You need to know the discretization scheme used by the code to test this.

You can arbitrarily define your own method to evaluate whether the numerical solution is divergence free, but you have the risk that your discretization is not the same scheme as the one used by the solver and is therefore inconsistent. A field may be divergence free in one discretization scheme and not another.
Thank you for your input LuckyTran and FMDenaro. This is connected to my original question. Since it is a black box code I do not know which discrete divergence operator is being used (I just tried one possible option in the second post). Assuming that the statement "the code is incompressible" is true, then I wonder if there are any means of verifying this.

If there are no ways of verifying if the code is incompressible then I wonder what significance the verification has. The code performs well with regards to standard test cases and if I have an inlet and outlet the fluxes at those boundaries also cancel to machine precision.

What do you think?
Simbelmynė is offline   Reply With Quote

Old   September 2, 2015, 03:25
Default
  #6
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,764
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Simbelmynė View Post
Thank you for your input LuckyTran and FMDenaro. This is connected to my original question. Since it is a black box code I do not know which discrete divergence operator is being used (I just tried one possible option in the second post). Assuming that the statement "the code is incompressible" is true, then I wonder if there are any means of verifying this.

If there are no ways of verifying if the code is incompressible then I wonder what significance the verification has. The code performs well with regards to standard test cases and if I have an inlet and outlet the fluxes at those boundaries also cancel to machine precision.

What do you think?
without using the same discrete divergence operator you can not check for the divergence-free requirement...
Testing the mass conservation by integrating the fluxes along the boundary is a good indicator but does not ensure the local divergence constraint
FMDenaro is offline   Reply With Quote

Old   September 2, 2015, 03:29
Default
  #7
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
without using the same discrete divergence operator you can not check for the divergence-free requirement...
Testing the mass conservation by integrating the fluxes along the boundary is a good indicator but does not ensure the local divergence constraint
OK. Let me try to reformulate my question:

What happens if the divergence-free requirement is not satisfied locally?
Simbelmynė is offline   Reply With Quote

Old   September 2, 2015, 04:07
Default
  #8
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,764
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Simbelmynė View Post
OK. Let me try to reformulate my question:

What happens if the divergence-free requirement is not satisfied locally?
Div v is a term appearing in the kinetic energy equation as additional work, therefore you would get in the solution a spurious source of kinetic energy
FMDenaro is offline   Reply With Quote

Old   September 2, 2015, 04:30
Default
  #9
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
Div v is a term appearing in the kinetic energy equation as additional work, therefore you would get in the solution a spurious source of kinetic energy
I imagine that this spurious source would affect the solution. Do we have any test case that certainly would produce a poor solution (or even better - divergence in the linear solver) if such spurious sources are indeed present?
Simbelmynė is offline   Reply With Quote

Old   September 2, 2015, 04:42
Default
  #10
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,764
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Simbelmynė View Post
I imagine that this spurious source would affect the solution. Do we have any test case that certainly would produce a poor solution (or even better - divergence in the linear solver) if such spurious sources are indeed present?

generally, you have to check for papers based on the approximate projection method where the divergence-free constraint is quite relaxed, being satisfied only up to the magnitude of the local truncation error.

The effect of such source term can be relevant in simulation of turbulence where you can have effects in the energy spectrum. You can also find in literature reported cases where the spurious production of kinetic energy causes a numerical instability (long-time simulation)
FMDenaro is offline   Reply With Quote

Reply

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
[DesignModeler] simply model, empty box conquer ANSYS Meshing & Geometry 0 March 28, 2014 18:26
Black Box Algebraic Multigrid Neazen Main CFD Forum 0 June 4, 2007 07:10
Junction Box Anil CFX 2 June 27, 2006 10:18
Immersol Simulation of a Heated Box Dong Phoenics 0 March 2, 2006 21:20
Convergence Tudi Xiao Main CFD Forum 4 July 2, 1999 16:33


All times are GMT -4. The time now is 19:10.