e3_block

e3_block.py – Classes for defining 2D and 3D blocks.

It is expected that this module be imported by the application program e3prep.py. The classes and functions will then be available for use in the user’s input scripts.

Generic functions and classes

e3_block.identify_block_connections(block_list=None, exclude_list=, []tolerance=1e-06, verbosity_level=0)

Identifies and makes block connections based on vertex locations.

Parameters:
  • block_list – list of Block3D or Block2D objects that are to be included in the search. If none is supplied, the whole collection is searched. This allows one to specify a limited selection of blocks to be connected.
  • exclude_list – list of pairs of Block3D objects that should not be connected
  • tolerance – spatial tolerance for colocation of vertices

Note that this function is just a proxy for the specialized 2D and 3D functions.

e3_block.make_patch(north, east, south, west, grid_type='TFI', tol=1e-06)

Defines a 2D patch (or region) by its boundary paths (in order NESW).

Parameters:
  • north – bounding path on the NORTH side
  • east – bounding path on the EAST side
  • south – bounding path on the SOUTH side
  • west – bounding path on the WEST side
  • grid_type

    indicates the type of interpolation within the patch:

    • TFI, COONS: transfinite interpolation or Coons patch
    • AO: interpolation via an area-orthogonality grid, used as background
  • tol – relative tolerance for testing coincidence of the corner points

A patch is defined by its four bounding Path objects with assumed positive directions as shown:

              NORTH
1       +------->-------+
|       |               |
s  WEST |               | EAST
|       |               |
0       +------->-------+
              SOUTH

        0-------r------>1

NORTH and SOUTH boundaries progress WEST to EAST while EAST and WEST boundaries progress SOUTH to NORTH.

To reuse a Path object when building multiple blocks, you will need to pay attention to the orientation of the blocks and the defined positive direction of the Path object.

e3_block.close_enough(vA, vB, tolerance=0.0001)

Decide if two Vector quantities are close enough to being equal.

This will be used to test that the block corners coincide.

class e3_block.Block

Python base class to organise the setting of block parameters.

We will create instances of its subclasses: Block2D or Block3D.

Block.set_BC(face_name, type_of_BC, inflow_condition=None, x_order=0, sponge_flag=None, Twall=None, Pout=None, Tout=300.0, use_Tout=False, r_omega=None, centre=None, v_trans=None, filename=None, n_profile=1, is_wall=0, sets_conv_flux=0, sets_visc_flux=0, Twall_flag=False, reorient_vector_quantities=False, Rmatrix=[1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0], assume_ideal=0, mdot=None, emissivity=None, sigma_jump=1.0, Twall_i=None, Twall_f=None, t_i=None, t_f=None, mass_flux=0.0, p_init=100000.0, relax_factor=0.05, p0_min=None, p0_max=None, direction_type='normal', direction_vector=[1.0, 0.0, 0.0], direction_alpha=0.0, direction_beta=0.0, ghost_cell_trans_fn=<function <lambda> at 0x2aebeaabcb18>, I_turb=0.0, u_turb_lam=1.0, T_non=None, starting_blk=0, no_blk=[1.0, 1.0, 1.0], label='')

Sets a boundary condition on a particular face of the block.

Parameters:
  • face_name – int identifier to select the appropriate boundary within the block.
  • type_of_BC – Name or index value of the requested boundary condition. See module bc_defs.py for the available options.
  • inflow_condition – If the type of boundary requires the user to specify the inflow FlowCondition object, this is the parameter to do so.
  • sponge_flag – Set to 1 to activate Andrew Denman’s damping layer near the boundary.
  • Twall – If appropriate, specify the boundary-wall temperature in degrees Kelvin.
  • Pout – If appropriate, specify the value of static pressure (in Pascals) just outside the boundary.
  • r_omega – If appropriate, specify the value of angular velocity (in rad/s) of the wall.

** FIX-ME ** rest of parameters not described

Sometimes it is good to be able to adjust properties after block creation; this function provides that capability.

Block.set_WBC(face_name, type_of_WBC, f_wall=[1.0], input_file=None, label='')

Sets a wall catalytic boundary condition on a particular face of the block.

Parameters:
  • face_name – String or int identifier to select the appropriate Face2D within the block.
  • type_of_WBC – Name or index value of the requested wall catalycity boundary condition. See module cns_bc_defs for the available options.
  • f_wall – If the user is required to set the chemical composition at the wall, then a list of mass fractions (floats) should be supplied as this parameter.
  • input_file – If the boundary condition requires an input file, then its name is supplied as this parameter.

