Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Compute or extract Strain Rate Tensor in Telemac 2D

Compute or extract Strain Rate Tensor in Telemac 2D 2 years 7 months ago #40244

  • konsonaut
  • konsonaut's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 413
  • Thank you received: 144
Hi PL,

isn't the multiplication with UNSV2D%R(I)**2 missing in the Smagoinsky subroutine smagor.f?

BR,
Clemens
The administrator has disabled public write access.

Compute or extract Strain Rate Tensor in Telemac 2D 2 years 7 months ago #40249

  • pilou1253
  • pilou1253's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 584
  • Thank you received: 106
Hi Clemens,

I also wondered about that, but as I understand, the gradients obtained with a CALL VECTOR and with formula 'GRADF X(orY)' are actually multiplied by the integral of test functions Psi(i).

In the Smaroginsky model,

nu_t = (Cs*delta)**2 * sqrt(2*Sij*Sij)

with delta = so-called filter or characteristic length. If we assume that delta**2 can be approximated by the cell area aready included in the gradient obtained with the CALL VECTOR, then the code should be OK. Note that I am not an expert in neither turbulence models nor BIEF subroutines, so this is maybe not exactely correct...?

Kind regards
PL
The administrator has disabled public write access.
The following user(s) said Thank You: konsonaut

Compute or extract Strain Rate Tensor in Telemac 2D 2 years 7 months ago #40250

  • konsonaut
  • konsonaut's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 413
  • Thank you received: 144
Hi PL,

indeed, this is exactly correct, thanks!
I had a look in the mixing length model subroutine and was confused about areas and mesh sizes when comparing with the Smagorinsky model.

Best regards,
Clemens
The administrator has disabled public write access.

Compute or extract Strain Rate Tensor in Telemac 2D 2 years 7 months ago #40251

  • konsonaut
  • konsonaut's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 413
  • Thank you received: 144
Intended as reply to opentelemac.org/index.php/kunena/16-tele...d?limitstart=0#40242

Since UNSV2D is the inverse of the basis function and sqrt(2*Sij*Sij) represent the averaged gradient, one should multiply sqrt(2*Sij*Sij) * UNSV2D


BR,
Clemens
The administrator has disabled public write access.

Compute or extract Strain Rate Tensor in Telemac 2D 2 years 6 months ago #40276

Dear Clemens and PL

Thank you a lot for the help. Actually I have managed to compute the sqrt(2*Sij*Sij) from smagor.f. Nevertheless, the values seem bit strange. I got values of range of 0-0.001 s^-1, when in my 3D model are 0-10 s^-1. I will try sqrt(2*Sij*Sij) * UNSV2D.

Clemens, I am trying to develop a model similar to this paper, but using SWE.

One more question,

I have used 'user_nomvar_telemac2d.f and 'user_preres_telemac2d.f' in the user_fortran folder.

They work when I use the command line 'telemac2d.py my_case.cas'. However when I use a python script 'python3 my_script.py'.

Do you know by any chance if I need to add some line code to run my user_fortran?

Thank you again for the help,

kind regards.

Marcelo
Attachments:
The administrator has disabled public write access.

Compute or extract Strain Rate Tensor in Telemac 2D 2 years 6 months ago #40281

Dear all,

I ahve made a mistake in the file my_script.py, it is missing the line
my_case.run_one_time_step()

in the loop.

Nevertheless, the code is not able yet to compile 'user_fortran' functions.

Kind regards,

Marcelo
The administrator has disabled public write access.

Compute or extract Strain Rate Tensor in Telemac 2D 2 years 6 months ago #40318

Dear all,

Now the code runs my fortran user subroutines:

it is necessry to add to the code line, user_fortran in the arguments.
my_case = Telemac2d('my_case.cas',user_fortran='user_fortran', lang=1, comm=MPI.COMM_WORLD)

Also sqrt(2*Sij*Sij) * UNSV2D displayed results similar to those of my 3D simulation.

Thank you very much PL and clemens for the whole support, you helped me a lot

Kind regards,

marcelo
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.