Solving PDEs: time dependent c coefficient
Mostra commenti meno recenti
I am solving a PDE to simulate current flow through a conductive medium in 2D.
My geometry is as follows:

With Neumann boundary conditions applied to edges E2 and E4, like so:
applyBoundaryCondition(model,'neumann','Edge',1:model.Geometry.NumEdges,'q',0,'g',0);
applyBoundaryCondition(model,'neumann','Edge',2,'q',0,'g',1);
applyBoundaryCondition(model,'neuman','Edge',4,'q',0,'g',-1);
I am only interested in solving the PDE in the form of the Laplace equation:
where
is electric potential (which we are solving for) and σ is the conductivity tensor, which is represented as the c coefficient in our PDE model.
I want to apply a time-dependent c coefficient to the subdomain, F2, whereby the conductivity changes in time such that c = t/(t+constant).
I have tried the following lines of code:
c1 = [1;0;0;1];
specifyCoefficients(model,'m',0,'d',0,'c',c1,'a',0,'f',0,'Face',1);
c2 = @(location,state)(repmat([1;0;0;1].*state.time./(state.time + 1),1,length(location.x))); % Conductivity tensor for Face 2.
specifyCoefficients(model,'m',0,'d',0,'c',c2,'a',0,'f',0,'Face',2);
However, I am unsure about how to specify the time scale as the rest of the PDE is time-independent. I have found that
tlist = 0:0.01:1;
results = solvepde(model,tlist);
does not work.
Any help is appreciated.
Additional, but less urgent:
Once this step is completed, I aim to have the conductivity tensor also non-constant in x and y, so that it has something resembling a normal distribution (smallest conductivity in the centre of Face 2 and parabolically tending towards equilibrium at the edges. If anyone has any ideas on how to tackle this, that would be great.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su General PDEs in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!