> On Apr 5, 2018, at 6:02 PM, Alokendra <aloken...@gmail.com> wrote:
> I am not so sure about the reaction 
> terms which can be coupled nonlinear functions. Do I need to use some 
> variation of `ImplicitSource` term?

Yes, these terms are appropriate for ImplicitSourceTerms, e.g., I would 
probably write $(k_fC_AC_B-k_rC_C)$ as

  ImplicitSourceTerm(coeff=k_f * C_A, var=C_B) - ImplicitSourceTerm(coeff=k_r, 

The first term could also be written

  ImplicitSourceTerm(coeff=k_f * C_B, var=C_A)

but that would result in less coupling between the equations, which would 
generally slow convergence. The first form might not be stable, though, so I 
would have to experiment if I was doing this.

> Also what is the most efficient way to get Fipy read information such as 
> rate constants, diffusion coefficients and drift diffusion coefficients 
> for many such species? Because of the nonlinearity in the reaction term 
> it cannot be vectorized in straightforward manner.

That depends on the form the coefficients take wherever you're getting them 

I would argue that one of the biggest advantages of FiPy over some other PDE 
solvers is that you define your problem with the Turing-complete Python 
programming language and not some dedicated scripting language or batch input 
file. You can do anything that Python can do to read and parse files.
fipy mailing list
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to