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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding customized function for tortuosity #2111

Closed
amirsh213 opened this issue Jun 17, 2022 · 5 comments · Fixed by #2841 or #3437
Closed

Adding customized function for tortuosity #2111

amirsh213 opened this issue Jun 17, 2022 · 5 comments · Fixed by #2841 or #3437

Comments

@amirsh213
Copy link

Description

I was wondering if it is possible to enable adding customized non-Bruggeman functions to define tortuosity or MacMullin number as a function of porosity?

Thanks.

Motivation

No response

Possible Implementation

No response

Additional context

No response

@rtimms
Copy link
Contributor

rtimms commented Jun 19, 2022

You could create a new submodel in this folder. The simplest thing would be to copy the Bruggeman submodel and edit it to whatever function you want.

You could either hard-code some functional form with some new scalar parameters, or allow a general function of porosity/active material by adding a new FunctionParameter

@amirsh213
Copy link
Author

amirsh213 commented Jun 22, 2022

If I copy the Bruggeman submodel and add my function, how should I have the model use this custom submodel and not the Bruggeman?

Also, can you please elaborate on how this FunctionParamter works? I want to add (and change) two parameters for my customized equation in the "negative_electrode" folder like where you defined "Negative electrode Bruggeman coefficient (electrolyte)" in the CSV file. Should I define those parameters here?

I'm also wondering how you defined your effective properties e.g. electrolyte diffusivity/conductivity? I get tortuosity smaller than 1 which is confusing. Where should I define my effective properties the way I want?

@rtimms
Copy link
Contributor

rtimms commented Jun 23, 2022

I'm currently working on adding extra documentation around how to use submodels, but there is an example of swapping out submodels here. If you wanted to integrate your new submodel into the code you could make it so that you pass an option to the model to set the tortuosity. Take a look at the base battery model to see how options are handled.

For FunctionParameters you could look at how particle radius is defined, and see this example for how to provide a function. Yes, you can define your new parameters in GeometricParameters.

See this discussion around how the properties are defined (we actually define a "transport efficiency", not a tortuosity).

@TomTranter
Copy link
Contributor

Hi @amirsh213 , how's it going? We are running a hackathon on 29th of March in Oxford and this issue is potentially one we could work on together. You'd be welcome to join us if you can make it. Tickets are free but limited availability https://www.eventbrite.co.uk/e/pybamm-hackathon-tickets-517334430207?keep_tld=1
If you have already made some progress on this issue then let us know and we will exclude it from the options to work on during the day. Thanks

@TomTranter
Copy link
Contributor

Hackathon info

  • Look at submodel structure
  • Read tortuosity paper for a few different model ideas
  • Implement new submodel and parameters
  • Configure new option
  • New examples
  • Tests
  • PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants