Terminal BC

General discussion about Elmer
Post Reply
kpereir
Posts: 7
Joined: 25 Mar 2021, 00:03
Antispam: Yes

Terminal BC

Post by kpereir »

Dear all,

I have a silly question here. I know that in Comsol, one could apply a terminal BC to an internal boundary and use it, for example, to dump current to a system in a electrostatic simulation. The terminal BC uses lumped parameters to ensure continuity at that interface.

I would like to model and electrode in contact with some biological tissue, forcing a fixed amount of current to it. In Comsol I would add a Terminal BC to account for that. I wonder if Elmer has something similar.

I had a look at creating a discontinuos mesh in gmsh, then running a static current analysis on Elmer with an initial value of voltage in each boundary of that discontinuos interface, asking to save scalars and computing the current flux across them. Then, using a python script, I would generate another side file with an updated Voltage at those surfaces and re-run the analysis until I got the current continuity across those boundaries satisfied with some tolerance. I feel like this is somehow not the right way to do it....

Just wondering if I am on the right path or if I am missing something here. Is there a simple way to deal with that? Really appreciate any comments!!

Btw, loving to learn Elmer. It is such a great software. Thank you guys for creating it!!!
Rich_B
Posts: 421
Joined: 24 Aug 2009, 20:18

Re: Terminal BC

Post by Rich_B »

Hi,

I'm not that familiar with your question, but this section in the Elmer Model Manual may be helpful?
17.3.1 Boundary Conditions
For the electric potential either a Dirichlet or Neumann boundary condition can be used. The Dirichlet
boundary condition gives the value of the potential on specified boundaries. The Neumann boundary condition is used to give a current Jb on specified boundaries
Jb = σ∇φ · ~n. (17.10)
Rich.
kpereir
Posts: 7
Joined: 25 Mar 2021, 00:03
Antispam: Yes

Re: Terminal BC

Post by kpereir »

Dear Rich, thank you for your reply. I checked the model manual, it is indeed possible to apply boundary current density (Neumann BC) to external boundaries of the model and the results seems fine for me.

My question is how to deal with an internal boundary that is a current source, for example, the interface of an electrode is embedded in a material, supplying current in a specific direction. I may be saying non sense, but my feeling is that in this case a Neumann condition will not work.

Any thoughts on that?
Rich_B
Posts: 421
Joined: 24 Aug 2009, 20:18

Re: Terminal BC

Post by Rich_B »

Hi,

Then maybe this entry in section 17.5 may be applicable to your case?
17.5 Keywords
....
Body Force bodyforce id
Current Source Real
This enables a scalar-valued source, not used often though.
Search through the tests folder, there are a few tests that include 'current source'.

Rich.
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Terminal BC

Post by kevinarden »

Should not matter if it is an internal or external boundary if the mesh is not discontinuous at the internal boundary, Internal boundaries can be attached to both bodies. I have attached the current test case as is, and one with an internal boundary. If you want a discontinuous boundary you can use mortar conditions to enforce conectivity.
current.zip
(89.35 KiB) Downloaded 165 times
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Terminal BC

Post by raback »

Hi

To my understanding you don't really need to apply a BC for anything else than to study the current. The standard Galerkin method basically enforces the potential to be continuous and the fluxes (currents) to be weakly continuous. Unless you need a jump in the potential there is no need to specify any boundary except to study the fluxes?

If you want to postprocess the fluxes you can use SaveScalars operating on given boundary & field with operator "diffusive flux". You could have more accurate fluxes by more elaborate means but this is straight-forward. I recommend quadratic elements if you're looking for currents.

-Peter
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Terminal BC

Post by kevinarden »

I should state the the test problem is quadratic elements, I changed it for the example to make adding the internal boundary easier.
Post Reply