In the following example, all volumes are selected, and a size of 0.055 is assigned:
a.selectionMode = "Volume";
a.selectAll();
a.applyMeshSize(0.055);
In this next example, a size of 2.5 is assigned to all volumes. The selection mode is then switched to surface, and all surfaces are selected. Some are then deselected, and a size of 0.15 is assigned:
a.selectionMode = "Volume";
a.selectAll();
a.applyMeshSize(2.5);
a.selectionMode = "Surface";
a.selectAll();
a.deselect(3);
a.deselect(11);
a.applyMeshSize(0.15);
Automatic assignment of mesh sizes can be performed by completely omitting mesh definitions from the script. Autodesk® CFD detects that no mesh sizes were specified and automatically assigns sizes based on the topology of the geometry.