Sometimes it is good to be able to adjust properties after block creation; this function provides that capability.

Two-dimensional flows

class e3_block.Block2D(psurf=None, grid=None, import_grid_file_name=None, nni=2, nnj=2, cf_list=[None, None, None, None], bc_list=[<bc_defs.SlipWallBC object at 0x2aebda25e050>, <bc_defs.SlipWallBC object at 0x2aebda25e050>, <bc_defs.SlipWallBC object at 0x2aebda25e050>, <bc_defs.SlipWallBC object at 0x2aebda25e050>], wc_bc_list=[<bc_defs.NonCatalyticWBC object at 0x2aebeaac8680>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8680>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8680>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8680>], fill_condition=None, hcell_list=[], mcell_list=[], xforce_list=[0, 0, 0, 0], zforce_list=[0, 0, 0, 0], transient_profile_faces=[], label='', active=1, verbosity_level=0)

Python class to organise the setting of block parameters for 2D flow.

Block2D.__init__(psurf=None, grid=None, import_grid_file_name=None, nni=2, nnj=2, cf_list=[None, None, None, None], bc_list=[<bc_defs.SlipWallBC object at 0x2aebda25e050>, <bc_defs.SlipWallBC object at 0x2aebda25e050>, <bc_defs.SlipWallBC object at 0x2aebda25e050>, <bc_defs.SlipWallBC object at 0x2aebda25e050>], wc_bc_list=[<bc_defs.NonCatalyticWBC object at 0x2aebeaac8680>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8680>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8680>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8680>], fill_condition=None, hcell_list=[], mcell_list=[], xforce_list=[0, 0, 0, 0], zforce_list=[0, 0, 0, 0], transient_profile_faces=[], label='', active=1, verbosity_level=0)

Create a block from a parametric-surface object.

You should specify one of the following three:

Parameters:
  • psurf – The ParametricSurface object defining the block in space. Typically, this will be a CoonsPatch or an AOPatch.
  • grid – A StructuredGrid object may be supplied directly.
  • import_grid_file_name – name of a VTK file containing the grid
  • nni – number of cells in the i-direction (west to east)
  • nnj – number of cells in the j-direction (south to north)
  • cf_list – List of the cluster_function objects, one for each boundary. The order within the list is NORTH, EAST, SOUTH and WEST.
  • bc_list – List of BoundaryCondition objects, one for each face.
  • fill_condition – Either a single FlowCondition or user-defined function.
  • hcell_list – List of (i,j) tuples specifying the cells (for this block) whose flow data is to be recorded in the history file. For an MPI simulation, there is one history file for each block but, for a shared-memory simulation, the history cells for all blocks are written to a single history file.
  • transient_profile_faces – list of face names or indices for which we want the transient flow data written. There will be one file created for each specified face.
  • mcell_list – List of (i,j) tuples specifying the cells (for this block) whose Temperature is to be monitored during the simulation.
  • xforce_list – list of int flags to indicate that we want boundary forces calculated
  • zforce_list – list of int flags to indicate that we want boundary forces calculated
  • transient_profile_faces – list of names of faces for which we’ll write a transient profile file
  • label – Optional string label that will appear in the generated parameter file.
  • active

    flag that indicates if the block is active:

    • =1 (default) the time integration operates for this block
    • =0 time integration for this block is suppressed
Note:
The blocks are given their identity (counting from zero) according to the order in which they are created by the user’s script. This identity is stored as blkId and is used internally in the preprocessing, simulation and postprocessing stages. For the MPI simulations, it also the same as the rank of the process.
Block2D.cell_centre_location(i, j, k, gdata)

Return the cell geometry.

Geometry of cell:

^ j
|
|
NW-----NE
|       |
|       |
SW-----SE  --> i
e3_block.connect_blocks_2D(A, faceA, B, faceB, with_udf=0, filename=None, is_wall=0, sets_conv_flux=0, sets_visc_flux=0, check_corner_locations=True, reorient_vector_quantities=False, nA=None, t1A=None, nB=None, t1B=None, verbosity_level=0)

Make the face-to-face connection between neighbouring blocks.

