RBE3 weighting factors with functions

Phenom
Phenom

Hello experts, in NX12 it's possible to define weighting factors for RBE3 interpolation elements. That sounds really good.  But modifying it individually is really difficult if the amount of independent nodes or grid points raises.

 

Is there a way to define functions maybe by means of geometric information to keep into account the distance from center grid point to independent grid points respectively?

 

if (distance >100 [mm]) then (Weighting_Factor = 0.) else ( Weighting_Factor = 1.)

or

if (distance >100 [mm]) then (Weighting_Factor = 100/(distance)^2) else (Weighting_Factor = 1.)

 

 

2019-07-03_101211.png

 

When defining the weighting factor it's possible to use an expression instead of a primitive real number and the value of expression is placed into DOF entry. But, It's not associative, changing the expression does not change the weighting factor. And the expression is constant, it would be better to use a function or table field for weighting factors.

 

Who can help? - All suggestions are welcome. Best wishes, Michael

| Production: NX10; Development: VB, TCL/TK, FORTRAN; Testing: NX12 | engelke engineering art GmbH, Germany | 2019-07-08
| Kudos for good posts! And if my post answers your question, please mark it as an "Accepted Solution". Kick Off (2015-09-14)On the Map (2016-10-21)1st Gear 2018 (2018-02-19)5th Birthday! (2018-02-25)Popular (100, ‎2018-10-30)Prolific (100, 2019-02-27)Philosopher (500, ‎2019-02-28)Problem Solver (50, 2019-06-25)

17 REPLIES 17

Re: RBE3 weighting factors with functions

Siemens Phenom Siemens Phenom
Siemens Phenom

Expressions cannot be used in the EAD UI.

 

For this particular case, if you renumbered the nodes so that the nodes on the inner ring were in one range and the nodes in the outer ring were in another, you could define the weighting values for one node in the range, then copy/paste those values into the table cells for the other nodes in that range (ranges of cells can be copied/pasted just like Excel).

 

For more complicated scenarios, a NX Open journal can be written to compute and set the appropriate value for each node/dof.

Re: RBE3 weighting factors with functions

Phenom
Phenom

indeed there could be a nice Nx.open programme there. A few things to flush out...

 

For Each theFEElm As CAE.FEElement In InListofFEElemSelected
		Dim arrtheFENodes() As CAE.FENode = theFEElm.GetNodes	

		'Find Independent Node
		theIndNode
		Dim theIndNodecoordinates As Point3d = arrtheFENodes(0).Coordinates
						
		For Each Node In arrtheFENodes() 
						
		If Node.Label = theIndNode.Label Then 
			Continue For
		Else
			Dim thecoordinates As Point3d = arrtheFENodes(1).Coordinates
			
			'Calculate distance
			Dim xDiff As Double = Math.Abs(theIndNodecoordinates.X - thecoordinates.X)
			Dim yDiff As Double = Math.Abs(theIndNodecoordinates.Y - thecoordinates.Y)
			Dim zdiff As Double = Math.Abs(theIndNodecoordinates.Z - thecoordinates.Z)
				
			distance = Math.sqrt(xDiff^2 + yDiff^2 + zDiff^2)
				
			If WeiggingOption = 1 Then
				if distance >100 then
					Weighting_Factor = 0
				Else 
					Weighting_Factor = 1.
				End if
			Else 'WeighingOption = 2
				If distance >100 then
					Weighting_Factor = 100/(distance)^2)
				Else
					Weighting_Factor = 1.
				End if
						
			'allocate Weighting_Factor to the node
						
			Next Node
	
Next theFEElm

 

Production: NX.CAE 10.0.2.6
Development: VB.NET (amateur level !)

Re: RBE3 weighting factors with functions

Phenom
Phenom

a nice programm to be thought of here indeed. A few things to flush out...

