Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
JuThinFilm
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
s.zitz
JuThinFilm
Commits
0cbdb650
Commit
0cbdb650
authored
Sep 18, 2020
by
s.zitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the wrong energy measurement
parent
ef5729f5
Pipeline
#23086
passed with stage
in 51 minutes and 44 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Sidebyside
Showing
1 changed file
with
89 additions
and
3 deletions
+89
3
src/measurements.jl
src/measurements.jl
+89
3
No files found.
src/measurements.jl
View file @
0cbdb650
...
...
@@ 3,7 +3,17 @@
Measurement of the base wetted area of a droplet.
# Theory
The area of the fluidsolid interface is easily computed by summing up the fluid nodes which are higher than the precursor film.
`` S =
\\
int_{h>h_p}
\\
Theta(
\\
mathbf{x},t)
\\
text{d}
\\
mathbf{x}. ``
Where ``
\\
Theta(
\\
mathbf{x},t) `` is a Heavyside function that returns one for a film height ``h(
\\
mathbf{x},t) >
\\
text{precursor layer}``.
The threshold value that seperates between film and dry spot is h = 0.06, all below will be counted as dry spot.
# Examples
```jldoctest
julia> using JuThinFilm
...
...
@@ 24,7 +34,7 @@ julia> JuThinFilm.measurewettedarea!(area, mom) # Now there is only one spot wit
# References
See also: [`run
realsimulation2
'](@ref)
See also: [`run
simulation
'](@ref)
"""
function
measurewettedarea!
(
area
,
mom
::
Moment
)
mask
=
findall
(
x
>
x
>
0.06
,
mom
.
height
)
...
...
@@ 37,14 +47,38 @@ end
Returns the differential surface area of the fluid interface.
# Theory
Computes the differential surface area according to
``S = ∫∫√[(∂ᵢh)^2 + (∂ⱼh)^2 + 1]didj ``
``S = ∫∫√[(∂ᵢh)^2 + (∂ⱼh)^2 + 1]didj .``
Keep in mind that we are not interested in the layer that stabilizes the simulation.
That is why a flat interface offers **no surface area**.
# Examples
```jldoctest
julia> using JuThinFilm
julia> surface = []; mom = default_moments(Float64, 10, 10);
julia> JuThinFilm.measurefluidsurfacearea!(surface, mom)
1element Array{Any,1}:
0.0
julia> mom.height = reshape(collect(1.0:100.0),10,10);
julia> JuThinFilm.measurefluidsurfacearea!(surface, mom) # Mainly due to the periodic bc!
2element Array{Any,1}:
0.0
1620.682406458573
```
# References
See also: [`runsimulation`](@ref)
"""
function
measurefluidsurfacearea!
(
surface
,
mom
::
JuThinFilm
.
Moment
)
len
,
wid
=
size
(
mom
.
height
)
...
...
@@ 62,7 +96,59 @@ function measurefluidsurfacearea!(surface, mom::JuThinFilm.Moment)
push!
(
surface
,
area
)
end
"""
measuresurfaceandenergy!(surface, energy, mom::JuThinFilm.Moment, θ)
Returns the differential surface area of the fluid interface as well as the reduced interfacial energy.
# Theory
Again we use the formular from `measurefluidsurfacearea` to calculate the differential surface area
``S = ∫∫√[(∂ᵢh)^2 + (∂ⱼh)^2 + 1]didj .``
Keep in mind that we are not interested in the layer that stabilizes the simulation.
That is why a flat interface offers **no surface area**.
On top for the computation of the reduced interfacial free energy we use
``
\\
tilde{E} =
\\
frac{E}{
\\
gamma} = S_{lv} 
\\
int_{A_{ls}}
\\
cos(
\\
theta(x,y))
\\
text{d}A.``
Where the contact angle ``
\\
theta(x,y)`` is assumed to be *Youngs* contact angle and not the dynamically measured one.
# Examples
```jldoctest
julia> using JuThinFilm
julia> surface = []; energy = []; mom = default_moments(Float64, 10, 10);
julia> JuThinFilm.measuresurfaceandenergy!(surface, energy, mom, fill(1/9,10,10))
1element Array{Any,1}:
93.96926207859084
julia> surface
1element Array{Any,1}:
0.0
julia> mom.height = reshape(collect(1.0:100.0),10,10);
julia> JuThinFilm.measuresurfaceandenergy!(surface, energy, mom, fill(1/9,10,10))
2element Array{Any,1}:
93.96926207859084
1526.7131443799822
julia> surface
2element Array{Any,1}:
0.0
1620.682406458573
```
# References
See also: [`runsimulation`](@ref)
"""
function
measuresurfaceandenergy!
(
surface
,
energy
,
mom
::
JuThinFilm
.
Moment
,
θ
)
len
,
wid
=
size
(
mom
.
height
)
minfilm
=
0.05
...
...
@@ 78,7 +164,7 @@ function measuresurfaceandenergy!(surface, energy, mom::JuThinFilm.Moment, θ)
area
=
sum
(
sqarea
)
# For the interfacial energy the contact angle field is needed as well.
mask
=
findall
(
x
>
x
>
0.06
,
mom
.
height
)
E
=
area

sum
(
θ
[
mask
]
)
E
=
area

sum
(
cospi
.
(
θ
[
mask
])
)
push!
(
surface
,
area
)
push!
(
energy
,
E
)
end
...
...
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