Welcome, Guest
Username: Password: Remember me

TOPIC: Turbulence intensity & reynolds stresses

Turbulence intensity & reynolds stresses 5 years 6 months ago #33541

  • SDAC
  • SDAC's Avatar
Hello,

I want to add new outputs for Turbulence Intensity (TI) and Reynolds stresses (RS).

I want to know the variable in T3D needed to represent u', v', & w' in equations - would it be K or AK?

TI can be calculated in 3D as: TI = SQRT(1/3*(u'^2+v'^2+w'^2)). Because of Reynolds averaging I assume they are not computed directly, with the turbulence model instead calculating TKE.
To calculate TI in 3D would I then use: TI = SQRT((2/3*k)/U)?

where k = TKE (j/kg), and U = averaged streamwise velocity? (or velocity norm?)

For RS, with no u'or v' what would the appropriate equation be? RS = P * k?

Thanks!
The administrator has disabled public write access.

Turbulence intensity & reynolds stresses 5 years 6 months ago #33544

Hello,

TI = sqrt((2/3*k)/U) sounds good to me. With U a reference velocity or the velocity magnitude.


RS = 2/3*k id - 2*nu_t*S (Boussinesq)

I am not sure that the post-treatment of RS gives you more informations on your model.

Best
The administrator has disabled public write access.
The following user(s) said Thank You: SDAC

Turbulence intensity & reynolds stresses 5 years 6 months ago #33546

  • SDAC
  • SDAC's Avatar
Hello,

Thankyou for your response.

For RS, I don't recognise all of the terms. Nu_T = dynamic viscosity. But what is S and k id?
The administrator has disabled public write access.

Turbulence intensity & reynolds stresses 5 years 6 months ago #33547

Hello,

_ means the term is a matrix

S = 0.5*(grad(u) + transposed_grad(u))
k *Id = k * 3x3_identity_matrix

and nu_t is the dynamic turbulent viscosity

Best
The administrator has disabled public write access.
The following user(s) said Thank You: SDAC

Turbulence intensity & reynolds stresses 5 years 5 months ago #33630

  • SDAC
  • SDAC's Avatar
Hello,

I've returned to my TI code. However I receive a syntax error. Previously, using an ostensively identical line of code, I got the error "Expected a right parenthesis in expression at (1)".

I assume this is because I'm using AK(I3D) incorrectly?

It errors when I declare AK under " TYPE(BIEF_OBJ), INTENT(IN) :: UN3" and " USE DECLARATIONS_TELEMAC3D". So I'm not sure how best to assign it?


The code:
IF(LEO.AND.SORG3D(28)) THEN
         DO IPLAN = NPLAN-33,NPLAN
	    I3D = I1+NPOIN2*(IPLAN-1)
	     div = 0.666666D0
	     [b]PRIVE%ADR(1)%P%r(I3D)=SQRT(div*AK(I3D)/UN3%R(I3D)) ![/b]error here
	 END DO
ENDIF
The administrator has disabled public write access.

Turbulence intensity & reynolds stresses 5 years 5 months ago #33631

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Error due to the small r in PRIVE?
How is declared AK?
If it's also a bief_obj, there is probably %R missing...
Hard to say with only an extract of code

regards
Christophe
The administrator has disabled public write access.
The following user(s) said Thank You: SDAC

Turbulence intensity & reynolds stresses 5 years 5 months ago #33653

  • SDAC
  • SDAC's Avatar
Thankyou for the response.I want to capture turbulence intensity at each node but Telemac is having difficulty defining AK for some reason.

If I don't define AK then the results for the variable are "1.#INF".

If I define AK as:
TYPE(BIEF_OBJ), INTENT(IN)    ::  UN3, AK
IF(LEO.AND.SORG3D(28)) THEN
         DO IPLAN = NPLAN-33,NPLAN
	    I3D = I1+NPOIN2*(IPLAN-1)
		div = 0.666666
		PRIVE%ADR(1)%P%R(I3D)=SQRT(div*AK%R(I3D)/UN3%R(I3D))
      ENDIF

Then I get the error:

PRIVE%ADR(1)%P%R(I3D)=SQRT(div*AK%R(I3D)/UN3%R(I3D))
1
Error: Name ‘ak’ at (1) is an ambiguous reference to ‘ak’ from current program unit

which suggests to me there's a bad interaction. I assume AK is the correct variable for TKE in 3D.
The administrator has disabled public write access.

Turbulence intensity & reynolds stresses 5 years 4 months ago #33874

  • SDAC
  • SDAC's Avatar
Returning to this I had an odd thing happen:

The equation is now fine but there's a problem with the velocity:
I tested a fresh PRERES... file which only included the NORM term. Telemac says the UN3/VN3/WN3 have no implicit type despite the USE DECLARATIONS_TELEMAC3D.
When I declare them as BIEF OBJECT INTENT (IN) the code runs but Telemac exits the cluster with error 5.

It's odd as declaring them this way in SOURCE works fine.

Does anyone know why this might occur? Seems to be some conflict in declarations or how the velocity variables are being called?


File Attachment:

File Name: TI_PRERES_T3D.f
File Size: 23 KB
The administrator has disabled public write access.

Turbulence intensity & reynolds stresses 5 years 4 months ago #33877

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

UN3/VN3/WN3 do not exist! Variables are actually called UN/VN/WM, see DECLARTIONS_TELEMAC3D.f.

The code below works for me:
DEUXTIERS = 0.6666666667D0
      DO I=1,NPOIN2
        DO IPLAN = 1,NPLAN
          I3D = I+NPOIN2*(IPLAN-1)
          NORM = SQRT(UN%R(I3D)**2+VN%R(I3D)**2+WN%R(I3D)**2)
          UU = MAX(NORM,1.D-6) 
          PRIVE%ADR(1)%P%R(I3D)=SQRT(DEUXTIERS*AKN%R(I3D))/UU 
        ENDDO
      ENDDO

Here is the output in Blue Kenue, for a fishpass model:

TI.png



Good luck!

Kind regards
PL
The administrator has disabled public write access.
Moderators: pham

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