I’m still struggling with my system of equations but simplified it to 1 parabolic equation to find the issue and feal like I lost some basics.

In below equation value of initial condition doesn’t influence results, looks like only boundary condition changes function values. What’s more function values don’t change much in following time steps.

I didn’t try to write it out but just looking at the problem the laplacian coef is
large suggesting second der is going to be “small.” It looks like the time derivative goes
to zero when gamma is just the boundary condition plus an exponential ( almost linear )
change in the x direction. I played with solver and took out quadrature rule not
much change although setting “init=1” seems to change things a little… Beta and 1/dt
seem to be similar magnitude although again you should probably just write it
out and look at the numbers. I should know the damped thing pretty well but its late here There are cases when a condition can be ignored, for example setting
initial value and initial derivative without a mixed formulation but I’m not
sure any case like that exists here. What result were your expecting or what equation
were you trying to implement?

Thanks for answering. I’ll look at it deeply again after the weekend.

Checking shortly at your code changes I see that initial condition influences results – good and expected. However, the solution doesn’t change in time like the gamma is constant – so the time derivative is not influencing.

If the initial condition is beta = 0.85 and boundary condition w1 = 60 I would expected values ~between these two in initial step and changing in the time. This equation describes oxygen flow in tissues so expect oxygen from boundary migrates to the whole tissue.

What eqn are you trying to model?
AFAICT, as written, for the steady state soln characteristic eqn in x direction roots I got (.5/D)(1 +/- sqrt(1-4BD)).
Your x values are somewhere around 0-2 or so and D is 1000 so I don’t
expect the soln to change much but in any case it should not be hard to put in
analytical soln and compare.

I’m trying to simulate tumor growth, this is oxygen density equation.
Probably you gave me important clue which I missed as I’m not so fluent in equations. Original area was rectangle 100-200 not 1-2, I rescaled it due to some other issues I didn’t realize how it influences current version.
After changing mesh size (to ~100-200) function values start to change however become more unstable in time (growing rapidly or take negative values) – need to verify this deeply.

If you are just trying to simulate 1 dimensional diffusion, there are a lot of examples of
that- heat diffuses and so do charge carriers. Getting a useful result will
probably require a more complicated model or better boundary conditions.
Its good to start simple and your current model is so simple there are ways
to approach it analytically which is always a good sanity check on a computer.
I’m an engineer so my description of the math may be vulgar but hopefully
useful Probably also you are interested in steady state or quasi static
situation first where the time derivatives don’t matter so much. But, you
may want to see analytically what happens to an initial guess of the form
exp(ikx) or exp(kx) whatever is easier. or for complex k. Then you get
something like dn/dt=a(k)*n and you can see if there are conditions where it grows
indefinitely. If seems to go to zero analytically and the simulation explodes,
it could be a bug or the time or space scales are too large.