自己编译最新版的OpenSees (地震工程模拟开放系统)
自己编译最新版的OpenSees (地震工程模拟开放系统)
GeotechWu
计算岩土力学(Geomechanics)是一个综合的岩土工程(Geotechnical Engineering)信息源。
1. 引言
OpenSe es是地震工程模拟开放系统 ( Open System for Earthquake Engineering Simulation ) 的缩写,它是一个面向对象的软件框架, 在美国国家 科学基金会资助的太平洋地震工程研究中心 (PEER) 时期( 19 97年 - 2007 年) 创建。该软件旨在开发应用程序来模拟结构和岩土系统在地震下的性能,它允许用户创建串行和并行有限元计算机应用程序,以模拟这些系统对地震和其他灾害的响应。除了核心功能外,OpenSees 还支持教育应用程序的开发。例如,PileGroupTool 是一个使用 OpenSees 构建的应用程序,允许用户检查分层土中的桩群对横向荷载的响应。
2. 准备工作
把下载下来的源代码解压到一个目录中,在Win64目录下找到OpenSees.sln,右击选择用VS 2022打开,进入到VS 2022环境下,把OpenSees设为启动项目开始,然后开始进行编译。第一次编译肯定不能通过,需要根据错误信息修改路径和环境变量,反复进行试验,直到编译不出现错误。
4. 测试
编译后的执行文件为OpenSees.exe(14.9M),位于Win64/Bin目录下。使用例子文件truss.tcl测试该程序,
source
truss.tcl
# ------------------------------
# Start of model generation
# ------------------------------
# Remove existing model
wipe
# Create ModelBuilder (with two-dimensions and 2 DOF/node)
model
BasicBuilder -ndm 2 -ndf 2
# Create nodes
# ------------
# Create nodes & add to Domain - command: node nodeId xCrd yCrd
node
1 0.0 0.0
node
2 144.0 0.0
node
3 168.0 0.0
node
4 72.0 96.0
# Set the boundary conditions - command: fix nodeID xResrnt? yRestrnt?
fix
1 1 1
fix
2 1 1
fix
3 1 1
# Define materials for truss elements
# -----------------------------------
# Create Elastic material prototype - command: uniaxialMaterial Elastic matID E
uniaxialMaterial
Elastic 1 3000
# Define elements
# ---------------
# Create truss elements - command: element truss trussID node1 node2 A matID
element
Truss 1 1 4 10.0 1
element
Truss 2 2 4 5.0 1
element
Truss 3 3 4 5.0 1
# Define loads
# ------------
#create a Linear TimeSeries (load factor varies linearly with time): command timeSeries Linear $tag
timeSeries
Linear 1
# Create a Plain load pattern with a linear TimeSeries: command pattern Plain $tag $timeSeriesTag { $loads }
pattern Plain 1 1 {
# Create the nodal load - command: load nodeID xForce yForce
load
4 100 -50
}
# ------------------------------
# Start of analysis generation
# ------------------------------
# Create the system of equation, a SPD using a band storage scheme
system
BandSPD
# Create the DOF numberer, the reverse Cuthill-McKee algorithm
numberer
RCM
# Create the constraint handler, a Plain handler is used as homo constraints
constraints
Plain
# Create the integration scheme, the LoadControl scheme using steps of 1.0
integrator
LoadControl 1.0
# Create the solution algorithm, a Linear algorithm is created
algorithm
Linear
# create the analysis object
analysis
Static
# ------------------------------
# Start of recorder generation
# ------------------------------
# create a Recorder object for the nodal displacements at node 4
recorder
Node -file example.out -time -node 4 -dof 1 2 disp
# Create a recorder for element forces, one in global and the other local system
recorder
Element -file eleGlobal.out -time -ele 1 2 3 forces
recorder
Element -file eleLocal.out -time -ele 1 2 3 basicForces
# ------------------------------
# Finally perform the analysis
# ------------------------------
# Perform the analysis
analyze
1
# ------------------------------
# Print Stuff to Screen
# ------------------------------
# Print the current state at node 4 and at all elements
puts
"node 4 displacement: [nodeDisp 4]"
print
node 4
print
ele
运行
结
果与官方网站上给出的结果完全相同,表明编译成功。
-
2023年血糖新标准公布,不是3.9-6.1,快来看看你的血糖正常吗? 2023-02-07
-
2023年各省最新电价一览!8省中午执行谷段电价! 2023-01-03
-
GB 55009-2021《燃气工程项目规范》(含条文说明),2022年1月1日起实施 2021-11-07
-
PPT导出高分辨率图片的四种方法 2022-09-22
-
2023年最新!国家电网27家省级电力公司负责人大盘点 2023-03-14
-
全国消防救援总队主官及简历(2023.2) 2023-02-10
-
盘点 l 中国石油大庆油田现任领导班子 2023-02-28
-
我们的前辈!历届全国工程勘察设计大师完整名单! 2022-11-18
-
关于某送变电公司“4·22”人身死亡事故的快报 2022-04-26
