How to start developing own modules with Elmer

Discussion about coding and new developments
Post Reply
raback
Site Admin
Posts: 4801
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

How to start developing own modules with Elmer

Post 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
Franz Pichler
Posts: 196
Joined: 29 Sep 2011, 12:25
Antispam: Yes

Re: How to start developing own modules with Elmer

Post by Franz Pichler »

NIce Work!
wish i had that a year ago ;)
best regards
Franz
sebastien ROUQUETTE
Posts: 97
Joined: 05 Nov 2011, 16:50
Antispam: Yes
Location: Nimes, France

Re: How to start developing own modules with Elmer

Post by sebastien ROUQUETTE »

Awesome!
Right in time for me...
Rouquette Sébastien
University of Montpellier / Mechanical and Civil Engineering Lab. / Welding Group
gschrank
Posts: 17
Joined: 21 Aug 2016, 05:40
Antispam: Yes

Re: How to start developing own modules with Elmer

Post 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.
Neosphere
Posts: 1
Joined: 15 Feb 2018, 09:27
Antispam: Yes
Location: Kathmandu, Nepal
Contact:

Re: How to start developing own modules with Elmer

Post 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..
riyasathe
Posts: 1
Joined: 18 Mar 2019, 07:15
Antispam: Yes

Re: How to start developing own modules with Elmer

Post by riyasathe »

Hi,
Thank you for this excellent information. It was helpful. Great information.
Post Reply