Displacment excitation input

Forum for OpenSees users to post questions, comments, etc. on the use of the OpenSees interpreter, OpenSees.exe

Moderators: silvia, selimgunay, Moderators

yfeng
Posts: 73
Joined: Thu Aug 28, 2008 11:47 am
Location: North Carolina State University

Displacment excitation input

Post by yfeng »

Hi all,
I ran a dynamic test for a cantilever specimen and got a series of displacment at the free node. Then I want to impose this displacement load history on the free node to run a static displacement controle test. But seems that there is not any kind of command which can impose a complicated load history on a node.
Can somebody give me some suggestions?
Thank you.

Yuhao Feng
Yuhao Feng
Research Assistant & graduate student
CCEE Dept. North Carolina State University
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

for static analysis, use the sp command under load control. make each time-increment step equal to the input step.
play around with something simple to make sure you get this down.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
yfeng
Posts: 73
Joined: Thu Aug 28, 2008 11:47 am
Location: North Carolina State University

Post by yfeng »

How to pick up the displacement values one by one from an input file?
One sp command impose a single displacement on the node. Since I need to impose a series of displacements sequentially, I need to pick it up from the file first. And then, use sp command impose it one after one.
Thank you.

[quote="silvia"]for static analysis, use the sp command under load control. make each time-increment step equal to the input step.
play around with something simple to make sure you get this down.[/quote]
Yuhao Feng
Research Assistant & graduate student
CCEE Dept. North Carolina State University
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

use the series for the pattern.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

here is an example of how i impose an axial force and a curvature on a section at the same time.
my values come from a Tcl List, you just have to modify your series command. just make sure that your time steps are uniform, makes life easeir.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
yfeng
Posts: 73
Joined: Thu Aug 28, 2008 11:47 am
Location: North Carolina State University

Post by yfeng »

Yeah I think it is a good idea to apply uniform time steps on it. Can you attach your example again. I cannot find it.
Thank you


[quote="silvia"]here is an example of how i impose an axial force and a curvature on a section at the same time.
my values come from a Tcl List, you just have to modify your series command. just make sure that your time steps are uniform, makes life easeir.[/quote]
Yuhao Feng
Research Assistant & graduate student
CCEE Dept. North Carolina State University
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

mmmm where did it go?

[code] # Define axial load
set Nstep [expr [llength $iAxialForce]-1]
set dt [expr 1.0/$Nstep]; # this is how the analysis will be run.
set AxialLoadSeries "Series -dt $dt -values \{$iAxialForce\}"
pattern Plain 3001 $AxialLoadSeries {
load 1002 1.0 0.0 0.0 0.0 0.0 0.0
}
set CurvatureSeries "Series -dt $dt -values \{$iCurvatureZ\}"
pattern Plain 6003 $CurvatureSeries {
sp 1002 6 1.0
}
if {[llength $iCurvatureY]>0} {
set CurvatureSeries "Series -dt $dt -values \{$iCurvatureY\}"
pattern Plain 5003 $CurvatureSeries {
sp 1002 5 1.0
}
}

set Tolerance 1e-8
AnalyzeLoadControl -Nstep $Nstep -LoadIncrement $dt -Tolerance $Tolerance -constraintsType Transformation; # apply axial load
wipe
[/code]
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
yfeng
Posts: 73
Joined: Thu Aug 28, 2008 11:47 am
Location: North Carolina State University

Post by yfeng »

Pretty cool! I will try to use displacement series.
Thanks again.


[quote="silvia"]mmmm where did it go?

[code] # Define axial load
set Nstep [expr [llength $iAxialForce]-1]
set dt [expr 1.0/$Nstep]; # this is how the analysis will be run.
set AxialLoadSeries "Series -dt $dt -values \{$iAxialForce\}"
pattern Plain 3001 $AxialLoadSeries {
load 1002 1.0 0.0 0.0 0.0 0.0 0.0
}
set CurvatureSeries "Series -dt $dt -values \{$iCurvatureZ\}"
pattern Plain 6003 $CurvatureSeries {
sp 1002 6 1.0
}
if {[llength $iCurvatureY]>0} {
set CurvatureSeries "Series -dt $dt -values \{$iCurvatureY\}"
pattern Plain 5003 $CurvatureSeries {
sp 1002 5 1.0
}
}

set Tolerance 1e-8
AnalyzeLoadControl -Nstep $Nstep -LoadIncrement $dt -Tolerance $Tolerance -constraintsType Transformation; # apply axial load
wipe
[/code][/quote]
Yuhao Feng
Research Assistant & graduate student
CCEE Dept. North Carolina State University
yfeng
Posts: 73
Joined: Thu Aug 28, 2008 11:47 am
Location: North Carolina State University

Post by yfeng »

Hi Silvia,
I still have a confusion that you impose a load and a curvature at a same time. Can it converge? I mean can this load you imposed give the curvature you expect? Or there is a load factor which will adjust the load value.

Thank you


[quote="silvia"]mmmm where did it go?

[code] # Define axial load
set Nstep [expr [llength $iAxialForce]-1]
set dt [expr 1.0/$Nstep]; # this is how the analysis will be run.
set AxialLoadSeries "Series -dt $dt -values \{$iAxialForce\}"
pattern Plain 3001 $AxialLoadSeries {
load 1002 1.0 0.0 0.0 0.0 0.0 0.0
}
set CurvatureSeries "Series -dt $dt -values \{$iCurvatureZ\}"
pattern Plain 6003 $CurvatureSeries {
sp 1002 6 1.0
}
if {[llength $iCurvatureY]>0} {
set CurvatureSeries "Series -dt $dt -values \{$iCurvatureY\}"
pattern Plain 5003 $CurvatureSeries {
sp 1002 5 1.0
}
}

set Tolerance 1e-8
AnalyzeLoadControl -Nstep $Nstep -LoadIncrement $dt -Tolerance $Tolerance -constraintsType Transformation; # apply axial load
wipe
[/code][/quote]
Yuhao Feng
Research Assistant & graduate student
CCEE Dept. North Carolina State University
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

the load and displacements are imposed at different dofs.
they are in separate load patters, so that each one has its own scaling factor.
yes, it does converge for me...... good enough for me!
:)
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
yfeng
Posts: 73
Joined: Thu Aug 28, 2008 11:47 am
Location: North Carolina State University

Post by yfeng »

Hi Silvia,
I have used sp command to define the displacement pattern. But, when I applied displacement control integrator I found that the first displacement increment can not be represented by pseudo-time step $dt now. Do you know how to solve this problem?
[quote="silvia"]the load and displacements are imposed at different dofs.
they are in separate load patters, so that each one has its own scaling factor.
yes, it does converge for me...... good enough for me!
:)[/quote]
Yuhao Feng
Research Assistant & graduate student
CCEE Dept. North Carolina State University
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

sp is treated like a load, so you have to use load-controlled. load factor =1 applies the entire load...

that's why i apply the lateral load and then control displacements, a bit easier.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

here is the script i use to do a curvature-controlled moment-curvature analysis where i impose a gravity load and impose curvatures in the two directions, it is from BuildingTcl, it might help give you an idea:
[code]#########################
## BuildingTclFiles
##
## Silvia Mazzoni, 2008
## University of California, Berkeley
#########################

