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

Improve interface for post-processed variables, including exporting #695

Closed
valentinsulzer opened this issue Oct 30, 2019 · 4 comments · Fixed by #811
Closed

Improve interface for post-processed variables, including exporting #695

valentinsulzer opened this issue Oct 30, 2019 · 4 comments · Fixed by #811

Comments

@valentinsulzer
Copy link
Member

Summary
Add functionality to simulation class to post-process and export variables

Motivation
Allow users to export variables to csv, matlab, etc for visualisation

@TomTranter
Copy link
Contributor

How would this handle the various spatial and temporal differences in the data? As there are many permutations might be better just to leave this in the users hands.

@TomTranter
Copy link
Contributor

After our conversation about this - I think it would be really useful to group the variables into domains so that they can all be visualized in the same way. If you run the following on a 1 plus 1D it fails on about half the variables
pybamm.post_process_variables(variables=spm.model.variables, t_sol=spm.solution.t, u_sol=spm.solution.y, mesh=spm.mesh)
maybe the post_process_variables and any new functions could accept a domain argument and only spit back the ones defined on that domain. Or if no domain is specified is could return a dict of dicts with the domain as the key on the first level

@rtimms
Copy link
Contributor

rtimms commented Nov 4, 2019

following on from that, it would be really great in Nplus1 to be able to visualize or create post process variables for the 1D model at a given y,z coordinate. But maybe this is more difficult than just improving how processed vars deals with higher-D variables...

@valentinsulzer
Copy link
Member Author

ProcessedVariable is a hacky mess atm so I am very happy for you to completely overhaul it if you have clear ideas how to do it. There's no support for 4D objects (t+r+x+z) atm hence why 1 plus 1D SPM fails.

valentinsulzer added a commit that referenced this issue Feb 7, 2020
valentinsulzer added a commit that referenced this issue Feb 11, 2020
valentinsulzer added a commit that referenced this issue Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants