예제 #1
0
import densmap as dm
import matplotlib.pyplot as plt
import numpy as np

# FP = dm.fitting_parameters( par_file='parameters_shear.txt' )
FP = dm.fitting_parameters(par_file='parameters_shear.txt')

# NB: contour tracking should check whether there are actually kfin-kinit files!!!
CD = dm.shear_tracking(FP.folder_name, FP.first_stamp, FP.last_stamp, FP, \
    file_root = '/flow_', contact_line = True, mode='int', ens=0)

# Testing xmgrace output
CD.save_xvg('InterfaceTest', mode='interface')

# Testing cl distribution binning
"""
signal = np.array(CD.foot['tr'])[:,0]
N = len(signal)
N_in = 300
sign_mean, sign_std, bin_vector, distribution = \
        dm.position_distribution( signal[N_in:], int(np.sqrt(N-N_in)) )
CD.plot_contact_line_pdf(N_in=300)
"""
# plt.step(bin_vector, distribution)
# plt.show()

# Testing plot
CD.plot_radius()
CD.plot_angles()

# Movie
예제 #2
0
import densmap as dm
import matplotlib.pyplot as plt
import numpy as np

FP = dm.fitting_parameters(par_file='ShearChar/parameters_shear.txt')

# NB: conutour tracking should check whether there are actually kfin-kinit files!!!

CD = dm.shear_tracking(FP.folder_name, FP.first_stamp, FP.last_stamp, FP, \
    file_root = '/flow_', contact_line = True)

CD.plot_radius()
CD.plot_angles()

dz = FP.dz
# CD.movie_contour(FP.lenght_x, FP.lenght_z, dz, contact_line = True)

CD.save_to_file('ShearDropModes')
예제 #3
0
import densmap as dm
import matplotlib.pyplot as plt
import numpy as np

FP = dm.fitting_parameters(par_file='parameters_droplet.txt')

# Rough substrate parameters
# R15
"""
height = 0.4
waven  = 1.675135382692315
phi_0  = 1.5525217216960845
h_0    = 0.9129142857142857
fs = lambda x : height * np.sin(waven*x+phi_0) + h_0
dfs = lambda x : height * waven * np.cos(waven*x+phi_0)
CD = dm.droplet_tracking(FP.folder_name, FP.first_stamp, FP.last_stamp, FP, \
    file_root='/flow_', contact_line=True, f_sub=fs, df_sub=dfs)
"""
# R05
"""
height = 0.1333333333333333
waven  = 5.025696662822574
phi_0  = 4.638399152217284
h_0    = 0.6416666666666667
fs = lambda x : height * np.sin(waven*x+phi_0) + h_0
dfs = lambda x : height * waven * np.cos(waven*x+phi_0)
CD = dm.droplet_tracking(FP.folder_name, FP.first_stamp, FP.last_stamp, FP, \
    file_root='/flow_', contact_line=True, f_sub=fs, df_sub=dfs)
"""

# Flat substrate
예제 #4
0
import densmap as dm
import numpy as np
import matplotlib.pyplot as plt

import scipy.optimize as opt

file_root = 'flow_'

FP = dm.fitting_parameters(par_file='parameters_test.txt')

# folder_poiseuille = FP.folder_name+'LJPoiseuille/Flow_epsilon03_f6'
# folder_couette    = FP.folder_name+'LJCouette/Flow_epsilon03'
folder_poiseuille = FP.folder_name + 'ConfinedPoiseuille_Q1_match/Flow'
folder_couette = FP.folder_name + 'ConfinedCouette_Q1/Flow'
Lx = FP.lenght_x
Lz = FP.lenght_z

vel_x, vel_z = dm.read_velocity_file(folder_poiseuille + '/' + file_root +
                                     '00001.dat')
Nx = vel_x.shape[0]
Nz = vel_x.shape[1]
hx = Lx / Nx
hz = Lz / Nz
x = hx * np.arange(0.0, Nx, 1.0, dtype=float) + 0.5 * hx
z = (hz * np.arange(0.0, Nz, 1.0, dtype=float) + 0.5 * hz)
z_s = 1.2
z_f = 1.8
n_exclude = np.argmin(np.abs(z - z_f))
n_data = len(z) - n_exclude
print("# exclude = " + str(n_exclude))
z = (hz * np.arange(0.0, Nz, 1.0, dtype=float) + 0.5 * hz) - 0.5 * Lz
예제 #5
0
import densmap as dm
import matplotlib.pyplot as plt
import numpy as np

FP_1 = dm.fitting_parameters(par_file='parameters1.txt')
FP_2 = dm.fitting_parameters(par_file='parameters2.txt')

# FP_3 = dm.fitting_parameters( par_file='parameters.txt' )

CD = dm.droplet_tracking(FP_1.folder_name, FP_1.first_stamp, \
    FP_1.last_stamp, FP_1)
CD_2 = dm.droplet_tracking(FP_2.folder_name, FP_2.first_stamp, \
    FP_2.last_stamp, FP_2)
# CD_3 = dm.droplet_tracking(FP_3.folder_name, FP_3.first_stamp, \
#     FP_3.last_stamp, FP_3)

CD.merge(CD_2)
# CD.merge(CD_3)

CD.plot_radius()
CD.plot_angles()
dz = FP_1.dz
CD.movie_contour(FP_1.lenght_x, FP_1.lenght_z, dz)

# SAVING WHAT NEEDED
spreading_radius = np.array(CD.foot_right) - np.array(CD.foot_left)
mean_contact_angle = 0.5 * (np.array(CD.angle_right) + np.array(CD.angle_left))
hysteresis = np.array(CD.angle_right) - np.array(CD.angle_left)
t = np.array(CD.time)
spreading_radius = np.array(CD.spreading_radius)
mean_contact_angle = np.array(CD.mean_contact_angle)
예제 #6
0
import densmap as dm

import numpy as np

import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib import cm

file_root = 'flow_'

# Linear flow profile fit
print("[densmap] Obtaning density profile")

FP = dm.fitting_parameters(par_file='parameters_nano.txt')
folder_name = FP.folder_name

Lx = FP.lenght_x
Lz = FP.lenght_z

rho = dm.read_density_file(folder_name + '/' + file_root + '00001.dat',
                           bin='y')
Nx = rho.shape[0]
Nz = rho.shape[1]
hx = Lx / Nx
hz = Lz / Nz
x = hx * np.arange(0.0, Nx, 1.0, dtype=float)
z = hz * np.arange(0.0, Nz, 1.0, dtype=float)
X, Z = np.meshgrid(x, z, sparse=False, indexing='ij')

profile_density = np.zeros(len(z), dtype=float)