Answer:
the pressure gradient in the x direction = -15.48Pa/m
Explanation:
- The concept of partial differentiation was used in the determination of the expression for u and v.
- each is partially differentiated with respect to x and the appropriate substitution was done to get the value of the pressure gradient as shown in the attached file.
Answer:
Aqueous solution of ionic compounds conduct electricity while solid ionic compounds don't.
Explanation:
Ionic compound conduct electricity when liquid or in aqueous solution that is resolved in water because the ionic bonds of the compound become weak and the ions are free to move from place to place.
Ionic compounds don't conduct electricity while in solid state because the ionic bonds are to strong and ions cannot move around with lack of space for movement which makes the electric conductivity zero.
Answer:
import numpy as np
import time
def matrixMul(m1,m2):
if m1.shape[1] == m2.shape[0]:
t1 = time.time()
r1 = np.zeros((m1.shape[0],m2.shape[1]))
for i in range(m1.shape[0]):
for j in range(m2.shape[1]):
r1[i,j] = (m1[i]*m2.transpose()[j]).sum()
t2 = time.time()
print("Native implementation: ",r1)
print("Time: ",t2-t1)
t1 = time.time()
r2 = m1.dot(m2)
t2 = time.time()
print("\nEfficient implementation: ",r2)
print("Time: ",t2-t1)
else:
print("Wrong dimensions!")
Explanation:
We define a function (matrixMul) that receive two arrays representing the two matrices to be multiplied, then we verify is the dimensions are appropriated for matrix multiplication if so we proceed with the native implementation consisting of two for-loops and prints the result of the operation and the execution time, then we proceed with the efficient implementation using .dot method then we return the result with the operation time. As you can see from the image the execution time is appreciable just for large matrices, in such a case the execution time of the efficient implementation can be 1000 times faster than the native implementation.