How to set initial condition on a particular edge for pde?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I need to set initial condition on a particular edge for my pde.
0 Commenti
Risposte (1)
Alan Weiss
il 8 Feb 2016
2 Commenti
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
Vedere anche
Categorie
Scopri di più su Geometry and Mesh in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!