Material Properties: Snowden Anisotropic Example#

Download the ExampleModel.slmd for this example.

Code Snippet: Snowden Anisotropic Example#
from Slide2Scripting.Slide2Modeler import Slide2Modeler
from Slide2Scripting.MaterialProperties.MaterialStrength import StrengthType
import os, inspect

current_dir = os.path.dirname(os.path.abspath(inspect.getfile(lambda: None)))
Slide2Modeler.startApplication(60074)

slide2_modeler = Slide2Modeler(60074)
model = slide2_modeler.openFile(rf"{current_dir}\example_models\ExampleModel.slmd")

material = model.getMaterialProperties()[0]
material.StrengthProperties.setStrengthType(StrengthType.SNOWDEN_ANISOTROPIC)
props = material.StrengthProperties.SnowdenAnisotropic
props.setA(1.0)
props.setB(1.0)
props.setCohesion1(12.0)
props.setPhi1(28.0)

print(props.getA())
print(props.getB())
print(props.getCohesion1())
print(props.getPhi1())

model.save()
model.close()

slide2_modeler.closeApplication()

Output#

1.0
1.0
12.0
28.0