-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
I would be inclined to approach the third term by writing and then representing that as F = ...
Fvec = [0, F]
eq = ... + ConvectionTerm(coeff=Fvec * (1 - phi), var=phi) == ...
Correct. The default BC for FiPy are no flux.
There are better tools for purely hyperbolic equations (such as Clawpack), but I have successfully used FiPy to solve Beer's law. I think you should be fine.
More complex coefficients should be fine. You'll probably need to sweep each time step to convergence.
I have not personally used Clawpack, but I think FiPy should be able to handle what you're trying to do. If you're going to be in an extreme range of fluid dynamics, such as involving shocks, Clawpack is probably better. Maybe @wd15 can weigh in. |
Beta Was this translation helpful? Give feedback.
-
I'm happy to see you've made as much progress as you have. My suggestions would be to tinker with sweeping and to try the What happens with You are defining @wd15 has much more experience with flow problems and may have other ideas. |
Beta Was this translation helpful? Give feedback.
I would be inclined to approach the third term by writing
and then representing that as