CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

How to implement a sensitivity analysis for certain items

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 2 Post By ghorrocks
  • 1 Post By JuPa
  • 2 Post By ghorrocks

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 13, 2014, 22:50
Post How to implement a sensitivity analysis for certain items
  #1
New Member
 
Mason
Join Date: Sep 2014
Posts: 22
Rep Power: 12
Mason liu is on a distinguished road
Hi,
I have read lots of the Sensitivity Analysis of some items, e.g. mesh size, inflation layer parameters,,, in this forum. But I'm not very sure how to implement this analysis. In my view maybe like below. Please give your comments.



For the first layer thickness(correlated with Yplus) of inflation layer, if we want to do a sensitivity analysis we need to keep the other mesh parameters same and just change first layer thickness(maybe 1e-2mm, 5e-3mm, 1e-3mm,,,) to finish several simulation and see if results(especially the variable you concern, maybe Drag Force) varies obviously.
  1. If no big difference, then the analysis is finished and we think that results are independent of first layer thickness. We can use this thickness(maybe 5e-3mm) in future sensitivity analysis of other parameters.
  2. If varies obviously, then we need to do further analysis of first layer thickness with other values(maybe 5e-2mm,,5e-4mm).
All in all, we need to find a region of first layer thickness within which variable we concern varies little(Form a flat region as below picture), then we can take this region as final value in further simulation.

Sensitivity analysis.png

Is my understanding about sensitivity analysis right or proper? Thank you so much.
Mason liu is offline   Reply With Quote

Old   October 14, 2014, 00:24
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
I should write an FAQ to explain this idea more thoroughly.

The main problem with your description is that the whole concept assumes that the output parameter converges as the input parameter is refined. So coarse inputs (such as a coarse mesh) should give large changes as the input parameter is refined, fine inputs (such as a fine mesh) should give small changes as the input parameter is refined, and eventually the changes in input parameter result in changes in output parameter which is too small to see. Further refinement in the input parameter does not affect the output.

That is the ideal situation, some things which can cause headaches include:
* The sensitivities are coupled, so mesh refinement requires time step refinement and might also change you convergence criteria.
* You cannot refine the mesh too much as the simulation run time or memory requirements becomes too large
* Effects such as numerical round-off means you cannot refine the mesh or time step too far either

This is a very simple outline of it. This reference goes into more detail: http://journaltool.asme.org/Template...umAccuracy.pdf and the text book "Computational Fluid Dynamics" by Roache is the seminal textbook on CFD accuracy, so is definitely worth a read if you want a thorough understanding of it.
camposrf and Mason liu like this.
ghorrocks is offline   Reply With Quote

Old   October 14, 2014, 02:39
Default
  #3
New Member
 
Mason
Join Date: Sep 2014
Posts: 22
Rep Power: 12
Mason liu is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
I should write an FAQ to explain this idea more thoroughly.
Thank you. This would be really great for us.

Quote:
Originally Posted by ghorrocks View Post
That is the ideal situation, some things which can cause headaches include:
OK, you have given me a good clarification of sensitivity analysis, yes this is the ideal situation.

Quote:
Originally Posted by ghorrocks View Post
This is a very simple outline of it. This reference goes into more detail: http://journaltool.asme.org/Templates/JFENumAccuracy.pdf and the text book "Computational Fluid Dynamics" by Roache is the seminal textbook on CFD accuracy, so is definitely worth a read if you want a thorough understanding of it.
Thank you, I'm trying to find this book's pdf edition for convenient read.
Mason liu is offline   Reply With Quote

Old   October 14, 2014, 03:12
Default
  #4
New Member
 
Mason
Join Date: Sep 2014
Posts: 22
Rep Power: 12
Mason liu is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
I should write an FAQ to explain this idea more thoroughly.
Hi, Glenn, thank you. Another question.

Is it acceptable that last cell thickness in inflation layer is very small than nearby tetra element size? Like below picture, I know that mesh in (B) is obviously good, but sometimes it's really hard to realize this expansion ratio. And my question is that 'mesh in (A) is acceptable???' Thanks a lot.

mesh.jpg
Mason liu is offline   Reply With Quote

Old   October 14, 2014, 05:57
Default
  #5
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Case B is preferable. But whether A is acceptable will depend on what you are modelling. Different models have different sensitivities to mesh quality. The best thing to do here is to do a sensitivity study on this parameter (the ratio of the element size from the tets to the first prism layer) and see if it makes a difference in your case.
ghorrocks is offline   Reply With Quote

