Spanwise Average

Description

Spanwise averaging along a given axis of a base.

This treatment spawns multiple processes thanks to the multiprocessing package.

Parameters

  • base: Base

    The input base.

  • axis: list(float),

    The Cartesian coordinates of the axis along with the averaging will be performed.

  • nb_cuts: int,

    The desired number of cuts for the averaging.

  • nb_procs: int,

    The desired number of proc used to perform the averaging.

  • minmax: list(float), default= [np.amin(base[0][0][‘x’]), np.amax(base[0][0][‘x’])]

    Minimum and maximum values defining the spanwise averaging window.

Preconditions

The coordinates must be (at least) in the first instant.

Postconditions

Example

The following example shows an azimuthal average along the x-axis (1., 0., 0.) from x=0.1 to x=0.2.

import antares
myt = antares.Treatment('SpanwiseAverage')
myt['base'] = base
myt['axis'] = [1., 0., 0.]
myt['minmax'] = [0.1, 0.2]
myt['nb_procs'] = 10
myt['nb_cuts'] = 180
cutbase = myt.execute()

Main functions

class antares.treatment.TreatmentSpanwiseAverage.TreatmentSpanwiseAverage
execute()

Execute the treatment.

Returns:

Return type:

Base

final_average(cut_bases)

Complete the average from the partial average coming from processes.

Parameters:

cut_bases (list(Base)) – bases of all cuts given by processes

Returns:

the final cut with the average.

Return type:

Base

get_mesh_ori(base)