Unstructure

Description

Transform a strutured mesh into an unstructured mesh.

Construction

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

Parameters

  • base: antares.Base

    The input base to be clipped.

  • boundary: bool, default= True

    Process boundary conditions of the input base.

Preconditions

None.

Postconditions

The output base is an unstructured base. 3D bases will contain hexahedral elements and connectivities. 2D bases will contain quadrangle elements and connectivities.

The output base is the input base that has been modified.

Example

import antares
myt = antares.Treatment('unstructure')
myt['base'] = base
unstbase = 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.

Return type

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