-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathmaterial_creep_fistr.py
More file actions
94 lines (82 loc) · 3.82 KB
/
material_creep_fistr.py
File metadata and controls
94 lines (82 loc) · 3.82 KB
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
# ***************************************************************************
# * Copyright (c) 2016 Bernd Hahnebach <bernd@bimstatik.org> *
# * Copyright (c) 2022 FrontISTR Commons <https://www.frontistr.com/> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it under the terms of the GNU Lesser General Public License (LGPL) *
# * as published by the Free Software Foundation; either version 2 of *
# * the License, or (at your option) any later version. *
# * for detail see the LICENCE text file. *
# * *
# * This program is distributed in the hope that it will be useful, *
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
# * GNU Library General Public License for more details. *
# * *
# * You should have received a copy of the GNU Library General Public *
# * License along with this program; if not, write to the Free Software *
# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
# * USA *
# * *
# ***************************************************************************
__title__ = "FrontISTR material creep document object"
__author__ = "FrontISTR Commons"
__url__ = "https://www.frontistr.com/"
from femobjects import base_fempythonobject
class MaterialCreepFISTR(base_fempythonobject.BaseFemPythonObject):
"""
The MaterialCreepFISTR object
"""
Type = "Fem::MaterialCreepFISTR"
def __init__(self, obj):
super(MaterialCreepFISTR, self).__init__(obj)
self.add_properties(obj)
def add_properties(self, obj):
if not hasattr(obj, "LinearBaseMaterial"):
obj.addProperty(
"App::PropertyLink",
"LinearBaseMaterial",
"Base",
"Set the linear material the nonlinear builds upon."
)
if not hasattr(obj, "CreepRateCoeff"):
obj.addProperty(
"App::PropertyString",
"CreepRateCoeff",
"Fem",
"Set creep rate coefficient 'A' of creep material."
)
obj.CreepRateCoeff = "1.0e-10"
if not hasattr(obj, "StressExponent"):
obj.addProperty(
"App::PropertyFloat",
"StressExponent",
"Fem",
"Set stress exponent 'n' of creep material."
)
obj.StressExponent = 5.0
if not hasattr(obj, "TimeExponent"):
obj.addProperty(
"App::PropertyFloat",
"TimeExponent",
"Fem",
"Set time exponent 'm' of creep material."
)
obj.TimeExponent = 0.0
if not hasattr(obj, "Temperature"):
obj.addProperty(
"App::PropertyFloat",
"Temperature",
"Fem",
"Set temperature of creep material."
)
obj.Temperature = 300.0
if not hasattr(obj, "TemperatureEnabled"):
obj.addProperty(
"App::PropertyBool",
"TemperatureEnabled",
"Fem",
"Use temperature of creep material."
)