HiFiLES / HiFiLES-solver

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

input file of sd7003 case #70

Closed popstar0426 closed 9 years ago

popstar0426 commented 9 years ago

Hi:

I try to do a simulation of the flow around airfoil sd7003. There is always a NAN residual error. Is there any update of the example of sd7003? Or could you make a input file of it?

Best regards!

mlopez14 commented 9 years ago

When is the NaN occurring? What time step are you using? What is the size of the smallest cell? What Reynolds and Mach numbers are you running? What polynomial degree are you using? What types of elements are in your grid?

At the moment we're focusing on improving stability and making it easier to recover from NaNs. We could guide you through the process of getting the wing section case to run; you could then write the tutorial for it. What do you think?

popstar0426 commented 9 years ago

Hi: I am really glad to do that. The mesh is shown with two pictures attached. The minimum cell size is 0.001c normal (y direction) to wall of wing section, and 0.004c in the streamwise (x) direction, 4 cells in spanwise direction (z direction (length 0.2c)).
sd7003 sd7003-1 Boundary conditions: Adiabat_Fix (wall), Cyclic(two planes in spanwise direction) and Char (farfield). Reynold number: 60000; Mach number: 0.2. polynomial degree: order 3; adv_type: 0 (Forward Euler) timestep :0.000001 (I have tried much smaller 10^-12) I used input file for cylinder flow with navier-stokes equations in testcases. So the elements are the same as the cylinder case. The simulation can be run for 67 steps. Then the NaN residual encountered (shown in figure below). sd7003-2

Best regards! Yue

mlopez14 commented 9 years ago

Thanks for all the info!

Try with the RK45 time-stepping method. adv_type 3

Forward Euler tends to be unstable for practical flows. It is unstable for pure advection, and has a very restrictive time-step for advection-diffusion. In the case of Navier-Stokes, forward Euler might be stable for highly dissipative flows (low Re). RK45 has a more lenient stability region.

popstar0426 commented 9 years ago

Hi: RK45 is not OK yet. The NaN residual shows again. The residuals are quite large at the beginning (above 1). This is quite different from testcases.

sd7003-3

Do you have any other suggestions?

Best regards!

mlopez14 commented 9 years ago

Have you tried decreasing the time-step with RK45?

popstar0426 commented 9 years ago

Hi: I have decrease the time-step to 10^-12. The simulation is still running with 4000 steps. However, the residuals are very large and increasing slowly. I do not think the result will converge. The time step is two small to implement in a simulation.

Best regards!

mlopez14 commented 9 years ago

It seems like the surface on the airfoil is being represented with linear elements. This could be causing singularities in the solution. Have you tried making the surface second order?

To check if this fix would let your simulation run, I would suggest using a polynomial of order 1 to represent the solution.

popstar0426 commented 9 years ago

I can not follow you now. How.can I control the representation of surface?

mlopez14 commented 9 years ago

In Gambit there is the option to make your elements quadratic. As seen in this website, you can make your hexahedral elements have 20 or 27 nodes.

Before re-meshing, I would suggest running the simulation with p = 1 to make sure there is no other problem. Let us know if p = 1 works (it should).

popstar0426 commented 9 years ago

Unfortunately, P =1 does not work. May be it is due to the mesh. The mesh is orginally made by Pointwise with fluent format. Then it is imported into Gambit with boundary settings. I tried to made a new mesh by Gambit directly. However, I am not familar with Gambit. It will take some time. Or could you make a small case of flow around wing section?

Best regards!

mlopez14 commented 9 years ago

This is very strange. I can only imagine then that there might be some element that is extremely small. What is the volume if the smallest element in your mesh?

If you output the solution at every time step you could see where the flow is going wrong (negative pressure or density). Where is it going wrong? At the boundaries or everywhere?

Would you mind sharing the contents of your input file? This unconditional NaNing happened to me once because the initial conditions did not match the inflow conditions. On Sun, Jul 5, 2015 at 5:59 PM popstar0426 notifications@github.com wrote:

Unfortunately, P =1 does not work. May be it is due to the mesh. The mesh is orginally made by Pointwise with fluent format. Then it is imported into Gambit with boundary settings. I tried to made a new mesh by Gambit directly. However, I am not familar with Gambit. It will take some time. Or could you make a small case of flow around wing section?

Best regards!

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

popstar0426 commented 9 years ago

Hi: I can share the mesh and the input file to you. Please download them by http://yunpan.cn/cQCrvqSgBS6IR The secret is 07a4.

Best regards! Yue

mlopez14 commented 9 years ago

Thanks! I have just downloaded them and I'll take a look at it when I have some free time.

mlopez14 commented 9 years ago

sd7003_100_iterations_dt_1e-5

There must be some minor error in your version of the code. I downloaded a fresh copy of HiFiLES, compiled it, and ran it with (a minor modification of) your input file, and the simulation ran until I stopped it. The image above shows the velocity magnitude after 1000 iterations, with a time-step of 1e-5, and p = 1.

What I would suggest you do is re-download HiFiLES and compile it again, and use the input file pasted below (note that the input values are now placed next to --not below-- the input variables).

Let us know how it goes! If this does work, you could then try increasing p while decreasing dt.

