T-Flows icon indicating copy to clipboard operation
T-Flows copied to clipboard

Program crashes if turbulence model in control file is none or dns

Open mhadziabdic opened this issue 4 years ago • 2 comments

Dear guys,

If we specify none in control file the program crashes due to this line in Main.f90 169 ! Compute deltas for Spalart-Allmaras models 170 call Turb_Mod_Calculate_Deltas(turb)

I suggest to move these two lines to Turb_Mod/Init.f90 like this 22 ! Compute deltas for Spalart-Allmaras and DES models 23 if(turbulence_model .eq. SPALART_ALLMARAS .or. & 24 turbulence_model .eq. DES_SPALART) then 25 call Turb_Mod_Calculate_Deltas(turb) 26 end if

If we specify dns in control file it crashes due to this line in Save_Results.f90

420 kin_vis_t(:) = 0.0 421 if(turbulence_model .ne. NO_TURBULENCE) then 422 kin_vis_t (-grid % n_bnd_cells:grid % n_cells) = & 423 turb % vis_t(-grid % n_bnd_cells:grid % n_cells) / & 424 flow % viscosity(-grid % n_bnd_cells:grid % n_cells) 425 call Save_Scalar(grid, IN_4, IN_5, "EddyOverMolecularViscosity", & 426 plot_inside, & 427 kin_vis_t(-grid % n_bnd_cells), f8, f9) 428 end if

Program also crashes if we use none or dns and try to collect statistics.

In addition, user function Force has grid argument and there should be flow.

mhadziabdic avatar Mar 20 '20 07:03 mhadziabdic

I will work on this in the afternoon.

Niceno avatar Mar 20 '20 08:03 Niceno

I can't reproduce these issues. I cloned the T-Flows, stayed in development_branch. I took the case from Tests/Laminar/Backstep/Nonorthogonal and all works fine.

Furthermore, if I check User_Mod/Force.f90, it starts as:

subroutine User_Mod_Force(grid, ui, a_matrix, b_vector)

It is called from Compute_Momentum.f90 as:

call User_Mod_Force(grid, ui, a, b)

which looks the same to me.

Could you tell exactly which case did you run when you encountered problems? Are you sure you were in development_branch?

Niceno avatar Mar 20 '20 12:03 Niceno