Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mhadziabdic opened this issue Mar 20, 2020 · 2 comments
Open
Assignees

Comments

@mhadziabdic
Copy link
Collaborator

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.

@Niceno
Copy link
Collaborator

Niceno commented Mar 20, 2020

I will work on this in the afternoon.

@Niceno Niceno self-assigned this Mar 20, 2020
@Niceno
Copy link
Collaborator

Niceno commented Mar 20, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants