How to set initial condition on a particular edge for pde?

3 visualizzazioni (ultimi 30 giorni)
I need to set initial condition on a particular edge for my pde.

Risposte (1)

Alan Weiss
Alan Weiss il 8 Feb 2016
Alan Weiss
MATLAB mathematical toolbox documentation
  2 Commenti
troxylon
troxylon il 8 Feb 2016
I saw this documentation already. It has the initial condition at mesh nodes but not at edges.
Alan Weiss
Alan Weiss il 9 Feb 2016
If you have a parabolic or hyperbolic type equation, then you need to set initial conditions everywhere, meaning at all nodes. To set the initial conditions differently at the nodes of a particular edge, say edge 3, first find out the nodes that are on edge 3:
edge3 = e(5,:) == 3;
Then find the first and second nodes on these edges (this might not be the most efficient way to do this, it is just the first way that occurred to me):
pindices1 = e(1,edge3);
pindices2 = e(2,edge3);
pindices = union(pindices1,pindices2)
You now have all the nodes that comprise the edge. Set your initial conditions using this information.
Alan Weiss
MATLAB mathematical toolbox documentation

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by