3 env = cf.Core.environment()
7 domain = root.create_component(
'Domain',
'cf3.mesh.Domain')
8 mesh = domain.create_component(
'OriginalMesh',
'cf3.mesh.Mesh')
10 blocks = root.create_component(
'model',
'cf3.mesh.BlockMesh.BlockArrays')
11 points = blocks.create_points(dimensions = 2, nb_points = 4)
16 block_nodes = blocks.create_blocks(1)
17 block_nodes[0] = [0, 1, 2, 3]
18 block_subdivs = blocks.create_block_subdivisions()
19 block_subdivs[0] = [16,16]
20 gradings = blocks.create_block_gradings()
21 gradings[0] = [1., 1., 1., 1.]
22 blocks.create_patch_nb_faces(name =
'bottom', nb_faces = 1)[0] = [0, 1]
23 blocks.create_patch_nb_faces(name =
'right', nb_faces = 1)[0] = [1, 2]
24 blocks.create_patch_nb_faces(name =
'top', nb_faces = 1)[0] = [2, 3]
25 blocks.create_patch_nb_faces(name =
'left', nb_faces = 1)[0] = [3, 0]
26 blocks.extrude_blocks(positions=[1.], nb_segments=[4], gradings=[1.])
27 blocks.partition_blocks(nb_partitions = cf.Core.nb_procs(), direction = 0)
28 blocks.create_mesh(mesh.uri())
30 coords = mesh.geometry.coordinates
31 for i
in range(len(coords)):
36 corr = domain.create_component(
'TwoPointCorrelation',
'cf3.solver.actions.TwoPointCorrelation')
39 corr.coordinate = 1.75
40 corr.file = cf.URI(
'two-point-correlation01-{iteration}.txt')
43 corr2 = domain.create_component(
'TwoPointCorrelation',
'cf3.solver.actions.TwoPointCorrelation')
46 corr2.coordinate = 1.75
47 corr2.file = cf.URI(
'two-point-correlation02-{iteration}.txt')