Reference page for GeoBase
Contents
- Summary
- this = GeoBase(arguments) Constructor
- this.Nrep(arguments) Number of times to replicate elementary mesh.
- this.add_circuit(arguments) Add Circuit to this.
- this.add_domain(arguments) Add Domain to this.
- this.add_material(arguments) Add Material to this.
- this.copy_domain(arguments) Copy domain and apply necessary rotations or
- this.create_geometry(arguments) Initialize geometry.
- GeoBase/this.dim(arguments) is a function.
- this.export_dxf(arguments) Export geometry as rudimentary dxf file.
- this.fill(arguments) Fill mesh
- this.get_domain(arguments) Get domain(s) by name.
- this.list_dimensions(arguments) Display dimensions info on command window
- this.mesh_elementary_geometry(arguments) Create mesh for the elementary geometry.
- GeoBase/this.mesh_elementary_geometry_3D(arguments) is a function.
- this.mesh_geometry(arguments) Mesh geometry.
- this.parse_nodes(arguments) Parse special nodes.
- this.plot(arguments) Plot nodes on the meshed geometry.
- this.plot_edges(arguments) Plot edges
- this.plot_geometry(arguments) Plots the geometry.
- this.replicate_elementary_mesh(arguments) Replicate elementary mesh.
- GeoBase/this.replicate_elementary_mesh_3D(arguments) is a function.
- this.save_to_excel(arguments) Save specifications to Excel sheet.
- this.shift_elementary_nodes(arguments) Replicate nodes to a new sector.
- this.symmetry_period(arguments) Symmetry period of the geometry.
- this.triplot(arguments) Triangle plot of this.
- this.visualize(arguments) this.visualize(arguments) geometry.
Summary
GeoBase Base class for geometries.
Basic usage:
- Add some Domains with this.add_domain
- Add the required Materials with this.add_material
- Optionally, add some Circuits with this.add_circuit
- Call this.mesh_geometry to mesh the elementary geometry and replicate accordingly.
Note that his is an abstract base class and cannot be instantiated. Most of the time, you'll be working with either RadialGeometry or AxialGeometry, or their subclasses. Those classes handle the practicalities of mesh replication, namely how the elementary mesh is rotated or translated.
The following methods are recommended to be re-implemented in subclasses:
- Nrep : number of mesh replications
- symmetry_period : symmetry period of winding etc.
See RadialGeometry, StatorBase, SlottedRotorBase, SynRotorBase Documentation for GeoBase doc GeoBase
PROPERTIES
- PMs - Permanent magnet Domain objects
- GeoBase/boundaries is a property.
- circuits - Circuit objects defined for this
- data - miscellaneous data
- domains - Domain objects making up this
- nodes = struct() %other nodes
- materials - Material objects
- mesh - mesh object, WPI
- n_ag - Airgap boundary nodes
- n_ccw - Counter-clockwise periodic boundary nodes
- n_cw - Clock-wise periodic boundary nodes
- n_dir - Dirichlet (flux insulation) boundary nodes
- p - Coordinates of nodes, 2xN array
- t - Element indices to this.nodes, nxN array
METHODS
Class methods are listed below. Inherited methods are not included.
this = GeoBase(arguments) Constructor
this.Nrep(arguments) Number of times to replicate elementary mesh.
Nrep(this)
Usually subclassed, but by default returns this.dimensions.*Nrep*.
this.add_circuit(arguments) Add Circuit to this.
this.add_domain(arguments) Add Domain to this.
this.add_material(arguments) Add Material to this.
this.copy_domain(arguments) Copy domain and apply necessary rotations or
translations to the domain and remanence orientation, if any.
new = copy_domain(this, old_domain, sector_index)
this.create_geometry(arguments) Initialize geometry.
this = create_geometry(this, varargin)
Initializes the geometry.
Must be subclassed.
GeoBase/this.dim(arguments) is a function.
d = dim(this)
this.export_dxf(arguments) Export geometry as rudimentary dxf file.
export_dxf(this, fname)
drawing = export_dxf(this, fname, 'skip_save', true) to return drawing object
export_dxf(this, drawing)
export_dxf(this, fname_or_drawing, key, val, ...) with
- 'Nrep', n : replicate geometry, see below
- 'rep_angle', x : apply angle x for each replication
- 'unit', 'm' or 'mm' : unit to use
this.fill(arguments) Fill mesh
fill(this, name, varargin)
Fills the mesh of domain name, using varargin{:} as arguments.
- See msh_*fill*
- See this.get_domain for the use of wildcards with name
fill(this, varargin)
Plots the entire mesh using varargin{:} as arguments.
this.get_domain(arguments) Get domain(s) by name.
get_domain(this, name)
Returns the Domain with the correct name.
The wildcard syntax name_* can be used to find all replicated domains corresponding to the original domain with name.
this.list_dimensions(arguments) Display dimensions info on command window
this.mesh_elementary_geometry(arguments) Create mesh for the elementary geometry.
mesh_elementary_geometry(this)
Meshes the elementary geometry, e.g. the raw geometry before possible replication.
Note that the methods this.shift_elementary_nodes, this.copy_domain, and this.parse_nodes have to be implemented.
GeoBase/this.mesh_elementary_geometry_3D(arguments) is a function.
mesh_elementary_geometry_3D(this, varargin)
this.mesh_geometry(arguments) Mesh geometry.
Equivalent to calling this.mesh_elementary_geometry and this.replicate_elementary_mesh
this.parse_nodes(arguments) Parse special nodes.
parse_nodes(this, Surfaces)
Parses special nodes from meshed Surfaces. Usually airgap and periodic boundary nodes.
this.plot(arguments) Plot nodes on the meshed geometry.
plot(this, varargin)
Equivalent to calling msh_*plot*(this, varargin{:})
this.plot_edges(arguments) Plot edges
this.plot_geometry(arguments) Plots the geometry.
[] = plot_geometry(this, varargin)
Plots the geometry using plot with varargin{:}
this.replicate_elementary_mesh(arguments) Replicate elementary mesh.
replicate_elementary_mesh(this, sector_shift, Nrep)
Replicates the elementary geometry Nrep times. This is performed by
- applying the sector_shift to this.p, using this.shift_elementary_nodes
- eliminating the duplicate nodes on the inter-sector boundaries, with the nodes corresponding to this.n_cw replaced by this.n_ccw.
GeoBase/this.replicate_elementary_mesh_3D(arguments) is a function.
replicate_elementary_mesh_3D(this)
this.save_to_excel(arguments) Save specifications to Excel sheet.
save_to_excel(this, fname, varargin)
this.shift_elementary_nodes(arguments) Replicate nodes to a new sector.
pnew = shift_elementary_nodes(this, p, k)
Replicated the nodes p of the elementary symmetry sector into the sector k.
this.symmetry_period(arguments) Symmetry period of the geometry.
symmetry_period(this)
Usually subclassed, but by default returns this.dimensions.*symmetry_period*.
this.triplot(arguments) Triangle plot of this.
triplot(this, name, varargin)
Plots the mesh of domain name, using varargin{:} as arguments.
triplot(this, varargin)
Plots the entire mesh using varargin{:} as arguments.
this.visualize(arguments) this.visualize(arguments) geometry.
visualize(this)
Visualizes geometry, using msh_fill with 'linestyle', 'none'.
visualize(this, args)
Visualize, passing args to patch.