Hello everybody and happy new year to all of you,
I’m solving a PDE system using MethodeOfLines tool of Julia. The documentation guided me quite well.
benefiting from ChrisRackauckas advise to speed up the non linearity, here is the good setup of the solve line , that works very well for this problem.
sol = solve(prob, FBDF(linsolve = LinearSolve.KrylovJL_GMRES()), abstol=1e-8, reltol=1e-8)
pdesys = PDESystem(eqs, bcs, domains, [t, x], [u(t, x), v(t, x), w(t, x)])
prob = discretize(pdesys, discretization)
The problem was solved successfully, but very slowly. ChrisRackauckas is currently collaborating with Julia’s community to find ways to speed things up.
Now, I want to calculate the derivatives ( Dx(u) ), ( Dx(v) ), and possibly ( Dt(u) ) and ( Dt(v) ) throughout the domain. This would help me better understand the flux in the system.
To retrieve the solutions, I assign them like this:
solu = sol[u(t,x)]
solv = sol[v(t,x)]
solw = sol[w(t,x)]
I thought getting the derivatives would be as simple as retrieving the solutions, for example:
solDxu = sol[Dx(u)]
But this doesn’t work.
Maybe I need to save the derivative information during the solving stage,
Maybe I should also ask for symbolic discretization because I’m using ModelingToolkit as fellow
sym_prob = symbolic_discretize(pdesys, discretization)
so I can access it later? I’m not sure how to proceed.
If someone understands my question and can help, I’d be really grateful!
If retrieving the derivatives isn’t possible, could you at least guide me on how to extract the boundary values of ( u ) and ( v ) from solu
and solv
? That way, I can calculate an average flux in the domain as a function of time.
Naceur Bouziani