0

I am trying to solve a set of PDEs with FiPy, but not sure how to represent the equations: see the PDEs here.

The terms give me trouble are those in red rectangle and blue rectangle. The one in red rectangle is a convection term times a function depending on x, T1 and T2; The one in blue rectangle is a transient term times another function depending on x, T1 and T2.

I couldn't find any example including this kind of terms. Could you please give me some suggestions, or share me an example?

I appreciate any help. Thanks in advance.

Rui Yang
  • 3
  • 1

1 Answers1

1

This question is similar to cellvariable*Diffusion in fipy, but for convection instead of diffusion. The solution is the same though. Use,

to convert the red terms into a convection term with a coefficient of f and a source term.

For the blue terms do exactly the same to get a transient term with a coefficient and a source term.


Edit: if we assume that then we can still use

and approximate explicitly (with f as a variable in FiPy and use grad). However, we can take it further and use,

and approximate the final explicitly.

Again, we can go even further with,

Again the last term can be solved explicitly. Depending on the form of f the last them should become more insignificant and thus, the explicitness less of an issue.

wd15
  • 1,068
  • 5
  • 8
  • However, the f functions depends on \phi, so I cannot use this method... – Rui Yang Dec 28 '21 at 11:24
  • Ok, I've tried to address this in the edit. One can still use the initial equation if f_x is evaluated explicitly. However, this doesn't seem as satisfactory as using one of the other identities. – wd15 Dec 29 '21 at 18:46