Parameters:
  • A – first Block2D object
  • faceA – indicates which face of block A is to be connected. The constants NORTH, EAST, SOUTH, and WEST may be convenient to use.
  • B – second Block2D object
  • faceB – indicates which face of block B is to be connected. The constants NORTH, EAST, SOUTH, and WEST may be convenient to use.
  • is_wall – passed through to the AdjacentPlusUDFBC if with_udf is True
  • sets_conv_flux – passed through to the AdjacentPlusUDFBC if with_udf is True
  • sets_visc_flux – passed through to the AdjacentPlusUDFBC if with_udf is True
  • check_corner_locations – set True (default) to check that the face corners are colocated
  • reorient_vector_quantities – if true, apply the rotation matrix to the incoming vector data. The rotation matrix is built from the nominal direction vectors of both faces.
  • nA
  • t1A – the nominal direction vectors for face A
  • nB
  • t1B – the nominal direction vectors for face B
e3_block.identify_block_connections_2D(block_list=None, exclude_list=, []tolerance=1e-06, verbosity_level=0)

Identifies and makes block connections based on block-vertex locations.

Parameters:
  • block_list – list of Block2D objects that are to be included in the search. If none is supplied, the whole collection is searched. This allows one to specify a limited selection of blocks to be connected.
  • exclude_list – list of pairs of Block2D objects that should not be connected
  • tolerance – spatial tolerance for colocation of vertices
class e3_block.MultiBlock2D(psurf=None, nni=None, nnj=None, bc_list=[<bc_defs.SlipWallBC object at 0x2aebd9f77710>, <bc_defs.SlipWallBC object at 0x2aebe47fbdd0>, <bc_defs.SlipWallBC object at 0x2aebea5e53b0>, <bc_defs.SlipWallBC object at 0x2aebea5e5560>], wc_bc_list=[<bc_defs.NonCatalyticWBC object at 0x2aebeaac8788>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8838>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8890>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac88e8>], nb_w2e=1, nb_s2n=1, nn_w2e=None, nn_s2n=None, cluster_w2e=None, cluster_s2n=None, fill_condition=None, label='blk', active=1)

Allows us to specify a block of sub-blocks.

A number of internally-connected Block2D objects will be created when one MultiBlock2D object is created. Individual blocks occupy subsections of the original parametric surface.

Note that the collection of Block2D objects will be stored in a list of lists with each inner-list storing a j-column of blocks:

.                       North
.   1       +-------------+-------------+
.   |       |   [0][1]    |   [1][1]    |
.   s  West +-------------+-------------+ East
.   |       |   [0][0]    |   [1][0]    |
.   0       +-------------+-------------+
.                       South
.           0           --r-->          1

The user script may access an individual block within the MultiBlock2D object as object.blks[i][j]. This will be useful for connecting blocks within the MultiBlock cluster to other blocks as defined in the user’s script.

Some properties, such as fill_conditions and grid_type, will be propagated to all sub-blocks. Individual sub-blocks can be later customised.

MultiBlock2D.__init__(psurf=None, nni=None, nnj=None, bc_list=[<bc_defs.SlipWallBC object at 0x2aebd9f77710>, <bc_defs.SlipWallBC object at 0x2aebe47fbdd0>, <bc_defs.SlipWallBC object at 0x2aebea5e53b0>, <bc_defs.SlipWallBC object at 0x2aebea5e5560>], wc_bc_list=[<bc_defs.NonCatalyticWBC object at 0x2aebeaac8788>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8838>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8890>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac88e8>], nb_w2e=1, nb_s2n=1, nn_w2e=None, nn_s2n=None, cluster_w2e=None, cluster_s2n=None, fill_condition=None, label='blk', active=1)

Create a cluster of blocks within an original parametric surface.

Parameters:
  • psurf – ParametricSurface which defines the block.
  • bc_list – List of boundary condition objects The order within the list is NORTH, EAST, SOUTH and WEST.
  • nb_w2e – Number of sub-blocks from west to east.
  • nb_s2n – Number of sub-blocks from south to north.
  • nn_w2e – List of discretisation values for north and south boundaries of the sub-blocks. If a list is not supplied, the original number of cells for the outer boundary is divided over the individual sub-block boundaries.
  • nn_s2n – List of discretisation values for west and east boundaries of the sub-blocks. If a list is not supplied, the original number of cells for the outer boundary is divided over the individual sub-block boundaries.
  • cluster_w2e – If a list of cluster functions is supplied, individual clustering will be applied to the corresponding south and north boundaries of each sub-block. If not supplied, a default of no clustering will be applied.
  • cluster_s2n – If a list of cluster functions is supplied, individual clustering will be applied to the corresponding west and east boundaries of each sub-block. If not supplied, a default of no clustering will be applied.
  • fill_condition – A single FlowCondition object that is to be used for all sub-blocks
  • grid_type – Select the type of grid generator from TFI or AO.
  • split_single_grid – If this boolean flag is true, a single grid is generated which is then subdivided into the required blocks.
  • label – A label that will be augmented with the sub-block index and then used to label the individual Block2D objects.
  • active

    (int) flag indicating if the block is active:

    • =1 (default) the time integration operates for this block
    • =0 time integration for this block is suppressed
