Superelement¶
Routines for reading and writing the attributes of super elements.
Geometric values (coordinates, lengths and areas) are related to the globally set unit (see General settings > gobal_unit). The vector values are cartesian coordinates if not otherwise indicated. Refer to Coordinate transformation for transformation functions to other coordinate systems.
Overview
Identifier |
Nr of values |
Unit |
Acces get/set |
Description |
valid |
1 |
- |
g |
validity |
key |
1 |
- |
g |
key (id) of this super element |
srkey |
1 |
- |
g |
key of subregion |
elkeys |
[N] |
- |
g |
keys of all N elements of this superelement |
ndkeys |
[N] |
- |
g |
keys of all N nodes included in this superelement |
ndchn |
[N] |
- |
g |
keys of all N node chains included in this superelement |
bndkeys |
[N] |
- |
g |
keys of all N boundary nodes of this superelement |
col |
1 |
- |
g |
color [1:255] |
mcvtyp |
1 |
- |
g/s |
|
condtyp |
1 |
- |
g/s |
Type of conductor (0: no wdg, 1: wire current, 2: wire flux, 3: bar current, 4: bar flux, 5: wire voltage, 6: bar voltage, 7: wire extern, 8: bar extern) |
conduc |
1 |
S/m |
g/s |
electrical conductivity |
rlength |
1 |
- |
g/s |
relative length |
velsys |
2 |
- |
g/s |
coordinate system of velocity (cartes, polar, cylind) |
velo |
2 |
m/s |
g/s |
velocity vector in coordinate system “velsys” |
area |
1 |
gu² |
g |
area of superelement |
curd |
2 |
A/mm² |
g/s |
(eddy) current density (Real, Imag) |
cur |
2 |
A |
g |
(eddy)current (Real, Imag) in superelement |
curlos |
1 |
W/gu |
g |
(eddy)current losses (mean) in superelement per unit length |
spezwe |
1 |
kg/m³ |
g/s |
specific mass density |
thcond |
1 |
W/(m*K) |
g/s |
thermal conductivity |
thheat |
1 |
J/(kg*K) |
g/s |
thermal heat capacity |
temp |
1 |
K |
g/s |
temperature of Subregion (FEMAG-ME) resp.. start temperature (FEMAG-TH) |
emodul |
1 |
N/m² |
g/s |
elasticity modul |
poisson |
1 |
- |
g/s |
ratio of transverse to axial strain |
linexp |
1 |
1/K |
g/s |
linear expansion coefficient |
gu = global unit of length
Befehlsbeschreibung
Function: key = get_spel_key(x, y)
Gibt die Nummer eines Superelementes zurück, das über die kartesischen Koordinaten x und y adressiert wird.
- Parameter
- [in] x Coordinate 1[in] y Coordiante 2
- Return values
- key Superelement number
Beispiel
key = get_spel_key(x, y) -- Get the superelement's number
print("super-element key = %d", key) -- Output to shell
Command: get_spel_keys(x, y, “var”)
Gibt die Nummern aller Superelemente einer Subregion zurück. Die Subregion wird über die kartesischen Koordinaten x und y adressiert.
- Parameter
- [in] x Coordinate 1[in] y Coordiante 2[out] var Bezeichner des Arrays in dem die Superelementnummern zurückgegeben werden
Beispiel
get_spel_keys(x, y, "keys") -- Get all superelements of the subregion addressed by x,y
N = table.getn(keys) -- Number of elements in array
Command: get_spel_keys(“var”)
Gibt die Nummern aller Superelemente des Modells zurück
- Parameter
- [out] var Bezeichner des Arrays in dem die Superelementnummern zurückgegeben werden
Beispiel
get_spel_keys("keys") -- Get all superelements of the model
N = table.getn(keys) -- Number of elements in array
Function: d1, d2, … = get_spel_data(“identifier”, key)
Liest Daten eines Superelementes und gibt diese zurück.
- Parameter
- [in] identifier Art der auszulesenden Daten (siehe Tabelle)[in] key Superelement number
- Return values
- d1 First return valued2 Second return value
Beispiel: Ermittlung der Fläche eines Superelements
A = get_spel_data("area", key)
Alternativ zu key kann das Superelement auch über kartesische Koordinaten in der globalen Einheit adressiert werden.
A = get_spel_data("area", x, y)
Command: set_spel_data(“identifier”, key, d1, d2, …)
Weist einem Superelement die angegebenen Eigenschaften zu.
- Parameter
- identifier Art der zuzuweisenden Eigenschaft (siehe Tabelle)key Superelement numberd1 First refering valued2 Second refering value
Beispiel: Vorgabe der Stromdichte eines Superelements
set_spel_data("curd", key, 4.24, 1.5)
Anwendungsbeispiel¶
Ermittlung der Nummern aller in einer Subregion enthaltenen Superelemente und zyklisches Lesen einer Größe, hier die Fläche der Superelemente.
get_spel_keys(x, y, "keys") -- get all superelememt keys in subregion addressed by x,y
N = table.getn(keys) -- number of keys
for i = 1,N do
draw_spel(keys[i], "red", 0) -- draw considered superelement
A = get_spel_data("area", keys[i]) -- get property of superelement
printf("%d %g", i, A) -- output result to shell
end
Rückgabe der Randknoten und Darstellung der Kontur eines Superelements.
bndkeys = get_spel_data("bndkeys", x0, y0) -- get all boarder node keys
grf_clear()
for j = 1,#bndkeys-1 do -- loop over all keys
x1, y1 = get_node_data("xy", bndkeys[j]) -- get the node coordinates
x2, y2 = get_node_data("xy", bndkeys[j+1])
point(x1, y1, "black", "x") -- draw nodes
line(x1, y1, x2, y2, "black") -- draw the contour
text(x1, y1, tostring(bndkeys[j]), "black", 0.1) -- print node numbers
end
x1, y1 = get_node_data("xy", bndkeys[1]) -- add the last node and close contour
point(x2, y2, "black", "x")
line(x1, y1, x2, y2, "black")
text(x2, y2, tostring(bndkeys[#bndkeys]), "black", 0.1)