3
$\begingroup$

I am looking for library written in Python which will enable me to solve the coupled nonlinear equations which looks like:

formula

I need the library which will enable me to couple this solver to other models. For instance, I would like to impose different boundary conditions and change them in time (at any time step) as well as access to vector of solution at each time step and have possibility to change it (for instance, to implement non-local transport).

Other "wishes":

  • fast
  • To have possibility of parallel solving.
  • and if possible easy to use.

Thank you in advance!

$\endgroup$
  • $\begingroup$ How many $C_i$s do you have? Are $\varepsilon$, $\omega$, and $D_i$ variables or constants? If variables, do you have their forms or closure equations for them? Is the domain always going to be a cartesian box, or do you have geometry to worry about? Define fast. $\endgroup$ – Bill Barth Oct 13 '14 at 16:28
  • $\begingroup$ I have around 20 to 30 Ci. Epsilon, omega and D are x dependent(means I have equations for them like D(x) =A*exp(x).) I don't have geometry now just 1d or 2d box, but probably in far future I will have. Also I could have any types of boundary conditions (Robyn, Dirichlet, Neumann). $\endgroup$ – Igor Markelov Oct 13 '14 at 18:03
3
$\begingroup$

I suggest taking a look at FiPy:

http://www.ctcms.nist.gov/fipy/

It uses the finite-volume method, is written in Python, has certainly been used to solve the class of problems you describe, and was designed with flexibility in mind.

The documentation seems relatively good to me and the authors are responsive to requests for help via a mailing list.

$\endgroup$
  • $\begingroup$ Thanks. It is pretty good. I was thinking about this package but wasn't sure: maybe there is something better. I want to consider as many as possible because I think it will be the core of long lasting development process and it is better to consider all possible variants now and do not migrate later.. $\endgroup$ – Igor Markelov Oct 15 '14 at 10:38
  • $\begingroup$ I've played a lot with FiPy and realised that it is a way too slow :( $\endgroup$ – Igor Markelov Nov 10 '14 at 1:14
  • $\begingroup$ @IgorMarkelov: Did you figure out what package best suits your problem? I have a similar problem with two coupled PDEs which are modified form of the transport equation that you have. $\endgroup$ – user5510 Jul 4 '15 at 1:09
  • $\begingroup$ I've used FiPy. Relatively slow but easy to use. $\endgroup$ – Igor Markelov Jul 4 '15 at 19:12
  • $\begingroup$ @IgorMarkelov: Can you post an answer with an example of using FiPy to solve the equation in your question? Also, can you solve the above equation if your variable $D$ is varying with $(x,y)$? Thanks. $\endgroup$ – user5510 Jul 19 '15 at 10:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.