class e3_block.SuperBlock2D(psurf=None, grid=None, nni=2, nnj=2, nbi=1, nbj=1, cf_list=[None, None, None, None], bc_list=[<bc_defs.SlipWallBC object at 0x2aebea5e5710>, <bc_defs.SlipWallBC object at 0x2aebea5e58c0>, <bc_defs.SlipWallBC object at 0x2aebea5e5a70>, <bc_defs.SlipWallBC object at 0x2aebea5e5c20>], wc_bc_list=[<bc_defs.NonCatalyticWBC object at 0x2aebeaac8998>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac89f0>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8a48>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8aa0>], fill_condition=None, hcell_list=[], transient_profile_faces=[], xforce_list=[0, 0, 0, 0], zforce_list=[0, 0, 0, 0], label='sblk', active=1, verbosity_level=0)

Creates a single grid over the region and then subdivides that grid.

SuperBlock2D.__init__(psurf=None, grid=None, nni=2, nnj=2, nbi=1, nbj=1, cf_list=[None, None, None, None], bc_list=[<bc_defs.SlipWallBC object at 0x2aebea5e5710>, <bc_defs.SlipWallBC object at 0x2aebea5e58c0>, <bc_defs.SlipWallBC object at 0x2aebea5e5a70>, <bc_defs.SlipWallBC object at 0x2aebea5e5c20>], wc_bc_list=[<bc_defs.NonCatalyticWBC object at 0x2aebeaac8998>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac89f0>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8a48>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8aa0>], fill_condition=None, hcell_list=[], transient_profile_faces=[], xforce_list=[0, 0, 0, 0], zforce_list=[0, 0, 0, 0], label='sblk', active=1, verbosity_level=0)

Creates a single grid over the region and then subdivides that grid.

On return, self.blks is a (nested) list-of-lists of subblock references.

Three-dimensional flows

class e3_block.Block3D(parametric_volume=None, grid=None, import_grid_file_name=None, nni=None, nnj=None, nnk=None, cf_list=[None, None, None, None, None, None, None, None, None, None, None, None], bc_list=[<bc_defs.SlipWallBC object at 0x2aebea5e5dd0>, <bc_defs.SlipWallBC object at 0x2aebea5e5dd0>, <bc_defs.SlipWallBC object at 0x2aebea5e5dd0>, <bc_defs.SlipWallBC object at 0x2aebea5e5dd0>, <bc_defs.SlipWallBC object at 0x2aebea5e5dd0>, <bc_defs.SlipWallBC object at 0x2aebea5e5dd0>], wc_bc_list=[<bc_defs.NonCatalyticWBC object at 0x2aebeaac8b50>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8b50>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8b50>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8b50>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8b50>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8b50>], fill_condition=None, hcell_list=None, mcell_list=None, xforce_list=[0, 0, 0, 0, 0, 0], zforce_list=[0, 0, 0, 0, 0, 0], transient_profile_faces=[], label='', active=1, omegaz=0.0, verbosity_level=0)

Organises the setting of block parameters for 3D geometry.

Block3D.__init__(parametric_volume=None, grid=None, import_grid_file_name=None, nni=None, nnj=None, nnk=None, cf_list=[None, None, None, None, None, None, None, None, None, None, None, None], bc_list=[<bc_defs.SlipWallBC object at 0x2aebea5e5dd0>, <bc_defs.SlipWallBC object at 0x2aebea5e5dd0>, <bc_defs.SlipWallBC object at 0x2aebea5e5dd0>, <bc_defs.SlipWallBC object at 0x2aebea5e5dd0>, <bc_defs.SlipWallBC object at 0x2aebea5e5dd0>, <bc_defs.SlipWallBC object at 0x2aebea5e5dd0>], wc_bc_list=[<bc_defs.NonCatalyticWBC object at 0x2aebeaac8b50>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8b50>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8b50>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8b50>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8b50>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8b50>], fill_condition=None, hcell_list=None, mcell_list=None, xforce_list=[0, 0, 0, 0, 0, 0], zforce_list=[0, 0, 0, 0, 0, 0], transient_profile_faces=[], label='', active=1, omegaz=0.0, verbosity_level=0)

