
[Sponsors] 
Poor mesh quality with inflation and 2D approximation 

LinkBack  Thread Tools  Search this Thread  Display Modes 
May 31, 2023, 06:40 
Poor mesh quality with inflation and 2D approximation

#1 
New Member
Join Date: Dec 2022
Posts: 29
Rep Power: 3 
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 zthickness of 1 element with a length equal to approximately 10 times the first layer thickness (I read I should use a zthickness equal to the smallest element size, but using a zthickness 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 zdirection: 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 timeaccurate? 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 nondimensional 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! 

May 31, 2023, 18:48 

#2 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,771
Rep Power: 143 
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 CFXMesh 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 35 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 selfsimilar 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. 

May 31, 2023, 19:22 

#3 
Member
Ashkan Kashani
Join Date: Apr 2016
Posts: 46
Rep Power: 10 
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. 

June 9, 2023, 05:44 

#4 
New Member
Join Date: Dec 2022
Posts: 29
Rep Power: 3 
Thanks a lot for the feedback! I upgraded to 2023, so it took me some time to reply.
Before trying to convince the CFXMesh 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 zdirection, 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 zthickness 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? 

June 9, 2023, 05:52 

#5 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,771
Rep Power: 143 
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 35 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. 

June 9, 2023, 06:25 

#6 
New Member
Join Date: Dec 2022
Posts: 29
Rep Power: 3 
Thanks, I will do so.
Attached image is what I meant with increasing the zthickness (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 nearplate quality. Could you give a guideline for the allowed inflation layer cell AR? 

June 9, 2023, 06:45 

#7 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,771
Rep Power: 143 
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. 

June 9, 2023, 09:00 

#8 
New Member
Join Date: Dec 2022
Posts: 29
Rep Power: 3 
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.7641E02 Minimum Extent = 3.0000E05 Maximum Extent = 1.1000E+00 Density = 1.1850E+00 Dynamic Viscosity = 1.8310E05 Velocity = 4.3101E+01 Advection Time = 6.4131E04 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 1e5 Timestep update freq = 1 Initial timestep 0.001 Max timestep 1e10 Min timestep 1e10 Target max loops 5 Target min loops 3 

June 9, 2023, 11:43 

#9 
New Member
Join Date: Dec 2022
Posts: 29
Rep Power: 3 
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 e4 [s] Wouldn't that be a good estimation for maximum step size? 

June 9, 2023, 19:58 

#10 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,771
Rep Power: 143 
I suspect your initial time step is too big. Try a smaller initial time step with adaptive time stepping. Your 1e4s 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. 

Thread Tools  Search this Thread 
Display Modes  