Old   August 10, 2017, 23:10
Default Is my mesh good enough?
  #6
New Member
 
Fernando
Join Date: Apr 2013
Posts: 15
Rep Power: 13
camposrf is on a distinguished road
Thanks ghorrocks for helping everyone.

I was applying those criteria but I did not know that this procedure had a name. I found this article for FEA simulation that complements your idea:

https://caeai.com/blog/how-do-i-know...sh-good-enough

Quote:
Originally Posted by Steven Hale at caeai.com;
(...) Meshes that are "good enough" are ones that produce results with an acceptable level of accuracy, assuming that all other inputs to the model are accurate. (...)

(...) One of the ways to evaluate the quality of your mesh (and a model overall) is to compare results to test data or to theoretical values. (...)

(...) The most fundamental and accurate method for evaluating mesh quality is to refine the mesh until a critical result, such as the maximum stress in a specific location converges (i.e. it doesn’t change significantly with each refinement) (...)

(...) Another option is to evaluate the magnitude of stress discontinuity between adjacent elements in the critical region. (...)
I start the simulation with a very coarse mesh and a poor residuals convergence, just looking for potential errors; Most of them are simple errors that I could have noticed before running the simulation. Many times I ran the simulation and had to wait a lot of time to discover in the post processing that I had done something wrong in the data loading process (it is very frustrating). Then when everything looks fine I try to refine the mesh in the critical areas where I need the information and improve the convergence. If the result overall makes sense then I put a little nodes more, if the result is pretty similar to the previous one I stop simulating.

At the beginning, I though that CFX meshing software had some hidden command to evaluate the mesh.
camposrf is offline   Reply With Quote

Old   August 14, 2017, 08:13
Default
  #7
Senior Member
 
JuPa's Avatar
 
Mr CFD
Join Date: Jun 2012
Location: Britain
Posts: 361
Rep Power: 15
JuPa is on a distinguished road
In the .out file you can see the mesh statistics, which are measured by:
OK
ok
!

OK - this is good
ok - this is "okay" but can be improved if needed
! - this needs attention
camposrf likes this.
JuPa is offline   Reply With Quote

Old   August 14, 2017, 08:21
Default
  #8
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Thanks Mr CFD, it is good to mention those quality measures.

Note that these mesh quality measures (and in fact any mesh quality measures) need to be considered against the simulation you are doing. For instance if you are doing a simple simulation - maybe a single phase flow at low Reynolds number - then lots of "!" mesh quality elements is still going to be fine. But if you are doing surface tension simulations then any elements which are out of the "OK" zone will cause problems.

So a mesh which is good for one type of simulation might not be good for another. So mesh metrics are just a guide.
JuPa and camposrf like this.
ghorrocks is offline   Reply With Quote

Old   August 14, 2017, 15:35
Default Mesh statistics measure
  #9
New Member
 
Fernando
Join Date: Apr 2013
Posts: 15
Rep Power: 13
camposrf is on a distinguished road
Quote:
Originally Posted by JuPa View Post
In the .out file you can see the mesh statistics, which are measured by:
OK
ok
!

OK - this is good
ok - this is "okay" but can be improved if needed
! - this needs attention
Thanks JuPa.

Is it the same notation for CFX 5?

Did you mean the red words in the following extract of the output file?

If your answer is yes. what is the meaning of "**" and "F"?

I have no "!" in this file, so I guess "**" and "F" means this needs attention

================================================== ====================
OUTER LOOP ITERATION = 1 CPU SECONDS = 2.298E+01
----------------------------------------------------------------------
| Equation | Rate | RMS Res | Max Res | Linear Solution |
+-------------------+------+---------+---------+--------------------+
| U-Mom-Air at 25 C | 0.00 | 3.9E-06 | 9.3E-05 | 4.6E+00 F |
| V-Mom-Air at 25 C | 0.00 | 3.8E-06 | 8.8E-05 | 6.1E+00 F |
| W-Mom-Air at 25 C | 0.00 | 1.6E-02 | 1.7E+00 | 1.8E+00 F |
| U-Mom-Water | 0.00 | 2.4E-05 | 1.2E-03 | 4.4E+00 F |
| V-Mom-Water | 0.00 | 2.2E-05 | 1.3E-03 | 5.2E+00 F |
| W-Mom-Water | 0.00 | 2.4E-01 | 6.3E+01 | 1.2E+00 F |
| P-Vol | 0.00 | 7.5E-10 | 1.1E-07 | 17.2 2.6E-01 ok|
+----------------------+------+---------+---------+------------------+
| Mass-Air at 25 C | 0.00 | 1.1E-01 | 3.9E-01 | 10.7 1.7E-03 OK|
| Mass-Water | 0.00 | 9.9E-02 | 3.1E-01 | 10.6 2.5E-03 OK|
+----------------------+------+---------+---------+------------------+

