Doubts on specifying 2-D "c" coefficients in Function Form
0 commentaires
Réponses (3)
2 commentaires
I have exactly the same Problem with the mesh. And I do not understand why Matlab unabled the possibility to refine the mesh for specific subdomains in the new workflow. However there seems to exist a Workaround, which I have not tried yet, but planned to do so: https://de.mathworks.com/matlabcentral/answers/346410-is-there-a-way-to-import-2d-meshes-nodes-and-triangles-into-pde-model-objects
Concerning your question:
You specify your coefficient in the function form by
coeff = sprintf('Coeffunc(u)');
When solving, the solver enters this function e.g.
u = parabolic(u0,tList,b,p,e,t,c,a,f,d);
The function has the form:
function coeff=Coeffunc(u)
You can give the mesh to the function or you declare the mesh global and call the mesh by global p,e,t. Than you have to calculate the positions of the centroids of the triangles. For each centroid you can define the values. The values are scalar, but the function is not only called once by the solver, so the values can change with time or anything. The Output coeff is than the value of the coefficient at each centroid.
0 commentaires
Voir également
Catégories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!