Question

I am working on a project (C# and .NET Framework) which requires me to solve some partial differential equations. Are there any specific libraries based on .NET Framework that I could see and make my work simpler?

I have worked with MATLAb and solving partial differential equations is very straightforward there. How can I solve this problem?

Was it helpful?

Solution

You could solve the problem in MATLAB and use the MATLAB compiler + Builder NE toolbox to create a .NET assembly which links to the rest of your app.

OTHER TIPS

Depends on which PDEs you want to solve and how you want to approach them.

Every approach that I know of will require linear algebra. You'll want to find a good matrix package for .NET, the best you can find, one that can handle sparse matricies efficiently.

Linear elliptic (steady state diffusion), parabolic (transient diffusion), and hyperbolic (F= MA dynamic) PDEs require slightly different approaches.

All three of these PDEs can use classical finite difference, finite element (weighted residual), or boundary element (Green's functions) to create the system matrix you'd like to solve. General non-linear PDEs are probably best attacked using a finite element/weighted residual technique.

But the parabolic and hyperbolic PDFs will turn into coupled sets of ODEs once you discretize them. You have to do transient integration to repeatedly solve the time evolution. Parabolic ODEs are first order in time; hyperbolic ODEs are second order in time.

I'm learning about CUDA and NVIDIA. You might want to look into CUDA bindings for your language.

All these are big topics unto themselves. Please Google for some sources, because it's not possible to give more than a cursory overview here.

UPDATE: I recently became aware of the Microsoft Solver Foundation. I haven't looked into it myself, but perhaps it'd be helpful to C# developers in solving this problem.

Another suggestion is AlgLib . I like this because unlike comprehensive libraries where you have to find what you need, AlgLib has all the algoritms separated, and often offered in multiple languages (including C#, in most/all cases). Regarding calculus AlgLib covers:

        Euler's method
        Runge-Kutta method
        Runge-Kutta method for a system of ODEs
        Bulirsch-Stoer method for a system of ODEs

A word of caution, however... upon checking these algorithm at AlgLib, I noted that they were not supported anymore (by AlgLib), because their licenses may be imcompatible with AlgLib's license (which is GPL, I believe).

Check out http://www.mathdotnet.com/About.aspx, it may have what you need. However I suspect you should get the best library for you application requirements, and then interface it to your .net application..

You'll probably find that with things like this (except where you using to learn either the language or the maths) there are a number of pre canned libraries.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top