function pbeDefinition = seededDissolution

%% Description
% In this case, we start with a population that grows freely. No boundary
%   interactions. After a certain time, the growth rate is inverted to a
%   dissolution rate. Boundary effects will take place during dissolution,
%   and the dissolution itself.
pbeDefinition.source = 'generic';

%% Preparation
% crystal
pbeDefinition.cdef = obtainCrystal('generic_potash_alum', 1);

% decomposition data
pbeDefinition.dec = obtainDec(pbeDefinition.cdef.A, 'mapping', ...
    pbeDefinition.cdef.groupMappingMatrix, 'verbose', 0);
pbeDefinition.dec = addMeasureDataDec(pbeDefinition.dec, 'volume');
%dec = addMeasureDataDec(dec, 'mean width');
%dec = addMeasureDataDec(dec, 'support', [1 1 1]);

%% Initial distribution
rng(1);
pbeDefinition.seeding.time = 0; % seconds
std = 0.3*[3 3]'*1e-8; % m
disD = obtainDistributionDiscrete('normal', ...
    'nSample', 100, ...
    'mean', [8 8]'*1e-8,...  %m
    'cov', diag(std.^2));
pbeDefinition.seeding.positionMatrix = disD.positionMatrix;       % m
pbeDefinition.seeding.numberVector = disD.probabilityVector*1e10; % #

% initial bulk states
bulkInitial = [];

% population balance equations
dec = pbeDefinition.dec;
pbeDefinition.growthRate = @(H, P, y, t)(...
    (t<600)*bsxfun(@plus, H - H, [0.01;0.01]*1e-7) + ...
    (t>=600)*bsxfun(@plus, H - H, -1*[0.01;0.01]*1e-7));   % m/s

pbeDefinition.pivotProperty = 'volume';
pbeDefinition.bulkProperty = @(P, N, x, t)(P*N');

% time span for solution
pbeDefinition.timeSpan = 0:30:(180*60);       %s