### Second-Order Temporal Discretization Except for Turbulence Model Equations

Posted:

**Fri May 17, 2024 3:00 am**Hi everyone,

I would like to use, where possible, a second-order temporal discretization for all relevant equations in an incompressible case with the DDES k-omega SST turbulence model. I understand that, in the case of this model, there is a restriction against using second-order time discretization for the k and omega equations. However, I would like to at least enable second-order time discretization for the other equations. I am using version 8.0.

I have tried various ways to achieve this, but I always encounter some failure or a warning indicating that some variables are being treated as first-order. Below is my latest attempt. The following code was added to cs_user_parameters.c:

I receive the following warning message:

What is still set as first-order time discretization that I could change to second-order? How do I change it in the code?

Thank you in advance.

I would like to use, where possible, a second-order temporal discretization for all relevant equations in an incompressible case with the DDES k-omega SST turbulence model. I understand that, in the case of this model, there is a restriction against using second-order time discretization for the k and omega equations. However, I would like to at least enable second-order time discretization for the other equations. I am using version 8.0.

I have tried various ways to achieve this, but I always encounter some failure or a warning indicating that some variables are being treated as first-order. Below is my latest attempt. The following code was added to cs_user_parameters.c:

Code: Select all

```
cs_time_scheme_t *t_sc = cs_get_glob_time_scheme();
//t_sc->time_order = 2; // it gets error for iturb=60 (k-omega SST)
t_sc->istmpf = 2;
t_sc->isno2t = 1;
t_sc->thetcp = 1/2;
int key_t_ext_id_t = cs_field_key_id("time_extrapolated");
cs_field_set_key_int(cs_field_by_name("density"), key_t_ext_id_t, 1);
```

I am also attaching the setup.log file.@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@

@ @@ WARNING: ADVANCED MODIFICATION FOR

@ ========,

@ velocity OF THE VARIABLE

@ THETAV.

@

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@

@

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@

@ @@ WARNING: ADVANCED MODIFICATION FOR

@ ========,

@ k OF THE VARIABLE

@ THETAV.

@

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@

@

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@

@ @@ WARNING: ADVANCED MODIFICATION FOR

@ ========,

@ omega OF THE VARIABLE

@ THETAV.

@

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@

@

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@

@ @@ WARNING : WHEN READING INPUT DATA

@ =========

@ CHOICE OF TIME-SCHEME

@

@ TIME-SCHEME FOR VELOCITY IS SECOND ORDER

@ (THETAV = 0.50E+00)

@ SOME TERMS ARE HOWEVER FIRST ORDER IN TIME WITH

@ THE FOLLOWING SETTINGS:

@

@ parameters ISTMPF ISNO2T ISTO2T IROEXT IVIEXT ICPEXT

@ Values entered 2 1 0 1 0 0

@

@ computation will go on.

@

@ Check the input data.

@

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

What is still set as first-order time discretization that I could change to second-order? How do I change it in the code?

Thank you in advance.