Basic initialisation for a block.

The order of the cluster_function_list elements are
edge 0 is from p0 -> p1 (i-direction, bottom surface)
edge 1 p1 -> p2 (j-direction, bottom surface)
2 p3 -> p2 (i-direction, bottom surface)
3 p0 -> p3 (j-direction, bottom surface)
4 p4 -> p5 (i-direction, top surface)
5 p5 -> p6 (j-direction, top surface)
6 p7 -> p6 (i-direction, top surface)
7 p4 -> p7 (j-direction, top surface)
8 p0 -> p4 (k-direction)
9 p1 -> p5 (k-direction)
10 p2 -> p6 (k-direction)
11 p3 -> p7 (k-direction)

The definitive list is in the function make_TFI_grid_from_volume() in the Python module e3_grid.py.

See below for other methods to provide details of the boundary conditions and the inter-block connections.

Block3D.cell_centre_location(i, j, k, gdata)

Cell geometry in 3D.

class e3_block.MultiBlock3D(parametric_volume=None, nbi=1, nbj=1, nbk=1, nni=None, nnj=None, nnk=None, clusteri=None, clusterj=None, clusterk=None, fill_condition=None, label='blk', omegaz=0.0, active=1)

Allows us to specify a block of sub-blocks.

A number of internally-connected Block3D objects will be created when one MultiBlock2D object is created. Individual blocks occupy subsections of the original parametric volume.

Note that the collection of Block3D objects will be stored in a list of lists of lists with each inner-most list storing a k-column of blocks. For example, the k=constant layer will have a plan view as shown here:

.                       North
.   1       +-------------+-------------+
.   |       |  [0][1][k]  |  [1][1][k]  |
.   s  West +-------------+-------------+ East
.   |       |  [0][0][k]  |  [1][0][k]  |
.   0       +-------------+-------------+
.                       South
.           0           --r-->          1

The user script may access an individual block within the MultiBlock3D object as object.blks[i][j][k]. This will be useful for connecting blocks within the MultiBlock cluster to other blocks as defined in the user’s script.

Some properties, such as fill_condition, will be propagated to all sub-blocks. Individual sub-blocks can be later customised.

MultiBlock3D.__init__(parametric_volume=None, nbi=1, nbj=1, nbk=1, nni=None, nnj=None, nnk=None, clusteri=None, clusterj=None, clusterk=None, fill_condition=None, label='blk', omegaz=0.0, active=1)

Create a cluster of blocks within a given parametric volume.

Parameters:
  • parametric_volume – The total volume that will be subdivided.
  • nbi – integer number of sub-blocks in the i-direction (i.e. from west to east).
  • nbj – integer number of sub-blocks in the j-direction (i.e. from south to north).
  • nbk – integer number of sub-blocks in the k-direction (i.e. from south to north).
  • nni – List of integer discretisation values along the i-direction edges of the sub-blocks.
  • nnj – List of integer discretisation values for j-direction edges.
  • nnk – List of integer discretisation values for k-direction edges.
  • clusteri – If a list of cluster function objects is supplied, individual clustering will be applied to the corresponding i-direction edges of each sub-block. If not supplied, a default of no clustering will be applied.
  • clusterj – If a list of cluster function objects is supplied, individual clustering will be applied to the corresponding j-direction edges of each sub-block. If not supplied, a default of no clustering will be applied.
  • clusterk – If a list of cluster function objects is supplied, individual clustering will be applied to the corresponding k-direction edges of each sub-block. If not supplied, a default of no clustering will be applied.
  • fill_condition – A single FlowCondition|ExistingSolution|function that is to be used for all sub-blocks
  • label – A string label that will be augmented with the sub-block index and then used to label the individual Block3D objects.
  • active

    flag to indicate if block is active:

    • =1 (default) the time integration operates for this block
    • =0 time integration for this block is suppressed
