コード例 #1
0
def main(args):
    """Creates cartesianMesh.yaml file for stretched grid."""
    mesh = CartesianStructuredMesh()
    mesh.create(mesh.read_yaml_file(args.input_path))
    mesh.print_parameters()
    if args.output_path:
        mesh.write_yaml_file(args.output_path)
    if args.grid_path:
        mesh.write(args.grid_path, precision=16)
コード例 #2
0
def main(args):
  """Creates cartesianMesh.yaml file for stretched grid."""
  mesh = CartesianStructuredMesh()
  mesh.create(mesh.read_yaml_file(args.input_path))
  mesh.print_parameters()
  if args.output_path:
    mesh.write_yaml_file(args.output_path)
  if args.grid_path:
    mesh.write(args.grid_path, precision=16)
コード例 #3
0
ファイル: createDomainYaml.py プロジェクト: barbagroup/cuIBM
"""
Creates a YAML file with info about the structured Cartesian mesh that will be
parsed by cuIBM.
"""

from snake.cartesianMesh import CartesianStructuredMesh


# info about the 2D structured Cartesian grid
info = [{'direction': 'x', 'start': 0.0,
         'subDomains': [{'end': 1.0,
                         'width': 0.0078125,
                         'stretchRatio': 1.0}]},
        {'direction': 'y', 'start': 0.0,
         'subDomains': [{'end': 1.0,
                         'width': 0.0078125,
                         'stretchRatio': 1.0}]}]

mesh = CartesianStructuredMesh()
mesh.create(info, mode='cuibm')
mesh.print_parameters()
mesh.write_yaml_file('domain.yaml')
コード例 #4
0
        'stretchRatio': 1.01,
        'reverse': True,
        'precision': 2
    }, {
        'end': 2.0,
        'width': width,
        'stretchRatio': 1.0
    }, {
        'end': 15.0,
        'width': width,
        'stretchRatio': 1.01,
        'precision': 2
    }]
}, {
    'direction':
    'z',
    'start':
    0.0,
    'subDomains': [{
        'end': spanwise_length,
        'width': spanwise_width,
        'stretchRatio': 1.0
    }]
}]

mesh = CartesianStructuredMesh()
mesh.create(info)
mesh.print_parameters()
filepath = root_dir / 'cartesianMesh.yaml'
mesh.write_yaml_file(str(filepath))
コード例 #5
0
"""
Creates a YAML file with info about the structured Cartesian mesh that will be
parsed by cuIBM.
"""

from snake.cartesianMesh import CartesianStructuredMesh

# info about the 2D structured Cartesian grid
info = [{
    'direction': 'x',
    'start': 0.0,
    'subDomains': [{
        'end': 1.0,
        'width': 1.0 / 192,
        'stretchRatio': 1.0
    }]
}, {
    'direction': 'y',
    'start': 0.0,
    'subDomains': [{
        'end': 1.0,
        'width': 1.0 / 192,
        'stretchRatio': 1.0
    }]
}]

mesh = CartesianStructuredMesh()
mesh.create(info, mode='cuibm')
mesh.print_parameters()
mesh.write_yaml_file('domain.yaml')
コード例 #6
0
        'stretchRatio': 1.01,
        'precision': 2
    }]
}, {
    'direction':
    'y',
    'start':
    -15.0,
    'subDomains': [{
        'end': -2.0,
        'width': width,
        'stretchRatio': 1.01,
        'reverse': True,
        'precision': 2
    }, {
        'end': 2.0,
        'width': width,
        'stretchRatio': 1.0
    }, {
        'end': 15.0,
        'width': width,
        'stretchRatio': 1.01,
        'precision': 2
    }]
}]

mesh = CartesianStructuredMesh()
mesh.create(info, mode='cuibm')
mesh.print_parameters()
mesh.write_yaml_file('cartesianMesh.yaml')