summaryrefslogtreecommitdiff
path: root/simulations_V8/structural steel_files/session_files/journal5.wbjn
blob: 1cca428d82f24efd83f768a88599927bb0c6726a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# encoding: utf-8
# 2024 R2
SetScriptVersion(Version="24.2.133")
system1 = GetSystem(Name="SYS")
resultsComponent1 = system1.GetComponent(Name="Results")
resultsComponent1.Clean()
solutionComponent1 = system1.GetComponent(Name="Solution")
solutionComponent1.Clean()
solution1 = system1.GetContainer(ComponentName="Solution")
solution1.Edit()
model1 = system1.GetContainer(ComponentName="Model")
model1.Exit()
fieldVariable1 = GetDataEntity("/Engineering Data/FieldVariableDataObject:Temperature 3")
fieldVariable1.DataString = "20 [C]"
fieldVariable2 = GetDataEntity("/Engineering Data/FieldVariableDataObject:Mean Stress 3")
fieldVariable2.Unit = "MPa"
modelComponent1 = system1.GetComponent(Name="Model")
modelComponent1.Refresh()
model1.Edit()
model1.Exit()
fieldVariable2.Unit = "Pa"
system2 = GetSystem(Name="ENGD")
engineeringData1 = system2.GetContainer(ComponentName="Engineering Data")
material1 = engineeringData1.GetMaterial(Name="Structural Steel")
material1.Delete()
favorites1 = EngData.LoadFavoriteItems()
library1 = EngData.OpenLibrary(
    Name="General Materials",
    Source="General_Materials.xml")
matl1 = engineeringData1.ImportMaterial(
    Name="Titanium Alloy",
    Source="General_Materials.xml")
modelComponent1.Update(AllDependencies=True)
model1.Edit()
matl1.Delete()
matl2 = engineeringData1.ImportMaterial(
    Name="Aluminum Alloy",
    Source="General_Materials.xml")
library2 = EngData.OpenLibrary(
    Name="Additive Manufacturing Materials",
    Source="Additive_Manufacturing_Materials.xml")
library3 = EngData.OpenLibrary(
    Name="Geomechanical Materials",
    Source="GeoMechanical_Materials.xml")
library4 = EngData.OpenLibrary(
    Name="Composite Materials",
    Source="Composite_Materials.xml")
library5 = EngData.OpenLibrary(
    Name="Explicit Materials",
    Source="Explicit_Materials.xml")
library6 = EngData.OpenLibrary(
    Name="General Non-linear Materials",
    Source="General Materials Non-linear.xml")
library7 = EngData.OpenLibrary(
    Name="Thermal Materials",
    Source="Thermal_Materials.xml")
library8 = EngData.OpenLibrary(
    Name="ANSYS GRANTA Materials Data for Simulation (Sample)",
    Source="Granta_Design_Typical_Materials.xml")
matl3 = engineeringData1.ImportMaterial(
    Name="Wood, Oak",
    Source="Granta_Design_Typical_Materials.xml")
matl4 = engineeringData1.ImportMaterial(
    Name="Aluminum Alloy",
    Source="General_Materials.xml")
matl3.Delete()
matl4.Delete()
modelComponent1.Refresh()
model1.Edit()
model1.Exit()
material2 = engineeringData1.GetMaterial(Name="Aluminum Alloy 2")
material2.Delete()
matl2.Delete()
matl5 = engineeringData1.ImportMaterial(
    Name="Stainless Steel",
    Source="General_Materials.xml")
modelComponent1.Refresh()
model1.Edit()
model1.Exit()
material3 = engineeringData1.GetMaterial(Name="Stainless Steel NL")
material3.Delete()
matl5.Delete()
material4 = engineeringData1.GetMaterial(Name="Polyethylene")
material4.Delete()
matl6 = engineeringData1.ImportMaterial(
    Name="Plastic, ABS (high-impact)",
    Source="Granta_Design_Typical_Materials.xml")
matl7 = engineeringData1.ImportMaterial(
    Name="Plastic, ABS (high-impact)",
    Source="Granta_Design_Typical_Materials.xml")
matl7.Delete()
modelComponent1.Refresh()
model1.Edit()
model1.Exit()
Save(Overwrite=True)