Discussion Groups

Simulation Moldflow Insight

Reply
Valued Contributor
tim.vanast
Posts: 75
Registered: ‎07-17-2009
Accepted Solution

script for counting filled vs unfilled elements

263 Views, 9 Replies
06-19-2014 08:38 AM

Has anyone created a script to count the number of elements (from a selected group) that have filled and that have not filled?  If so would you be wiling to share it?

 

I have a model that I've got multiple areas that are expected to short.  I am running multiple studies with different variations and want to easily tell which study is doing the best/worst job at filling or not filling.  I think that a count of elements that have filled/no filled would be an easy way to intererate the results.

 

Thanks,

 

Tim VanAst

Please use plain text.
Product Support
nordhb
Posts: 475
Registered: ‎03-23-2009

Re: script for counting filled vs unfilled elements

06-24-2014 01:46 AM in reply to: tim.vanast

Hello Tim,

unfortunatly I have no such script available.

 

Assume this is for Midplane and/or Dual Domain mesh type, right?

 

For 3D mesh type, if a short shot, there is an "Unfilled cavity" result plot.

The short shot areas are displayed in dark blue, and other areas are translucent.

 

Let us see if someone in the community has created such a script.

 

Regards,

Berndt



Berndt Nordh
Please use plain text.
Valued Contributor
tim.vanast
Posts: 75
Registered: ‎07-17-2009

Re: script for counting filled vs unfilled elements

06-24-2014 06:37 AM in reply to: nordhb

Hi Berndt,

 

You are correct, it is a midplane model.  There are some areas that I've made really thin, expecting them to short.  So I'd like to try and quantify the results to get a better feel for the effect of the different versions that I'm running.

 

Even with the 3d Unfilled Cavity result, is there a way to get a count of those elements? Or is it just visual?

 

Thanks,

 

Tim

Please use plain text.
Product Support
nordhb
Posts: 475
Registered: ‎03-23-2009

Re: script for counting filled vs unfilled elements

06-24-2014 10:29 AM in reply to: tim.vanast

Hi Tim,

the 3D unfilled cavity is a nodal result. Then displayed on elements in UI.

An unfilled node will get value 1. So basically from result find the nodes with a value 1 (or rather > 0), or how long the result array is, meaning how many nodes has a result of unfilled cavity.

Get a number of nodes unfilled, using same study with no changes in number of nodes should be ok.

 

An idea here for Midplane, and other mesh types as well, is to select nodes belonging to cavity, look up how many nodes has a fill time result (=> 0), and use the difference as "unfilled" and short shot.

 

Will have a look at this in more detail.

 

Regards,

Berndt

 

 

 

 



Berndt Nordh
Please use plain text.
Valued Contributor
tim.vanast
Posts: 75
Registered: ‎07-17-2009

Re: script for counting filled vs unfilled elements

06-25-2014 07:50 AM in reply to: nordhb

Brerndt,

 

Thanks for the script and for you help on this.

 

I really appreciate it.

 

Tim

Please use plain text.
Distinguished Contributor
mayur_dhumal
Posts: 165
Registered: ‎05-05-2011

Re: script for counting filled vs unfilled elements

06-30-2014 03:05 AM in reply to: tim.vanast
Hi Tim / Nordh,

Would it be possible for you to share script?

Thanks,
Mayur
Please use plain text.
Valued Contributor
tim.vanast
Posts: 75
Registered: ‎07-17-2009

Re: script for counting filled vs unfilled elements

07-01-2014 06:24 AM in reply to: mayur_dhumal

Of course!  Send me an email and I'll forward it to you.

 

tim.vanast@cascadeng.com

 

 

Regards,

Tim

Please use plain text.
Active Contributor
toofewfish
Posts: 27
Registered: ‎03-19-2009

Re: script for counting filled vs unfilled elements

07-01-2014 06:28 AM in reply to: tim.vanast

How about you reply and include the script as an attachment. That way we are not all pestering you with emails.

Please use plain text.
Valued Contributor
tim.vanast
Posts: 75
Registered: ‎07-17-2009

Re: script for counting filled vs unfilled elements

07-01-2014 06:43 AM in reply to: toofewfish

Brilliant!    Below is the message from Berndt:

 

 

 

Hello Tim,

I have created a macro that find min and max value of fill time, and number of
nodes with result, and compare with entities selected.


Entities selected = must be cavity nodes for right result

The macro does not check that only nodes are selected, this to make it faster.

(Can be done though, but still has to be cavity entities selected.)


Put cavity nodes on a separate layer, or save to selection list, for easy
selection when using this macro.


Put the attached file in folder such as:

C:\My AMI 2015 Projects\commands

or

C:\Documents and Settings\user_id\My Documents\My ASMI 2015 Projects\commands



Rename nodes_filled.rename_to_vbs to nodes_filled.vbs



To run command:

In Synergy Ribbon UI:

View > User Interface > Commands



In command line type:

nodes_filled <enter>



Let me know if this macro helps.



Thanks.



Kind Regards,

Berndt



Please use plain text.
Product Support
nordhb
Posts: 475
Registered: ‎03-23-2009

Re: script for counting filled vs unfilled elements

07-01-2014 06:49 AM in reply to: tim.vanast

Hi,

just to remind:
You should do a graphics selection of all nodes that should have a Fill Time result (so not only cavity nodes...).
The script needs to know how many nodes to be filled, and subtract number of nodes actually filled.
(If a negative number, it is 0.)
It should do the job for Midplane / Dual Domain / 3D mesh type.

 

Have fun! :smileyhappy:

Regards,
Berndt



Berndt Nordh
Please use plain text.