================================================== ====================
OUTER LOOP ITERATION = 2 CPU SECONDS = 1.134E+02
----------------------------------------------------------------------
| Equation | Rate | RMS Res | Max Res | Linear Solution |
+----------------------+------+---------+---------+------------------+
| U-Mom-Air at 25 C |99.99 | 3.0E-03 | 3.5E-02 | 4.5E-02 OK|
| V-Mom-Air at 25 C |99.99 | 2.7E-03 | 3.3E-02 | 4.7E-02 OK|
| W-Mom-Air at 25 C |72.43 | 1.2E+00 | 7.5E+00 | 5.9E-04 OK|
| U-Mom-Water |99.99 | 8.5E-03 | 2.5E-01 | 6.4E-02 OK|
| V-Mom-Water |99.99 | 7.6E-03 | 2.4E-01 | 6.5E-02 OK|
| W-Mom-Water |12.06 | 3.0E+00 | 1.9E+01 | 6.6E-04 OK|
| P-Vol |99.99 | 6.4E-03 | 7.7E-01 | 9.1 8.0E-02 OK|
+----------------------+------+---------+---------+------------------+
| Mass-Air at 25 C | 0.39 | 4.2E-02 | 3.8E-01 | 10.6 1.1E-03 OK|
| Mass-Water | 0.70 | 6.9E-02 | 4.3E-01 | 10.6 1.3E-03 OK|
+----------------------+------+---------+---------+------------------+

| W-Mom-Water | 0.00 | 2.4E-01 | 6.3E+01 | 1.2E+00 F |
| P-Vol | 0.00 | 7.5E-10 | 1.1E-07 | 17.2 2.6E-01 ok|
| U-Mom-Air at 25 C |99.99 | 1.2E-05 | 2.6E-03 | NaN ok |
| U-Mom-Air at 25 C | 0.14 | 1.8E-06 | 3.0E-04 | NaN ** |
| Mass-Air at 25 C | 2.49 | 2.0E-02 | 1.0E+00 | 10.4 1.8E-02 OK|
camposrf is offline   Reply With Quote

Old   August 14, 2017, 20:04
Default
  #10
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Same notation as CFX-5 - Yes. But that is very old, I hope you are not using CFX5, it is very superseded now.

What you have shown here is different. You are showing the convergence of the linear solver. OK means the linear solver converged OK, "ok" means it converged but only just, F means it failed to converge but did not diverge massively, and the other symbols mean you may have a problem.

This is discussed in more detail in the CFX documentation.
ghorrocks is offline   Reply With Quote

Old   August 17, 2017, 09:46
Default CFX documentation
  #11
New Member
 
Fernando
Join Date: Apr 2013
Posts: 15
Rep Power: 13
camposrf is on a distinguished road
Thanks ghorrocks!

Quote:
Originally Posted by ghorrocks View Post
Same notation as CFX-5 - Yes. But that is very old, I hope you are not using CFX5, it is very superseded now.
Bad news! I am using it! Is the faster version I can use in my old PC. I already try 14.5 but it creates a lot of files and runs slow, I mean opening windows and these stuffs. Running the solver, it runs as fast as the version 10.

Quote:
Originally Posted by ghorrocks View Post
(...) What you have shown here is different. You are showing the convergence of the linear solver. (...)
I guess that, All the *.out files generated by cfx solver in my working folder says the same. I did not find any "mesh statistics", but the convergence report.


Quote:
Originally Posted by ghorrocks View Post
(...) This is discussed in more detail in the CFX documentation. (...)
Do you remmember the especific PDF help file? I found this "Pre_SolverControl.pdf" but I did not see anything about mesh statistics.
camposrf 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
Sensitivity Analysis - Grids Not Asymptotic Marc FLUENT 2 November 8, 2017 07:35
questions about sensitivity analysis and adaptive timestep sjtusyc CFX 10 June 21, 2012 10:24
Grid sensitivity analysis darookie CFX 2 August 25, 2009 10:00
What exactly is a sensitivity analysis? Josh CFX 3 August 19, 2009 10:18
sensitivity analysis Silvia FLUENT 1 November 3, 2005 05:48


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