Creating Geometry for PDE model

I'm trying to create a 2-D domain for my PDE model. I've been using MATLAB's examples for Partial Differential Equation Toolbox as references, but none of them construct their own geometry.
What I'm trying to create is a rectangular domain which has the following specifications. X-domain: [-117.25, -117.0] and Y-domain: [32.55,33.03]
How could I do this to input into the geometryFromEdges() function?
Thank you!

 Risposta accettata

Sean de Wolski
Sean de Wolski il 20 Giu 2022

0 voti

What about the doc example isn't sufficient for you? It literally creates a rectangle.

4 Commenti

All of the sources that I've SEEN do not construct their own rectangular domain. They call upon MATLAB's library to construct a square or rectangular domain. But the domain is strictly set in that defined region and cannot be defined somewhere else that I've SEEN.
Now, if you have an example that provides such as I'm asking. Could you please link it so I may use it?
Thank you
I guess I'm missing what the first example on that doc page is missing which takes geometry from a set of rectangular coordinates which is what you have. Hijacking the example to your x/y bounds:
xbnd = [-117.25, -117.0];
ybnd = [32.55,33.03];
R = [3,4,xbnd(1),xbnd(2),xbnd(2),xbnd(1),ybnd(1),ybnd(1),ybnd(2),ybnd(2)]';
g = decsg(R);
m = createpde;
m = geometryFromEdges(m, g)
m =
AnalyticGeometry with properties: NumCells: 0 NumFaces: 1 NumEdges: 4 NumVertices: 4 Vertices: [4×2 double]
pdegplot(m,"EdgeLabels","on")
Thank you so much!
Could you explain to me how you created R? I'm not sure what the values represent.
I used the doc example opened with below and modified it to suit (i.e. didn't use the circle), but the definition of R in decsg is here: https://www.mathworks.com/help/releases/R2022a/pde/ug/decsg.html#bu_fft3-gd
openExample('pde/GeometryFromDecomposedSolidGeometryExample')

Accedi per commentare.

Più risposte (0)

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by