Help with Plotting a time and space dependent variable (Shrinking Core Model)

5 views (last 30 days)
Hello MATLAB Community,
I hope everyone is doing great and staying safe and healthy. I am coding a time and space dependent property of a particle that is undergoing a chemical reaction. The reaction front basically moves from the outer most surface towards the center (Shrinking Core Model). I have succesfully coded it using nested FOR loops but I am having problems in extracting results and plotting them. I would be really grateful if someone can help me as this project report is due in a few days. The code is also attached.
  1. The figure below show the change in target variable as a function of radius, and each curve is for a specific time value. For example, 1 is the curve for time 1, 2 is the radius for time 2 and so on. I need help to convert this to a surface map with radiua as x variable, time as y variable and PCO2 as z variable.
2. The second thing I need help with is making a diagram. the sketch below shows what I have in mind. Right now my code can give the values of inner and outer radius at each time and also how PCO2 (the target variable) changes in the yellow region. I want to make this figure and display the values of PCO2 in the yellow region as acolor spectrum (high-red, low-blue). Any help would be greatly appreciated.
3. The last thing I need help with is putting a slider for time so I can automatically jump to the required time. Someting like an interactive graph of PCO2 vs. Radius witha time slider.
Once again THANKYOU for your attention and I would really appreciate any help.
The Code is attached

Sign in to comment.

Answers (0)


Find more on Chemistry in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!