---------------------------- Solver parameters ---------------------------- // 0: Euler/Navier-Stokes, 1:Advection/Adv-Diffusion equation 0 viscous 1 riemann_solve_type 0 // 0: Rusanov, 1: Lax-Friedrich, 2: Roe vis_riemann_solve_type 0 ic_form 1 // 0: Isentropic Vortex, 1: Uniform flow, 2: Sine Wave test_case 0 // 0: Normal (doesn't have an analytical solution), 1:Isentropic Vortex, 2: Advection-Equation order 1 // Order of basis polynomials dt_type 0 CFL 0.5 dt 0.00001 n_steps 1000000000 adv_type 3 // 0: Forward Euler, 3: RK45 tau 1.0 pen_fact 0.5 ----------------------- Restart options ----------------------- restart_flag 0 restart_iter 2000000 n_restart_files 3 ----------------------- Mesh options ----------------------- mesh_file 3dsd7003.neu dx_cyclic 10000 dy_cyclic 10000 dz_cyclic 0.2 ----------------------------------- Monitoring, plotting parameters ----------------------------------- p_res 4 // Plotting resolution, number of nodes per direction write_type 0 // 0: Paraview, 1: Tecplot n_diagnostic_fields 0 inters_cub_order 6 // Order of cubature rule for integrating over element interfaces volume_cub_order 6 // Order of cubature rule for integrating over element volumes plot_freq 1000 restart_dump_freq 10000 monitor_integrals_freq 0 monitor_res_freq 1 monitor_cp_freq 100 // specify output frequency of file containing cp point values on surface. 0: no output. res_norm_type 1 // 0:infinity norm, 1:L1 norm, 2:L2 norm error_norm_type 1 // 0:infinity norm, 1:L1 norm, 2:L2 norm res_norm_field 0 // Density --------------------------- Wave Equation parameters --------------------------- wave_speed_x 1. wave_speed_y 0. wave_speed_z 0. lambda 1 // 1: upwind --------------------------- Element parameters --------------------------- upts_type_tri 0 fpts_type_tri 0 vcjh_scheme_tri 1 c_tri 0.0 sparse_tri 0 upts_type_quad 0 vcjh_scheme_quad 0 eta_quad 0.0 sparse_quad 0 upts_type_hexa 0 vcjh_scheme_hexa 0 eta_hexa 0. sparse_hexa 0 upts_type_tet 1 fpts_type_tet 0 vcjh_scheme_tet 0 eta_tet 0.0 sparse_tet 0 upts_type_pri_tri 0 upts_type_pri_1d 0 vcjh_scheme_pri_1d 0 eta_pri 0.0 sparse_pri 0 ------------------------------------ Fluid Parameters ------------------------------------ gamma 1.4 prandtl 0.72 S_gas 120. T_gas 291.15 R_gas 286.9 mu_gas 1.827E-05 ----------------------------------- Boundary conditions ----------------------------------- --------- Viscous --------- fix_vis 0. // 0: Sutherland's law, 1: Constant viscosity Mach_free_stream 0.2 nx_free_stream 1. ny_free_stream 0. nz_free_stream 0. Re_free_stream 60000 L_free_stream 1. T_free_stream 300 Mach_wall 0.0 nx_wall 1. ny_wall 0. nz_wall 0. T_wall 300 Mach_c_ic 0.2 nx_c_ic 1. ny_c_ic 0. nz_c_ic 0. Re_c_ic 60000 T_c_ic 300 ----------- Inviscid ----------- rho_c_ic 1.0 u_c_ic 1.0 v_c_ic 0.0 w_c_ic 0.0 p_c_ic 17.857142857142854098 rho_bound 1. u_bound 1.0 v_bound 0.0 w_bound 0.0 p_bound 17.857142857142854098

popstar0426 commented 9 years ago

Hi:

I down loaded a fresh copy of HiFiLES and succeeded in compiling it. The two testcases are run very well.

However there is error when I ran 3dSD7003 case? The error message shows "WARNING: UNable to assign value to option equation" Fatal error 'required option not set: equation 'at ../src/input.cpp:616

mlopez14 commented 9 years ago

Do you need help here or did you close the issue because you found a solution?

popstar0426 commented 9 years ago

I have found the solution.

popstar0426 commented 9 years ago

Hi: I added "turb_model = 1" in the input file. It showed "3D source term not implemented yet". What is the problem?

Best regards!

mlopez14 commented 9 years ago

That it may not be implemented in hexahedral elements yet.

popstar0426 commented 9 years ago

Do you mean the RANS model ("turb_model") can not implemented in hexahedral elements?

mlopez14 commented 9 years ago

No, I mean that it has not been implemented yet in 3d. On Tue, Jul 7, 2015 at 5:51 PM popstar0426 notifications@github.com wrote:

Do you mean the RANS model ("turb_model") can not implemented in hexahedral elements?

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

popstar0426 commented 9 years ago

How can I solve it?

popstar0426 commented 9 years ago

Hi:

I changed to LES with WALE SGS model. It can be run. Question: at the beginning, I did not specify any turb_model in the input file. What kind of simulation is it running? When I specify turb_model = 1, does the SA RANS model will be used? If I specify "LES 0", there is no SGS model used in the simulation. Does this mean a Implicit LES will be used?

Best regards!

mlopez14 commented 9 years ago

Correct, LES 0 it would be implicit LES, and turb_model = 1 would be SA RANS.

popstar0426 commented 9 years ago

If I did not specify any turb_model, does HiFiLES solve Navier-stokes equations directly? If the mesh is fine enough, is it a DNS simulation?

Best regards!

mlopez14 commented 9 years ago

Yes to both questions: HiFiLES solves the Navier-Stokes equations directly, and if the mesh is fine enough you have DNS.