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
9522125e
Commit
9522125e
authored
2 months ago
by
ssibirtsev
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
2d0605ce
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
script/DropDeform_main.py
+74
-0
74 additions, 0 deletions
script/DropDeform_main.py
with
74 additions
and
0 deletions
script/DropDeform_main.py
0 → 100644
+
74
−
0
View file @
9522125e
"""
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.
This is the main script to execute DropDeform.
Script version date: 06.01.2025
"""
"""
Import packages
"""
import
os
import
warnings
import
time
import
numpy
as
np
"""
Import configuration
"""
import
DropDeform_config
as
config
"""
Import polyhedral shape parameters
"""
import
DropDeform_poly
as
poly
"""
Import droplet deformation model related functions
"""
from
DropDeform_deform
import
calc_deform
"""
Import Bond number correlation related functions
"""
from
DropDeform_bo
import
calc_pars_bo
"""
Import data export related functions
"""
from
DropDeform_excel
import
save_excel
"""
Solver warning messages
"""
if
config
.
display_solver_warnings
==
False
:
warnings
.
filterwarnings
(
"
ignore
"
)
"""
Simulation starts from here
"""
# Time stamp overall simulation
start_sim_total
=
time
.
time
()
# Assign output file folder
NAME_OUTPUT_FILE
=
(
config
.
name_output_file
+
'
.xls
'
)
ROOT_DIR_OUTPUT
=
os
.
path
.
abspath
(
"
../output
"
)
# Check if the folder exists
if
not
os
.
path
.
exists
(
ROOT_DIR_OUTPUT
):
# Create the folder
os
.
makedirs
(
ROOT_DIR_OUTPUT
)
"""
MAIN
"""
if
__name__
==
"
__main__
"
:
# Time stamp deformation caclulation
start_sim_deform
=
time
.
time
()
# Droplet diameters
d
=
np
.
linspace
(
config
.
d_min
,
config
.
d_max
,
config
.
n_steps
)
# Pressures
p
=
np
.
linspace
(
config
.
p_min
,
config
.
p_max
,
config
.
n_steps
)
# Interfacial tensions
sigma
=
np
.
linspace
(
config
.
sigma_min
,
config
.
sigma_max
,
config
.
n_steps
)
# Define polyhedron shape names
shape_names
=
[
'
Tetrahedron
'
,
'
Cube
'
,
'
Octahedron
'
,
'
Dodecahedron
'
,
'
Icosahedron
'
]
# Create index mappings
shape_names_ind
=
{
j
:
shape_names
[
j
]
for
j
in
range
(
len
(
shape_names
))}
# Prediefine matrix to store the deformation parameter and polyhedron volume: M_deform = [Bo, r_a][Bo, r_f][Bo, eps]
# Bo = Bond number
# r_a = droplet's curvature radius normalized by droplet diameter
# r_f = droplet's contact area radius normalized by droplet diameter
# eps = volume ratio between droplet's volume and its polyhedron volume
M_deform
=
np
.
zeros
((
3
,
config
.
n_steps
**
3
,
6
))
# Calculate droplet deformation and the corresponding polyhedron parameter:
M_deform
=
calc_deform
(
config
,
poly
,
p
,
sigma
,
d
,
M_deform
,
shape_names_ind
)
# Determine fitting parameter of Bond correlations
D_bo
=
calc_pars_bo
(
config
,
poly
,
M_deform
,
shape_names
,
shape_names_ind
)
"""
Save results as Excel sheet.
"""
save_excel
(
ROOT_DIR_OUTPUT
,
NAME_OUTPUT_FILE
,
M_deform
)
print
(
'
Simulation completed
'
)
print
(
'
Total simulation time:
'
)
print
(
"
--- %s seconds ---
"
%
(
time
.
time
()
-
start_sim_deform
))
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