LLNL / echemfem

Finite Element Method for Electrochemical Transport (EchemFEM)
MIT License
20 stars 5 forks source link

What needs to be done after subclassing EchemSolver? #13

Open sudarshanv01 opened 5 months ago

sudarshanv01 commented 5 months ago

I am trying to understand how two examples (https://github.com/LLNL/echemfem/blob/main/examples/catalyst_layer_Cu.py and https://github.com/LLNL/echemfem/blob/main/examples/bicarb_Ag_Cu_tandem_example.py) work in practice. Both seem to subclass an abstract base class, but this abstract base class does not seem to require any required methods to be implemented. Could there be some additional documentation about methods that need to be implemented - or in general some documentation about the use of EchemSolver?

In general, for the examples, it would also be good to explain what they are intended to do and how they interface with echemfem. One suggestion may be to generate YAML files for the inputs (removing clutter at the start of the file) and then keeping post-processing and output towards the very end with a clear label.

tlroy commented 5 months ago

The only method that needs to be implemented in all cases is set_boundary_markers. The other methods are set_velocity if using advection, neumann if using a Neumann BC, and poisson_neumann if using a Neumann BC for the Poisson equation. In each case, their use is mentioned in documentation (where advection or boundary conditions are discussed). Regardless, the use of abstract base class was introduced early in the development, and its uses have stayed rather limited. All other methods have obvious defaults and parameters are actually being set through arguments. Is this limited use of abstract base class too confusing?

As mentioned in Issue #11 , examples need to be better documented. Their structure could also be improved, and input files could be introduced as well.

sudarshanv01 commented 5 months ago

Okay wonderful, thanks for the clarification. I will wait for the resolution of #11 in that case, thanks!