expected integer but got "-dir"

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

Moderators: silvia, selimgunay, Moderators

Post Reply
HXHqingdao
Posts: 5
Joined: Sun Jun 20, 2021 4:14 pm

expected integer but got "-dir"

Post by HXHqingdao » Mon Jul 05, 2021 7:20 pm

When we used the the twoNodelink in opensees3.3.0,there will display "expected integer but got "-dir"".What should we do?


wipe;
model basic -ndm 2 -ndf 3;
if { [file exists output] == 0 } {
file mkdir output;
}

node 1 0 0 0;
node 2 0 0 0;
node 3 0 0 0;

fix 1 1 1 1;
fix 2 0 1 1;
fix 3 0 1 1;
geomTransf Linear 1;

puts "material";

#uniaxialMaterial ViscousDamper $matTag $K $Cd $alpha <$LGap> < $NM $RelTol $AbsTol $MaxHalf>
uniaxialMaterial ViscousDamper 1 [expr 5400*10000] 8.1 1;
uniaxialMaterial Elastic 2 5400;


puts "element";
element twoNodeLink 1 1 2 -mat 1 -dir 1;
element twoNodeLink 2 1 2 -mat 2 -dir 1;
#inerter eleTag iNode jNode -dir dirs -inertance ib <-orient <x1 x2 x3> y1 y2 y3> <-pDelta Mratios> <-doRayleigh> <-damp cb> <-mass m>
element inerter 3 2 3 -dir 1 -inertance 2;

mhscott
Posts: 868
Joined: Tue Jul 06, 2004 3:38 pm
Location: Corvallis, Oregon USA
Contact:

Re: expected integer but got "-dir"

Post by mhscott » Mon Jul 05, 2021 11:01 pm

Looks like there's a parsing error in OpenSees. I'll fix it tomorrow.

HXHqingdao
Posts: 5
Joined: Sun Jun 20, 2021 4:14 pm

Re: expected integer but got "-dir"

Post by HXHqingdao » Wed Jul 07, 2021 5:59 pm

Thank you very much. We find that this problem occurs when we input directly, but it can also operate normally when we use the command “source” directly.

mhscott
Posts: 868
Joined: Tue Jul 06, 2004 3:38 pm
Location: Corvallis, Oregon USA
Contact:

Re: expected integer but got "-dir"

Post by mhscott » Thu Jul 08, 2021 10:30 am

I'm not sure what you mean that it works normally when "sourced"

mhscott
Posts: 868
Joined: Tue Jul 06, 2004 3:38 pm
Location: Corvallis, Oregon USA
Contact:

Re: expected integer but got "-dir"

Post by mhscott » Thu Jul 08, 2021 11:26 am

OK, I think I know what you mean.

Put a statement at the end of your script, like puts "a". There's some kind of parsing error that's not obvious. It happens with other elements too.

Post Reply