Page 1 of 1

How to start developing own modules with Elmer

Posted: 12 Apr 2013, 13:50
by raback
Hi All

I thought that I would write a few words for those who are interested in developing or modifying their own modules in Elmer. There is some new material that might help in the process.

A presentation on how the software development practices around Elmer may be found at:
http://www.nic.funet.fi/pub/sci/physics ... 3April.pdf

The is also really nice "ModelPDE" case that is among the tests in
https://sourceforge.net/p/elmerfem/code ... /ModelPDE/

This is a really nice model problem for transient/steady advection-diffusion-reaction problem that may be tailored by the users to fit their needs. It even includes bubble stabilization and runs serial and parallel and nodal/p-elements etc. Still it is just ~170 lines of code. The Elmer dialect has evelved over the years and it may be a good idea to avoid the older legacy solvers if starting to write own code and utilize the current practices that result to much more economical code.

The ModelPDE It is nicely documented in Ch 6. of Programmers Tutorial in:
http://www.nic.funet.fi/pub/sci/physics ... torial.pdf

Hope these pointers help those wanting to dwell deeper into Elmer world.

-Peter

Re: How to start developing own modules with Elmer

Posted: 23 Apr 2013, 14:46
by Franz Pichler
NIce Work!
wish i had that a year ago ;)
best regards
Franz

Re: How to start developing own modules with Elmer

Posted: 23 Apr 2013, 18:54
by sebastien ROUQUETTE
Awesome!
Right in time for me...

Re: How to start developing own modules with Elmer

Posted: 22 Oct 2016, 23:44
by gschrank
Good afternoon. I'm hoping to piggyback off of this post and try to get some guidance as I dive into developing my own module. I'm relatively new to Elmer (worked with it for about a year) and to Fortran. My previous experience with FEM was with COMSOL, so I didn't have to think about the nuts and bolts of the computation.

I'm working on developing a module for my niche application of polarized gas. I think I've properly expressed the weak form of the PDE. I've used ModelPDE as a template for my module, and I've started editing the code for the mass and stiffness matrix generally. However, I've run into the difficulty of linearizing the problem. The Elmer Programers' Tutorial excludes the linearization step for simplicity, but it is something I kind of need to know how to do to properly code my PDE.

I think I understand the two methods that Elmer uses standard, Picard and Newton. What I don't know or can't readily find is if there is a prewritten function call to implement either of these methods or to implement the hybrid method. Is there something in DefUtils or elsewhere I can use to easily integrate this step into the module? Is this something I need to hardcode in the module? Are their coding standards in place for the linearization step.

Thanks in advance... and if this question needs it's own thread, please let me know.

Re: How to start developing own modules with Elmer

Posted: 15 Feb 2018, 09:36
by Neosphere
raback wrote:Hi All

I thought that I would write a few words for those who are interested in developing or modifying their own modules in Elmer. There is some new material that might help in the process.

A presentation on how the software development practices around Elmer may be found at:
http://www.nic.funet.fi/pub/sci/physics ... 3April.pdf

The is also really nice "ModelPDE" case that is among the tests in
https://sourceforge.net/p/elmerfem/code ... /ModelPDE/

This is a really nice model problem for transient/steady advection-diffusion-reaction problem that may be tailored by the users to fit their needs. It even includes bubble stabilization and runs serial and parallel and nodal/p-elements etc. Still it is just ~170 lines of code. The Elmer dialect has evelved over the years and it may be a good idea to avoid the older legacy solvers if starting to write own code and utilize the current practices that result to much more economical code.

The ModelPDE It is nicely documented in Ch 6. of Programmers Tutorial in:
http://www.nic.funet.fi/pub/sci/physics ... torial.pdf

Hope these pointers help those wanting to dwell deeper into Elmer world.

-Peter
Hey, thanks for the nice information. Keep it up..

Re: How to start developing own modules with Elmer

Posted: 18 Mar 2019, 07:16
by riyasathe
Hi,
Thank you for this excellent information. It was helpful. Great information.