Mobile concentration plot not rendering in Permeation barrier modelling

Open Beginner friendly
#172 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
jupyter-notebook

Research direction

Open the task04 Permeation barrier modelling page and inspect the cell using profile.times, the mobile concentration plot, and profile_exports. Run the notebook to reproduce the empty plot, compare profile.t with profile.times, and verify that the concentration plot renders while exported timestamps populate profile.times as expected.

Written by the indexing model from the issue text.

Description

In https://festim-workshop.readthedocs.io/en/latest/content/applications/task04.html#model-with-barrier
Error:
/tmp/ipykernel_3252/2865152383.py:23: UserWarning: No artists with labels found to put in legend. Note that artists whose label start with an underscore are ignored when legend() is called with no argument. axs[0].legend(fontsize=12, reverse=True)

It is caused by the fact that profile.times is empty so nothing is plotted
-> fix by iterating over profile.t instead. Still profile.times should be populated since timestamps are specified when doing the export

profile_exports = [
    [F.Profile1DExport](field=spe, subdomain=vol, times=[100, 17000, 8e5])
    for spe in model_barrier.species
    for vol in model_barrier.volume_subdomains
]
Dominant language
Jupyter Notebook
Stars
29
Forks
12
Avg merge
1d 35m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from festim-dev/FESTIM-workshop

All issues in festim-dev/FESTIM-workshop

Similar issues

More Data Visualization issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.