Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Finding top 10 nodal stress in a SOL103 resp. sim using a loop

To all,

 

I am trying to think of a way of getting/extrating the top 10 nodal stress from a sol103 resp. simulation for a given group (NX9). Appreciate that the stress prediction is not "real" but this is not important for the programme I have in mind

 

From a previous dicsussion, see link at the end of the query, it seems that the Identify-Results() tool cannot be used in a programme. So I am looking for another way

 

Given/input

1. A SOL103 Resp. Sim with M modes calculated. result = stress

2. A group with elements

 

For Each Normal Mode find the N highest nodal stress in the given group

 create a group containg these N nodes (and attached element)

Next Mode

 

Union all the groups created in previous loop into 1 group

 

I believe looping through the modes and groups (if more than 1 group is specifed) should be easy. What I am not sure if what is the "best" approach to get the top 10 nodal stress. for the purpose of starting I am assuming a "top 10" but eventually this could be a user input (say "top 5")

 

1st thought: Would it work to write a list of (nodal) stress for each node in the group then sort the list? Not sure how one would keep track of the node ID and stress!

 

I have read somewhere about something called NX OOTB which does one envelope calculation at a time. Is anyone familiar with it?

 

Thanks

Regards

 

Related (initial) questionhttp://community.plm.automation.siemens.com/t5/NX-Programming-Customization/Accessing-the-quot-Ident...

Production: NX9.0.3.4, NX10.0.2.6
Development: VB.NET (amateur level !)
3 REPLIES

Re: Finding top 10 nodal stress in a SOL103 resp. sim using a loop

NX Post Results Manipulation tools contains an Envelope Results command. This is the NXOpen.CAE.ResultsEnvelopeBuilder class in the API.

 

This will compute the extreme results value for each node/element over a range of results, which does not sound like what you want (which I understand to be the top 10 stresses in each mode).

 

I would try to build a unique string from each node label and its associated stress value, i.e. xxx.xxxxx::yyyy where xxx.xxxxx is the real stress value and yyyy is the integer node ID. Add each string to a SortedList collection and let it do the sorting for you. At the end, extract the first 10 items and split them at the '::' to get the stress value and node ID.

Re: Finding top 10 nodal stress in a SOL103 resp. sim using a loop

thanks JimB. Had a look at the 'NXOpen.CAE.ResultsEnvelopeBuilder' but it seems that one can only get the max (min) value i.e 1 value. 

 

I fear that I may have to "develop" a custom version of the Identify-Results() tool which is a real shame (and possibly a lot of work)

 

Thanks for the suggestion of the unique string from each node label and its associated stress value. Program workflow could be something like the one given below. Ignore the type of variable to use for the moment

 

I am not sure about the SortList mentioned. I have used .Sort before but not sure how it would work on a "concatenated" string

 

myListNodeID=GetNodeID(myselectedgroup)
'Note. My need to get the elements in the group and use GetNodes()
'to return a list of CAE.FENode or a list of FENode Label i.e Integer For Each theNMode In mySol103RespSim
For Each myNodeID In myListNodeID
myNodalValue=GetMyNodalResult(theNMode,myNodeID) 'a fn to get the nodal result myListStringRes.Add=myNodalValue & "-"& myNodeID
Next theNodeID 'sort the list of result myListStringRes.Sort 'add top 10 to a group for future use Dim N as Integer = 10 Dim thesplitstring() As String
For i= 0 to N thesplitstring=split(myListStringRes(i),"-") theNodeIDToAdd=thesplitstring(1) AddToGroup("mygroupforfutureuse",theNodeIDToAdd) Next i Next theNMode

 

 

 

 

 

 

Production: NX9.0.3.4, NX10.0.2.6
Development: VB.NET (amateur level !)
Solution
Solution
Accepted by topic author selex_ct
‎08-27-2015 02:08 AM

Re: Finding top 10 nodal stress in a SOL103 resp. sim using a loop

To all

 

Need advice from expert as I am a bit at a loss regarding accessing nodal stress result .I have managed to programm the following

 

user selection to get:

1. A SOL 103 Response Simulation (Solution type: SEMODES 103 - Response Simulation)

2. All the associated normal modes with SOL103 resp. sim (iteration in NX parlance I believe).

   2a. It's a list of string at the moment (ListofNmodes)

3. A group containing elements

  3a. I "extracted" all the element form the group and put them in variable as follow

      <vbnet> Dim arrFEElmInGroupTarget() As CAE.FEElement </vbnet>

 

I believe I know all the info but I am unusre on how to access the results

My line of thought at the moment is something like

 

For Each Nmode In ListofNmodes

  For Each myFEElm In arrFEElmInGroupTarget

    NodalValue=getNodalVMStressValue(Nmode,myFEElm)

  next myFEElm 

Next Nmode

 

Anyone willing to push me in the right direction?

 

Thanks

Regards

Production: NX9.0.3.4, NX10.0.2.6
Development: VB.NET (amateur level !)