su2code / SU2

SU2: An Open-Source Suite for Multiphysics Simulation and Design
https://su2code.github.io
Other
1.33k stars 843 forks source link

Minor mesh deformation causing negative volumes #1026

Closed auzbaig closed 4 years ago

auzbaig commented 4 years ago

case728.txt

I am running a shape optimization of a single blade row stator with an FFD box of degree (5 , 11, 2). The max deformation is of the order 1E-5. The change in mesh visually is very minimal but after SU2 deforms the mesh it generates negative volumes and a negative Jacobian. It is also happening if I use only one DV in the optimization. As a result my DSN_002 DIRECT results are all diverging.

In the image, the red box is the deformed box and the green one is the undeformed box. You can also see the blade. The number of nodes are just shy of 1 million in the whole volume mesh.

untitled

SU2 mesh stats for DSN001: Computing mesh quality statistics for the dual control volumes. +--------------------------------------------------------------+ | Mesh Quality Metric| Minimum| Maximum| +--------------------------------------------------------------+ | Orthogonality Angle (deg.)| 52.4241| 89.9962| | CV Face Area Aspect Ratio| 1.02662| 2123.48| | CV Sub-Volume Ratio| 1.00007| 3.63253| +--------------------------------------------------------------+

SU2_mesh stats for DSN002: Computing mesh quality statistics for the dual control volumes. +--------------------------------------------------------------+ | Mesh Quality Metric| Minimum| Maximum| +--------------------------------------------------------------+ | Orthogonality Angle (deg.)| -42.6863| 89.9963| | CV Face Area Aspect Ratio| 1.02903| 31868.8| | CV Sub-Volume Ratio| 1.00034| 40627.1| +--------------------------------------------------------------+

From Tecplot I can calculate that the cell volumes and the Jacobian is also negative for DSN002 for some cells.

I believe if I reduce my OPT_RELAX_FACTOR I can have deformations of the O(-6) but isn't this already too small. Are there any parameters I can change in the config file to avoid this issue?

pcarruscag commented 4 years ago

There are certainly parameters in the config, and if you had posted yours I could give advice without having to write a bloody essay on all of them.

DEFORM_STIFFNESS_TYPE= WALL_DISTANCE // always DEFORM_COEFF= "nu" // the Poisson ratio, default 1E6, you can also try a small value 0.2-0.3 DEFORM_LIMIT= "R" // clamps domain points with wall distance greater than "R", this improves the condition of the stiffness matrix, which makes it easier for the linear solver to converge. DEFORM_CONSOLE_OUTPUT= YES // so you can see if the linear solver converges DEFORM_NONLINEAR_ITER= 1 // always DEFORM_LINEAR_SOLVER = FGMRES // or CONJUGATE_GRADIENT if memory becomes a problem, i.e. if GMRES does not converge in 100-200 iterations. DEFORM_LINEAR_SOLVER_PREC = ILU // always, always, never anything else. DEFORM_LINEAR_SOLVER_ERROR= 1e-9 // at least, I usually set it to 1e-10 DEFORM_LINEAR_SOLVER_ITER= 200 // or a much larger number when using CG since its memory usage does not depend on number of iterations

auzbaig commented 4 years ago

Thanks Pedro for the description of all these!

I was using the default value for most of them. I tried increasing the DEFORM_LINEAR_SOLVER_ITER but that did not have any effect. Probably will try using DEFORM_COEFF and DEFORM_LIMIT to see if that has an effect.

I have also attached the config file for future reference.

auzbaig commented 4 years ago

I figured out the issue. It looks an issue at the first layer of the boundary mesh. Here is what the negative volume looks like at the shroud:

neg-volumes2

There are a total of 30 negative volumes for this case and all of them are on the airfoil section at the boundary layer of the shroud wall (indicated by a +):

neg-volumes

With a DV = 1E-5 or small, this issue does not occur.

This deformation was with only one DV near the shroud. So its effect on shroud are prominent. It was also over the top side of the blade, where you see all the negative volumes.

To alleviate this issue I included the hub and the shroud in the deformation markers (after some change in markers) and now it can take any deformation without negative volumes:

def-1E3FULL