Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[help wanted] Creating phase groups #7

Open
Max-EDFLMT opened this issue Feb 24, 2021 · 1 comment
Open

[help wanted] Creating phase groups #7

Max-EDFLMT opened this issue Feb 24, 2021 · 1 comment

Comments

@Max-EDFLMT
Copy link

Max-EDFLMT commented Feb 24, 2021

Hi Dorian,

I'm not that confident with GMSH but I added a little something to your mesh command in order to create a group for phases in the fashion you introduced grains groups. This is useful for affecting mechanical behaviors afterwards.

groupPrefix='Gr';
phaseList = unique(obj.Grains.Phase);
for i=1:size(phaseList,1)
Ids = obj.Grains.GrainID(ismember(obj.Grains.Phase,phaseList(i)));
Ids_str = [sprintf('%d,', Ids(1:end-1)), sprintf('%d', Ids(end))];
fprintf(ffid,['Physical Volume("%s_%s")={' Ids_str '};\n'],groupPrefix,phaseList{i,1});
end

I added this piece of code right after you ended the "for" loop in "Physical Volumes" section.
The issue is that GMSH is creating a mesh for grains groups and phase groups resulting in duplicating the elements everywhere (because grain groups are all included in phase groups, lying on the same base geometry entities)

Is there a way to avoid this issue ?

Thanks in advance,

Maxime

@Max-EDFLMT Max-EDFLMT changed the title Creating phase groups [help wanted] Creating phase groups Feb 24, 2021
@DorianDepriester
Copy link
Owner

Hi Maxime,
Thank you for your comment. Indeed, grouping grains by their phase could be an interesting feature. I am currently away from office, but I will have a look on your issue ASAP.

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants