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

Poor mesh quality with inflation and 2D approximation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 31, 2023, 06:40
Default Poor mesh quality with inflation and 2D approximation
  #1
New Member
 
Join Date: Dec 2022
Posts: 29
Rep Power: 3
jaxk is on a distinguished road
Hey, I have some questions about my CFX simulation. I tried to do as much research on my own, but some help would be very much appreciated. I hope I gave all the relevant information.

I am doing a steady state analysis of a vertical thin plate in CFX, and I am performing a sensitivity analysis to find the drag coefficient at Re = 1.5E5.
I am using a structured mesh including an inflation layer. I want to do a 2D approximation first, so I use a z-thickness of 1 element with a length equal to approximately 10 times the first layer thickness (I read I should use a z-thickness equal to the smallest element size, but using a z-thickness equal to the first layer thickness results in an error in the design modeler).

The mesh with the mesh quality can be seen in the attachments.

The settings I used are:
Fluid: air; velocity: 57 m/s; Inflation first layer thickness: 0.00000515 (y+ approx. 1); grids in z-direction: 1; Auto timescale: 0.00017 s; Number of elements: 28800 (all Hexahedra); Turbulence model: SST;

The value of Cd over time can be seen in the last attachment.

Q0: Can anyone provide me with some general feedback on my mesh/settings?
Q1: Can I avoid the poor mesh quality when using inflation in combination with a 2D approximation?
Q2: The oscillating Cd value I see is because of vortex shedding. If I want to find the Strouhal number, should I switch to transient analysis because the steady state solution is not time-accurate? Or can I take the vortex frequency from the oscillating Cd value of my steady state results?
Q3: When selecting the auto timescale the timestep size used is 0.00017 s. Are there guidelines for upper/lower boundaries for times step sizes I should try in my sensitivity analysis? For example using the non-dimensional time step Δt*U/c? (with c the chord length or height of the plate)
Q4: I am using air as the fluid so I need air velocity of 57 m/s to reach Re=1.5E5. I know Courant number is not important for the implicit CFX solver, but would it help to switch to water in combination with lower flow velocities to find the drag coefficient of the plate? Could I then use larger timesteps?

Thanks in advance for any feedback!
Attached Images
File Type: png mesh1.png (54.8 KB, 21 views)
File Type: png mesh2.png (84.3 KB, 29 views)
File Type: png mesh3.png (54.7 KB, 23 views)
File Type: png mesh4.png (11.4 KB, 16 views)
File Type: jpg results.jpg (97.0 KB, 14 views)
jaxk is offline   Reply With Quote

Old   May 31, 2023, 18:48
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,719
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Q0: I agree that your mesh is not good. I would consider just doing a inflation + tri mesh, extruded to give a 2D mesh.
Q1: Yes, I would consider just doing a inflation + tri mesh, extruded to give a 2D mesh. It can be difficult to convince CFX-Mesh to give meshes like this so consider doing it in ICEM. But it should be able to be done in both with careful setup.
Q2: Yes, the periodic behaviour is likely to be vortex shedding. No, you cannot use a steady state run to get any information about the transient behaviour, you need a proper transient simulation. The steady state simulation does not include several transient terms so is not modelling the full transient equations.
Q3: I assume you are talking about a transient simulation here. Time step size in steady state simulations is only useful for obtaining convergence and doing time step convergence studies on the time step size is not meaningful. When you do a transient simulation I recommend using adaptive time stepping, homing in on 3-5 coeff loops per iteration. Make sure the upper and lower limits are wide enough you never hit them.
Q4: The simulation is likely to be self-similar on Reynolds number. So any fluid, run to conditions to give Re=1.5E5 with the fluid properties, fluid velocity and geometry size adjusted to give Re=1.5E5 will converge the same (within numerical tolerances). If the change in fluid then changes the Re then you are talking about a different flow regime and it will be harder or easier to converge depending on whether it is a simpler or more complex flow regime.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   May 31, 2023, 19:22
Default
  #3
Member
 
Ashkan Kashani
Join Date: Apr 2016
Posts: 46
Rep Power: 10
Ashkan Kashani is on a distinguished road
Hello. I'm not a pro (so treat my comments with caution) but I hope you find my comments helpful.
Regarding your mesh, I can see a big expansion between adjacent cells in some areas of your mesh. It would be better, in terms of stability and accuracy, to apply a smooth transition from small to large cells, especially close to the body. Try to avoid high aspect ratio cells, especially if the smaller dimension of the cell aligns with the flow dominant direction. It slows down the convergence, if not causing divergence. According to the ANSYS documentation, the extrusion length (for 2D simulation) should be in the order of the planar size of the smallest cells. Personally, I found large extrusion lengths to cause linear solver failure.
Regarding a steady or transient solution, I would choose a transient solution considering the inherent unsteadiness of the problem (stemming from the instability of the separated shear layer). I would set an adaptive timestep homing in on 3 to 5 coefficient loops per timestep, as recommended.
Regarding substituting air with water, yes it's possible, provided you do not miss an important effect by doing so (i.e. the only important dimensionless number in your case is the Reynolds number). For example, if the surface tension force is important, switching from air to water would not reproduce your expected flow. If your only concern is the Courant number, the adaptive timestepping should be able to take care of that automatically.
Ashkan Kashani is offline   Reply With Quote

Old   June 9, 2023, 05:44
Default
  #4
New Member
 
