Specifying 3D PDE Coefficients at Element Centroids
Mostrar comentarios más antiguos
I am trying to specify my c, a, and f coefficients for a 3D problem by assembling row vectors for each. The row vectors are [1 x number of elements] (the coefficients are calculated at the element centroids). When I call...
u = assempde(pdem,c,a,f)
for this 3D problem I receive and error. However I know that for a similar 2D problem this approach works fine and gives me a nice looking solution u.
Is there any workaround for a 3D problem? My coefficients cannot be specified by the region and state arguments alone. I need additional arguments to define these coefficients.
Thanks!
Respuestas (1)
Alan Weiss
el 7 de Mzo. de 2017
0 votos
For 3-D problems you must pass nonconstant coefficients in the requisite format, which involves writing a function that accepts the region and state inputs and returns the coefficient values.
If you must, you can interpolate your coefficient values from particular points that you know. See scatteredInterpolant.
Alan Weiss
MATLAB mathematical toolbox documentation
Categorías
Más información sobre Electromagnetics 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!