Solved

_S_MaterialModel in Mathematica

  • 26 April 2022
  • 2 replies
  • 83 views

Dear all,

 

in Wolfram Matheamtica how can one set Nd for material.

 

LoadNETType["ZOSAPI.Editors.SolveType"]

 

layer = theNCE@GetObjectAt[5]
solver = layer@MaterialCell@CreateSolveType[SolveType`MaterialModel]
solver@USUMaterialModel@IndexNd = 1.6
layer@MaterialCell@SetSolveData[solver]

 

USUMaterialModel derived from "ZOSAPI.Editors.ISolveMaterialModel" _S _MaterialModel seems to be a problem?

 

Thanx for support and BR,

Jozef

icon

Best answer by Allie 26 April 2022, 20:25

View original

2 replies

Userlevel 6
Badge +2

Hi @Jozef.Pulko!

This is a great question. I didn’t realize this is not exemplified in any of the samples I wrote. 

It appears we do not need to go through the intermediate “_S_MaterialModel” property when applying a solve in Mathematica. I’m not sure if this is universal to all solve types, but at least for a material solve, we can simply use this code:

solver@IndexNd = 1.6;

To be honest, I’m not entirely sure why this is the case for Mathematica. Ultimately, it seems the ISolveData properties are a bit arbitrary based on language. For example, in Matlab, the property is called with this syntax instead: S_SurfacePickup_ It may just be a quirk based on how .NET is implemented in Mathematica.

By the way - a great way to investigate the capabilities of the API objects is by using the NETTypeInfo command within Mathematica. It provides you with a list of properties and methods for a given object, such as your solver variable. I’m attaching my Interactive Extension code so you can see it in action. 

Excellent explanation. Thanks!

Reply