How can I specify different PDE coefficients for different regions in a 3D geometry using PDE toolbox?
Show older comments
I am using PDE toolbox. I have 4 closed 3D surfaces, one inside the other, I want to specify different PDE coefficients for elements in these four regions.
How can I implement this? I was planning to make use of "sub domain" (11th row of 't' in "[p,e,t] = meshToPet(model.Mesh);"). But all values in it was 1, hence my plan didn't work.
Answers (1)
Alan Weiss
on 29 Jun 2015
0 votes
Currently, subdomains are not supported for 3-D geometry. However, you can write coefficients in function form so that the coefficients have different values in different regions. This is not as convenient as having real subdomains, but as far as I know it is the only current workaround.
Alan Weiss
MATLAB mathematical toolbox documentation
7 Comments
ashwaque edassey
on 30 Jun 2015
Alan Weiss
on 1 Jul 2015
It might not be possible to do what you are asking in an easy way. As I said before, the current 3-D PDE toolbox does not support subdomains.
I suppose that you could create subdomain labels for each mesh element manually to ensure that they are not just all 1. Then create a function that queries the label, and uses that to create different coefficients. But I do not know a simple way to create these labels unless you have a mathematical or other way of determining the subdomain label from an element's position.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
Amirreza Khodadadian
on 2 Feb 2017
Dear Alan:
I have a question regarding using MATLAB in 3D geometries.
My geometry consists of three different materials/subdomains (with different c,a and f coefficients for each material). In 2D mesh generation, as you mentioned in your comment, for the triangles, I defined a label to emphasis the value of the coefficients (it works very well in assempde). In 3D implementation, I could label the each mesh element, and I wrote a function which for each element defines the coefficients. But, I do not know how I can give this matrix to assempde (in 3D). In fact, as I checked, in 3D, assempde says that the length of the vector should be 1.
Could you please guide me how can I implement it?
I have checked google many time, but I could not find a suitable example for it (in 3D), I would so appreciate, if you can help me.
Cheers,
Amirreza
Alan Weiss
on 2 Feb 2017
I am sorry, but currently there is no affordance for subdomains in 3-D geometry. It is a limitation that we are well aware of, and plan to support in the future.
Meanwhile, the only way I know to fake the existence of subdomains is to write a nonlinear function for each coefficient and somehow have your coefficient functions return values based on location. In other words, you would need your coefficient functions to be able to give appropriate coefficients based purely on x, y, z coordinates. This is not easy, but it is the only way I know to fake the existence of subdomains.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
Wey
on 25 Feb 2017
If the subdomains are defined as alphashapes, the coefficient functions can be as simple as calling inshape and assigning values in corresponding regions.
MarionJ
on 12 Apr 2018
@Alan: Has future arrived, yet? Does the PDE-Package support coefficient definition dependent on the subdomains for 3D geometries?
Alan Weiss
on 12 Apr 2018
The easiest way to find out is to read the release notes. There you will find a function that might help you do what you want: geometryFromMesh.
Alan Weiss
MATLAB mathematical toolbox documentation
Categories
Find more on Geometry and Mesh in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!