Extract Wake

Compute the wake in a specified ‘x’-plane.

Parameters

  • base: Base

    The base must contain:

    • the mesh coordinates x, y, and z

    • the solution

  • family_name: str

    The name of the family from which the percent will be computed.

  • x_value: float, default= None

    The axial position of the plane.

  • r_percent: float, default= None

    The ‘r’-value given as a percentage of the radius.

  • r_value: tuple(float), default= None

    The radius value. The argument should be a tuple of min and max values.

  • cut_plane: bool, default= True

    Flow contains an axial cut and the wake is extracted from this plane.

  • duplicate: bool, default= False

    Duplication of the axial cut. Not needed for mixing-plane simulation as there is a periodicity condition.

Main functions

class antares.treatment.turbomachine.TreatmentExtractWake.TreatmentExtractWake
execute()

Execute the treatment.

Returns:

Return type:

Base

Example

import os

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

import numpy as np

from antares import Reader, Treatment, Writer

#

# Data can be downloaded from
# https://cerfacs.fr/antares/downloads/application1_tutorial_data.tgz

r = Reader('bin_tp')
r['filename'] = os.path.join('..', 'data', 'ROTOR37', 'ELSA_CASE', 'MESH',
                             'mesh_<zone>.dat')
r['zone_prefix'] = 'Block'
r['topology_file'] = os.path.join('..', 'data', 'ROTOR37', 'ELSA_CASE',
                                  'script_topo.py')
r['shared'] = True
base = r.read()
print(base.families)

r = Reader('bin_tp')
r['base'] = base
r['filename'] = os.path.join('..', 'data', 'ROTOR37', 'ELSA_CASE', 'FLOW',
                             'flow_<zone>.dat')
r['zone_prefix'] = 'Block'
r['location'] = 'cell'
r.read()

base.set_computer_model('internal')

# Needed for turbomachinery dedicated treatments
base.cell_to_node()
base = base.get_location('node')
print(base.families)

base.compute('psta')
base.compute('Pi')
base.compute('theta')
P0_INF = 1.9
base.compute('MachIs = (((%f/psta)**((gamma-1)/gamma)-1.) * (2./(gamma-1.))  )**0.5' % P0_INF)

# Definition of the treatment
t = Treatment('extractwake')
t['base'] = base
t['family_name'] = 'BLADE'
t['r_percent'] = 0.5
t['x_value'] = 5.0
wake = t.execute()

# Wake
res_dir = os.path.join('OUTPUT', 'WAKE')
if not os.path.isdir(res_dir):
    os.makedirs(res_dir)

writer = Writer('bin_tp')
writer['filename'] = os.path.join(res_dir, 'wake.plt')
writer['base'] = wake
writer.dump()