资源简介
周期边界,通过python代码实现,abaqus多尺度仿真,有效性能计算,复合材料
代码片段和文件信息
from abaqusConstants import *
def LabelName(index root):
# This function create a label name appending the index to the root which is a string.
return root + str(index)
def Get_Cube_dimension(modelName instanceName):
node = mdb.models[modelName].rootAssembly.instances[instanceName].nodes
Xmin = 0.0
Xmax = 0.0
Ymin = 0.0
Ymax = 0.0
Zmin = 0.0
Zmax = 0.0
for i in range(len(node)):
x = node[i].coordinates[0]
y = node[i].coordinates[1]
z = node[i].coordinates[2]
if (Xmin > x):
Xmin = x
elif (Xmax < x):
Xmax = x
if (Ymin > y):
Ymin = y
elif (Ymax < y):
Ymax = y
if (Zmin > z):
Zmin = z
elif (Zmax < z):
Zmax = z
return Xmin Xmax Ymin Ymax Zmin Zmax
def MeshHandlingCube(modelName instanceName Dimension):
Xmin = Dimension[0]
Xmax = Dimension[1]
Ymin = Dimension[2]
Ymax = Dimension[3]
Zmin = Dimension[4]
Zmax = Dimension[5]
# This functions creates a basic mesh.
eps1 = abs(Zmax - Zmin) * 0.001
eps2 = abs(Zmax - Zmin) * 0.01
tolerance = 0.01 * eps1
BX = Xmax - Xmin
BY = Ymax - Ymin
BZ = Zmax - Zmin
node = mdb.models[modelName].rootAssembly.instances[instanceName].nodes
node_E1 = node[1:1]
node_E2 = node[1:1]
node_E3 = node[1:1]
node_E4 = node[1:1]
node_E5 = node[1:1]
node_E6 = node[1:1]
node_E7 = node[1:1]
node_E8 = node[1:1]
node_E9 = node[1:1]
node_E10 = node[1:1]
node_E11 = node[1:1]
node_E12 = node[1:1]
node_FXP = node[1:1]
node_FXN = node[1:1]
node_FYP = node[1:1]
node_FYN = node[1:1]
node_FZP = node[1:1]
node_FZN = node[1:1]
for i in range(len(node)):
x = node[i].coordinates[0]
y = node[i].coordinates[1]
z = node[i].coordinates[2]
if ((abs(x - Xmin) < eps1) and (abs(y - Ymin) < eps1) and (abs(z - Zmin) < eps1)):
node_v1 = node[i:i + 1]
elif ((abs(x - Xmax) < eps1) and (abs(y - Ymin) < eps1) and (abs(z - Zmin) < eps1)):
node_v2 = node[i:i + 1]
elif ((abs(x - Xmax) < eps1) and (abs(y - Ymax) < eps1) and (abs(z - Zmin) < eps1)):
node_v3 = node[i:i + 1]
elif ((abs(x - Xmin) < eps1) and (abs(y - Ymax) < eps1) and (abs(z - Zmin) < eps1)):
node_v4 = node[i:i + 1]
elif ((abs(x - Xmin) < eps1) and (abs(y - Ymin) < eps1) and (abs(z - Zmax) < eps1)):
node_v5 = node[i:i + 1]
elif ((abs(x - Xmax) < eps1) and (abs(y - Ymin) < eps1) and (abs(z - Zmax) < eps1)):
node_v6 = node[i:i + 1]
elif ((abs(x - Xmax) < eps1) and (abs(y - Ymax) < eps1) and (abs(z - Zmax) < eps1)):
node_v7 = node[i:i + 1]
elif ((abs(x - Xmin) < eps1) and (abs(y - Ymax) < eps1) and (abs(z - Zmax) < eps1)):
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 6025 2020-01-21 22:28 周期性边界条件代码\Periodic2DRVE-ok-v1.py
文件 51841 2020-01-21 22:27 周期性边界条件代码\mpc_cube-Right.py
目录 0 2020-01-21 22:28 周期性边界条件代码\
- 上一篇:基于LSTM的航班乘客预测
- 下一篇:Student 学习python3.0
评论
共有 条评论