# Error while using NDSolve

I'm trying to solve a PDE using NDSolve.

cfun = NDSolveValue[pde, c, {t, 0, tEnd},
DirichletCondition[c[t, x] == 5, x == 0], {x} \[Element] mesh];


I get the following error while trying to specify the boundary condition for a time-dependent problem.

NDSolveValue::dvlen: The function c[t,x] does not have the same number of arguments as independent variables (3).


notebook

code reference

EDIT:

Complete code:

Needs["NDSolveFEM"]
region = Line[{{0}, {100}}];
includePoints = {{10}, {20}, {30}, {40}, {50}};
mesh = ToElementMesh[region, "IncludePoints" -> includePoints,
"MaxCellMeasure" -> 0.0008]
vars = {c[t, x], t, {x}};
RegularizedDeltaPoint[g_, X_List, Xs_List] :=
Piecewise[{{Times @@ Thread[1/(4 g) (1 + Cos[\[Pi]/(2 g) (X - Xs)])],
And @@ Thread[RealAbs[X - Xs] <= 2 g]}, {0, True}}]
Subscript[h, mesh] = Sqrt[Min[mesh["MeshElementMeasure"]]];
Subscript[gamma, reg] = Subscript[h, mesh]/2;
temp = RegularizedDeltaPoint[Subscript[gamma, reg], {x},
includePoints[]];
parameters = {kappa -> {{910}}, v1 -> 162,
gamma -> Subscript[gamma, reg], Qp -> 1.5};
pde = {Derivative[1, 0][c][t, x] +
Inactive[
c[t, x], {x}], {x}] + {v1}.Inactive[Grad][c[t, x], {x}] +
Qp*RegularizedDeltaPoint[gamma, {x}, {10}] == 0,
c[0, x] == 1} /. parameters;

tEnd = 2;
cfun = NDSolveValue[pde, c, {t, 0, tEnd},
DirichletCondition[c[t, x] == 5, x == 0], {x} \[Element] mesh];


The issue is when I include the  DirichletCondition[c[t, x] == 5, x == 0]. I want to fix the left boundary (i.e. x=0) at a value of c = 5 at all time, t, and specify the Neumann boundary condition at the right boundary.

• The DirichletCondition should be the list of equations like cfun = NDSolveValue[{pde, DirichletCondition[c[t, x] == 5, x == 0]}, c, {t, 0, tEnd}, {x} \[Element] mesh]. Jun 19 at 14:51
• The default NeumannValue is zero. If you want some other value, add it to the RHS of the PDE. For example, look here. Jun 19 at 15:27