Subdomain misidentification

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

Subdomain misidentification

Below is a problem consisting of a spherical shell at the center of a cube. Three subdomains are identified: the shell, the spherical space inside the shell, and the outer enclosing space of the cube/box. I have what I believe is an issue where the identity of the outer subdomain is numbered #3 in the Equation mode yet is treated as subdomain #2 in the Grid mode when specifying grid size in the Grid Generation Settings window.

The following shows the grid settings. Note the large grid size, ".4", is for the second subdomain (#2):

Generating the grid, exporting the fea struct to MATLAB and viewing the grid it by slicing off all with negative 'x' using:

%% Clear FEAtool plot area (except for axes)

delete(setdiff(findall( ...
    findall(findall(0,'tag','featool_gui_main_window'),'type','axes')), ...


plotgrid( fea.grid, 'selcells', selcells(fea.grid, 'x>0') )


The subdomain grid sizes are: ".04 .4 .001".  The above plot shows that the large grid size (.4) applies to the outer subdomain.

However, when the Equations Settings is displayed, the outer subdomain seems to be labeled #3:

Also note that when subdomain #2 is selected (above), subdomain #1 seems to be highlighted.

Am I correct in thinking that this is incorrect?

Here is the problem file:


Kind regards,
Reply | Threaded
Open this post in threaded view

Re: Subdomain misidentification

Precise Simulation
It is not guarateed that the given subdomain numbering will be respected by extenal tools such as Gmsh. In these cases you will simply have to use trial and error to deduce the subdomain or boundary numbers.