Unstructure

Description

Transform a structured mesh into an unstructured mesh.

Parameters

  • base: Base

    The input base to be unstructured.

  • boundary: bool, default= True

    Process boundary conditions of the input base.

Preconditions

None.

Postconditions

This treatment processes the input base in-place. The input base becomes an unstructured base. 3D bases will contain hexahedral elements and connectivities. 2D bases will contain quadrangle elements and connectivities.

Example

import antares
myt = antares.Treatment('unstructure')
myt['base'] = base
myt.execute()

Main functions

class antares.treatment.TreatmentUnstructure.TreatmentUnstructure
execute()

Transform a structured mesh into an unstructured mesh.

Process also the boundaries.

Returns

an unstructured Base. This is for backward compatibility (in-place treatment).

Return type

Base

Example

import os

import antares

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

r = antares.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()

r = antares.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.unstructure()

w = antares.Writer('hdf_cgns')
w['base'] = base
w['filename'] = os.path.join('OUTPUT', 'unst_rotor37.cgns')
w.dump()