Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
553d7ec7
Commit
553d7ec7
authored
10 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
newc -> newl
parent
5004c226
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
benchmarks/2d/stator_parametric.geo
+110
-110
110 additions, 110 deletions
benchmarks/2d/stator_parametric.geo
demos/indheat.geo
+1
-1
1 addition, 1 deletion
demos/indheat.geo
tutorial/t5.geo
+1
-1
1 addition, 1 deletion
tutorial/t5.geo
with
112 additions
and
112 deletions
benchmarks/2d/stator_parametric.geo
+
110
−
110
View file @
553d7ec7
Mesh
.
Algorithm
=
6
;
// test frontal algorithm
// Einheiten
mm
=
1.e-3
;
deg
=
Pi
/
180.
;
// Charakteristische Lnge
lc
=
2
*
mm
;
// allgemein
lc_delta
=
lc
/
5
;
// Luftspalt
// -----------
// STATORDATEN
// -----------
da
=
250.
*
mm
;
// Aussendurchmesser
di
=
126.
*
mm
;
// Bohrungsdurchmesser
n
=
10
;
// Anzahl der Nuten
hNut
=
65.
*
mm
;
// Nuthhe
bNut_u
=
6.
*
mm
;
// Nutbreite unten
bNut_o
=
10.
*
mm
;
// Nutbreite oben
bNutoeffnung
=
2.
*
mm
;
// Breite der Nutffnung
hNutoeffnung
=
4.
*
mm
;
// Hhe der Nutffnung
hPolfuss
=
5.
*
mm
;
//
// Luftspalt
delta
=
1.
*
mm
;
// Mittelpunkt
x0
=
0
;
y0
=
0
;
z0
=
0
;
// Punkte berechnen
// Umriss des Stators
ursprung
=
newp
;
Point
(
ursprung
)
=
{
x0
,
y0
,
z0
,
lc
};
Point
(
2
)
=
{
x0
,
y0
+
da
,
z0
,
lc
};
Point
(
3
)
=
{
x0
+
da
,
y0
,
z0
,
lc
};
Point
(
4
)
=
{
x0
,
y0
+
di
,
z0
,
lc_delta
};
Point
(
5
)
=
{
x0
+
di
,
y0
,
z0
,
lc_delta
};
Function
Nut
// eine Nut
x1
=
x0
+
bNutoeffnung
/
2
;
y1
=
y0
+
Sqrt
(
di
^
2
-
x1
^
2
);
x2
=
x1
;
y2
=
y1
+
hNutoeffnung
;
x3
=
bNut_u
;
y3
=
y2
+
hPolfuss
;
x4
=
bNut_o
;
y4
=
y3
+
hNut
;
p1
=
newp
;
Point
(
p1
)
=
{
x1
,
y1
,
z0
,
lc_delta
};
p2
=
newp
;
Point
(
p2
)
=
{
-
x1
,
y1
,
z0
,
lc_delta
};
p3
=
newp
;
Point
(
p3
)
=
{
x2
,
y2
,
z0
,
lc_delta
};
p4
=
newp
;
Point
(
p4
)
=
{
-
x2
,
y2
,
z0
,
lc_delta
};
p5
=
newp
;
Point
(
p5
)
=
{
x3
,
y3
,
z0
,
lc
};
p6
=
newp
;
Point
(
p6
)
=
{
-
x3
,
y3
,
z0
,
lc
};
p7
=
newp
;
Point
(
p7
)
=
{
x4
,
y4
,
z0
,
lc
};
p8
=
newp
;
Point
(
p8
)
=
{
-
x4
,
y4
,
z0
,
lc
};
first
[
i
]
=
p2
;
last
[
i
]
=
p1
;
Rotate
{
{
0
,
0
,
1
},
{
x0
,
y0
,
z0
},
winkel
}
{
Point
{
p1
};
Point
{
p2
};
Point
{
p3
};
Point
{
p4
};
Point
{
p5
};
Point
{
p6
};
Point
{
p7
};
Point
{
p8
};}
l1
[
i
]
=
new
c
;
Line
(
l1
[
i
])
=
{
p1
,
p3
};
l2
[
i
]
=
new
c
;
Line
(
l2
[
i
])
=
{
p3
,
p5
};
l3
[
i
]
=
new
c
;
Line
(
l3
[
i
])
=
{
p5
,
p7
};
l4
[
i
]
=
new
c
;
Line
(
l4
[
i
])
=
{
p7
,
p8
};
l5
[
i
]
=
new
c
;
Line
(
l5
[
i
])
=
{
p8
,
p6
};
l6
[
i
]
=
new
c
;
Line
(
l6
[
i
])
=
{
p6
,
p4
};
l7
[
i
]
=
new
c
;
Line
(
l7
[
i
])
=
{
p4
,
p2
};
l8
[
i
]
=
new
c
;
Line
(
l8
[
i
])
=
{
p4
,
p3
};
theloops
[
i
]
=
newreg
;
Line
Loop
(
theloops
[
i
])
=
{
l2
[
i
],
l3
[
i
],
l4
[
i
],
l5
[
i
],
l6
[
i
],
l8
[
i
]};
dienut
=
newreg
;
Plane
Surface
(
dienut
)
=
theloops
[
i
];
Return
// Nuten erzeugen
winkel
=
0
;
i
=
0
;
last
[
0
]
=
4
;
For
i
In
{
1
:
n
}
winkel
=
-
(
90
*
(
i
-
0.5
)
/
(
n
))
*
deg
;
Call
Nut
;
l
[
i
]
=
newreg
;
Circle
(
l
[
i
])
=
{
last
[
i
-
1
],
ursprung
,
first
[
i
]};
EndFor
l
[
n
+
1
]
=
newreg
;
Circle
(
l
[
n
+
1
])
=
{
last
[
n
],
ursprung
,
5
};
// Statorumrisse erzeugen
links
=
new
c
;
Line
(
links
)
=
{
2
,
4
};
rechts
=
new
c
;
Line
(
rechts
)
=
{
5
,
3
};
aussen
=
new
c
;
Circle
(
aussen
)
=
{
2
,
ursprung
,
3
};
ll
=
newll
;
Line
Loop
(
ll
)
=
{
l1
[{
1
:
n
}],
l2
[{
1
:
n
}],
l3
[{
1
:
n
}],
l4
[{
1
:
n
}],
l5
[{
1
:
n
}],
l6
[{
1
:
n
}],
l7
[{
1
:
n
}],
-
l
[{
1
:
n
+
1
}],
-
links
,
-
rechts
,
aussen
};
Plane
Surface
(
news
)
=
ll
;
Mesh
.
Algorithm
=
6
;
// test frontal algorithm
// Einheiten
mm
=
1.e-3
;
deg
=
Pi
/
180.
;
// Charakteristische Lnge
lc
=
2
*
mm
;
// allgemein
lc_delta
=
lc
/
5
;
// Luftspalt
// -----------
// STATORDATEN
// -----------
da
=
250.
*
mm
;
// Aussendurchmesser
di
=
126.
*
mm
;
// Bohrungsdurchmesser
n
=
10
;
// Anzahl der Nuten
hNut
=
65.
*
mm
;
// Nuthhe
bNut_u
=
6.
*
mm
;
// Nutbreite unten
bNut_o
=
10.
*
mm
;
// Nutbreite oben
bNutoeffnung
=
2.
*
mm
;
// Breite der Nutffnung
hNutoeffnung
=
4.
*
mm
;
// Hhe der Nutffnung
hPolfuss
=
5.
*
mm
;
//
// Luftspalt
delta
=
1.
*
mm
;
// Mittelpunkt
x0
=
0
;
y0
=
0
;
z0
=
0
;
// Punkte berechnen
// Umriss des Stators
ursprung
=
newp
;
Point
(
ursprung
)
=
{
x0
,
y0
,
z0
,
lc
};
Point
(
2
)
=
{
x0
,
y0
+
da
,
z0
,
lc
};
Point
(
3
)
=
{
x0
+
da
,
y0
,
z0
,
lc
};
Point
(
4
)
=
{
x0
,
y0
+
di
,
z0
,
lc_delta
};
Point
(
5
)
=
{
x0
+
di
,
y0
,
z0
,
lc_delta
};
Function
Nut
// eine Nut
x1
=
x0
+
bNutoeffnung
/
2
;
y1
=
y0
+
Sqrt
(
di
^
2
-
x1
^
2
);
x2
=
x1
;
y2
=
y1
+
hNutoeffnung
;
x3
=
bNut_u
;
y3
=
y2
+
hPolfuss
;
x4
=
bNut_o
;
y4
=
y3
+
hNut
;
p1
=
newp
;
Point
(
p1
)
=
{
x1
,
y1
,
z0
,
lc_delta
};
p2
=
newp
;
Point
(
p2
)
=
{
-
x1
,
y1
,
z0
,
lc_delta
};
p3
=
newp
;
Point
(
p3
)
=
{
x2
,
y2
,
z0
,
lc_delta
};
p4
=
newp
;
Point
(
p4
)
=
{
-
x2
,
y2
,
z0
,
lc_delta
};
p5
=
newp
;
Point
(
p5
)
=
{
x3
,
y3
,
z0
,
lc
};
p6
=
newp
;
Point
(
p6
)
=
{
-
x3
,
y3
,
z0
,
lc
};
p7
=
newp
;
Point
(
p7
)
=
{
x4
,
y4
,
z0
,
lc
};
p8
=
newp
;
Point
(
p8
)
=
{
-
x4
,
y4
,
z0
,
lc
};
first
[
i
]
=
p2
;
last
[
i
]
=
p1
;
Rotate
{
{
0
,
0
,
1
},
{
x0
,
y0
,
z0
},
winkel
}
{
Point
{
p1
};
Point
{
p2
};
Point
{
p3
};
Point
{
p4
};
Point
{
p5
};
Point
{
p6
};
Point
{
p7
};
Point
{
p8
};}
l1
[
i
]
=
new
l
;
Line
(
l1
[
i
])
=
{
p1
,
p3
};
l2
[
i
]
=
new
l
;
Line
(
l2
[
i
])
=
{
p3
,
p5
};
l3
[
i
]
=
new
l
;
Line
(
l3
[
i
])
=
{
p5
,
p7
};
l4
[
i
]
=
new
l
;
Line
(
l4
[
i
])
=
{
p7
,
p8
};
l5
[
i
]
=
new
l
;
Line
(
l5
[
i
])
=
{
p8
,
p6
};
l6
[
i
]
=
new
l
;
Line
(
l6
[
i
])
=
{
p6
,
p4
};
l7
[
i
]
=
new
l
;
Line
(
l7
[
i
])
=
{
p4
,
p2
};
l8
[
i
]
=
new
l
;
Line
(
l8
[
i
])
=
{
p4
,
p3
};
theloops
[
i
]
=
newreg
;
Line
Loop
(
theloops
[
i
])
=
{
l2
[
i
],
l3
[
i
],
l4
[
i
],
l5
[
i
],
l6
[
i
],
l8
[
i
]};
dienut
=
newreg
;
Plane
Surface
(
dienut
)
=
theloops
[
i
];
Return
// Nuten erzeugen
winkel
=
0
;
i
=
0
;
last
[
0
]
=
4
;
For
i
In
{
1
:
n
}
winkel
=
-
(
90
*
(
i
-
0.5
)
/
(
n
))
*
deg
;
Call
Nut
;
l
[
i
]
=
newreg
;
Circle
(
l
[
i
])
=
{
last
[
i
-
1
],
ursprung
,
first
[
i
]};
EndFor
l
[
n
+
1
]
=
newreg
;
Circle
(
l
[
n
+
1
])
=
{
last
[
n
],
ursprung
,
5
};
// Statorumrisse erzeugen
links
=
new
l
;
Line
(
links
)
=
{
2
,
4
};
rechts
=
new
l
;
Line
(
rechts
)
=
{
5
,
3
};
aussen
=
new
l
;
Circle
(
aussen
)
=
{
2
,
ursprung
,
3
};
ll
=
newll
;
Line
Loop
(
ll
)
=
{
l1
[{
1
:
n
}],
l2
[{
1
:
n
}],
l3
[{
1
:
n
}],
l4
[{
1
:
n
}],
l5
[{
1
:
n
}],
l6
[{
1
:
n
}],
l7
[{
1
:
n
}],
-
l
[{
1
:
n
+
1
}],
-
links
,
-
rechts
,
aussen
};
Plane
Surface
(
news
)
=
ll
;
Recombine
Surface
{
10
,
21
,
32
,
43
,
54
,
65
,
76
,
87
,
98
,
109
,
116
};
This diff is collapsed.
Click to expand it.
demos/indheat.geo
+
1
−
1
View file @
553d7ec7
...
...
@@ -59,7 +59,7 @@ Point(p+5) = {rt2, 0, -ht/2, lc};
Point
(
p
+
6
)
=
{
0
,
rt2
,
-
ht
/
2
,
lc
};
Point
(
p
+
7
)
=
{
-
rt2
,
0
,
-
ht
/
2
,
lc
};
Point
(
p
+
8
)
=
{
0
,
-
rt2
,
-
ht
/
2
,
lc
};
c
=
new
c
;
c
=
new
l
;
Circle
(
c
)
=
{
p
+
1
,
p
,
p
+
2
};
Circle
(
c
+
1
)
=
{
p
+
2
,
p
,
p
+
3
};
Circle
(
c
+
2
)
=
{
p
+
3
,
p
,
p
+
4
};
...
...
This diff is collapsed.
Click to expand it.
tutorial/t5.geo
+
1
−
1
View file @
553d7ec7
...
...
@@ -66,7 +66,7 @@ Function CheeseHole
// In the following commands we use the reserved variable name
// `newp', which automatically selects a new point number. This
// number is chosen as the highest current point number, plus
// one. (Note that, analogously to `newp', the variables `new
c
',
// one. (Note that, analogously to `newp', the variables `new
l
',
// `news', `newv' and `newreg' select the highest number amongst
// currently defined curves, surfaces, volumes and `any entities
// other than points', respectively.)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment