ClearAll["`*"];Remove["`*"];
In[]:=
c0=1/2;a=-2;d=1;sat=1;k1=2;
Numerically can be solved
​
if I add additional conditon for example: cb[t, 2] == 0
In[]:=
sol1=NDSolve[{D[cb[t,x],{x,2}]==D[cb[t,x],t]/d,cb[t,a]==c0,cb[0,x]==c0,cb[t,2]==0},cb,{t,0,10},{x,-2,2},Method{"PDEDiscretization"{"MethodOfLines","SpatialDiscretization""FiniteElement"}}];
In[]:=
Plot3D[cb[t,x]/.sol1,{t,0,10},{x,0,1}]
Out[]=
In[]:=
sol2=NDSolve[{D[s[t],t]==k1*(cb[t,0]/.sol1[[1]])*(s[t]-sat),s[0]==0},s[t],{t,0,10}];
In[]:=
Plot[s[t]/.sol2,{t,0,10}]
Out[]=
(*---------------------------------------------------------------------------------------*)
In[]:=
ClearAll["`*"];Remove["`*"];
Analytically:
In[]:=
sol=DSolve[{D[cb[t,x],{x,2}]==D[cb[t,x],t]/d,cb[t,a]==c0,cb[0,x]==c0},cb[t,x],{t,x}]
Out[]=
cb[t,x]
d
Integrate-c0
-
2
(-a+x-K[1])
4dt
-
2
(-a+x+K[1])
4dt


2
(-a+x-K[1])
4dt

-
2
(-a+x+K[1])
4dt

,{K[1],0,∞},AssumptionsTrue+
dt
(-a+x)Integrate
c0
-
2
(-a+x)
4dt-4dK[2]

3/2
(t-K[2])
,{K[2],0,t},AssumptionsTrue
2d
π
t
d>0&&-a+x>0
Indeterminate
True

In[]:=
sol3=(cb[t,x]/.sol)[[1,1]][[1,1]]//Expand
Out[]=
Integrate-c0
-
2
(-a+x-K[1])
4dt
-
2
(-a+x+K[1])
4dt


2
(-a+x-K[1])
4dt

-
2
(-a+x+K[1])
4dt

,{K[1],0,∞},AssumptionsTrue
2
d
π
t
-
a
dt
Integrate
c0
-
2
(-a+x)
4dt-4dK[2]

3/2
(t-K[2])
,{K[2],0,t},AssumptionsTrue
2d
π
t
+
dt
xIntegrate
c0
-
2
(-a+x)
4dt-4dK[2]

3/2
(t-K[2])
,{K[2],0,t},AssumptionsTrue
2d
π
t
%//Activate(*Can'tComputesecondandthirdintegral!!!*)
Out[]=
-c0Erf
a-x
2
d
t
+
ac0(-∞)
Sign[dt]
Sign[d]
Sign[t]
+
c0x∞
Sign[dt]
Sign[d]
Sign[t]
if t∈&&d
2
(a-x)
<0
Workaround:
In[]:=
Integrate
c0
-
2
A
4dt-4dK[2]

3/2
(t-K[2])
,{K[2],0,t}==InverseMellinTransformIntegrateMellinTransform
c0
-
2
A
4dt-4dK[2]

3/2
(t-K[2])
,A,s//PowerExpand,{K[2],0,t},Assumptions->t>0//PowerExpand//ExpandAll,s,A/.A->-a+x
Out[]=
t
∫
0
c0
-
2
(-a+x)
4dt-4dK[2]

3/2
(t-K[2])
K[2]-
2c0
d
π
-1+Erf
-a+x
2
d
t

-a+x
In[]:=
-c0Erf
a-x
2
d
t
-
a
dt
*-
2c0
d
π
-1+Erf
-a+x
2
d
t

-a+x
2d
π
t
+
dt
x*-
2c0
d
π
-1+Erf
-a+x
2
d
t

-a+x
2d
π
t
//FullSimplify
Out[]=
c0-1+Erfc
a-x
2
d
t
+
d
t
Erfc
-a+x
2
d
t

