MATLAB Answers

How to specify initial conditions for two different subdomains in PDE solver?

2 views (last 30 days)
Ankit Gaur
Ankit Gaur on 20 Aug 2019
Answered: Ravi Kumar on 29 Aug 2019
I am using the graphic PDE solver app in MATLAB. My aim is to model a diffusion equation in a 2-D rectangular space. I want have an initial condition where the molecules are released in the impulses form as initial condition, which requires kronecker delta function
However when I try to input the same using `eq' in the parameter values it does not reflect anaychange in the solved PDE.
Is it possible to apply kronecker delta function in the PDE solver as initial condition?
As a work around, I try to create a very small circular domain in the rectangular space to give it the necassary initial condition. I tried to have initial condition in the circualar domain different than in the rectangular domain. In cicle I tried to have initial condition as `1' and in rectangle as `0'. However, I am not able to assign different initial condition in the circular and rectangular domain. Both are selected simulataneously. How can one specifty two diffrerent initial conditions to two different subdomains?


Sign in to comment.

Answers (1)

Ravi Kumar
Ravi Kumar on 29 Aug 2019
I suggest you to look at the programmatic workflow, refer to the programmatic workflow overview doc page.
In the programmatic wokflow, te setInitialConditions function should allow you to set ICs as functions for differnte subdomains.


Sign in to comment.

Sign in to answer this question.