Changes between Version 3 and Version 4 of ModellingQuestions


Ignore:
Timestamp:
Oct 20, 2008, 1:42:52 PM (15 years ago)
Author:
rwilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ModellingQuestions

    v3 v4  
    7575If meshes are too coarse, discretisation errors in both stage and momentum may lead to unrealistic results. All studies should include sensitivity and convergence studies based on different resolutions.
    7676
     77== How do I tag interior polygons? ==
     78
     79At the moment create_mesh_from_regions does not allow interior
     80polygons with symbolic tags. If tags are needed, the interior
     81polygons must be created subsequently. For example, given a filename
     82of polygons representing solid walls (in Arc Ungenerate format) can
     83be tagged as such using the code snippet:
     84{{{
     85# Create mesh outline with tags
     86mesh = create_mesh_from_regions(bounding_polygon,
     87                                boundary_tags=boundary_tags)
     88# Add buildings outlines with tags set to 'wall'. This would typically
     89# bind to a Reflective boundary
     90mesh.import_ungenerate_file(buildings_filename, tag='wall')
     91
     92# Generate and write mesh to file
     93mesh.generate_mesh(maximum_triangle_area=max_area)
     94mesh.export_mesh_file(mesh_filename)
     95}}}
     96
     97Note that a mesh object is returned from \{{{create_mesh_from_regions}}}
     98when file name is omitted.
    7799
    78100
     101
     102