"remove timeSeries $tag" in OpenSees 2.3.0
Moderators: silvia, selimgunay, Moderators
-
- Posts: 65
- Joined: Mon Oct 04, 2010 6:24 pm
- Location: Colombia
"remove timeSeries $tag" in OpenSees 2.3.0
Hi Frank/Vesna. In version 2.3.0, it seems that the "remove timeSeries $tag" has finally been implemented in the framework. But, when I run:
-----------------------------
remove timeSeries 20
-----------------------------
tcl gets an error.
-----------------------------
while executing
"remove timeSeries 20"
("eval" body line 29)
invoked from within
"eval $simulation"
("foreach" body line 7)
invoked from within
"foreach gmotion [split [read $gmotionsListChannel] "\n"] {
if {[string is s..."
(file "MODEL.tcl" line 144)
-----------------------------
I am trying to remove:
-----------------------------
timeSeries PeerNGAMotion 20 $gmotionDir/$gmotionName 9.81 -dT dt -nPts nPts
-----------------------------
Do you have any idea why I am getting this tcl error?
Thank you!
P.S. I am using OpenSees 2.3.0 for mac; the one downloaded from the download page.
-----------------------------
remove timeSeries 20
-----------------------------
tcl gets an error.
-----------------------------
while executing
"remove timeSeries 20"
("eval" body line 29)
invoked from within
"eval $simulation"
("foreach" body line 7)
invoked from within
"foreach gmotion [split [read $gmotionsListChannel] "\n"] {
if {[string is s..."
(file "MODEL.tcl" line 144)
-----------------------------
I am trying to remove:
-----------------------------
timeSeries PeerNGAMotion 20 $gmotionDir/$gmotionName 9.81 -dT dt -nPts nPts
-----------------------------
Do you have any idea why I am getting this tcl error?
Thank you!
P.S. I am using OpenSees 2.3.0 for mac; the one downloaded from the download page.
Re: "remove timeSeries $tag" in OpenSees 2.3.0
Why don't you try to define time series using "Path TimeSeries" command? Let me know if it works for that case.
-
- Posts: 65
- Joined: Mon Oct 04, 2010 6:24 pm
- Location: Colombia
Re: "remove timeSeries $tag" in OpenSees 2.3.0
Neither. That would probably be because the command is still being developed by Frank?
Thank you.
Thank you.
Re: "remove timeSeries $tag" in OpenSees 2.3.0
Frank is at the vacation now. I'll check this with him after he returns.
-
- Posts: 65
- Joined: Mon Oct 04, 2010 6:24 pm
- Location: Colombia
Re: "remove timeSeries $tag" in OpenSees 2.3.0
Thanks Vesna. I will be staying tuned...
-
- Posts: 65
- Joined: Mon Oct 04, 2010 6:24 pm
- Location: Colombia
Re: "remove timeSeries $tag" in OpenSees 2.3.0
Hi Frank. I wonder if in the new version of OpenSees (2.3.0) is possible to remove timeSeries objects. Taking a look at the source code, this feature seems to have added within this release but I think is not working. Thanks.
Re: "remove timeSeries $tag" in OpenSees 2.3.0
I checked it with Frank and it hasn't been added.
-
- Posts: 65
- Joined: Mon Oct 04, 2010 6:24 pm
- Location: Colombia
Re: "remove timeSeries $tag" in OpenSees 2.3.0
Vesna, thank you very much for the reply. Maybe such command was added on a later time. I looked at the source code again and found this in commands.cpp:
------------------------------
int
removeObject(ClientData clientData, Tcl_Interp *interp, int argc,
TCL_Char **argv)
{
// make sure at least one other argument to contain type of system
if (argc < 2) {
opserr << "WARNING want - remove objectType?\n";
return TCL_ERROR;
}
int tag;
if …………
else if ((strcmp(argv[1],"timeSeries") == 0)) {
if (argc < 3) {
opserr << "WARNING want - remove timeSeries $tag\n";
return TCL_ERROR;
}
if (Tcl_GetInt(interp, argv[2], &tag) != TCL_OK) {
opserr << "WARNING remove timeSeries tag? failed to read tag: " << argv[2] << endln;
return TCL_ERROR;
}
return OPS_removeTimeSeries(tag);
}
………
else
opserr << "WARNING remove " << argv[1] << " not supported" << endln;
return TCL_OK;
}
------------------------------
Anyway… I think I can wait until this command is finally released in the near future. But most likely I am wrong
Thank you very much for your kind of help.
------------------------------
int
removeObject(ClientData clientData, Tcl_Interp *interp, int argc,
TCL_Char **argv)
{
// make sure at least one other argument to contain type of system
if (argc < 2) {
opserr << "WARNING want - remove objectType?\n";
return TCL_ERROR;
}
int tag;
if …………
else if ((strcmp(argv[1],"timeSeries") == 0)) {
if (argc < 3) {
opserr << "WARNING want - remove timeSeries $tag\n";
return TCL_ERROR;
}
if (Tcl_GetInt(interp, argv[2], &tag) != TCL_OK) {
opserr << "WARNING remove timeSeries tag? failed to read tag: " << argv[2] << endln;
return TCL_ERROR;
}
return OPS_removeTimeSeries(tag);
}
………
else
opserr << "WARNING remove " << argv[1] << " not supported" << endln;
return TCL_OK;
}
------------------------------
Anyway… I think I can wait until this command is finally released in the near future. But most likely I am wrong
Thank you very much for your kind of help.
Re: "remove timeSeries $tag" in OpenSees 2.3.0
Based on the code you have posted it looks like remove timeSeries command is in there.
I tested it on an example and it is working. To be consistent with you I also used timeSeries PeerNGAMotion. I do not have idea why it did not work for you. Try downloading 2.3.0 again and let me know if you still have problems with it.
I tested it on an example and it is working. To be consistent with you I also used timeSeries PeerNGAMotion. I do not have idea why it did not work for you. Try downloading 2.3.0 again and let me know if you still have problems with it.
-
- Posts: 65
- Joined: Mon Oct 04, 2010 6:24 pm
- Location: Colombia
Re: "remove timeSeries $tag" in OpenSees 2.3.0
Hi Vesna. I downloaded again OpenSees version 2.3.0 (for the mac platform; at the moment I do not have access to a windows machine to test my script) from the download page and ran again the simulation. However, as before I am getting the same error. Please, would you send me via e-mail the model you did to look at if that one works on my computer? Thank you. PS: my e-mail is oleviuqserh at hotmail dot com. Thanks.
Re: "remove timeSeries $tag" in OpenSees 2.3.0
Here is the example:
# SET UP ----------------------------------------------------------------------------
wipe; # clear opensees model
model basic -ndm 2 -ndf 3; # 2 dimensions, 3 dof per node
file mkdir data; # create data directory
# define GEOMETRY -------------------------------------------------------------
# nodal coordinates:
node 1 0. 0.; # node#, X Y
node 2 0. 432.
# Single point constraints -- Boundary Conditions
fix 1 1 1 1; # node DX DY RZ
# nodal masses:
mass 2 5.18 1.e-9 0.; # node#, Mx My Mz, Mass=Weight/g.
# Define ELEMENTS -------------------------------------------------------------
# define geometric transformation: performs a linear geometric transformation of beam stiffness and resisting force from the basic system to the global-coordinate system
geomTransf Linear 1; # associate a tag to transformation
# connectivity:
element elasticBeamColumn 1 1 2 3600 3225 1080000 1; # element elasticBeamColumn $eleTag $iNode $jNode $A $E $Iz $transfTag
# Define RECORDERS -------------------------------------------------------------
recorder Node -file Data/DFree.out -time -node 2 -dof 1 2 3 disp; # displacements of free nodes
recorder Node -file Data/RBase.out -time -node 1 -dof 1 2 3 reaction; # support reaction
recorder Drift -file Data/Drift.out -time -iNode 1 -jNode 2 -dof 1 -perpDirn 2 ; # lateral drift
recorder Element -file Data/FCol.out -time -ele 1 force; # element forces -- column
# define GRAVITY -------------------------------------------------------------
timeSeries Linear 1
pattern Plain 1 1 {
load 2 0. -2000. 0.; # node#, FX FY MZ -- superstructure-weight
}
constraints Plain; # how it handles boundary conditions
numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to
system BandGeneral; # how to store and solve the system of equations in the analysis
algorithm Linear; # use Linear algorithm for linear analysis
integrator LoadControl 0.1; # determine the next time step for an analysis, # apply gravity in 10 steps
analysis Static # define type of analysis static or transient
analyze 10; # perform gravity analysis
loadConst -time 0.0; # hold gravity constant and restart time
# DYNAMIC ground-motion analysis -------------------------------------------------------------
# create load pattern
set G 386
#timeSeries Path 2 -dt 0.005 -filePath A10000.tcl -factor $G; # define acceleration vector from file (dt=0.005 is associated with the input file gm)
timeSeries PeerNGAMotion 2 /BORREGO/A-ELC270 386.4
pattern UniformExcitation 2 1 -accel 2; # define where and how (pattern tag, dof) acceleration is applied
# set damping based on first eigen mode
set freq [expr [eigen 1]**0.5]
set dampRatio 0.02
rayleigh 0. 0. 0. [expr 2*$dampRatio/$freq]
# create the analysis
wipeAnalysis; # clear previously-define analysis parameters
constraints Plain; # how it handles boundary conditions
numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to
system BandGeneral; # how to store and solve the system of equations in the analysis
algorithm Linear # use Linear algorithm for linear analysis
integrator Newmark 0.5 0.25 ; # determine the next time step for an analysis
analysis Transient; # define type of analysis: time-dependent
analyze 3995 0.01; # apply 3995 0.01-sec time steps in analysis
puts "Done!"
#wipe
remove timeSeries 2
# SET UP ----------------------------------------------------------------------------
wipe; # clear opensees model
model basic -ndm 2 -ndf 3; # 2 dimensions, 3 dof per node
file mkdir data; # create data directory
# define GEOMETRY -------------------------------------------------------------
# nodal coordinates:
node 1 0. 0.; # node#, X Y
node 2 0. 432.
# Single point constraints -- Boundary Conditions
fix 1 1 1 1; # node DX DY RZ
# nodal masses:
mass 2 5.18 1.e-9 0.; # node#, Mx My Mz, Mass=Weight/g.
# Define ELEMENTS -------------------------------------------------------------
# define geometric transformation: performs a linear geometric transformation of beam stiffness and resisting force from the basic system to the global-coordinate system
geomTransf Linear 1; # associate a tag to transformation
# connectivity:
element elasticBeamColumn 1 1 2 3600 3225 1080000 1; # element elasticBeamColumn $eleTag $iNode $jNode $A $E $Iz $transfTag
# Define RECORDERS -------------------------------------------------------------
recorder Node -file Data/DFree.out -time -node 2 -dof 1 2 3 disp; # displacements of free nodes
recorder Node -file Data/RBase.out -time -node 1 -dof 1 2 3 reaction; # support reaction
recorder Drift -file Data/Drift.out -time -iNode 1 -jNode 2 -dof 1 -perpDirn 2 ; # lateral drift
recorder Element -file Data/FCol.out -time -ele 1 force; # element forces -- column
# define GRAVITY -------------------------------------------------------------
timeSeries Linear 1
pattern Plain 1 1 {
load 2 0. -2000. 0.; # node#, FX FY MZ -- superstructure-weight
}
constraints Plain; # how it handles boundary conditions
numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to
system BandGeneral; # how to store and solve the system of equations in the analysis
algorithm Linear; # use Linear algorithm for linear analysis
integrator LoadControl 0.1; # determine the next time step for an analysis, # apply gravity in 10 steps
analysis Static # define type of analysis static or transient
analyze 10; # perform gravity analysis
loadConst -time 0.0; # hold gravity constant and restart time
# DYNAMIC ground-motion analysis -------------------------------------------------------------
# create load pattern
set G 386
#timeSeries Path 2 -dt 0.005 -filePath A10000.tcl -factor $G; # define acceleration vector from file (dt=0.005 is associated with the input file gm)
timeSeries PeerNGAMotion 2 /BORREGO/A-ELC270 386.4
pattern UniformExcitation 2 1 -accel 2; # define where and how (pattern tag, dof) acceleration is applied
# set damping based on first eigen mode
set freq [expr [eigen 1]**0.5]
set dampRatio 0.02
rayleigh 0. 0. 0. [expr 2*$dampRatio/$freq]
# create the analysis
wipeAnalysis; # clear previously-define analysis parameters
constraints Plain; # how it handles boundary conditions
numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to
system BandGeneral; # how to store and solve the system of equations in the analysis
algorithm Linear # use Linear algorithm for linear analysis
integrator Newmark 0.5 0.25 ; # determine the next time step for an analysis
analysis Transient; # define type of analysis: time-dependent
analyze 3995 0.01; # apply 3995 0.01-sec time steps in analysis
puts "Done!"
#wipe
remove timeSeries 2
-
- Posts: 65
- Joined: Mon Oct 04, 2010 6:24 pm
- Location: Colombia
Re: "remove timeSeries $tag" in OpenSees 2.3.0
No, it does not work for me. It looks like there is a bug for the mac platform. Can I ask you one more thing? Could you run this script, please? The difference with yours is that at the end I define again the timeSeries I just deleted:
--------------------------------------------------------
timeSeries PeerNGAMotion 2 /BORREGO/A-ELC270 386.4
--------------------------------------------------------
I just want to know if the command "remove timeSeries $tag" is actually removing the timeSeries object.
Thank you very much.
# SET UP ----------------------------------------------------------------------------
wipe; # clear opensees model
model basic -ndm 2 -ndf 3; # 2 dimensions, 3 dof per node
file mkdir data; # create data directory
# define GEOMETRY -------------------------------------------------------------
# nodal coordinates:
node 1 0. 0.; # node#, X Y
node 2 0. 432.
# Single point constraints -- Boundary Conditions
fix 1 1 1 1; # node DX DY RZ
# nodal masses:
mass 2 5.18 1.e-9 0.; # node#, Mx My Mz, Mass=Weight/g.
# Define ELEMENTS -------------------------------------------------------------
# define geometric transformation: performs a linear geometric transformation of beam stiffness and resisting force from the basic system to the global-coordinate system
geomTransf Linear 1; # associate a tag to transformation
# connectivity:
element elasticBeamColumn 1 1 2 3600 3225 1080000 1; # element elasticBeamColumn $eleTag $iNode $jNode $A $E $Iz $transfTag
# Define RECORDERS -------------------------------------------------------------
recorder Node -file Data/DFree.out -time -node 2 -dof 1 2 3 disp; # displacements of free nodes
recorder Node -file Data/RBase.out -time -node 1 -dof 1 2 3 reaction; # support reaction
recorder Drift -file Data/Drift.out -time -iNode 1 -jNode 2 -dof 1 -perpDirn 2 ; # lateral drift
recorder Element -file Data/FCol.out -time -ele 1 force; # element forces -- column
# define GRAVITY -------------------------------------------------------------
timeSeries Linear 1
pattern Plain 1 1 {
load 2 0. -2000. 0.; # node#, FX FY MZ -- superstructure-weight
}
constraints Plain; # how it handles boundary conditions
numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to
system BandGeneral; # how to store and solve the system of equations in the analysis
algorithm Linear; # use Linear algorithm for linear analysis
integrator LoadControl 0.1; # determine the next time step for an analysis, # apply gravity in 10 steps
analysis Static # define type of analysis static or transient
analyze 10; # perform gravity analysis
loadConst -time 0.0; # hold gravity constant and restart time
# DYNAMIC ground-motion analysis -------------------------------------------------------------
# create load pattern
set G 386
#timeSeries Path 2 -dt 0.005 -filePath A10000.tcl -factor $G; # define acceleration vector from file (dt=0.005 is associated with the input file gm)
timeSeries PeerNGAMotion 2 /BORREGO/A-ELC270 386.4
pattern UniformExcitation 2 1 -accel 2; # define where and how (pattern tag, dof) acceleration is applied
# set damping based on first eigen mode
set freq [expr [eigen 1]**0.5]
set dampRatio 0.02
rayleigh 0. 0. 0. [expr 2*$dampRatio/$freq]
# create the analysis
wipeAnalysis; # clear previously-define analysis parameters
constraints Plain; # how it handles boundary conditions
numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to
system BandGeneral; # how to store and solve the system of equations in the analysis
algorithm Linear # use Linear algorithm for linear analysis
integrator Newmark 0.5 0.25 ; # determine the next time step for an analysis
analysis Transient; # define type of analysis: time-dependent
analyze 3995 0.01; # apply 3995 0.01-sec time steps in analysis
puts "Done!"
#wipe
remove timeSeries 2
timeSeries PeerNGAMotion 2 /BORREGO/A-ELC270 386.4
--------------------------------------------------------
timeSeries PeerNGAMotion 2 /BORREGO/A-ELC270 386.4
--------------------------------------------------------
I just want to know if the command "remove timeSeries $tag" is actually removing the timeSeries object.
Thank you very much.
# SET UP ----------------------------------------------------------------------------
wipe; # clear opensees model
model basic -ndm 2 -ndf 3; # 2 dimensions, 3 dof per node
file mkdir data; # create data directory
# define GEOMETRY -------------------------------------------------------------
# nodal coordinates:
node 1 0. 0.; # node#, X Y
node 2 0. 432.
# Single point constraints -- Boundary Conditions
fix 1 1 1 1; # node DX DY RZ
# nodal masses:
mass 2 5.18 1.e-9 0.; # node#, Mx My Mz, Mass=Weight/g.
# Define ELEMENTS -------------------------------------------------------------
# define geometric transformation: performs a linear geometric transformation of beam stiffness and resisting force from the basic system to the global-coordinate system
geomTransf Linear 1; # associate a tag to transformation
# connectivity:
element elasticBeamColumn 1 1 2 3600 3225 1080000 1; # element elasticBeamColumn $eleTag $iNode $jNode $A $E $Iz $transfTag
# Define RECORDERS -------------------------------------------------------------
recorder Node -file Data/DFree.out -time -node 2 -dof 1 2 3 disp; # displacements of free nodes
recorder Node -file Data/RBase.out -time -node 1 -dof 1 2 3 reaction; # support reaction
recorder Drift -file Data/Drift.out -time -iNode 1 -jNode 2 -dof 1 -perpDirn 2 ; # lateral drift
recorder Element -file Data/FCol.out -time -ele 1 force; # element forces -- column
# define GRAVITY -------------------------------------------------------------
timeSeries Linear 1
pattern Plain 1 1 {
load 2 0. -2000. 0.; # node#, FX FY MZ -- superstructure-weight
}
constraints Plain; # how it handles boundary conditions
numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to
system BandGeneral; # how to store and solve the system of equations in the analysis
algorithm Linear; # use Linear algorithm for linear analysis
integrator LoadControl 0.1; # determine the next time step for an analysis, # apply gravity in 10 steps
analysis Static # define type of analysis static or transient
analyze 10; # perform gravity analysis
loadConst -time 0.0; # hold gravity constant and restart time
# DYNAMIC ground-motion analysis -------------------------------------------------------------
# create load pattern
set G 386
#timeSeries Path 2 -dt 0.005 -filePath A10000.tcl -factor $G; # define acceleration vector from file (dt=0.005 is associated with the input file gm)
timeSeries PeerNGAMotion 2 /BORREGO/A-ELC270 386.4
pattern UniformExcitation 2 1 -accel 2; # define where and how (pattern tag, dof) acceleration is applied
# set damping based on first eigen mode
set freq [expr [eigen 1]**0.5]
set dampRatio 0.02
rayleigh 0. 0. 0. [expr 2*$dampRatio/$freq]
# create the analysis
wipeAnalysis; # clear previously-define analysis parameters
constraints Plain; # how it handles boundary conditions
numberer Plain; # renumber dof's to minimize band-width (optimization), if you want to
system BandGeneral; # how to store and solve the system of equations in the analysis
algorithm Linear # use Linear algorithm for linear analysis
integrator Newmark 0.5 0.25 ; # determine the next time step for an analysis
analysis Transient; # define type of analysis: time-dependent
analyze 3995 0.01; # apply 3995 0.01-sec time steps in analysis
puts "Done!"
#wipe
remove timeSeries 2
timeSeries PeerNGAMotion 2 /BORREGO/A-ELC270 386.4
Re: "remove timeSeries $tag" in OpenSees 2.3.0
Yes, I am using a PC and it worked for me. I will ask Frank to check it with the mac.
Re: "remove timeSeries $tag" in OpenSees 2.3.0
I want to record the response of SDOF system, I used "recorder Node -file Data/node2.out -timeSeries 2 -time -node 2 -dof 1 accel". But, in the output its saying timeseries2 doesn't exist. Please help me as I used the same problem with superstructure load (timeseries 1) applied afterwards timehistory (timeseries 2 for uniform exitation).
output: TimeSeries *getTimeSeries(int tag) - none found with tag: 2
Its means, I am not able to record the total acceleration, instead recording the relative acceleration. Please help me in this issue
output: TimeSeries *getTimeSeries(int tag) - none found with tag: 2
Its means, I am not able to record the total acceleration, instead recording the relative acceleration. Please help me in this issue