LOADING A .TXT OF DISPLACEMENTS

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

Moderators: silvia, selimgunay, Moderators

Post Reply
yairbcn
Posts: 18
Joined: Sun Oct 03, 2010 12:09 pm
Location: UC Irvine

LOADING A .TXT OF DISPLACEMENTS

Post by yairbcn »

Dear all,

I am trying to load a txt file with displacements. The time interval is 0.05 sec. This would be an example of part of my txt (in total there is 9012 points):

-5.89401E-05
0.00067319
0.000307125
0.000307125
0.001405319
-0.0015232
-0.000425005
0.001405319
0.00067319
-0.001157135
-5.89401E-05
0.00067319
-0.00079107
-0.0015232

I have build a model called test which I have tried with pushovers and other analysis and it works. The model is:


# SET UP --------------------------------------------------------------------------------------

wipe;
model basic -ndm 2 -ndf 3;
file mkdir Data;

# DEFINE GEOMETRY-------------------------------------------------------------------------------


node 1 0 0;
node 2 0 0;

# BOUNDARY CONDITIONS---------------------------------------------------------------------------

fix 1 1 1 1;
fix 2 0 1 1;

# MATERIAL PROPERTIES---------------------------------------------------------------------------

set K 29000000
set alpha 1000000
set Fy 65000
set lambda 2000
set dp 0.5
set dpc 2

# uniaxialMaterial Bilin 1 $K $alpha $alpha $Fy $Fy $lambda $lambda $lambda $lambda 1 1 1 1 $dp $dp $dpc $dpc 0.001 -0.001 $dpc $dpc 10 10

uniaxialMaterial Elastic 1 $K

# DEFINE ELEMENTS---------------------------------------------------------------------------

set transfTag 1;
geomTransf Linear $transfTag;

element zeroLength 1 1 2 -mat 1 -dir 1


# DEFINE RECORDERS------------------------------------------------------------------------------------

recorder Node -file Data/RBase1.out -time -node 1 -dof 1 reaction;
recorder Node -file Data/Disp13.out -time -node 2 -dof 1 disp;


#--------------------------------------------------------------------------------------------------------


puts "Model Built"


And then I have the analysis which I want it to load the data from the txt file. The analysis is:

set SupportNode 2;
set GMdirection "1"




# --------------------------------- perform Dynamic Ground-Motion Analysis

pattern MultipleSupport 4 {

timeSeries Path 956 -dt 0.05 -filePath DispControl.out
groundMotion 5 Plain -disp 956
imposedMotion $SupportNode $GMdirection 5
}


loadConst -time 0.0;
constraints Plain;
numberer Plain;
system BandGeneral;
test NormDispIncr 1.0e-6 6;
algorithm Newton;
integrator LoadControl 0.1;
analysis Transient;
loadConst -time 0.0;


analyze 9012 0.05

--------------------------------------------------------

No matter what I do, I cant see the mistake why it doesn't work. Could anybody tell me if i am doing anything wrong?

Thank you so so so so much

Bests

Yair
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: LOADING A .TXT OF DISPLACEMENTS

Post by vesna »

The first thing I noticed is that you are trying to perform transient analysis without a mass on your element. Define a mass and try again.
yairbcn
Posts: 18
Joined: Sun Oct 03, 2010 12:09 pm
Location: UC Irvine

Re: LOADING A .TXT OF DISPLACEMENTS

Post by yairbcn »

Hi Vesna and thank you vor your answer. I don't understand why do I need a mass to make a transient analysis, could I make it static? I dont think so because if I want to load a txt file of displacement I am supposed to do it transient, is that right?

Anyway I modified the file adding a mass in each of the node and it still does not work.

This is the new modification


# MODEL OF AN EXPERIMENTAL COLUMN REPRESENTING A REAL MODEL WITH UKNOWN PARAMETERS.

# SET UP --------------------------------------------------------------------------------------

wipe;
model basic -ndm 2 -ndf 3;
file mkdir Data;

# DEFINE GEOMETRY-------------------------------------------------------------------------------


node 1 0 0;
node 2 0 0;

# BOUNDARY CONDITIONS---------------------------------------------------------------------------

fix 1 1 1 1;
fix 2 0 1 1;

# MATERIAL PROPERTIES---------------------------------------------------------------------------

set K 29000000
set alpha 1000000
set Fy 65000
set lambda 2000
set dp 0.5
set dpc 2

# uniaxialMaterial Bilin 1 $K $alpha $alpha $Fy $Fy $lambda $lambda $lambda $lambda 1 1 1 1 $dp $dp $dpc $dpc 0.001 -0.001 $dpc $dpc 10 10

uniaxialMaterial Elastic 1 $K


# NODAL MASSES---------------------------------------------------------------------------

set WCol 119.6;

mass 1 [expr $WCol/2] 0. 0.
mass 2 [expr $WCol/2] 0. 0.

# DEFINE ELEMENTS---------------------------------------------------------------------------

set transfTag 1;
geomTransf Linear $transfTag;

element zeroLength 1 1 2 -mat 1 -dir 1


# DEFINE RECORDERS------------------------------------------------------------------------------------

recorder Node -file Data/RBase1.out -time -node 1 -dof 1 reaction;
recorder Node -file Data/Disp13.out -time -node 2 -dof 1 disp;


#--------------------------------------------------------------------------------------------------------


puts "Model Built"
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: LOADING A .TXT OF DISPLACEMENTS

Post by vesna »

If I understood well, you want to do static analysis by applying the displacements (loaded from a file) on your zeroLength element.

