openfoam Package

block_mesh Module

Inheritance diagram of pyNastran.converters.openfoam.block_mesh
defines:
  • model = read_block_mesh(block_mesh_dict_filename, log=None, debug=False)
class pyNastran.converters.openfoam.block_mesh.BlockMesh(log=None, debug=False)[source]

Bases: object

defines BlockMesh

creates BlockMesh

_write_block_mesh(self, block_mesh_file, make_symmetry)[source]

writes a BlockMeshDict with a file object

adjust_nodes_to_symmetry(self)[source]
equivalence_nodes(self, Rtol=0.1)[source]

equivalences the nodes of a BlockMeshDict

make_hex_bar(self, unused_bias, ncells)[source]

bias = Llast/Lfirst

make_hex_bars(self, unused_hex_id)[source]
read_openfoam(self, block_mesh_name='blockMeshDict')[source]

reads the BlockMesh file

write_bdf(self, bdf_filename, nodes, hexas)[source]

writes the BlockMesh as a Nastran BDF

write_block_mesh(self, block_mesh_name_out='blockMeshDict.out', make_symmetry=False)[source]

filename interface to _write_block_mesh

pyNastran.converters.openfoam.block_mesh.area_centroid(n1, n2, n3, n4)[source]

calculates the area and centroid of a quad

pyNastran.converters.openfoam.block_mesh.get_not_indexes(a, indices)[source]

only works for 1D

pyNastran.converters.openfoam.block_mesh.main()[source]
pyNastran.converters.openfoam.block_mesh.mirror_block_mesh(block_mesh_name, block_mesh_name_out, log=None, debug=True)[source]

mirrors a blockMeshDict

pyNastran.converters.openfoam.block_mesh.read_block_mesh(block_mesh_dict_filename, log=None, debug=False)[source]

functional interface to BlockMesh

pyNastran.converters.openfoam.block_mesh.volume8(n1, n2, n3, n4, n5, n6, n7, n8)[source]

calculates the volume of a hex

openfoam_parser Module

Inheritance diagram of pyNastran.converters.openfoam.openfoam_parser
class pyNastran.converters.openfoam.openfoam_parser.FoamFile(filename, log=None)[source]

Bases: object

read_foam_file(self)[source]
pyNastran.converters.openfoam.openfoam_parser.convert_to_dict(self, lines, debug=True)[source]

should use regex…

FoamFile {

version 0.0508; format ascii; class dictionary; object blockMeshDict;

}

-> data = {
‘FoamFile’ : {
‘version’ : ‘0.0508’, ‘format’ : ‘ascii’, ‘class’ : ‘dictionary’, ‘object’ : ‘blockMeshDict’,

}

}

pyNastran.converters.openfoam.openfoam_parser.remove_c_comments(lines)[source]
pyNastran.converters.openfoam.openfoam_parser.write_dict(openfoam_dict, nbase=0, baseword='name')[source]

surface_mesh Module

Inheritance diagram of pyNastran.converters.openfoam.surface_mesh
class pyNastran.converters.openfoam.surface_mesh.Faces[source]

Bases: object

read_faces(self)[source]
class pyNastran.converters.openfoam.surface_mesh.Points[source]

Bases: object

read_points(self)[source]
pyNastran.converters.openfoam.surface_mesh.main()[source]