proc TestSectionLoadPath {thisSectionLabel Orient thisInitialFilename NodeLabel iAxialForce iCurvatureZ {iCurvatureY ""}} {
global GlobalizeUnits
eval $GlobalizeUnits; # need units to calculate default properties

global iAllSectionData
array set thisSectionData $iAllSectionData($thisSectionLabel)

# overwrite rotated-geometry properties
if {$Orient == "WeakAxisBending" || $Orient == "Rotated"} {
set iRotatedSectionData $thisSectionData(iRotatedSectionData)
foreach {Name Value} $iRotatedSectionData {
set thisSectionData($Name) $Value
}
}
foreach {Name Value} [array get thisSectionData] {
set $Name $Value
}

global StopAnalysisSwitch
set StopAnalysisSwitch 0
# Analysis Parameters

# SET UP ----------------------------------------------------------------------------
wipe; # clear memory of all past model definitions
model BasicBuilder -ndm 3 -ndf 6; # Define the model builder, ndm=#dimension, ndf=#dofs

# build Material Library
global iAllMaterialData
foreach {Name thisData} [array get iAllMaterialData] {
catch {unset DataArray}; # clear memory
array set DataArray $thisData
foreach Name $DataArray(BuildMaterialCommandInputArguments) {
set Value $DataArray($Name)
set $Name $Value
}
eval $DataArray(BuildMaterialCommand)
}

# Define two nodes at (0,0)
node 1001 0.0 0.0 0.0 0.0 0.0 0.0
node 1002 0.0 0.0 0.0 0.0 0.0 0.0

# Fix all degrees of freedom except axial and bending
fix 1001 1 1 1 1 1 1
fix 1002 0 1 1 1 0 0
set IDctrlNode 1002
# define section
eval $BuildSectionCommand

# Define element
set ResponseElementTag 2001
element zeroLengthSection $ResponseElementTag 1001 1002 $SectionTag

# elastic element
set ElasticElementTag 2002
set ElasticMaterialTag 99
set Eelastic 1.0
set Aelastic 1.0
set Ielastic 1.0
uniaxialMaterial Elastic $ElasticMaterialTag $Eelastic
element zeroLength $ElasticElementTag 1001 1002 -mat $ElasticMaterialTag $ElasticMaterialTag -dir 5 6

# Create recorder
set RecorderFilename ${thisInitialFilename}_${NodeLabel}_ElForce.out
recorder Element -file $RecorderFilename -time -ele $ResponseElementTag force;
set RecorderFilename ${thisInitialFilename}_${NodeLabel}_ElDefo.out
recorder Element -file $RecorderFilename -time -ele $ResponseElementTag deformation;
# create section recorders, if any
set SectionRecorderFilename $SectionLabel
set SectionTag 1
global iAllMaterialLabelTag
if {[info exists FiberRecorderData]} {
foreach {FiberLocationLabel thisFiberRecorderData} $FiberRecorderData {
catch {unset thisFiberRecorderDataArray}
array set thisFiberRecorderDataArray $thisFiberRecorderData
set CoordData $thisFiberRecorderDataArray(CoordData)
eval "set MaterialLabel $thisFiberRecorderDataArray(MaterialLabel)"
set MaterialTag $iAllMaterialLabelTag($MaterialLabel)
set RecorderFilename ${thisInitialFilename}_${NodeLabel}_${FiberLocationLabel}_SS.out
eval "recorder Element -file $RecorderFilename -ele $ResponseElementTag section fiber $CoordData $MaterialTag stressStrain"
}
}
# Define axial load
set Nstep [expr [llength $iAxialForce]-1]
set dt [expr 1.0/$Nstep]; # this is how the analysis will be run.
set AxialLoadSeries "Series -dt $dt -values \{$iAxialForce\}"
pattern Plain 3001 $AxialLoadSeries {
load 1002 1.0 0.0 0.0 0.0 0.0 0.0
}
set CurvatureSeries "Series -dt $dt -values \{$iCurvatureZ\}"
pattern Plain 6003 $CurvatureSeries {
sp 1002 6 1.0
}
if {[llength $iCurvatureY]>0} {
set CurvatureSeries "Series -dt $dt -values \{$iCurvatureY\}"
pattern Plain 5003 $CurvatureSeries {
sp 1002 5 1.0
}
}

set Tolerance 1e-8
AnalyzeLoadControl -Nstep $Nstep -LoadIncrement $dt -Tolerance $Tolerance -constraintsType Transformation; # apply axial load
wipe

return 1

}[/code]
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
zvidrih
Posts: 39
Joined: Wed Apr 30, 2008 1:55 am
Location: Ljubljana, Slovenia

Cyclic test

Post by zvidrih »

Hi,

on the other hand you can also modify the static reversed cyclic analysis (example 4 - 2D file: Ex4.Portal2D.analyze.Static.Cycle.tcl)

in the above example file the cyclic load is generated automaticaly, but you can read $iDmax from a file:

eg: (read displacements from a file disp.txt

set stepI 0.0
set fl [open disp.txt]
set data [read $fl]
close $fl
set iDmax [split $data \n]
set stepI 0.0
foreach Dincr $iDmax {
# puts $Dincr
integrator DisplacementControl $IDctrlNode $IDctrlDOF [expr double($Dincr-$stepI)]
analysis Static
# ----------------------------------------------first analyze command------------------------
set ok [analyze 1]
# ----------------------------------------------if convergence failure-------------------------
if {$ok != 0} {
# if analysis fails, we try some other stuff
# performance is slower inside this loop global maxNumIterStatic; # max no. of iterations performed before "failure to converge" is ret'd
if {$ok != 0} {
puts "Trying Newton with Initial Tangent .."
test NormDispIncr $TolStatic 2000 0
algorithm Newton -initial
set ok [analyze 1]
test $testTypeStatic $TolStatic $maxNumIterStatic 0
algorithm $algorithmTypeStatic
}
if {$ok != 0} {
puts "Trying Broyden .."
algorithm Broyden 8
set ok [analyze 1 ]
algorithm $algorithmTypeStatic
}
if {$ok != 0} {
puts "Trying NewtonWithLineSearch .."
algorithm NewtonLineSearch 0.8
set ok [analyze 1]
algorithm $algorithmTypeStatic
}
if {$ok != 0} {
# set putout [format $fmt1 "PROBLEM" $IDctrlNode $IDctrlDOF [nodeDisp $IDctrlNode $IDctrlDOF] $LunitTXT]
# puts $putout
return -1
}; # end if
}; # end if
set stepI $Dincr
}; # end of iDmaxCycl


another way would be the use of MultipleSupport Pattern...
Zlatko Vidrih
Institute of Structural Engineering, earthquake Engineering and Construction IT
Faculty of Civil and Geodetic Engineering
University of Ljubljana, Slovenia
silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia »

the two cases are different, it depends on whether you want to control the independent dispalacement histories, or the load distribution.
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104
Post Reply