For Each theFEElm As CAE.FEElement In InListofFEElem
		Dim arrtheFENodes() As CAE.FENode = theFEElm.GetNodes	

		'Find Independent Node
		theIndNode
		Dim theIndNodecoordinates As Point3d = arrtheFENodes(0).Coordinates
						
		For Each Node In arrtheFENodes() 
						
		If Node.Label = theIndNode.Label Then 
			Continue For
		Else
			Dim thecoordinates As Point3d = arrtheFENodes(1).Coordinates
			
			'Calculate distance
			Dim xDiff As Double = Math.Abs(theIndNodecoordinates.X - thecoordinates.X)
			Dim yDiff As Double = Math.Abs(theIndNodecoordinates.Y - thecoordinates.Y)
			Dim zdiff As Double = Math.Abs(theIndNodecoordinates.Z - thecoordinates.Z)
				
			distance = Math.sqrt(xDiff^2 + yDiff^2 + zDiff^2)
				
			If WeightingOption = 1 Then
				if distance >100 then
					Weighting_Factor = 0
				Else 
					Weighting_Factor = 1.
				End if
			Else 'WeightingOption = 2
				If distance >100 then
					Weighting_Factor = 100/(distance)^2)
				Else
					Weighting_Factor = 1.
				End if
						
			'allocate Weighting_Factor	to the node
						
			Next Node
Next theFEElm
Production: NX.CAE 10.0.2.6
Development: VB.NET (amateur level !)

Re: RBE3 weighting factors with functions

Phenom
Phenom

a few things to flush out but still...

 

For Each theFEElm As CAE.FEElement In InListofFEElem
		Dim arrtheFENodes() As CAE.FENode = theFEElm.GetNodes	

		'Find Independent Node
		theIndNode
		Dim theIndNodecoordinates As Point3d = arrtheFENodes(0).Coordinates
						
		For Each Node In arrtheFENodes() 
						
		If Node.Label = theIndNode.Label Then 
			Continue For
		Else
			Dim thecoordinates As Point3d = arrtheFENodes(1).Coordinates
			
			'Calculate distance
			Dim xDiff As Double = Math.Abs(theIndNodecoordinates.X - thecoordinates.X)
			Dim yDiff As Double = Math.Abs(theIndNodecoordinates.Y - thecoordinates.Y)
			Dim zdiff As Double = Math.Abs(theIndNodecoordinates.Z - thecoordinates.Z)
				
			distance = Math.sqrt(xDiff^2 + yDiff^2 + zDiff^2)
				
			If WeightingOption = 1 Then
				if distance >100 then
					Weighting_Factor = 0
				Else 
					Weighting_Factor = 1.
				End if
			Else 'WeightingOption = 2
				If distance >100 then
					Weighting_Factor = 100/(distance)^2)
				Else
					Weighting_Factor = 1.
				End if
						
			'allocate Weighting_Factor	to the node
						
			Next Node
Next theFEElm
Production: NX.CAE 10.0.2.6
Development: VB.NET (amateur level !)

Re: RBE3 weighting factors with functions

Phenom
Phenom

@JimB,

thank you for answering. Unfortunately, renumbering is not the way to do because the list of grid points in dialogue "Element Associated Data" is not sorted by means of grid point labels but probably by means of internal object declarations or so. It's not possible to rearrange or sort the table. (point for an enhancement request, I assume)

 

See here :

- elements => one layer of parabolic hexahedrons,

- outer grid points => 2001-2032,

- inner grid points => 3001-3032,

- middle grid point => 4001-4016):

 

2019-07-04_112510.png

 

So, the method of using a script with NXOpen is the better way (for those who can develop such a script  Smiley Wink Smiley Wink  Smiley Wink ).

 

Info: I made the modification showed here manually and that was very complicated because of necessity for not forgetting a grid point.

 

Best wishes, Michael

| Production: NX10; Development: VB, TCL/TK, FORTRAN; Testing: NX12 | engelke engineering art GmbH, Germany | 2019-07-08
| Kudos for good posts! And if my post answers your question, please mark it as an "Accepted Solution". Kick Off (2015-09-14)On the Map (2016-10-21)1st Gear 2018 (2018-02-19)5th Birthday! (2018-02-25)Popular (100, ‎2018-10-30)Prolific (100, 2019-02-27)Philosopher (500, ‎2019-02-28)Problem Solver (50, 2019-06-25)

Re: RBE3 weighting factors with functions

Phenom
Phenom

@selex_ct,

thank you for answering. Is your script working? - It looks very well in the basic formulas. But the coding for NX objects I can't  check. I assume it is a first attempt but my ability for writing such scripts are limited.

 

Best wishes, Michael

 

| Production: NX10; Development: VB, TCL/TK, FORTRAN; Testing: NX12 | engelke engineering art GmbH, Germany | 2019-07-08
| Kudos for good posts! And if my post answers your question, please mark it as an "Accepted Solution". Kick Off (2015-09-14)On the Map (2016-10-21)1st Gear 2018 (2018-02-19)5th Birthday! (2018-02-25)Popular (100, ‎2018-10-30)Prolific (100, 2019-02-27)Philosopher (500, ‎2019-02-28)Problem Solver (50, 2019-06-25)

