Hi,

I am very new to FreeFEM so I am probably making a few simple mistakes but would really appreciate your help.

I am trying to solve a system of 6 PDEs to model cancer growth. This is my code so far:

real L = 1.0;

real D = 10.0;

real b = 1.0;

real P = 1.2;

int meshSize = 50;

int wall = 1;

int inlet = 2;

int outlet = 3;

mesh Mesh;

border b1(t =0.,1.){x=L*t; y = 0.; label=wall;};
border b2(t=0.,1.){x=L; y=L*t; label=outlet;};

border b3(t=0.,1.){x=L-L

*t; y=L; label =wall;};*

border b4(t=0.,1.){x=0.;y=L-Lt; label=inlet;};

border b4(t=0.,1.){x=0.;y=L-L

Mesh = buildmesh(b1(meshSize) + b2(meshSize) + b3(meshSize) + b4(meshSize));

plot(Mesh, wait =1);

real t = 0.0;

real dt = 0.2;

real Kc = 1.0;

real Kn = 1.0;

real epsilon = 0.001;

real Pan = 1.0;

real Pac = 1.0;

real Pbn = 1.0;

real Pbc = 1.0;

real Q = 1.0;

real deltaA = 1.0;

real deltaB = 1.0;

real deltaE = 1.0;

real dC = 1.0;

real dN = 1.0;

real dA = 1.0;

real dB = 1.0;

real dX = 1.0;

real dE = 1.0;

real DA = 1.0;

real DB = 1.0;

real DX = 1.0;

real DE = 1.0;

real G = 1.0;

fespace Space(Mesh, P1);

Space C, Ncell, A, B, X, E, v;

problem Cequation(C, v) =

int2d(Mesh)( dC * C * v / dt + -C * log((C/Kc)+ epsilon) * v)

+ on(1, C = 1);

problem Nequation(Ncell, v) =

int2d(Mesh)( dN * Ncell * v / dt + -C * log(Ncell / Kn + epsilon) * v)

+ on(1, Ncell = 1);

problem Aequation(A, v) =

int2d(Mesh)( dA * A * v / dt + DA * dx(A) * dx(v)+ Pan * Ncell * v+ Pac * C * v - deltaA * A * v)

+ on(1, A = 1);

problem Bequation(B, v) =

int2d(Mesh)( dB * B * v / dt + DB * dx(B) * dx(v)+ Pbn * Ncell * v+ Pbc * C * v - deltaB * B * v)

+ on(1, B = 1);

problem Xequation(X,v) =

int2d(Mesh)(dX* X * v / dt + DX * dx(X) * dx(v) + Q * (1 - X) * E * v - C * X - Ncell * X )

+ on(1, X = 1);

problem Eequation(E,v) =

int2d(Mesh)(dE * E * v / dt + DE * dx(E) * dx(v) + G * E * v - deltaE * E * v)

+ on(1, X = 1);

In my first and second equation, I use a log function : log((C/Kc)+epsilon). When I run the code I am getting the error <10LinearCombI7MGauche4C_F0E>, . I think it has something to do with having C in the log function - maybe causing negative numbers in the log.

Does anyone know how to fix this issue? Also any other recommendations on how I should solve this system would be great. Thanks