Plane Shear Layer Initialization

Plane Shear Layer

The following treatment creates the mesh and the initial condition for a plane shear layer.

Parameters

  • domain_size: list(float)

    Size of the box in longitudinal (Lx), normal (Ly), and transverse (Lz) directions.

  • mesh_node_nb: list(int)

    Number of nodes used to create the mesh in the longitudinal (Nx), normal (Ny), and transverse (Nz) directions.

  • base_flow_velocities: list(float)

    Base-flow velocities up and down the shear-layer.

  • shear_layer_thickness: float

    Thickness of the shear layer to meet top to down base-flow velocities.

  • perturbation_amplitude: float

    Amplitude of the perturbation related to the exponential term.

  • inf_state_ref: list(float)

    Conservative variables at infinity.

Preconditions

Perfect Gas Assumption: γ=1.4.

Main functions

class antares.treatment.init.TreatmentInitShearLayer.TreatmentInitShearLayer
execute()

Compute an initial field with a shear.

The returned base contains one structured zone with one instant with default names. It contains a structured mesh and conservative variables (ro, rou, rov, row, roE) at nodes.

The flow field is composed of a base flow based on a uniform velocity U1 for y>d2 and U2 for y<d2.

In the shear layer domain (d2<y<d2), the base flow profile is a linear profile that ensures velocity continuity between the two uniform domains.

U(y)=U1 for yd2

U(y)=U1U2dy+U1U22y for d2<y<d2

U(y)=U2 for yd2

A perturbation is added to the base flow:

u1=αBexp(αy)sin(αx),v1=αBexp(αy)cos(αx) if y0

u2=αBexp(αy)cos(αx),v2=αBexp(αy)sin(αx) if y<0

with α=2πλ, λ being the perturbation wavelength.

Example

import os
if not os.path.isdir('OUTPUT'):
    os.makedirs('OUTPUT')

import antares

t = antares.Treatment('InitShearLayer')
t['domain_size'] = [1.0, 1.0, 1.0]       # [Lx,Ly,Lz]
t['mesh_node_nb'] = [20, 20, 20]         # [Nx,Ny,Nz]
t['base_flow_velocities'] = [10.0, 6.0]  # U1 et U2 velocities
t['shear_layer_thickness'] = 0.1         # shear layer thickness (d)
t['perturbation_amplitude'] = 0.0005     # Coefficient B
t['inf_state_ref'] = [1.16, 0.0, 0.0, 0.0, 249864.58]
b = t.execute()

print(b[0][0])
w = antares.Writer('hdf_antares')
w['base'] = b
w['filename'] = os.path.join('OUTPUT', 'ex_test')
w.dump()