Re: RBE3 weighting factors with functions

Phenom
Phenom

No .

It's something I lifted from some program I have. So there's a quite a few things missing

the bare-bone Nx script needs not to be complicated. for example

  • create a group containing all the (RBE3) elements you want processed - Yes you could create a GUI to allow selection "on the fly" by the user but it now gets complicated!
  • passe this group to a function
    • loop through each element in the group
    • for each element get the nodes and identify the independant node
    • for each node
    • get co-ordinates and calculate distance
    • based on option & distance add a weight factor to a list (array)
    • once all nodes were processed, update the RBE3 ie 'Edit Associated Data'

What I do not know is

  1. how to get the indepedant node ID (from the list of nodes obtained from .Getnodes)
  2. If the 'Edit Associated Data' is an API

 

I coded something a while ago and the way around a similar issue to 1 (albeit with element type) I used the .GetSolverCardSyntax(). I then parsed the string to get what I wanted. In the case of an RBE3 , field 4 of the parsed data should containt the independant node ID.

 

if you go down that route then it's a different question to be posted in different forum. Have fun...Smiley Happy

 

Function SetRBE3MyWay(	InListofFEElem As List (of CAE.FEElement), _
						IndbTheRefDistance as Double,_
						Optional theWeightingOption As Integer = 1)
						
						
	For Each theFEElm As CAE.FEElement In InListofFEElem
	
		Dim dicoNodeLabelWFactor As New Dictionary(Of Integer, Integer)
	
			Dim arrtheFENodes() As CAE.FENode = theFEElm.GetNodes	

			'Find Independent Node
			theIndNode
			Dim theIndNodecoordinates As Point3d = arrtheFENodes(0).Coordinates
							
			For Each Node In arrtheFENodes() 
							
			If Node.Label = theIndNode.Label Then 
				Continue For
			Else
				Dim thecoordinates As Point3d = arrtheFENodes(1).Coordinates
				
				'Calculate distance
				Dim xDiff As Double = Math.Abs(theIndNodecoordinates.X - thecoordinates.X)
				Dim yDiff As Double = Math.Abs(theIndNodecoordinates.Y - thecoordinates.Y)
				Dim zdiff As Double = Math.Abs(theIndNodecoordinates.Z - thecoordinates.Z)
					
				distance = Math.sqrt(xDiff^2 + yDiff^2 + zDiff^2)
					
				If theWeightingOption = 1 Then
					If distance >IndbTheRefDistance then
						Weighting_Factor = 0
					Else 
						Weighting_Factor = 1.
					End if
				Else 'theWeightingOption = 2
					If distance >IndbTheRefDistance then
						Weighting_Factor = IndbTheRefDistance/(distance)^2)
					Else
						Weighting_Factor = 1.
				End if
				
				dicoNodeLabelWFactor.Add(Node.Label, Weighting_Factor)
		
				Next Node
				
				'allocate Weighting_Factors to each by looping through the dictionary create
				
	Next theFEElm

End Function
Production: NX.CAE 10.0.2.6
Development: VB.NET (amateur level !)

Re: RBE3 weighting factors with functions

Phenom
Phenom

where/how did you get the interpolation element? I don't have it the list if connections!

Production: NX.CAE 10.0.2.6
Development: VB.NET (amateur level !)

Re: RBE3 weighting factors with functions

Phenom
Phenom

@selex_ct,

 

I'm not really sure what you mean, so here two answers:

 

1. The interpolation element is the:

1D spider connection with RBE3 elements.

 

2. The weighting factors are modifyable at:

Nodes and Elements => Elements => Associated Data2019-07-04_162842.png

 

 

=> Interpolation2019-07-04_163213.png

 

 

After that, select the RBE3 element that you want from view. There it is....

 

2019-07-04_163311.png

 

Best wishes, Michael

| Production: NX10; Development: VB, TCL/TK, FORTRAN; Testing: NX12 | engelke engineering art GmbH, Germany | 2019-07-08
| Kudos for good posts! And if my post answers your question, please mark it as an "Accepted Solution". Kick Off (2015-09-14)On the Map (2016-10-21)1st Gear 2018 (2018-02-19)5th Birthday! (2018-02-25)Popular (100, ‎2018-10-30)Prolific (100, 2019-02-27)Philosopher (500, ‎2019-02-28)Problem Solver (50, 2019-06-25)