pyhip package¶
Submodules¶
pyhip.hip_wrapper module¶
pyhip.operations module¶
This module contains hip functionnalities intending to perform mesh operations
-
pyhip.operations.
extrude_2d_mesh
(extrude_coords, extrude_node_num, axis)[source]¶ Extrude 2-dimensional mesh to a 3D mesh.
- extrude_coords: a tuple/list of extrusion extremes
(ext_min, ext_max), ext_min and ext_max can refer to positions (if extusion is done around x, y or z axis) or to angles in degrees (if extusion is choosen to be axisymmetric)
extrude_node_num: Number of nodes/elements slices axis: axis around which extrusion is performed, possible
- values :
x, y, z or axi
-
pyhip.operations.
generate_2d_mesh
(lower_corner, upper_corner, resolution)[source]¶ Generate an unstructured rectangular mesh of quadrilateral elements given box bounds
- lower_corner: A tuple/list of box lower corner
coordinates (x, y)
- upper_corner: A tuple/list of box upper corner
coordinates (x, y)
- resolutiona tuple/list of mesh resolution
(i.e number of points) (n_x, n_y)
pyhip.readers module¶
Module containing hip readers functions
-
pyhip.readers.
read_centaur_mesh
(centaur_mesh_file)[source]¶ Read hybrid grid in Centaursofts format.
- centaur_mesh_fileCentaursofts format mesh_file. Supported file
format are versions: - 4 (single record) - 5 (multiple record).
-
pyhip.readers.
read_cgns_mesh
(grid_file, sol_file=None, abnd_file=None)[source]¶ Read an unstructured CGNS database.
grid_file: CGNS grid file sol_file: CGNS solution file abnd_file: if bnd info in an AVBP-style .asciiBound file is given,
this supersedes boundary condition definition in the CGNS grid_file.
-
pyhip.readers.
read_ensight_mesh
(ensight_case_file)[source]¶ Read an unstructured grid (no Solution) in Ensight Gold format
ensight_case_file: Ensight Gold format file
-
pyhip.readers.
read_fluent_mesh
(mesh_file, solution_file=None)[source]¶ Read an unstructured grid and optionally a solution in Fluent’s v5 and v6 ascii and binary formats
mesh_file: Fluent/Gambit mesh file (.msh/.cas extensions) solution_file : Fluent solution file (.dat extension)
pyhip.writers module¶
Module containing hip writers functions
-
pyhip.writers.
write_avbp
(rootfile, flavour=None, level=None)[source]¶ Write mesh and optionnaly solution to avbp format
rootfile : output file base name path (without extension) flavour: should be one of the avbp flavours :
“avad”, “avbp4.2”, “avbp4.7”, “avbp5.1”, “avbp5.3eg”, “avbp5.3”, “avh”
- levellevel of coarsed mesh to be written, default is finest
mesh
-
pyhip.writers.
write_cgns
(rootfile)[source]¶ Write mesh into fieldview format
rootfile : output file base name path (without extension)
-
pyhip.writers.
write_ensight
(rootfile, writing_ascii=False, write_node_ids=False, extrude_2d=True)[source]¶ Write mesh int ensight gold format
rootfile : output file base name path (without extension) writing_ascii : if True, ascii format is adopted write_node_ids : if True, store node ids extrude_2d : if True, 2D mesh is extruded to 3D
in order to be readable by paraview
-
pyhip.writers.
write_fieldview
(rootfile)[source]¶ Write mesh into fieldview format
rootfile : output file base name path (without extension)
-
pyhip.writers.
write_gmsh
(rootfile)[source]¶ Write mesh into gmsh format
rootfile : output file base name path (without extension)
-
pyhip.writers.
write_hdf5
(rootfile, write_all=True, only_solution=False, separate_boundary_shell=False, add_metis_graph=False, write_faces_list=False, write_zone_info=True, compression_level=None)[source]¶ Write mesh and optionnaly solution to file
rootfile : output file base name path (without extension) write_all : if True all the variables that are stored,
otherwize, only the standard set is stored
- separate_boundary_shellif True, the boundary shell (skin)
is written as a separately numbered mesh entity for each boundary patch.
- compression_level: sets the zip compression level.
Note that due to overhead, compression with the hdf native routines does not always result in relevant file size reduction, or at times any reduction at all.
add_metis_graph: If True adds the METIS style elGraph. write_faces_list : if True, a complete list of faces between
elements is written to file. Warning: Writing the complete list of faces will enlarge the file size considerably.
only_solution: if True, write a solution only but not the mesh write_zone_info: if True, Write zone information to file
Module contents¶
Hippy module