code-saturne / code-saturne/code_saturne

Bug: Symmetric tensor diffusivity

Open
#64 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
307
Forks
102
PR merge metrics
No merged PRs in 30d

Description

The combination of `turb_model->iturb = CS_TURB_NONE;` and `iturt(iscalt) = 10` (i.e. GGDH) leads to a segfault. I would expect the code to ignore `iturt` for laminar flow so the user can simply change one parameter when switching on the turbulence model. IMO, we should at least throw a warning that the settings are incompatible, rather than segfault.

It seems the issue stems from `cpltur.f90` where a test for GGDH leads to an assumption of a symmetric tensor diffusivity for the thermal variable, when in reality the diffusivity is a scalar (my settings have diffusivity as variable in space and time, if it makes a difference).

Contributor guide

Open the contributing guide

Research direction

Start in cpltur.f90 and reproduce the segfault with CS_TURB_NONE and iturt(iscalt)=10, including the variable-in-space-and-time diffusivity setting. Trace the GGDH branch for the thermal variable and compare its symmetric-tensor assumption with the laminar scalar case. Done means the incompatible settings no longer segfault and are either safely ignored or reported with a warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
fortran
Domain
hpc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.