diff --git a/Calc_kappa.py b/Calc_kappa.py index 55f88ed..ee5f3c8 100644 --- a/Calc_kappa.py +++ b/Calc_kappa.py @@ -106,7 +106,11 @@ def integrationSigmaX(k): def f(k, ans): return integrationSigmaX(k)/integrationSigmaZ(k) - ans -ans = 17.53667954 +sigma_x = 0.0038610038610 # conductivty (S/m) along x-axis +sigma_z = 0.0002201673272 # conductivty (S/m) along z-axis +sigma_l = 21.0 # conductivity (S/m) of the coductive phase in cracks + +ans = sigma_x / sigma_z eps = 0.001 a = -10.0 b = 10.0 @@ -118,11 +122,10 @@ def f(k, ans): else: a = c if abs(f(c, ans)) < eps: - fileName = 'kappa.txt' + fileName = 'kappa_phi.txt' f = open(fileName, 'w') f.write("kappa: " + str(c) + "\n") - f.write("factor X: " + str(integrationSigmaX(c)) + "\n") - f.write("factor Z: " + str(integrationSigmaZ(c)) + "\n") + f.write("crack volume fraction: " + str(sigma_z/integrationSigmaZ(c)/sigma_l) + "\n") f.close() break n += 1 diff --git a/CrackX.py b/CrackX.py index b8c200d..94084b0 100644 --- a/CrackX.py +++ b/CrackX.py @@ -75,12 +75,15 @@ def integration(k): result += 0.5 * dTheta * (sum1 + sum2) return result -fileName = 'crack_x.csv' +phi=0.01 #volume fraction (0 <= phi <= 1.0) +sigma_l = 1.0 # conductivity (S/m) of the coductive phase in cracks +fileName = 'crack_sigma_x.csv' f = open(fileName, 'w') +f.write("kappa, sigma_x"+'\n') list = (100.0, 50.0, 30.0, 20.0, 10.0, 5.0, 3.0, 2.0, 1.0, 0.0, -1.0, -2.0, -3.0, -5.0, -10.0, -20.0, -30.0, -50.0, -100.0) -for k in list: - result = integration(k) - s = str(k)+','+str(result)+'\n' +for kappa in list: + sigma_x = integration(kappa) * sigma_l * phi # conductivity (S/m) + s = str(kappa)+','+str(sigma_x)+'\n' f.write(s) f.flush() f.close() diff --git a/CrackZ.py b/CrackZ.py index 52b13e5..89bba85 100644 --- a/CrackZ.py +++ b/CrackZ.py @@ -72,12 +72,15 @@ def integration(k): result += 0.5 * dTheta * (sum1 + sum2) return result -fileName = 'crack_z.csv' +phi=0.01 #volume fraction (0 <= phi <= 1.0) +sigma_l = 1.0 # conductivity (S/m) of the coductive phase in cracks +fileName = 'crack_sigma_z.csv' f = open(fileName, 'w') +f.write("kappa, sigma_z"+'\n') list = (100.0, 50.0, 30.0, 20.0, 10.0, 5.0, 3.0, 2.0, 1.0, 0.0, -1.0, -2.0, -3.0, -5.0, -10.0, -20.0, -30.0, -50.0, -100.0) -for k in list: - result = integration(k) - s = str(k)+','+str(result)+'\n' +for kappa in list: + sigma_z = integration(kappa) * sigma_l * phi # conductivity (S/m) + s = str(kappa)+','+str(sigma_z)+'\n' f.write(s) f.flush() f.close() diff --git a/TubeX.py b/TubeX.py index 46cb0c3..6b7dda7 100644 --- a/TubeX.py +++ b/TubeX.py @@ -75,12 +75,15 @@ def integration(k): result += 0.5 * dTheta * (sum1 + sum2) return result -fileName = 'tube_x.csv' +phi=0.01 #volume fraction (0 <= phi <= 1.0) +sigma_l = 1.0 # conductivity (S/m) of the coductive phase in cracks +fileName = 'tube_sigma_x.csv' f = open(fileName, 'w') +f.write("kappa, sigma_x"+'\n') list = (100.0, 50.0, 30.0, 20.0, 10.0, 5.0, 3.0, 2.0, 1.0, 0.0, -1.0, -2.0, -3.0, -5.0, -10.0, -20.0, -30.0, -50.0, -100.0) -for k in list: - result = integration(k) - s = str(k)+','+str(result)+'\n' +for kappa in list: + sigma_x = integration(kappa) * sigma_l * phi # conductivity (S/m) + s = str(kappa)+','+str(sigma_x)+'\n' f.write(s) f.flush() f.close() diff --git a/TubeZ.py b/TubeZ.py index 4cd2afb..dd51beb 100644 --- a/TubeZ.py +++ b/TubeZ.py @@ -72,12 +72,15 @@ def integration(k): result += 0.5 * dTheta * (sum1 + sum2) return result -fileName = 'tube_zx.csv' +phi=0.01 #volume fraction (0 <= phi <= 1.0) +sigma_l = 1.0 # conductivity (S/m) of the coductive phase in cracks +fileName = 'tube_sigma_z.csv' f = open(fileName, 'w') +f.write("kappa, sigma_z"+'\n') list = (100.0, 50.0, 30.0, 20.0, 10.0, 5.0, 3.0, 2.0, 1.0, 0.0, -1.0, -2.0, -3.0, -5.0, -10.0, -20.0, -30.0, -50.0, -100.0) -for k in list: - result = integration(k) - s = str(k)+','+str(result)+'\n' +for kappa in list: + sigma_z = integration(kappa) * sigma_l * phi # conductivity (S/m) + s = str(kappa)+','+str(sigma_z)+'\n' f.write(s) f.flush() f.close()