Creat GROUP_MA from array

More
8 years 2 months ago #8530 by Ben
Creat GROUP_MA from array was created by Ben
Hey guys!

I need your help with some post_processing matters:

I run a simulation on my structure, then I calculate a TSAI_HILL criteria using a fonction on an array, I extract all the MAILLE for which the value of the TSAI_HILL criteria is higher than 0.5.
What I would like to do now is to create a group_ma with all those MAILLE, in order to plot those mailles later on. However I cannot make it, is there a special command? Do you know the python code in order to achieve this?

Thank you very much,

Ben.

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #8531 by RichardS
Replied by RichardS on topic Re: Creat GROUP_MA from array
Hi,
I guess there is no direct way to achieve this.
I would suggest to extract the TSAI-HILL data into a table (EXTR_TABLE or POST_RELEVE_T), Then use some table processing (CALC_TABLE with some python) to extract the list of elements with the value greater than 0.5. And finally you can use DEFI_GROUP/CREA_GROUP_MA/MAILLE with the explicit element list you got beforehand.

Best,
Richard

SimScale - Engineering Simulation in your browser!

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #8532 by Ben
Replied by Ben on topic Re: Creat GROUP_MA from array
Hey Richard,

Thanks for your help,
I finally found a way to do it. I do as you say to get the mailles where the TSAI-HILL value is higher thant 0.5 (we need to use a CALC-TABLE with CHAM_UTIL where the tsai_hill fonction should be implemented). We name that table tab. Then I use python to make a liste of maille with the fonction tab.EXTR_TABLE() and then use DEFI_GROUP/CREA_GROUP_MA/MAILLE to create the group of maille I am interested in.

Regards,
Ben.

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #8533 by RichardS
Replied by RichardS on topic Re: Creat GROUP_MA from array
Nice that it worked!
Could you post a code snippet with your solution, so that others don't have to ask the same question again in the future?
Best,
Richard

SimScale - Engineering Simulation in your browser!

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #8537 by Ben
Replied by Ben on topic Re: Creat GROUP_MA from array
Hey,

Sure I would be glad to do it but I do not know how to do to upload a document, could you tell me ?

Thanks,
Ben.

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago - 8 years 2 months ago #8539 by RichardS
Replied by RichardS on topic Re: Creat GROUP_MA from array
HI,
it seems uploading files does not work very stable.
You could just add the code snipped in the text message formatted as CODE.

Best,
Richard

SimScale - Engineering Simulation in your browser!
Last edit: 8 years 2 months ago by RichardS.

Please Log in or Create an account to join the conversation.

Moderators: catux
Time to create page: 0.155 seconds
Powered by Kunena Forum