Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Pries, Jason
Oersted
Commits
3be33db6
Commit
3be33db6
authored
Dec 01, 2017
by
Pries, Jason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Partial Commit on Synchronous Reluctance Rotor Template
parent
2704ddd8
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
209 additions
and
29 deletions
+209
-29
src/Model Templates/CMakeLists.txt
src/Model Templates/CMakeLists.txt
+1
-1
src/Model Templates/include/ModelTemplates.hpp
src/Model Templates/include/ModelTemplates.hpp
+1
-0
src/Model Templates/src/DistributedWindingStator.cpp
src/Model Templates/src/DistributedWindingStator.cpp
+15
-6
src/Model Templates/src/DistributedWindingStator.h
src/Model Templates/src/DistributedWindingStator.h
+5
-11
src/Model Templates/src/ModelTemplate.h
src/Model Templates/src/ModelTemplate.h
+21
-0
src/Model Templates/src/SynchronousReluctanceRotor.cpp
src/Model Templates/src/SynchronousReluctanceRotor.cpp
+91
-0
src/Model Templates/src/SynchronousReluctanceRotor.h
src/Model Templates/src/SynchronousReluctanceRotor.h
+23
-0
test/CMakeLists.txt
test/CMakeLists.txt
+1
-1
test/Model Templates/test_DistributedWindingStator.cpp
test/Model Templates/test_DistributedWindingStator.cpp
+6
-10
test/Model Templates/test_SynchronousReluctanceRotor.cpp
test/Model Templates/test_SynchronousReluctanceRotor.cpp
+45
-0
No files found.
src/Model Templates/CMakeLists.txt
View file @
3be33db6
...
@@ -4,7 +4,7 @@ set(SOURCE_FILES
...
@@ -4,7 +4,7 @@ set(SOURCE_FILES
./include/ModelTemplates.hpp
./include/ModelTemplates.hpp
./src/DistributedWindingStator.h ./src/DistributedWindingStator.cpp
./src/DistributedWindingStator.h ./src/DistributedWindingStator.cpp
)
src/SynchronousReluctanceRotor.cpp src/SynchronousReluctanceRotor.h src/ModelTemplate.h
)
add_library
(
model_templates SHARED
${
SOURCE_FILES
}
)
add_library
(
model_templates SHARED
${
SOURCE_FILES
}
)
...
...
src/Model Templates/include/ModelTemplates.hpp
View file @
3be33db6
...
@@ -2,5 +2,6 @@
...
@@ -2,5 +2,6 @@
#define OERSTED_MODELTEMPLATES_H
#define OERSTED_MODELTEMPLATES_H
#include "../src/DistributedWindingStator.h"
#include "../src/DistributedWindingStator.h"
#include "../src/SynchronousReluctanceRotor.h"
#endif //OERSTED_MODELTEMPLATES_H
#endif //OERSTED_MODELTEMPLATES_H
src/Model Templates/src/DistributedWindingStator.cpp
View file @
3be33db6
#include "DistributedWindingStator.h"
#include "DistributedWindingStator.h"
void
DistributedWindingStator
::
add_to_sketch
(
Sketch
&
s
,
std
::
shared_ptr
<
Vertex
>
origin
,
size_t
Nt
)
{
void
DistributedWindingStator
::
add_to_sketch
(
Sketch
&
s
,
std
::
shared_ptr
<
Vertex
>
origin
)
{
// Dimensions are approximate, sketch.solve() + constraints will impose real values
// Dimensions are approximate, sketch.solve() + constraints will impose real values
double_t
at
=
M_PI
/
Teeth
;
double_t
at
=
M_PI
/
Total
Teeth
;
double_t
ri
=
InnerRadius
;
double_t
ri
=
InnerRadius
;
double_t
rb
=
ri
+
ToothFaceThickness
+
SlotDepth
;
double_t
rb
=
ri
+
ToothFaceThickness
+
SlotDepth
;
double_t
ro
=
rb
+
BackironThickness
;
double_t
ro
=
rb
+
BackironThickness
;
double_t
rof
=
rb
-
SlotWidth
/
2.0
;
double_t
rof
=
rb
-
SlotWidth
/
2.0
;
double_t
rif
=
ri
+
SlotOpening
+
SlotWidth
/
2.0
;
double_t
rif
=
ri
+
SlotOpening
+
SlotWidth
/
2.0
;
double_t
aso
=
at
-
at
*
SlotOpening
*
Teeth
/
(
2.0
*
M_PI
*
ri
);
double_t
aso
=
at
-
at
*
SlotOpening
*
Total
Teeth
/
(
2.0
*
M_PI
*
ri
);
double_t
rso
=
ri
+
ToothFaceThickness
;
double_t
rso
=
ri
+
ToothFaceThickness
;
double_t
rf
=
SlotWidth
/
2.0
;
double_t
rf
=
SlotWidth
/
2.0
;
double_t
af
=
at
-
M_PI_2
;
double_t
af
=
at
-
M_PI_2
;
// Construct geometry
// Construct geometry
V
.
resize
(
12
);
V
[
0
]
=
s
.
new_element
<
Vertex
>
(
ri
,
0.0
);
V
[
0
]
=
s
.
new_element
<
Vertex
>
(
ri
,
0.0
);
V
[
1
]
=
s
.
new_element
<
Vertex
>
(
ro
,
0.0
);
V
[
1
]
=
s
.
new_element
<
Vertex
>
(
ro
,
0.0
);
V
[
2
]
=
s
.
new_element
<
Vertex
>
(
ro
*
cos
(
at
),
ro
*
sin
(
at
));
V
[
2
]
=
s
.
new_element
<
Vertex
>
(
ro
*
cos
(
at
),
ro
*
sin
(
at
));
...
@@ -28,6 +29,7 @@ void DistributedWindingStator::add_to_sketch(Sketch &s, std::shared_ptr<Vertex>
...
@@ -28,6 +29,7 @@ void DistributedWindingStator::add_to_sketch(Sketch &s, std::shared_ptr<Vertex>
V
[
10
]
=
s
.
new_element
<
Vertex
>
(
V
[
5
]
->
x
()
+
rf
*
cos
(
af
),
V
[
5
]
->
y
()
+
rf
*
sin
(
af
));
V
[
10
]
=
s
.
new_element
<
Vertex
>
(
V
[
5
]
->
x
()
+
rf
*
cos
(
af
),
V
[
5
]
->
y
()
+
rf
*
sin
(
af
));
V
[
11
]
=
s
.
new_element
<
Vertex
>
(
V
[
4
]
->
x
()
+
rf
*
cos
(
af
),
V
[
4
]
->
y
()
+
rf
*
sin
(
af
));
V
[
11
]
=
s
.
new_element
<
Vertex
>
(
V
[
4
]
->
x
()
+
rf
*
cos
(
af
),
V
[
4
]
->
y
()
+
rf
*
sin
(
af
));
L
.
resize
(
7
);
L
[
0
]
=
s
.
new_element
<
LineSegment
>
(
V
[
0
],
V
[
1
]);
L
[
0
]
=
s
.
new_element
<
LineSegment
>
(
V
[
0
],
V
[
1
]);
L
[
1
]
=
s
.
new_element
<
LineSegment
>
(
V
[
3
],
V
[
2
],
true
);
// for construction
L
[
1
]
=
s
.
new_element
<
LineSegment
>
(
V
[
3
],
V
[
2
],
true
);
// for construction
L
[
2
]
=
s
.
new_element
<
LineSegment
>
(
V
[
6
],
V
[
3
],
true
);
// for construction
L
[
2
]
=
s
.
new_element
<
LineSegment
>
(
V
[
6
],
V
[
3
],
true
);
// for construction
...
@@ -36,6 +38,7 @@ void DistributedWindingStator::add_to_sketch(Sketch &s, std::shared_ptr<Vertex>
...
@@ -36,6 +38,7 @@ void DistributedWindingStator::add_to_sketch(Sketch &s, std::shared_ptr<Vertex>
L
[
5
]
=
s
.
new_element
<
LineSegment
>
(
V
[
9
],
V
[
6
]);
L
[
5
]
=
s
.
new_element
<
LineSegment
>
(
V
[
9
],
V
[
6
]);
L
[
6
]
=
s
.
new_element
<
LineSegment
>
(
V
[
10
],
V
[
11
]);
L
[
6
]
=
s
.
new_element
<
LineSegment
>
(
V
[
10
],
V
[
11
]);
C
.
resize
(
5
);
C
[
0
]
=
s
.
new_element
<
CircularArc
>
(
V
[
0
],
V
[
8
],
origin
,
ri
);
C
[
0
]
=
s
.
new_element
<
CircularArc
>
(
V
[
0
],
V
[
8
],
origin
,
ri
);
C
[
1
]
=
s
.
new_element
<
CircularArc
>
(
V
[
1
],
V
[
2
],
origin
,
ro
);
C
[
1
]
=
s
.
new_element
<
CircularArc
>
(
V
[
1
],
V
[
2
],
origin
,
ro
);
C
[
2
]
=
s
.
new_element
<
CircularArc
>
(
V
[
8
],
V
[
7
],
origin
,
ri
);
C
[
2
]
=
s
.
new_element
<
CircularArc
>
(
V
[
8
],
V
[
7
],
origin
,
ri
);
...
@@ -63,7 +66,7 @@ void DistributedWindingStator::add_to_sketch(Sketch &s, std::shared_ptr<Vertex>
...
@@ -63,7 +66,7 @@ void DistributedWindingStator::add_to_sketch(Sketch &s, std::shared_ptr<Vertex>
s
.
new_element
<
Distance
<
LineSegment
>>
(
L
[
3
],
L
[
4
],
SlotOpening
/
2.0
);
s
.
new_element
<
Distance
<
LineSegment
>>
(
L
[
3
],
L
[
4
],
SlotOpening
/
2.0
);
at
=
180.0
/
Teeth
;
at
=
180.0
/
Total
Teeth
;
s
.
new_element
<
Angle
>
(
L
[
0
],
L
[
1
],
at
);
s
.
new_element
<
Angle
>
(
L
[
0
],
L
[
1
],
at
);
double_t
tol
=
s
.
solve
();
double_t
tol
=
s
.
solve
();
...
@@ -80,6 +83,12 @@ void DistributedWindingStator::add_to_sketch(Sketch &s, std::shared_ptr<Vertex>
...
@@ -80,6 +83,12 @@ void DistributedWindingStator::add_to_sketch(Sketch &s, std::shared_ptr<Vertex>
// Rotational Copy
// Rotational Copy
copy_curves
.
insert
(
copy_curves
.
end
(),
mc
->
curves
().
begin
(),
mc
->
curves
().
end
());
copy_curves
.
insert
(
copy_curves
.
end
(),
mc
->
curves
().
begin
(),
mc
->
curves
().
end
());
at
=
360.0
/
Teeth
;
at
=
360.0
/
TotalTeeth
;
std
::
shared_ptr
<
RotateCopy
>
rc
=
s
.
new_element
<
RotateCopy
>
(
copy_curves
,
origin
,
at
,
Nt
-
1
,
true
);
std
::
shared_ptr
<
RotateCopy
>
rc
=
s
.
new_element
<
RotateCopy
>
(
copy_curves
,
origin
,
at
,
ModeledTeeth
-
1
,
true
);
if
(
Convexify
)
{
std
::
shared_ptr
V0p
=
s
.
select_periodic_vertex
(
V
[
0
],
origin
,
(
360.0
*
ModeledTeeth
)
/
TotalTeeth
);
s
.
new_element
<
LineSegment
>
(
origin
,
V
[
0
]);
s
.
new_element
<
LineSegment
>
(
origin
,
V0p
);
}
}
}
\ No newline at end of file
src/Model Templates/src/DistributedWindingStator.h
View file @
3be33db6
#ifndef OERSTED_DISTRIBUTEDWINDINGSTATOR_H
#ifndef OERSTED_DISTRIBUTEDWINDINGSTATOR_H
#define OERSTED_DISTRIBUTEDWINDINGSTATOR_H
#define OERSTED_DISTRIBUTEDWINDINGSTATOR_H
#include <cstddef>
#include "ModelTemplate.h"
#include <cmath>
#include "Sketch.hpp"
class
DistributedWindingStator
:
public
ModelTemplate
{
class
DistributedWindingStator
{
public:
public:
void
add_to_sketch
(
Sketch
&
s
,
std
::
shared_ptr
<
Vertex
>
origin
,
size_t
Nt
)
;
void
add_to_sketch
(
Sketch
&
s
,
std
::
shared_ptr
<
Vertex
>
origin
)
override
;
size_t
Teeth
;
size_t
TotalTeeth
;
size_t
ModeledTeeth
;
double_t
InnerRadius
;
double_t
InnerRadius
;
double_t
ToothFaceThickness
;
double_t
ToothFaceThickness
;
...
@@ -19,10 +17,6 @@ public:
...
@@ -19,10 +17,6 @@ public:
double_t
SlotOpening
;
double_t
SlotOpening
;
double_t
SlotWidth
;
double_t
SlotWidth
;
std
::
array
<
std
::
shared_ptr
<
Vertex
>
,
12
>
V
;
std
::
array
<
std
::
shared_ptr
<
LineSegment
>
,
7
>
L
;
std
::
array
<
std
::
shared_ptr
<
CircularArc
>
,
5
>
C
;
};
};
#endif //OERSTED_DISTRIBUTEDWINDINGSTATOR_H
#endif //OERSTED_DISTRIBUTEDWINDINGSTATOR_H
src/Model Templates/src/ModelTemplate.h
0 → 100644
View file @
3be33db6
#ifndef OERSTED_MODELTEMPLATE_H
#define OERSTED_MODELTEMPLATE_H
#include <cstddef>
#include <cmath>
#include "Sketch.hpp"
class
ModelTemplate
{
public:
virtual
void
add_to_sketch
(
Sketch
&
s
,
std
::
shared_ptr
<
Vertex
>
origin
)
=
0
;
bool
Convexify
{
false
};
std
::
vector
<
std
::
shared_ptr
<
Vertex
>>
V
;
std
::
vector
<
std
::
shared_ptr
<
LineSegment
>>
L
;
std
::
vector
<
std
::
shared_ptr
<
CircularArc
>>
C
;
};
#endif //OERSTED_MODELTEMPLATE_H
src/Model Templates/src/SynchronousReluctanceRotor.cpp
0 → 100644
View file @
3be33db6
#include "SynchronousReluctanceRotor.h"
void
SynchronousReluctanceRotor
::
add_to_sketch
(
Sketch
&
s
,
std
::
shared_ptr
<
Vertex
>
origin
)
{
// Dimensions are approximate, sketch.solve() + constraints will impose real values
double_t
ri
=
InnerRadius
;
double_t
ro
=
OuterRadius
;
double_t
Np
=
Poles
;
double_t
Nb
=
RadialBridgeThickness
.
size
();
double_t
a180p
=
M_PI
/
Np
;
std
::
vector
<
double_t
>
rr
,
drr
;
std
::
vector
<
double_t
>
aa
,
dra
;
rr
.
push_back
(
ro
-
RadialThickness
[
0
]);
drr
.
push_back
(
RadialBridgeThickness
[
0
]);
aa
.
push_back
(
a180p
-
M_PI
*
AngularThickness
[
0
]
/
180.0
);
dra
.
push_back
(
AngularBridgeThickness
[
0
]);
for
(
size_t
i
=
1
;
i
!=
RadialThickness
.
size
();
++
i
)
{
rr
.
push_back
(
rr
[
i
-
1
]
-
RadialThickness
[
i
]);
drr
.
push_back
(
RadialBridgeThickness
[
i
/
2
]);
aa
.
push_back
(
aa
[
i
-
1
]
-
M_PI
*
AngularThickness
[
i
]
/
180.0
);
dra
.
push_back
(
AngularBridgeThickness
[
i
/
2
]);
}
std
::
vector
<
double_t
>
xr
,
yr
,
xa
,
ya
;
for
(
size_t
i
=
0
;
i
!=
rr
.
size
();
++
i
)
{
xr
.
push_back
(
rr
[
i
]
*
cos
(
a180p
)
+
drr
[
i
]
*
sin
(
a180p
));
yr
.
push_back
(
rr
[
i
]
*
sin
(
a180p
)
-
drr
[
i
]
*
cos
(
a180p
));
xa
.
push_back
((
ro
-
dra
[
i
])
*
cos
(
aa
[
i
]));
ya
.
push_back
((
ro
-
dra
[
i
])
*
sin
(
aa
[
i
]));
}
// Construct geometry
V
.
resize
(
4
);
V
[
0
]
=
s
.
new_element
<
Vertex
>
(
ri
,
0.0
);
V
[
1
]
=
s
.
new_element
<
Vertex
>
(
ro
,
0.0
);
V
[
2
]
=
s
.
new_element
<
Vertex
>
(
ri
*
cos
(
M_PI
/
Np
),
ri
*
sin
(
M_PI
/
Np
));
V
[
3
]
=
s
.
new_element
<
Vertex
>
(
ro
*
cos
(
M_PI
/
Np
),
ro
*
sin
(
M_PI
/
Np
));
L
.
resize
(
2
);
L
[
0
]
=
s
.
new_element
<
LineSegment
>
(
V
[
0
],
V
[
1
]);
L
[
1
]
=
s
.
new_element
<
LineSegment
>
(
V
[
2
],
V
[
3
],
true
);
C
.
resize
(
2
);
C
[
0
]
=
s
.
new_element
<
CircularArc
>
(
V
[
0
],
V
[
2
],
origin
,
ri
);
C
[
1
]
=
s
.
new_element
<
CircularArc
>
(
V
[
1
],
V
[
3
],
origin
,
ro
);
for
(
size_t
i
=
0
;
i
!=
Nb
;
++
i
)
{
size_t
j
=
2
*
i
;
auto
v0
=
s
.
new_element
<
Vertex
>
(
xr
[
j
+
1
],
yr
[
j
+
1
]);
auto
v1
=
s
.
new_element
<
Vertex
>
(
xr
[
j
],
yr
[
j
]);
auto
v2
=
s
.
new_element
<
Vertex
>
(
xa
[
j
+
1
],
ya
[
j
+
1
]);
auto
v3
=
s
.
new_element
<
Vertex
>
(
xa
[
j
],
ya
[
j
]);
auto
f0
=
s
.
new_element
<
Fixation
>
(
v0
);
auto
f1
=
s
.
new_element
<
Fixation
>
(
v1
);
auto
f2
=
s
.
new_element
<
Fixation
>
(
v2
);
auto
f3
=
s
.
new_element
<
Fixation
>
(
v3
);
auto
l0
=
s
.
new_element
<
LineSegment
>
(
v0
,
v1
);
//auto l1 = s.new_element<LineSegment>(origin,v2); // for construction
//auto l2 = s.new_element<LineSegment>(origin,v3); // for construction
auto
c0
=
s
.
new_element
<
CircularArc
>
(
v2
,
v3
,
origin
,
ro
-
dra
[
j
]);
}
// Impose constraints
s
.
new_element
<
Horizontal
>
(
L
[
0
]);
s
.
new_element
<
Radius
>
(
C
[
0
],
ri
);
s
.
new_element
<
Radius
>
(
C
[
1
],
ro
);
s
.
new_element
<
Angle
>
(
L
[
0
],
L
[
1
],
180.0
/
Np
);
double_t
tol
=
s
.
solve
();
// Mirror Copy
std
::
vector
<
std
::
shared_ptr
<
Curve
const
>>
copy_curves
{
L
[
0
]};
copy_curves
.
insert
(
copy_curves
.
end
(),
L
.
begin
()
+
2
,
L
.
end
());
copy_curves
.
insert
(
copy_curves
.
end
(),
C
.
begin
(),
C
.
end
());
std
::
shared_ptr
<
MirrorCopy
>
mc
=
s
.
new_element
<
MirrorCopy
>
(
copy_curves
,
L
[
1
],
true
);
tol
=
s
.
solve
();
if
(
Convexify
)
{
throw
;
}
}
\ No newline at end of file
src/Model Templates/src/SynchronousReluctanceRotor.h
0 → 100644
View file @
3be33db6
#ifndef OERSTED_SYNCHRONOUSRELUCTANCEROTOR_H
#define OERSTED_SYNCHRONOUSRELUCTANCEROTOR_H
#include "ModelTemplate.h"
class
SynchronousReluctanceRotor
:
public
ModelTemplate
{
public:
void
add_to_sketch
(
Sketch
&
s
,
std
::
shared_ptr
<
Vertex
>
origin
)
override
;
size_t
Poles
;
double_t
InnerRadius
;
double_t
OuterRadius
;
std
::
vector
<
double_t
>
AngularBridgeThickness
;
std
::
vector
<
double_t
>
RadialBridgeThickness
;
std
::
vector
<
double_t
>
AngularThickness
;
std
::
vector
<
double_t
>
RadialThickness
;
};
#endif //OERSTED_SYNCHRONOUSRELUCTANCEROTOR_H
test/CMakeLists.txt
View file @
3be33db6
...
@@ -43,7 +43,7 @@ set(SOURCE_FILES
...
@@ -43,7 +43,7 @@ set(SOURCE_FILES
Model\ Templates/test_ModelTemplates.hpp
Model\ Templates/test_ModelTemplates.hpp
Model\ Templates/test_DistributedWindingStator.cpp
Model\ Templates/test_DistributedWindingStator.cpp
)
"Model Templates/test_SynchronousReluctanceRotor.cpp"
)
add_executable
(
run_tests
${
SOURCE_FILES
}
)
add_executable
(
run_tests
${
SOURCE_FILES
}
)
...
...
test/Model Templates/test_DistributedWindingStator.cpp
View file @
3be33db6
...
@@ -17,23 +17,19 @@ TEST_F(Distributed_Winding_Stator, basic_test) {
...
@@ -17,23 +17,19 @@ TEST_F(Distributed_Winding_Stator, basic_test) {
dws
.
SlotWidth
=
6.05e-3
;
dws
.
SlotWidth
=
6.05e-3
;
dws
.
SlotOpening
=
1.74e-3
;
dws
.
SlotOpening
=
1.74e-3
;
dws
.
Teeth
=
48
;
dws
.
TotalTeeth
=
48
;
dws
.
ModeledTeeth
=
6
;
dws
.
Convexify
=
true
;
std
::
cout
<<
"//Mesh creation fails with non-convex domains"
<<
std
::
endl
;
Sketch
sketch
;
Sketch
sketch
;
auto
origin
=
sketch
.
new_element
<
Vertex
>
(
0.0
,
0.0
);
auto
origin
=
sketch
.
new_element
<
Vertex
>
(
0.0
,
0.0
);
auto
fo
=
sketch
.
new_element
<
Fixation
>
(
origin
);
auto
fo
=
sketch
.
new_element
<
Fixation
>
(
origin
);
dws
.
add_to_sketch
(
sketch
,
origin
,
6
);
dws
.
add_to_sketch
(
sketch
,
origin
);
// TODO: Mesh creation fails with non-convex domains
std
::
shared_ptr
V0p
=
sketch
.
select_periodic_vertex
(
dws
.
V
[
0
],
origin
,
360.0
/
8.0
);
sketch
.
new_element
<
LineSegment
>
(
origin
,
dws
.
V
[
0
]);
sketch
.
new_element
<
LineSegment
>
(
origin
,
V0p
);
EXPECT_LE
(
sketch
.
solve
(),
89e-3
*
FLT_EPSILON
);
std
::
cout
<<
"//TODO: CHECK CONVERGENCE TOLERANCE DURING SKETCH::SOLVE()"
<<
std
::
endl
;
EXPECT_LE
(
sketch
.
solve
(),
89e-3
*
FLT_EPSILON
);
std
::
cout
<<
"//TODO: CHECK CONVERGENCE TOLERANCE DURING SKETCH::SOLVE()"
<<
std
::
endl
;
sketch
.
save_as
<
SaveMethod
::
Rasterize
>
(
SAVE_DIR
,
"Distributed_Winding_Stator"
);
sketch
.
save_as
<
SaveMethod
::
Rasterize
>
(
SAVE_DIR
,
"Distributed_Winding_Stator"
);
...
...
test/Model Templates/test_SynchronousReluctanceRotor.cpp
0 → 100644
View file @
3be33db6
#include "test_ModelTemplates.hpp"
class
Synchronous_Reluctance_Rotor
:
public
::
testing
::
Test
{
public:
virtual
void
SetUp
()
{
}
};
TEST_F
(
Synchronous_Reluctance_Rotor
,
basic_test
)
{
SynchronousReluctanceRotor
srr
;
srr
.
Poles
=
8
;
srr
.
InnerRadius
=
25.4e-3
;
srr
.
OuterRadius
=
89e-3
-
0.03
*
25.4e-3
;
srr
.
AngularBridgeThickness
=
{
0.5e-3
};
srr
.
RadialBridgeThickness
=
{
0.5e-3
};
srr
.
RadialThickness
=
{
5.0e-3
,
5.0e-3
};
srr
.
AngularThickness
=
{
5.0
,
5.0
};
//srr.Convexify = true; std::cout << "//Mesh creation fails with non-convex domains" << std::endl;
Sketch
sketch
;
auto
origin
=
sketch
.
new_element
<
Vertex
>
(
0.0
,
0.0
);
auto
fo
=
sketch
.
new_element
<
Fixation
>
(
origin
);
srr
.
add_to_sketch
(
sketch
,
origin
);
EXPECT_LE
(
sketch
.
solve
(),
89e-3
*
FLT_EPSILON
);
std
::
cout
<<
"//TODO: CHECK CONVERGENCE TOLERANCE DURING SKETCH::SOLVE()"
<<
std
::
endl
;
sketch
.
save_as
<
SaveMethod
::
Rasterize
>
(
SAVE_DIR
,
"Synchronous_Reluctance_Rotor"
);
EXPECT_TRUE
(
sketch
.
build
());
/*
Mesh mesh{sketch};
mesh.create();
mesh.MinimumElementQuality = 0.5;
EXPECT_TRUE(mesh.refine());
mesh.save_as(SAVE_DIR,"Distributed_Winding_Stator");
*/
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment