function [porosity_inner_1] = findInnerPorosity1Profile(Br,Pe,porosity_outer,effpressure_comp,z,zct,delta)

dphi1dz = ((Br - porosity_outer.*effpressure_comp)./Pe).';
porosity_inner_1 = cumtrapz(z,dphi1dz);
[~,idx] = (min(abs(z - zct)));
C = -trapz(z(1:idx),dphi1dz(1:idx));
porosity_inner_1 = (porosity_inner_1+C)./(1./delta.^(0.5));

porosity_inner_1(z>zct) = 0;

% porosity_inner_1 = (Pe + sqrt(Pe.^2 - 4.*kappa.*Br*(z-1)))./(2.*kappa);
% porosity_inner_1(z>zct) = 0;

end

