instruction of opensees installation on ubuntu:
https://vijaypolimeru.github.io/Something_Abt_Everything/opensees/OPS_Ubuntu/
instruction of opensees installation on ubuntu:
https://vijaypolimeru.github.io/Something_Abt_Everything/opensees/OPS_Ubuntu/
What sucks is the OpenSees has pathetic support in the package ecosystem.
Take for example the Arch Linux package repository AKA the “AUR” (one of the more robust up to date package ecosystems in Linux) only supports OpenSees 2.5 (which was back in 2016)
https://aur.archlinux.org/packages/opensees
Edit: For clarity and posterity, at the time this was posted the only downstream package available was an obsolete version of OpenSees (v2.5) on the AUR
yes, but it is widely use in earthquake engineering for linear and nonlinear analysis and has complete library of new materials. also it has many gui written for it:
http://gidopensees.rclab.civil.auth.gr/
https://peer.berkeley.edu/opensees-navigator
via https://www.nextfem.it/it/home/
http://soilquake.net/openseespl/
i think we can write best gui for it via freecad.
This is an example of modeling 3D cantilever beam in opensees from opensees site:
https://opensees.berkeley.edu/OpenSees/manuals/ExamplesManual/HTML/878.htm
my change for creating FreeCAD 3D cantilever beam example, i don’t know why when i import larger force, the analysis comes with error, but this is almost all things about opensees input file:
Units.tcl file:
#Basic units
set m 1.0; # meter for length
set sec 1.0; # second for time
set kg 1.0; # Kilogram for mass
#Other units
# angle
#set rad 1.0;
#set deg [expr $PI/180.0*$rad];
# length
set cm 0.01;
set in 0.0254;
set ft [expr 12.0*$in];
# mass
set lbs 0.4536;
set kip [expr 1000.0*$lbs];
set ton [expr 1000.0*$kg]
# force
set N [expr 0.1 * $kg * $m / ($sec * $sec)] ;
set KN [expr 1000.0*$N];
set MN [expr 1000.0*$KN];
# pressure
set Pa [expr 1.0*$N/pow($m, 2)];
set KPa [expr 1000.0*$Pa];
set GPa [expr 1000.0*$KPa];
set pcf [expr $lbs/pow($ft,3)]; # pcf = #/cubic foot
set ksi [expr $kip/pow($in,2)];
set psi [expr $ksi/1000.];
Example8.1.tcl:
# ----------------------------
# Start of model generation
# ----------------------------
# kgf-m
# Create ModelBuilder with 3 dimensions and 6 DOF/node
model basic -ndm 3 -ndf 3
source Units.tcl
# create the material
nDMaterial ElasticIsotropic 1 [expr 210*$GPa] 0.3 7900
# Define geometry
# ---------------
# define some parameters
set eleArgs "1"
#set element stdBrick
set element bbarBrick
set nz 2
set nx 6
set ny 2
set nn [expr ($nz+1)*($nx+1)*($ny+1) ]
# mesh generation
block3D $nx $ny $nz 8 1 $element $eleArgs {
1 4 1 0
2 -4 1 0
3 -4 0 0
4 4 0 0
5 4 1 1
6 -4 1 1
7 -4 0 1
8 4 0 1
}
set load [expr 900*$N]
# Constant point load
pattern Plain 1 Linear {
load $nn 0 0 $load
}
# boundary conditions
fixX 4 1 1 1 1 1 1
# --------------------------------------------------------------------
# Start of static analysis (creation of the analysis & analysis itself)
# --------------------------------------------------------------------
# Load control with variable load steps
# init Jd min max
integrator LoadControl 1.0 1
# Convergence test
# tolerance maxIter displayCode
test NormUnbalance 1.0e-10 20 0
# Solution algorithm
algorithm Newton
# DOF numberer
numberer RCM
# Cosntraint handler
constraints Plain
# System of equations solver
system ProfileSPD
# Analysis for gravity load
analysis Static
# Perform the analysis
analyze 5
# --------------------------
# End of static analysis
# --------------------------
# ----------------------------
# Start of recorder generation
# ----------------------------
recorder Node -file Node.out -time -node $nn -dof 1 2 3 disp
#recorder plot Node.out CenterNodeDisp 625 10 625 450 -columns 1 2
recorder display ShakingBeam 0 0 300 300 -wipe
prp -100 100 120.5
vup 0 1 0
display 1 4 1
# --------------------------
# End of recorder generation
# --------------------------
# ---------------------------------------
# Create and Perform the dynamic analysis
# ---------------------------------------
# Remove the static analysis & reset the time to 0.0
wipeAnalysis
setTime 0.0
# Now remove the loads and let the beam vibrate
remove loadPattern 1
# add some mass proportional damping
rayleigh 0.01 0.0 0.0 0.0
# Create the transient analysis
test EnergyIncr 1.0e-10 20 0
algorithm Newton
numberer RCM
constraints Plain
integrator Newmark 0.5 0.25
#integrator GeneralizedMidpoint 0.50
analysis Transient
# Perform the transient analysis (20 sec)
# numSteps dt
analyze 100 2.0
https://forum.freecadweb.org/viewtopic.php?f=18&t=31288&p=370251#p370251
I may try to make a open sees solver object to get started. I would use your input file as dummy file which would be written on any solver run. Than we would have a base and could with implementing the writer directly.
bernd
I’m waiting for applying this, very thanks
I have compiled Opensees for Ubuntu. required packages must be installed first.
https://drive.google.com/file/d/1HKpKd4N-MpUMet83WMbUyc9zz0GGnmJC/view?usp=sharing
cool, I will give it a try on my Debian Buster! It may work on that too!
@shahram10715 perhaps we can get the package incorporated in to Debian/Ubuntu and other downstream repositories like Conda, Homebrew, OpenSUSE etc…
Edit: I’ve opened an issue on https://github.com/OpenSees/OpenSees/issues/248
requires GLIBC_2.29 but buster has 2.28-10 means it probably runs on Debian Testing aka Debian bullseye
@Kunda1
Recently I wanted to put opensees binary as ppa in ubuntu launchpad but it’s not possible because you can only add FREE software. We must find a place which allows both free and proprietary software. The second option is an interesting repo on github (if you search you will find it) which has Docker for opensees ver 2.5 (not continued). And the third option is an appimage like FreeCAD.
I thought you have Ubuntu. I will try to compile it on Debian too as soon as I can.
Debian Buster is what I am on. If you are able to compile OpenSees on debian Buster, it would be good if you could post the steps and the packages needed to do.
I wrote a bash script which works both for Debian and Ubuntu to download and compile Opensees. Here is the link to bash script:
https://github.com/shahram10715/myPasteBeeens/blob/master/opensees.sh
Please send me feedback for the above bash script. And if you want to download directly the binary file of Opensees here is the link:
https://drive.google.com/file/d/1S2-jiZVjGX3iEWcMRcbUlmojN92KYVVw/view?usp=sharing
works great on Debian Buster ![]()
if I run this file in OpenSees I get …
hugo@Ahorn:~/bin$ OpenSees Example8.1.tcl
OpenSees -- Open System For Earthquake Engineering Simulation
Pacific Earthquake Engineering Research Center
Version 3.1.0 64-Bit
(c) Copyright 1999-2016 The Regents of the University of California
All Rights Reserved
(Copyright and Disclaimer @ http://www.berkeley.edu/OpenSees/copyright.html)
-1
while executing
"recorder plot Node.out CenterNodeDisp 625 10 625 450 -columns 1 2"
(file "Example8.1.tcl" line 90)
hugo@Ahorn:~/bin$
and an empty file Node.out as well as a 10.0 MegaByte file gmon.out is created. -1 seams something went wrong ?
There is a basic truss example on the following page. In my opinion its another good starting point alongside Ebrahim cantilever code.
https://opensees.berkeley.edu/wiki/index.php/Basic_Truss_Example
A little bit off topic but studying the documents of fem workbench, I see it is hugely relied on c++ codes. Or maybe I should learn more.
There is a basic truss example on the following page. In my opinion its another good starting point alongside Ebrahim cantilever code.
https://opensees.berkeley.edu/wiki/index.php/Basic_Truss_Example
A little bit off topic but studying the documents of fem workbench, I see it is hugely relied on c++ codes. Or maybe I should learn more.
It is a mix of C++ and Python. It depends what the aim is. A lot can be done with Python, really a lot. For example to implement a new solver only less than ten lines of code need to be C++ where as all other code can be Python. Only a few things can only be done in C++. As said it depends.
But if one would like to do C++, most things could also be done in C++. All this is for history reasons.
Thanks for the example. I will give this one a try and see if it fits better.
cheers Bernd
Is it possible to output results in vtk format?