Cell to Node


Compute node values from cell-centered values.

This treatment contains several features:

  • the detection of all connected zones to any node (even for edges and corners).

  • connected boundaries inside a same zone result in an appropriate average value.

Processing of the extensive variable ‘surface’

The surface area assigned to a point is the average of areas of the elements that contain this vertex. It is defined as: \(s_i = \sum_\Omega s_\Omega / N_\Omega\) with \(\Omega\) the elements that contain the vertex \(i\), \(s_\Omega\) the surface area of the element \(\Omega\), and \(N_\Omega\) the number of vertices defining the element \(\Omega\).

Processing of the normal vector

The normal vector assigned to a point is the sum of the normal vectors of the elements that contain this vertex. If the normal vectors at the cell centers of these elements are unit vectors, then the normal vector at the point is normalized with a norm equal to one. Otherwise, it is normalized with a norm equal to the surface area computed at this point.

Processing of the other variables

The value assigned to a point is the arithmetic average of values of the elements that contain this vertex.


Other extensive variables may not be computed correctly (e.g. volume).


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


  • base: Base

    The input base on which the cell2node will be performed.

  • variables: list(str), default= None

    List of names of variables to process. If None, all variables are processed.

  • report_boundaries: bool, default= False

    If True, the node data in the zone is overwritten with the boundary node data.

  • vectors: list(str) or list(list(str)), default= None

    List of vector variables which must follow a periodic condition (rotation) if defined.

  • bnd_keep_zeros: bool, default= True

    If True, when zeroes are encountered as bnd node value, they will be kept when merging several boundary node values.


The input base may be structured or unstructured.


The input base is modified. Variables located at cell centers are processed to give new variables located at nodes.

Support boundary data - in this case, boundary values will be reported into the main part.


import antares
myt = antares.Treatment('cell2node')
myt['base'] = base
myt['variables'] = ['dens', 'pres']

Main functions

class antares.treatment.TreatmentCell2Node.TreatmentCell2Node

Main class for TreatmentCell2Node.


Compute nodal values from cell-centered values.

To perform the cell2node, they are 2 steps: First, perform a loop on each zone, and perform the cell2node in this zone only. Every nodal point will receive a value coming from the zone. Second, the interfaces (between zones) are processed, again in two steps:

-> mean value on the interface internal part -> edges and corners list data appending (slice).

The edges and corners are processed at the end, to know all contributions (avoid all issues with overwrite, diagonal missing contribution. Other advantage, each interface will be processed only once