To do that you have to define a time series like this:

set History "Series -dt $dt -filePath displacement.out"

and then define the load pattern like this:

pattern Plain 10 $History {
sp $nodeTag $dofTag $dofValue
}

The analysis has to be static and to use LoadControl integrator.
yairbcn
Posts: 18
Joined: Sun Oct 03, 2010 12:09 pm
Location: UC Irvine

Re: LOADING A .TXT OF DISPLACEMENTS

Post by yairbcn »

I am not quite sure about the difference with static analysis or the transient one. But when I was reading the Opensees manual for loading my txt file I have to use:

pattern MultipleSupport $patternTag {
groundMotion...
imposedMotion...
...
}

And I am using a ground motion:

groundMotion type? arg1? ..

in my case plain and loading displacements:

groundMotion $gmTag Plain <-accel $tsTag> <-vel $tsTag> <-disp $tsTag> <-int (IntegratorType intArgs)>

But since I have a timeseries (that will be my loaded file) I thought I had to make a transient analysis. But I am not sure if that's a correct assumption. Anyway I tried static and doesn't work either.
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: LOADING A .TXT OF DISPLACEMENTS

Post by vesna »

Static analysis solves the problem ku=P, and transient analysis solves the problem ma+cv+ku=P.

What you are doing is conceptually wrong and that is why you can not get the result.
yairbcn
Posts: 18
Joined: Sun Oct 03, 2010 12:09 pm
Location: UC Irvine

Re: LOADING A .TXT OF DISPLACEMENTS

Post by yairbcn »

Oh I see. So what can I do to make it work?

I am doing that because I have a set of data from a real experiment of a reverse cycle displacement control of a column. And I am trying to model its behavior with Opensees to obtain the characteristic parameters of the column, such as the stiffness, the elastic limit, etc.

By now I am modeling only the elastic part of the hystereic cycle, but after I will model the entire material using a bilin material and I will obtain the parameters of the Column using a Genethic Algorithm that compares the real experiment with the model.

That's why I need to input the displacements from the experiment to Opensees.

Oh and thank you for your help
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: LOADING A .TXT OF DISPLACEMENTS

Post by vesna »

Here is what you have to do:

Define a time series like this:

set History "Series -dt $dt -filePath displacement.out"

and then define the load pattern like this:

pattern Plain 10 $History {
sp $nodeTag $dofTag $dofValue
}

The analysis has to be static and integrator LoadControl.
yairbcn
Posts: 18
Joined: Sun Oct 03, 2010 12:09 pm
Location: UC Irvine

Re: LOADING A .TXT OF DISPLACEMENTS

Post by yairbcn »

So I don't have to use pattern MultipleSupport?
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: LOADING A .TXT OF DISPLACEMENTS

Post by vesna »

Yes.
yairbcn
Posts: 18
Joined: Sun Oct 03, 2010 12:09 pm
Location: UC Irvine

Re: LOADING A .TXT OF DISPLACEMENTS

Post by yairbcn »

Hi Vesna,

I could make a dynamic analysis but my advisor told me that I need to do a static one. And I don't know why it doesn't work if I follow the things u said about defining a series History...

my model is:

# MODEL OF A ZERO ELEMENT LENGTH ELEMENT WITH AN INPUT OF DISPLACEMENTS FROM A TXT FILE

# SET UP --------------------------------------------------------------------------------------

wipe;
model basic -ndm 2 -ndf 3;
file mkdir Data;

# DEFINE GEOMETRY-------------------------------------------------------------------------------

node 1 0 0;
node 2 0 0;

# BOUNDARY CONDITIONS---------------------------------------------------------------------------

fix 1 1 1 1;
fix 2 0 1 1;

# MATERIAL PROPERTIES---------------------------------------------------------------------------

set K 29000000


uniaxialMaterial Elastic 1 $K



# DEFINE ELEMENTS---------------------------------------------------------------------------

set transfTag 1;
geomTransf Linear $transfTag;

element zeroLength 1 1 2 -mat 1 -dir 1


# DEFINE RECORDERS------------------------------------------------------------------------------------

recorder Node -file Data/RBase1.out -time -node 1 -dof 1 reaction;
recorder Node -file Data/Disp13.out -time -node 2 -dof 1 disp;


#--------------------------------------------------------------------------------------------------------

source analizar.tcl
puts "Model Built"






and the analysis is:


# INPUT OF A TXT FILE AND ANALYSIS


set SupportNode 2;
set GMdirection "1"



set History "Series -dt 0.05 -filePath DispControl.out"
pattern Plain 10 $History {
sp 2 1 1
}





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
test NormDispIncr 1.0e-8 6 ; # determine if convergence has been achieved at the end of an iteration step
algorithm Newton; # use Newton's solution algorithm: updates tangent stiffness at every iteration
integrator LoadControl 0.001; # determine the next time step for an analysis, # apply gravity in 10 steps
analysis Static # define type of analysis static or transient
analyze 9012 0.05; # perform gravity analysis
loadConst -time 0.0; # hold gravity constant and restart time



puts "Displacements input Done. End Time: [getTime]"

But it doesnt work, and the error that appears is:
WARNING PlainHandler::handle() - non-homogeneos constraint for node 2 homo assumed
** On entry to DGBSV parameter number 9 had an illegal value
>>
vesna
Posts: 3033
Joined: Tue May 23, 2006 11:23 am
Location: UC Berkeley

Re: LOADING A .TXT OF DISPLACEMENTS

Post by vesna »

Plain constrain will not work for your case. Use Penalty constraint.
Post Reply