I was trying to use VoronoiFVM.jl and I am not sure I understand how to build a Physics object correctly.
This is probably because of my lack of knowledge about FVM in general.
I have a PDE in 2D with two species and the following shape:
Would it be correct to translate it to this Physics object?
grid = simplexgrid(collect(0:1/100:1), collect(0:1/100:1))
physics = VoronoiFVM.Physics(
; reaction = function (f, u, node, data)
f[1] = (k_2*(1 - u[1]) - k_3 + f(u[2]))*u[1]
f[2] = k_4*u[1] - k_5*u[2]
end,
flux = function (f, u, edge, data)
nspecies = 2
f[1] = D_u*(u[1,1]-u[1,2]) - k_1*u[1]*(u[2,1]-u[2,2])
f[2] = D_v*(u[2,1]-u[2,2])
end, source = function (f, node, data)
f[1] = 0
f[2] = k_6
end, storage = function (f, u, node, data)
f[1] = u[1]
f[2] = u[2]
end)
sys = VoronoiFVM.System(grid, physics; unknown_storage = unknown_storage)
enable_species!(sys, 1, [1])
enable_species!(sys, 2, [1])
boundary_neumann!(sys, 1, 1, 1.0)
boundary_neumann!(sys, 1, 2, 0.0)
boundary_neumann!(sys, 2, 1, 1.0)
boundary_neumann!(sys, 2, 2, 0.0)