Solution dependent material coefficient? How to use specifyCoefficients in pdetool (for a time dependnet PDE solution)

2 views (last 30 days)
Hi, I have set up a time-dependnet PDE (Fick's law of difusion) in pdetool (v2017) which appears to give me expected results.
Now, I want to make a material property (diffusion ceoffincent) solution dependent (concentration).
I scanned through the documentation and but I am finding it difficult to understand.
How do I use specifyCoefficients
(e.g. specifyCoefficientsspecifyCoefficients(model,'m',0,'d',1,'c',2.3e-3,'a',0,'f',0,'Face',1) is currently set, where 2.3e-3 is the concentration independent diffusion coeff)
when material parameter (in my case the diffusion coefficent) solution dependent
(i.e 2.3e-3 is now 2.3e-3*u*u, where u(x,y) is the solutiion)?

Accepted Answer

Ravi Kumar
Ravi Kumar on 10 Feb 2020
Define a function or a anonymous function handle as per the prescribed format. For example you can define:
cFcn = @(region,state) 2.3E-3*state.u.* state.u;
Then use it in specifyCoefficients as:
specifyCoefficients(model,'m',0,'d',1,'c',cFcn,'a',0,'f',0,'Face',1)
Regards,
Ravi

More Answers (0)

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!