Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Droplet Deformation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
AVT-FVT
public
Droplet Deformation
Commits
24bf2c64
Commit
24bf2c64
authored
2 months ago
by
ssibirtsev
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
acd113c3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
script/DropDeform_poly.py
+129
-0
129 additions, 0 deletions
script/DropDeform_poly.py
with
129 additions
and
0 deletions
script/DropDeform_poly.py
0 → 100644
+
129
−
0
View file @
24bf2c64
"""
Droplet Deformation (DropDeform)
Determine droplet deformation into Polyhedron Shape.
Source code of DropDeform: https://git.rwth-aachen.de/avt-fvt/public/droplet-deformation/
The source code of DropDeform is licensed under the Eclipse Public License v2.0 (EPL 2.0).
Copyright (c) 2025 Fluid Process Engineering (AVT.FVT), RWTH Aachen University.
Written by Stepan Sibirtsev
The coyprights and license terms are given in LICENSE.
In this script polyhedral shape parameters for the DropDeform_main.py script are set.
Script version date: 06.01.2025
"""
"""
Import packages
"""
import
numpy
as
np
"""
Define Polyhedral shape parameters
"""
# Predefine polyhedron shape specific constants for:
# Polyhedron volume
C_V
=
np
.
zeros
(
5
)
# Polygon face area
C_A
=
np
.
zeros
(
5
)
# Polygon incircle radius
C_rc
=
np
.
zeros
(
5
)
# Polyhedron midsphere radius
C_rm
=
np
.
zeros
(
5
)
# Polyhedron insphere radius
C_rs
=
np
.
zeros
(
5
)
# Number of edges
n_e
=
np
.
zeros
(
5
)
# Number of corners
n_c
=
np
.
zeros
(
5
)
# Number of polygon faces
n_f
=
np
.
zeros
(
5
)
# Iterate through the five polyhedron shapes and assign the polyhedral shape parameters
for
ish
in
range
(
5
):
# Tetrahedron
if
ish
==
0
:
# Polyhedron volume
C_V
[
ish
]
=
1.0
/
(
6.0
*
2.0
**
0.5
)
# Polygon face area
C_A
[
ish
]
=
(
3.0
**
0.5
)
/
4.0
# Polygon incircle radius
C_rc
[
ish
]
=
(
3.0
**
0.5
)
/
6.0
# Polyhedron midsphere radius
C_rm
[
ish
]
=
1.0
/
(
8.0
**
0.5
)
# Polyhedron insphere radius
C_rs
[
ish
]
=
1.0
/
(
24.0
**
0.5
)
# Number of edges
n_e
[
ish
]
=
6.0
# Number of corners
n_c
[
ish
]
=
4.0
# Number of polygon faces
n_f
[
ish
]
=
4.0
# Cube
elif
ish
==
1
:
# Polyhedron volume
C_V
[
ish
]
=
1.0
# Polygon face area
C_A
[
ish
]
=
1.0
# Polygon incircle radius
C_rc
[
ish
]
=
0.5
# Polyhedron midsphere radius
C_rm
[
ish
]
=
1.0
/
(
2.0
**
0.5
)
# Polyhedron insphere radius
C_rs
[
ish
]
=
0.5
# Number of edges
n_e
[
ish
]
=
12.0
# Number of corners
n_c
[
ish
]
=
8.0
# Number of polygon faces
n_f
[
ish
]
=
6.0
# Octahedron
elif
ish
==
2
:
# Polyhedron volume
C_V
[
ish
]
=
(
2.0
**
0.5
)
/
3.0
# Polygon face area
C_A
[
ish
]
=
(
3.0
**
0.5
)
/
4.0
# Polygon incircle radius
C_rc
[
ish
]
=
(
3.0
**
0.5
)
/
6.0
# Polyhedron midsphere radius
C_rm
[
ish
]
=
0.5
# Polyhedron insphere radius
C_rs
[
ish
]
=
1.0
/
(
6.0
**
0.5
)
# Number of edges
n_e
[
ish
]
=
12.0
# Number of corners
n_c
[
ish
]
=
6.0
# Number of polygon faces
n_f
[
ish
]
=
8.0
# Dodecahedron
elif
ish
==
3
:
# Polyhedron volume
C_V
[
ish
]
=
(
15.0
+
7.0
*
(
5.0
**
0.5
))
/
4.0
# Polygon face area
C_A
[
ish
]
=
((
5.0
*
(
5.0
+
2.0
*
(
5.0
**
0.5
)))
**
0.5
)
/
4.0
# Polygon incircle radius
C_rc
[
ish
]
=
((
1.0
+
2.0
/
(
5.0
**
0.5
))
**
0.5
)
/
2.0
# Polyhedron midsphere radius
C_rm
[
ish
]
=
(
3.0
+
5.0
**
0.5
)
/
4.0
# Polyhedron insphere radius
C_rs
[
ish
]
=
((
10.0
*
(
25.0
+
11.0
*
(
5.0
**
0.5
)))
**
0.5
)
/
20.0
# Number of edges
n_e
[
ish
]
=
30.0
# Number of corners
n_c
[
ish
]
=
20.0
# Number of polygon faces
n_f
[
ish
]
=
12.0
# Icosahedron
elif
ish
==
4
:
# Polyhedron volume
C_V
[
ish
]
=
5.0
*
(
3.0
+
5.0
**
0.5
)
/
12.0
# Polygon face area
C_A
[
ish
]
=
(
3.0
**
0.5
)
/
4.0
# Polygon incircle radius
C_rc
[
ish
]
=
(
3.0
**
0.5
)
/
6.0
# Polyhedron midsphere radius
C_rm
[
ish
]
=
(
1.0
+
5.0
**
0.5
)
/
4.0
# Polyhedron insphere radius
C_rs
[
ish
]
=
((
3.0
**
0.5
)
*
(
3.0
+
5.0
**
0.5
))
/
12.0
# Number of edges
n_e
[
ish
]
=
30.0
# Number of corners
n_c
[
ish
]
=
12.0
# Number of polygon faces
n_f
[
ish
]
=
20.0
\ No newline at end of file
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