class e3_block.SuperBlock3D(parametric_volume=None, grid=None, nni=2, nnj=2, nnk=2, nbi=1, nbj=1, nbk=1, cf_list=[None, None, None, None, None, None, None, None, None, None, None, None], bc_list=[<bc_defs.SlipWallBC object at 0x2aebeaad7050>, <bc_defs.SlipWallBC object at 0x2aebeaad7200>, <bc_defs.SlipWallBC object at 0x2aebeaad73b0>, <bc_defs.SlipWallBC object at 0x2aebeaad7560>, <bc_defs.SlipWallBC object at 0x2aebeaad7710>, <bc_defs.SlipWallBC object at 0x2aebeaad78c0>], wc_bc_list=[<bc_defs.NonCatalyticWBC object at 0x2aebeaac8c58>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8cb0>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8d08>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8d60>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8db8>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8e10>], fill_condition=None, hcell_list=[], xforce_list=[0, 0, 0, 0, 0, 0], zforce_list=[0, 0, 0, 0, 0, 0], transient_profile_faces=[], label='sblk', omegaz=0.0, active=1)

Creates a single grid over the region and then subdivides that grid.

Implemented as an extension of SuperBlock2D to the third dimension.

SuperBlock3D.__init__(parametric_volume=None, grid=None, nni=2, nnj=2, nnk=2, nbi=1, nbj=1, nbk=1, cf_list=[None, None, None, None, None, None, None, None, None, None, None, None], bc_list=[<bc_defs.SlipWallBC object at 0x2aebeaad7050>, <bc_defs.SlipWallBC object at 0x2aebeaad7200>, <bc_defs.SlipWallBC object at 0x2aebeaad73b0>, <bc_defs.SlipWallBC object at 0x2aebeaad7560>, <bc_defs.SlipWallBC object at 0x2aebeaad7710>, <bc_defs.SlipWallBC object at 0x2aebeaad78c0>], wc_bc_list=[<bc_defs.NonCatalyticWBC object at 0x2aebeaac8c58>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8cb0>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8d08>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8d60>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8db8>, <bc_defs.NonCatalyticWBC object at 0x2aebeaac8e10>], fill_condition=None, hcell_list=[], xforce_list=[0, 0, 0, 0, 0, 0], zforce_list=[0, 0, 0, 0, 0, 0], transient_profile_faces=[], label='sblk', omegaz=0.0, active=1)

Creates a single grid over the region and then subdivides that grid.

On return self.blks holds a list-of-lists collection of sub-blocks

e3_block.identify_block_connections_3D(block_list=None, exclude_list=, []tolerance=1e-06, verbosity_level=0)

Identifies and makes block connections based on vertex locations.

Parameters:
  • block_list – list of Block3D objects that are to be included in the search. If none is supplied, the whole collection is searched. This allows one to specify a limited selection of blocks to be connected.
  • exclude_list – list of pairs of Block3D objects that should not be connected
  • tolerance – spatial tolerance for colocation of vertices
e3_block.identify_colocated_vertices(A, B, tolerance)

Identify colocated vertices by looking at their position is 3D space.

Parameters:
  • A – Block3D object
  • B – Block3D object
  • tolerance – Vertices are considered to be colocated if their Euclidian distance is less than tolerance.
e3_block.connect_blocks_3D(A, B, vtx_pairs, with_udf=0, filename=None, is_wall=0, sets_conv_flux=0, sets_visc_flux=0, check_corner_locations=True, reorient_vector_quantities=False, nA=None, t1A=None, nB=None, t1B=None, verbosity_level=0)

Make the specified vertex-to-vertex connection between neighbouring blocks.

Parameters:
  • A – Block3D object
  • B – Block3D object
  • vtxPairs – list of 4 pairs of vertex indices specifying the corresponding corners.
  • is_wall – passed through to the AdjacentPlusUDFBC if with_udf is True
  • sets_conv_flux – passed through to the AdjacentPlusUDFBC if with_udf is True
  • sets_visc_flux – passed through to the AdjacentPlusUDFBC if with_udf is True
  • check_corner_locations – set True (default) to check that the face corners are colocated
  • reorient_vector_quantities – if true, apply the rotation matrix to the incoming vector data. The rotation matrix is built from the nominal direction vectors of both faces.
  • nA
  • t1A – the nominal direction vectors for face A
  • nB
  • t1B – the nominal direction vectors for face B
e3_block.cell_count_consistent_3D(blkA, faceA, blkB, faceB, orientation)

Returns True if the cell-discretization matches for the faces, False otherwise.

Table Of Contents

Previous topic

e3_flow

Next topic

e3_grid

This Page