Automatic Meshing
Helpers to derive mesh lines from geometric primitives, see Mesh.
Created on Sun Feb 19 20:29:25 2017
@author: thorsten
- openEMS.automesh.mesh_hint_from_point(point, dirs)
Get a grid hint for the coordinates of the point.
- Parameters:
dirs – str – ‘x’,’y’,’z’ or ‘xy’, ‘yz’ or ‘xyz’ or ‘all’
mesh – combine mesh hint to existing mesh
- Returns:
(3,) list of mesh hints
- openEMS.automesh.mesh_hint_from_box(box, dirs, metal_edge_res=None, **kw)
Get a grid hint for the edges of the given box with an an optional 2D metal edge resolution.
- Parameters:
dirs – str – ‘x’,’y’,’z’ or ‘xy’, ‘yz’ or ‘xyz’ or ‘all’
metal_edge_res – float – 2D flat edge resolution
up_dir – bool – Enable upper edge
down_dir – bool – Enable lower edge
mesh – combine mesh hint to existing mesh
- Returns:
(3,) list of mesh hints
- openEMS.automesh.mesh_estimate_cfl_timestep(mesh)
Estimate the maximum CFL time step of the given mesh needed to ensure numerical stability, assuming propagation in pure vacuum.
- Returns:
the maximum CFL time step, in seconds