dt
HoldFormcb[t,x]==c0-1+Erfc
a-x
2
d
t
+
d
t
Erfc
-a+x
2
d
t

dt
//TraditionalForm(*SolutionforPDE*)
Out[]//TraditionalForm=
cb(t,x)c0-1+erfc
a-x
2
d
t
+
d
t
erfc
-a+x
2
d
t

dt
We can check solution ,BC and IC:
In[]:=
FullSimplify{D[cb[t,x],{x,2}]==D[cb[t,x],t]/d,cb[t,a]==c0,cb[0,x]==c0}/.cbFunction{t,x},c0-1+Erfc
a-x
2
d
t
+
d
t
Erfc
-a+x
2
d
t

dt
,Assumptions->{d>0,t>0,-a+x>0}
Power
:Infinite expression
1
0
encountered.
Power
:Infinite expression
1
0
encountered.
Power
:Infinite expression
1
0
encountered.
General
:Further output of Power::infy will be suppressed during this calculation.
Infinity
:Indeterminate expression 0
d
ComplexInfinityErfc[ComplexInfinity] encountered.
Out[]=
{True,True,Indeterminatec0}
Third condition: cb[0, x] == c0 we can check using limit :
In[]:=
Limitc0-1+Erfc
a-x
2
d
t
+
d
t
Erfc
-a+x
2
d
t

dt
,t->0,Assumptions->{d>0,t>0,-a+x>0,c0∈Reals}(*OK*)
Limit
:Warning: Assumptions that involve the limit variable are ignored.
Out[]=
c0
Then solve for: s[t] :
In[]:=
sol4=DSolveD[s[t],t]==k1*c0-1+Erfc
a-x
2
d
t
+
d
t
Erfc
-a+x
2
d
t

dt
/.x->0*(s[t]-sat),s[0]==0,s[t],t
Out[]=
s[t]
c0k1-t-
a
2
a
dt
t
4
2
a
-
2
a
4dt

d
3/2
2
a
dt
t
-2
π
1-Erf
1
2
2
a
dt

4
d
π
+
a
2
a
dt
t
4
2
a
-
2
a
4dt

d
3/2
2
a
dt
t
-2
π
1-Erf
1
2
2
a
dt

4
π
dt
+
d
3/2
t
Erfc-
a
2
d
t

dt
+tErfc
a
2
d
t


t
∫
0
1
dK[1]
-c0k1-
a-2
π
1-Erf
1
2
2
a
dK[1]
+
4
2
a
-
2
a
4dK[1]

d
3/2
2
a
dK[1]
K[1]
2
a
dK[1]
K[1]
4
d
π
-K[1]+Erfc
a
2
d
K[1]
K[1]+
a-2
π
1-Erf
1
2
2
a
dK[1]
+
4
2
a
-
2
a
4dK[1]

d
3/2
2
a
dK[1]
K[1]
2
a
dK[1]
K[1]
4
π
dK[1]
+
d
Erfc-
a
2
d
K[1]

3/2
K[1]
dK[1]

-c0
d
k1satErfc-
a
2
d
K[1]

K[1]
+c0k1sat
dK[1]
-c0k1satErfc
a
2
d
K[1]

dK[1]
K[1]
sol4//FullSimplify//Expand(*Idoubtthere'saclosedformfortheintegral!!!*)
Out[]=
s[t]
c0k1t
d
t
2d
π
t+a
-
2
a
4dt

-2+
2
a
4dt

π
2
a
dt
-
d
t
+
dt
-
π

2
a
+2dt-
d
t
+
dt
Erf
a
2
d
t

2
π
3/2
(dt)

t
∫
0
c0
c0
-
2
a
4dK[1]

k12a
d
K[1]
-a
2
a
4dK[1]

π
Erfc
1
2
2
a
dK[1]

2
a
dK[1]

d
K[1]
-
dK[1]
-2a
dK[1]
+
d
2
a
4dK[1]

π
K[1]

dK[1]
+Erf
a
2
d
K[1]
-
d
K[1]
+
dK[1]

2d
π

k1sat-
d
Erfc-
a
2
d
K[1]

K[1]
+Erf
a
2
d
K[1]

dK[1]
dK[1]
K[1]