festim-dev / FESTIM-workshop

Learn how to simulate hydrogen transport with FESTIM
Apache License 2.0
17 stars 7 forks source link

Example: How to create a custom BC, source, trap, etc #59

Closed RemDelaporteMathurin closed 2 months ago

RemDelaporteMathurin commented 3 months ago

Often users need to create their own custom models.

It would be good to show the process of inheriting from a FESTIM class to override some methods etc

KulaginVladimir commented 3 months ago

Does this issue also include a custom Newton solver?

RemDelaporteMathurin commented 3 months ago

It could include it yes.

Although maybe the custom solver could have its own demo?

Initially I was more thinking cases where we want a specific formulation for extrinsic traps or things like this that require to override classes

KulaginVladimir commented 3 months ago

Although maybe the custom solver could have its own demo?

Sure. I simply wanted to clarify this.

Thus, we need a dedicated issue for the Newton solver demo as well.

RemDelaporteMathurin commented 3 months ago

In fact there are several examples of when we need to do this:

Maybe each of them could have its own demo

RemDelaporteMathurin commented 3 months ago

Actually we have the CustomFlux BC that already does a lot of stuff so many BCs are not the best example for this.

@jhdark was suggesting writing custom derived quantities like including advection for instance.