How to set initial condition on a particular edge for pde?
Mostrar comentarios más antiguos
I need to set initial condition on a particular edge for my pde.
Respuestas (1)
Alan Weiss
el 8 de Feb. de 2016
0 votos
2 comentarios
troxylon
el 8 de Feb. de 2016
Alan Weiss
el 9 de Feb. de 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
Categorías
Más información sobre Eigenvalue Problems en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!