Join Date: Dec 2022
Posts: 29
Rep Power: 3
jaxk is on a distinguished road
Thanks a lot for the feedback! I upgraded to 2023, so it took me some time to reply.

Before trying to convince the CFX-Mesh to do what I want I should first understand what the mesh should look like. As suggested I have tried to make a tri mesh + inflation (using Sweep method to force the use of tri elements and 1 element in z-direction, Inflation to get the right y+ value and Edge sizing to capture the curve of the rounded edge).

The mesh quality near the plate seems alright and there are no very large aspect ratio (AR) cells. However, far away from the plate I allow the cells to become larger. As a result the aspect ratio increases and the mesh quality becomes poor.

It this something I can ignore? I believe I have 3 options:
1. Reduce max allowed cell size so entire domain has small cells (long simulation time)
2. Increase z-thickness so the AR of cells far away from plate become smaller, but AR of cells near plate get larger
3. Allow cells far away from plate to have a large AR.

I believe a combination of option 1 and 3 would be best. Are there guidelines for the maximum aspect ratio of the tri cells in this 2D approximation?
Is there a minimum element quality value I should aim for?
Attached Images
File Type: jpg mesh1.jpg (70.5 KB, 6 views)
File Type: png mesh2.PNG (89.8 KB, 9 views)
File Type: jpg mesh3.jpg (101.7 KB, 9 views)
File Type: png Mesh.PNG (27.7 KB, 3 views)
jaxk is offline   Reply With Quote

Old   June 9, 2023, 05:52
Default
  #5
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,719
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
I would think that mesh quality will work well for most single phase incompressible flows. You will probably require a better mesh if you are doing multiphase or shock wave simulations.

You said in the first post this is for incompressible vortex shedding simulations - so I think you are OK to proceed to a mesh sensitivity check now. You will need a transient simulation (with the time step size set by adaptive time stepping, homing in on 3-5 coeff loops per iteration) and see what drag coefficient you get. Then do another mesh with half the element edge length and repeat and compare the results. If the results are the same by a tolerance you are happy with then you have found the mesh required to get the accuracy you want. If not then refine by another factor of two and continue until you do get it to converge versus mesh size.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   June 9, 2023, 06:25
Default
  #6
New Member
 
Join Date: Dec 2022
Posts: 29
Rep Power: 3
jaxk is on a distinguished road
Thanks, I will do so.

Attached image is what I meant with increasing the z-thickness (I increased from 3e5 m to 1.5e4 m) which improves overall mesh quality at cost of mesh quality in inflation layer. The minimum mesh quality value improved from 0.00025 to 0.00126 by doing so. But I'm not sure if it's a good thing to improve overall quality at the expense of near-plate quality.

Could you give a guideline for the allowed inflation layer cell AR?
Attached Images
File Type: jpg zthickness15e3.jpg (100.6 KB, 6 views)
File Type: png zthickness3e5.PNG (105.4 KB, 6 views)
jaxk is offline   Reply With Quote

Old   June 9, 2023, 06:45
Default
  #7
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,719
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Again, there is no guideline. For most flows you can have quite a high AR in the inflation layers as the flow is aligned with the mesh and that means the high diffusion typical of high AR elements is mitigated. But some types of simulation are sensitive to it and you need to be more careful.

As I said in my previous post - I think your mesh is good enough quality to proceed.

Alternately, if you want to study the effect of mesh quality in your case then run those simulations and see which ones affect accuracy and which ones do not.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   June 9, 2023, 09:00
Default
  #8
New Member
 
Join Date: Dec 2022
Posts: 29
Rep Power: 3
jaxk is on a distinguished road
My results converge to a stable drag coefficient, but no vortex shedding takes place.
Shouldn't the adaptive time stepping change such that an appropriate Courant number (near 1) is found such that the vortex shedding can be captured?

At average scale information at the end of the run I see very high Courant numbers:

Average Scale Information |
+--------------------------------------------------------------------+

Domain Name : Default Domain
Global Length = 2.7641E-02
Minimum Extent = 3.0000E-05
Maximum Extent = 1.1000E+00
Density = 1.1850E+00
Dynamic Viscosity = 1.8310E-05
Velocity = 4.3101E+01
Advection Time = 6.4131E-04
RMS Courant Number = 3.5974E+04
Maximum Courant Number = 2.5257E+05
Reynolds Number = 7.7104E+04


I have min coeff loops on 1, max on 10.
RMS residual target on 1e-5
Timestep update freq = 1
Initial timestep 0.001
Max timestep 1e10
Min timestep 1e-10
Target max loops 5
Target min loops 3
jaxk is offline   Reply With Quote

Old   June 9, 2023, 11:43
Default
  #9
New Member
 
Join Date: Dec 2022
Posts: 29
Rep Power: 3
jaxk is on a distinguished road
I expect the Strouhal number to be roughly 0.13 for a thin plate normal to flow at high Reynolds number.

f = S * U / d = 0.13 * 57 [m/s] / 0.04 [m] = 185 Hz

period of vortex shedding = 1/f ~ 0.005 [s]

timestep needed about 1/50 of 0.005 [s], so 1.0 e-4 [s]

Wouldn't that be a good estimation for maximum step size?
jaxk is offline   Reply With Quote

Old   June 9, 2023, 19:58
Default
  #10
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,719
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
I suspect your initial time step is too big. Try a smaller initial time step with adaptive time stepping. Your 1e-4s estimate looks like a better place to start from.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks 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



All times are GMT -4. The time now is 11:52.