Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent naming scheme for circuit elements #83

Closed
mdmurbach opened this issue Feb 21, 2020 · 5 comments
Closed

Consistent naming scheme for circuit elements #83

mdmurbach opened this issue Feb 21, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@mdmurbach
Copy link
Member

mdmurbach commented Feb 21, 2020

Now that we can have multi-letter circuit elements (#82), the options for how to name elements are endless... 馃槀 In reality, we should try to stick to a standard naming scheme to make it easier.

Currently, the elements that I think should be renamed (along with some early brainstorming...) are:

  • A (Semi-infinite Warburg) -> W
  • W (Blocked finite-length Warburg i.e. the one with the coth) -> Wb or Wo (looks like it's typically called open)
  • [should add] (Transmissive finite-length Warburg, i.e. the one with the tanh) -> Wt or Ws (looks like it's typically called short)
  • T (Macrohomogeneous porous electrode transmission line model) -> PE or TLMp?
@BGerwe
Copy link
Collaborator

BGerwe commented Mar 13, 2020

I'm inclined toward the Wo and Ws versions. I also have plans to include a finite-length Gerischer develope in this paper for CO2 electrolysis since it's the model Jon and his undergrad are using. That element would be Gs since it's a Gerischer with a tanh term.

Maybe this is better in a new issue, but I discovered a slightly annoying behavior with the new element naming method. Previously, elements could be followed by an underscore when writing the circuit string, but now it throws an error.

For example, using this circuit string circ = 'R_0-p(R_1,C_1)-G_1' raises a ValueError. I imagine this comes from how the raw_element variable is built and checked.

for elem in extracted_elements:
    raw_element = ''.join(char for char in elem if char not in ints)
    num_params = check_and_eval(raw_element).num_params
    length += num_params

@nealde Do you think it's worth changing this to allow for _ after the circuit element label? Or should we just discourage that practice?

@mdmurbach
Copy link
Member Author

Awesome. I'll rename the Warburg elements in my branch

I think we could just have the ignored characters (currently ints) be 0123456789_ and that should do the trick (means we can't ever name any elements with an underscore (i.e. W_s), but I think that's an okay tradeoff).

@mdmurbach
Copy link
Member Author

Elements like R_0 work again as of 6c4b36e

@BGerwe
Copy link
Collaborator

BGerwe commented Mar 16, 2020

Are we ready to close this one too?

@mdmurbach
Copy link
Member Author

Yeah, I think so!

@BGerwe BGerwe closed this as completed Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants