Skip to content

Commit

Permalink
Fix CI python warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
HomesGH authored Jul 24, 2023
1 parent e33ce01 commit e2338ee
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 23 deletions.
2 changes: 0 additions & 2 deletions examples/DropletCollision/dropColl_MD_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,6 @@ def duplicate_droplet(in_file_path, out_file_path):
headerXMLTree = et.parse(in_file_path_header)
headerXML = headerXMLTree.getroot()

num_old = int(headerXML.find('headerinfo/number').text)

# Read in checkpoint data
chp = imp.imp_chp_bin_DF(in_file_path)

Expand Down
8 changes: 6 additions & 2 deletions tools/ppls1/ppls1/fluids/shear_visco.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def eta(T,rho,fluid):
print('Fluid not yet supported')
print('Possible fluids:')
print(allFluids)
return
return 0.0

na=6.02214076e23
kb=1.380649e-23
Expand All @@ -155,6 +155,10 @@ def eta(T,rho,fluid):
# rc=0.31
else:
units = 'SI'
sig=1.0
eps=1.0
mass=1.0
tc=150.687

if units == 'reduced':
T = T/tc*150.687
Expand All @@ -166,7 +170,7 @@ def eta(T,rho,fluid):
pass
else:
print('Unit unknown')
return
return 0.0

eta_value=eta(T, rho, fluid)
if units == 'reduced':
Expand Down
25 changes: 6 additions & 19 deletions tools/ppls1/ppls1/fluids/therm_cond.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,6 @@ def eta0(T,fluid):
#eta0=(0.168729283*np.sqrt(T)) / (sig**2*Omega(Tstar,fluid)) # Monika
return eta0 #8.18940 #22.7241 #8.18940 #eta0

def etar(tau,delta,fluid):
summe=0
for ri in range(0,len(tab3[fluid])):
i,Ni,ti,di,li=tab3[fluid]['i'][ri],tab3[fluid]['Ni'][ri],tab3[fluid]['ti'][ri],tab3[fluid]['di'][ri],tab3[fluid]['li'][ri]
if li==0:
gamma=0
else:
gamma=1
summe+=Ni*tau**ti*delta**di*np.exp(-gamma*delta**li)
return summe

def eta(T,rho,fluid):
Tc,rhoc=tab1[fluid][0],tab1[fluid][1]
tau,delta=Tc/T,rho/rhoc
eta=eta0(T,fluid)+etar(tau,delta,fluid)
return eta

def lam0(T,fluid):
Tc=tab1[fluid][0]
tau=Tc/T
Expand Down Expand Up @@ -152,7 +135,7 @@ def lamr(tau,delta,fluid):
print('Fluid not yet supported')
print('Possible fluids:')
print(allFluids)
return
return 0.0

na=6.02214076e23
kb=1.380649e-23
Expand All @@ -175,6 +158,10 @@ def lamr(tau,delta,fluid):
# rc=0.31
else:
units = 'SI'
sig=1.0
eps=1.0
mass=1.0
tc=150.687

if units == 'reduced':
T = T/tc*150.687
Expand All @@ -186,7 +173,7 @@ def lamr(tau,delta,fluid):
pass
else:
print('Unit unknown')
return
return 0.0

Tc,rhoc=tab1[fluid][0],tab1[fluid][1]
tau,delta=Tc/T,rho/rhoc
Expand Down

0 comments on commit e2338ee

Please sign in to comment.