Page 2 of 2

Re: URANS in code_saturne

Posted: Wed Feb 19, 2025 4:43 pm
by Yvan Fournier
Hello,

Yes, v8.3 is missing the features for this, though you could do a time average of the matching field ("boundary_forces", which is intensive, i.e. a total force per face and not per unit surface), and divide each final value by its surface.

In v9.0 beta, we have just changed this, so that stresses are computed directly as a field (and also added the possibility of doing time averages over cs_function_t definitions). So v9.0 veta could be a better choice here (it is still quite similar to v8.3, and we are currently preparing for validation and fixing bugs, with fixes applied to both versions).

Best regards,

Yvan

Re: URANS in code_saturne

Posted: Thu Feb 20, 2025 2:17 am
by StandardRANSUser001
Hi Yvon,

This is great to hear about this included functionality. I will avoid CS9.0 Beta, as I am not able to dedicate the time to resolving bugs and such at the moment, but I would be happy to port this functionality back to 8.3 if you update the git?

If you are already calculating shear-stress, would there be an option to also include skin-friction (Cf) as a field as well? This is very handy to have for research codes, and very tricky to calculate for 3D, unstructured geometries. If you have all the fields in the solver at run time, this would be a fantastic addition to CS 9.0. :)

Best regards,
Sean Hanrahan

Re: URANS in code_saturne

Posted: Mon Feb 24, 2025 9:59 am
by StandardRANSUser001
Dear Yvon,

I have tried to extract some more time-averaged fields in the methodology that you have suggested.

The fields that are of interest are:
  • algo:gradient_velocity
  • algo:gradient_pressure
  • algo:rij_production
  • algo:rij_pressure_strain_correlation
The time-averaged pressure-strain tensor, and the production tensor seem correct, however, no values are written in the time-averaged velocity gradient or pressure gradient fields. These fields are empty when I view them in paraview.

Could you please reccomend what I can do to fix this?

I am currently running this in CS 8.3.

Best regards,
Sean Hanrahan

Code: Select all

void
cs_user_time_moments(void)
{
{
    int moment_f_id[] = {cs_field_by_name("algo:rij_production")->id};
    int moment_c_id[] = {-1};
    cs_time_moment_define_by_field_ids("algo:rij_production_mean",
                                       1,
                                       moment_f_id,
                                       moment_c_id,
                                       CS_TIME_MOMENT_MEAN,
                                       1, /* nt_start */
                                       -1,   /* t_start */
                                       CS_TIME_MOMENT_RESTART_AUTO,
                                       nullptr);
  }
{
    int moment_f_id[] = {cs_field_by_name("algo:gradient_pressure")->id};
    int moment_c_id[] = {-1};
    cs_time_moment_define_by_field_ids("algo:gradient_pressure_mean",
                                       1,
                                       moment_f_id,
                                       moment_c_id,
                                       CS_TIME_MOMENT_MEAN,
                                       1, /* nt_start */
                                       -1,   /* t_start */
                                       CS_TIME_MOMENT_RESTART_AUTO,
                                       nullptr);
   }


Re: URANS in code_saturne

Posted: Thu Feb 27, 2025 2:43 am
by Yvan Fournier
Hello,

Do you have the postprocessing for the instantaneous velocity and pressure gradient fields ? You may need to activate those first for the postprocessing of time averages to work, since these fields are not present by default.

Best regards,

Yvan

Re: URANS in code_saturne

Posted: Fri Mar 07, 2025 8:15 am
by StandardRANSUser001
Hi Yvon,

I was unable to see how to do this - if possible, could you please provide a script for this?

I also wanted to enquire about using second-order time stepping with URANS. I wanted to run a k-w URANS study with this, and I received a warning that this is not currently supported. Is this something that could be released in version nine?

Best regards,

Sean Hanrahan

Re: URANS in code_saturne

Posted: Fri Mar 07, 2025 8:23 am
by StandardRANSUser001
Hi Yvon,

In addition to my last post, I wanted to verify whether second-order timestepping has ever been available for the k-omega SST model in CS. The reason I ask, is that in Application of recently developed elliptic blending based models to separated flows by Billard, Revell, and Craft, the authors used second-order timestepping with the k-omega model.

I tried to run this, but this was met with an error message advising that this feature is unavailable.

Has this feature been removed, or was this implemented by the authors?

Best regards,
Sean Hanrahan

Re: URANS in code_saturne

Posted: Sun Mar 09, 2025 11:49 pm
by Yvan Fournier
Hello,

I checked with colleague and it seems someone is working on this at the university of Manchester, but this has never been usable in the main code repository.

Best regards,

Yvan