function dcdt = cdot_new_conc(t,conc,D,vol,x,x_mid);

% function dcdt = cdot_new_conc(t,conc,D,vol,x,x_mid);
% new cdot file in concentration form

[M,N] = size(conc);

dx = diff(x);                               % face to face distance, (n-1) 
dx_mid = diff(x_mid);                       % center to center distance, (n-2)


% augment for ghost cells to make no flux BCs
conc = [conc(1) ; conc(:) ; conc(end)];              % cell quantity
dx_mid = [dx_mid(1) ; dx_mid(:) ; dx_mid(end)];      % face quantity
%area = [area(1) ; area ; area(end)];                 % aug_area (cell)
%avg_area = area(1:end-1) + 1/2*(diff(area));         % avg_area (face) 

% now find cdot
flux_face = D.*(diff(conc)./dx_mid);  % face quantity
dcdt = 1./vol.*diff(flux_face)./dx;                   % back to cell quantity  
% measures concentration      
%Sum = sum(dcdt)

%keyboard
