HiFiLES / HiFiLES-solver

High Fidelity Large Eddy Simulation Solver
Other
172 stars 131 forks source link

Questions about the error when I ran my own case of naca0012 #67

Closed javierchang closed 9 years ago

javierchang commented 9 years ago

Hi, I have used Gambit to generate a mesh of naca0012 (2D) for sake of validation. The airfoil is surrounded by a strutured mesh and outside to the farfield boundary, it is filled with unstructured mesh. The outside boundary is rectangular, with the boundary condition 'Sub_In_Simple' 'Sub_Out_Simp' 'Char' and 'Isotherm_Fix'. And the freestream condition is Re=10000, Ma=0.2,AOA=4 deg.

But when I run the case, an error occured, with information displayed below: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% setting element transforms ... at solution points 0.00% 9.99% 19.98% 29.98% 39.97% 49.96% 59.95% 69.95% 79.94% 89.93% 99.92% at flux points 0.00% 9.99% 19.98% 29.98% 39.97% 49.96% 59.95% 69.95% 79.94% 89.93% 99.92% at solution points 0.00% 10.00% 20.00% 30.00% 40.00% 50.00% 60.00% 70.00% 80.00% 90.00% at flux points 0.00% 10.00% 20.00% 30.00% 40.00% 50.00% 60.00% 70.00% 80.00% 90.00% done. initializing grid velocity to 0 ... done. setting element transforms at interface cubpts ... done. setting element transforms at volume cubpts ... Setting initial conditions... Writing Tecplot file number 0 on rank 0 Done writing Tecplot file number 0 ....

Fatal error 'NaN in residual, exiting.' at ../src/eles.cpp:1634 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

So I am confused and I really don't know where I go wrong. Is the problem about the mesh itself or some setting? But I am really not sure. So I need some help regards this problems so that I could know how to fix it. Best regards Javier Chang

mlopez14 commented 9 years ago

Javier,

This is likely being caused by a value of dt (time step) that is too large. Let us know if the simulation runs by reducing this value. On Sat, Jun 13, 2015 at 7:51 PM javierchang notifications@github.com wrote:

Hi, I have used Gambit to generate a mesh of naca0012 (2D) for sake of validation. The airfoil is surrounded by a strutured mesh and outside to the farfield boundary, it is filled with unstructured mesh. The outside boundary is rectangular, with the boundary condition 'Sub_In_Simple' 'Sub_Out_Simp' 'Char' and 'Isotherm_Fix'. And the freestream condition is Re=10000, Ma=0.2,AOA=4 deg.

But when I run the case, an error occured, with information displayed below: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% setting element transforms ... at solution points 0.00% 9.99% 19.98% 29.98% 39.97% 49.96% 59.95% 69.95% 79.94% 89.93% 99.92% at flux points 0.00% 9.99% 19.98% 29.98% 39.97% 49.96% 59.95% 69.95% 79.94% 89.93% 99.92% at solution points 0.00% 10.00% 20.00% 30.00% 40.00% 50.00% 60.00% 70.00% 80.00% 90.00% at flux points 0.00% 10.00% 20.00% 30.00% 40.00% 50.00% 60.00% 70.00% 80.00% 90.00% done. initializing grid velocity to 0 ... done. setting element transforms at interface cubpts ... done. setting element transforms at volume cubpts ... Setting initial conditions... Writing Tecplot file number 0 on rank 0 Done writing Tecplot file number 0 ....

Fatal error 'NaN in residual, exiting.' at ../src/eles.cpp:1634 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

So I am confused and I really don't know where I go wrong. Is the problem about the mesh itself or some setting? But I am really not sure. So I need some help regards this problems so that I could know how to fix it. Best regards Javier Chang

— Reply to this email directly or view it on GitHub https://github.com/HiFiLES/HiFiLES-solver/issues/67.

javierchang commented 9 years ago

Dear Lopez, My initial time step setting is 1e-4, then follow your suggestion, I switched it to 1e-6 and I can run it for several iterations but still soon the same problems occured. So have to keep reducing the timestep to 1e-8 and it turns out I can run it now. But convergence is really slow and I notice that the residual is roughly of the magnitude of 100-1000,which drops really slow, so even after 10000 iterations, I open the tecplot file to check the flow field and find that all the variable(like pressure and rho) is still constant. So is there any way that I can increase the time step so that I can increase the convergence speed? Meanwhile, what is the general requirement for the mesh since the mesh quality affects a lot and I can use as a criteria when I am generating mesh.

JacobCrabill commented 9 years ago

Hi Javier,

Since we are using explicit time-stepping, in general, the size of the smallest element in the mesh determines the maximum time step that can be taken (see this article on the CFL condition if you're not familiar with it). Additionally, with high-order methods, the quality of the mesh also plays a large role, as highly skewed elements can lead to instabilities in the numeric. In your case though, it seems to be the former rather than the latter; unfortunately, without implicit time-stepping, the only way for you to increase your time-step limit is to increase the size of the smallest element(s) in your mesh.

As for general meshing requirements for viscous flows, others may add some comments here, but usually a good rule of thumb is to have ~30 points in the boundary layer to fully resolve it, and then progressively expand the mesh outside the boundary layer.

Hope that helps, Jacob

javierchang commented 9 years ago

Dear Jacob Crabill, Thanks for your tips and help. Previously, I specified the exact 'dt' in the input file. Now I have altered to prescribing the 'CFL number' in the input file and it works well, without the problem of 'NaN in residuals' arising. As for the mesh, I plan to run more cases and make some comparison to determine some more rules I can follow in generating mesh. Best regards Javier Chang

JacobCrabill commented 9 years ago

Glad to hear you got your case running - just be forewarned that, for viscous cases at least, the CFL-based dt calculated in the code isn't perfect (a 'good' time step estimate doesn't really exist for viscous flows, especially for high-order methods).

If you run any interesting cases in the future, feel free to share your experience / results with the HiFiLES dev list!