code-saturne / code_saturne

code_saturne public mirror
https://www.code-saturne.org
GNU General Public License v2.0
215 stars 80 forks source link

Fix detection of turbulent variables in GUI for default equation parameters #134

Closed mpigou closed 4 months ago

mpigou commented 4 months ago

In neptune_cfd mode, some turbulent variables are not detected as such. At IMFT this is in particular the case for covariance_qfp whose default scheme is SOLU whilst it should be set to the order_scheme_pressure_turbulence scheme (UPWIND) like for other turbulent variables:

image

The issue comes from the XML node name which in this case is covariance_qfp_1 and not just covariance_qfp.

I propose a fix to the _isTurbulenceVariable method where instead of checking for strict equality between the XML node name and the list of expected names for turbulent variables, I treat these expected names as possible prefixes and check if the names starts with any of these prefixes.

This correctly fixes the issue as now all turbulent variables have the expected scheme.

YvanFournier commented 4 months ago

Done in commit f5b78c3a.