Meridional Plane

Description

Compute the meridional plane by performing several azimuthal means over ‘x’-planes. The mass-flow is used as averaging variable (\(\displaystyle \rho v_x \partial \theta\)).

Construction

import antares
myt = antares.Treatment('meridionalplane')

Parameters

  • base: Base

    The input base on which the meridional plane is built.

  • x_min: float, default= None

    The “x”-value of the axial start position of the plane.

  • x_max: float, default= None

    The “x”-value of the axial end position of the plane.

  • num_x: int, default= 20

    The number of points in the axial distribution.

  • num_r: int, default= 30

    The number of points in the radial distribution.

  • m_var: str, default= ‘rovx’

    The variable to be averaged on the plane.

Preconditions

The input base must contain the mesh coordinates x, y, and z, the solution and ‘hb_computation’ as an Base.attrs (if HB/TSM type).

Postconditions

The meridional output plane contains x, r coordinates and values.

Main functions

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

Compute the meridional plane.

Returns:

Return type:

Base

Example

import os

from antares import Reader, Treatment, Writer

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

# 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)

# Meridional plane
res_dir = os.path.join('OUTPUT', 'MERID')
if not os.path.isdir(res_dir):
    os.makedirs(res_dir)

NUM_R = 50
NUM_X = 25
t = Treatment('meridionalplane')
t['base'] = base
t['num_r'] = NUM_R
t['num_x'] = NUM_X
t['x_min'] = -12.5
t['x_max'] = 12.5
t['m_var'] = 'psta'
merid_base = t.execute()

writer = Writer('bin_tp')
writer['filename'] = os.path.join(res_dir, 'flow_merid_%i_%i.plt' % (NUM_X, NUM_R))
writer['base'] = merid_base
writer.dump()