
clc
clear all
close all

p1 = dlmread('p1.csv',',');
p2 = dlmread('p2.csv',',');
p3 = dlmread('p3.csv',',');
p  = p1+p2+p3;

r1 = dlmread('r1.csv',',');
r2 = dlmread('r2.csv',',');
r3 = dlmread('r3.csv',',');
r  = r1+r2+r3;

u1 = dlmread('u1.csv',',');
u2 = dlmread('u2.csv',',');
u3 = dlmread('u3.csv',',');

nx=size(p1,1);
ny=size(p1,2);
x=[1:nx];
y=[1:ny];

figure(1)
mesh(p1),grid on,hold on
mesh(p2),grid on,hold on
mesh(p3),grid on,hold on
xlabel('x axis')
ylabel('y axis')
zlabel('partial pressures')

v = (p1./p).*u1+(p2./p).*u2+(p3./p).*u3;
u = (r1./r).*u1+(r2./r).*u2+(r3./r).*u3;
