[eleResponse $ele integrationPoints]

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

Moderators: silvia, selimgunay, Moderators

Post Reply
EricsonEncinaZ
Posts: 108
Joined: Mon Sep 16, 2013 1:14 pm
Location: University of Auckland

[eleResponse $ele integrationPoints]

Post by EricsonEncinaZ »

Hi,

I tried to use the command [eleResponse $ele integrationPoints] in a 3D domain but it didnt work. I then checked it in 2D, as I had used it before, and it worked. To give an example I created the simple codes below for 2D and 3D. Am I doing something wrong? Is it just a bug?

# 2D example (works properly): --------------------------------------------

model BasicBuilder -ndm 2 -ndf 3

node 1 0 0
node 2 0 3

fix 1 1 1 1

uniaxialMaterial Elastic 10 1e10
uniaxialMaterial Concrete02 100 -40000 -0.0021 -8000 -0.0045 0.1 3920 30000000
uniaxialMaterial Steel02 140 300000 200000000 0.00217 15.0 0.925 0.15 0.0 1.0 0.0 1.0 0.0

section Fiber 1 -GJ 1.0e10 {
patch quad 100 10 10 -0.30 0.15 -0.30 -0.15 0.30 -0.15 0.30 0.15
layer straight 140 4 1e-4 0.25 0 -0.25 0
}

geomTransf Linear 1

element forceBeamColumn 1 1 2 1 "Lobatto 1 3"

puts " Locations are: [eleResponse 1 integrationPoints]"
puts " Weights are: [eleResponse 1 integrationWeights]"
# ---------------------------------------------------------------------------------




# 3D model (does not work) ---------------------------------------------

model BasicBuilder -ndm 3 -ndf 6

node 1 0 0 0
node 2 0 3 0

fix 1 1 1 1 1 1 1

uniaxialMaterial Elastic 10 1e10
uniaxialMaterial Concrete02 100 -40000 -0.0021 -8000 -0.0045 0.1 3920 30000000
uniaxialMaterial Steel02 140 300000 200000000 0.00217 15.0 0.925 0.15 0.0 1.0 0.0 1.0 0.0

section Fiber 1 -GJ 1.0e10 {
patch quad 100 10 10 -0.30 0.15 -0.30 -0.15 0.30 -0.15 0.30 0.15
layer straight 140 4 1e-4 0.25 0 -0.25 0
}

geomTransf Linear 1 0.0 0.0 1.0

element forceBeamColumn 1 1 2 1 "Lobatto 1 3"

puts " Locations are: [eleResponse 1 integrationPoints]"
puts " Weights are: [eleResponse 1 integrationWeights]"
# ---------------------------------------------------------------------------------------------------
Last edited by EricsonEncinaZ on Thu Feb 28, 2019 12:01 am, edited 1 time in total.
EricsonEncinaZ
Posts: 108
Joined: Mon Sep 16, 2013 1:14 pm
Location: University of Auckland

Re: [eleResponse $ele integrationPoints]

Post by EricsonEncinaZ »

A workaround is to define a 2D domain, 2 nodes, 1 elastic section, 1 FBE/DBE element with the require IPs, save the position and weights of the IPs in variables, wipe the 2D model and then start the 3D model as normal, all in the same script execution. The "wipe" command will delete the 2D model, but not the variables that were defined.
Is this the only way to do it or there is a special flag for the 3D case?
Last edited by EricsonEncinaZ on Thu Feb 28, 2019 12:01 am, edited 1 time in total.
EricsonEncinaZ
Posts: 108
Joined: Mon Sep 16, 2013 1:14 pm
Location: University of Auckland

Re: [eleResponse $ele integrationPoints]

Post by EricsonEncinaZ »

Hehehe better to get them from the source code and put them into a procedure.
Below the proc in case it is useful

proc infoIntegracion {inte NoIPs WorP} {

# Check info is correct
if {$inte!="Lobatto" && $inte!="Legendre" && $inte!="Radau" && $inte!="NewtonCotes"} {
return "infoIntegracion: The integration is not recognized"
}
if {$NoIPs < 1 || 10 < $NoIPs} {
return "infoIntegracion: Number of IPs is out of the valid range(1-10)"
}
if {$WorP != "W" && $WorP != "P"} {
return "infoIntegracion: Weights or Points not defined. Options are W or P"
}

# Lobatto integration Scheme
set inteComp "Lobatto"
if {$inte == $inteComp && $WorP == "P"} {
switch $NoIPs {
1 {return [list -1.00]}
2 {return [list 0.000 1.000]}
3 {return [list 0.000 0.500 1.000]}
4 {return [list 0.000 0.276 0.724 1.000]}
5 {return [list 0.000 0.173 0.500 0.827 1.000]}
6 {return [list 0.000 0.117 0.357 0.643 0.883 1.000]}
7 {return [list 0.000 0.085 0.266 0.500 0.734 0.915 1.000]}
8 {return [list 0.000 0.064 0.204 0.395 0.605 0.796 0.936 1.000]}
9 {return [list 0.000 0.050 0.161 0.318 0.500 0.682 0.839 0.950 1.000]}
10 {return [list 0.000 0.040 0.131 0.261 0.417 0.583 0.739 0.869 0.960 1.000]}
}
} elseif {$inte == $inteComp && $WorP == "W"} {
switch $NoIPs {
1 {return [list -1.00]}
2 {return [list 0.500 0.500]}
3 {return [list 0.167 0.666 0.167]}
4 {return [list 0.083 0.417 0.417 0.083]}
5 {return [list 0.050 0.272 0.356 0.272 0.050]}
6 {return [list 0.034 0.189 0.277 0.277 0.189 0.034]}
7 {return [list 0.024 0.138 0.216 0.244 0.216 0.138 0.024]}
8 {return [list 0.018 0.105 0.171 0.206 0.206 0.171 0.105 0.018]}
9 {return [list 0.014 0.083 0.137 0.173 0.186 0.173 0.137 0.083 0.014]}
10 {return [list 0.011 0.067 0.112 0.146 0.164 0.164 0.146 0.112 0.067 0.011]}
}
}

# Legendre integration Scheme
set inteComp "Legendre"
if {$inte == $inteComp && $WorP == "P"} {
switch $NoIPs {
1 {return [list 0.500]}
2 {return [list 0.211 0.789]}
3 {return [list 0.113 0.500 0.887]}
4 {return [list 0.069 0.330 0.670 0.931]}
5 {return [list 0.047 0.231 0.500 0.769 0.953]}
6 {return [list 0.034 0.169 0.381 0.619 0.831 0.966]}
7 {return [list 0.025 0.129 0.297 0.500 0.703 0.871 0.975]}
8 {return [list 0.020 0.102 0.237 0.408 0.592 0.763 0.898 0.980]}
9 {return [list 0.016 0.082 0.193 0.338 0.500 0.662 0.807 0.918 0.984]}
10 {return [list 0.013 0.067 0.160 0.283 0.426 0.574 0.717 0.840 0.933 0.987]}
}
} elseif {$inte == $inteComp && $WorP == "W"} {
switch $NoIPs {
1 {return [list 1.000]}
2 {return [list 0.500 0.500]}
3 {return [list 0.278 0.444 0.278]}
4 {return [list 0.174 0.326 0.326 0.174]}
5 {return [list 0.119 0.239 0.284 0.239 0.119]}
6 {return [list 0.086 0.180 0.234 0.234 0.180 0.086]}
7 {return [list 0.065 0.140 0.191 0.208 0.191 0.140 0.065]}
8 {return [list 0.051 0.111 0.157 0.181 0.181 0.157 0.111 0.051]}
9 {return [list 0.041 0.090 0.130 0.156 0.166 0.156 0.130 0.090 0.041]}
10 {return [list 0.033 0.074 0.110 0.135 0.148 0.148 0.135 0.110 0.074 0.033]}
}
}

# Radau integration Scheme
set inteComp "Radau"
if {$inte == $inteComp && $WorP == "P"} {
switch $NoIPs {
1 {return [list 0.000]}
2 {return [list 0.000 0.667]}
3 {return [list 0.000 0.355 0.845]}
4 {return [list 0.000 0.212 0.591 0.911]}
5 {return [list 0.000 0.140 0.416 0.723 0.943]}
6 {return [list 0.000 0.099 0.305 0.562 0.802 0.960]}
7 {return [list 0.000 0.073 0.231 0.441 0.663 0.852 0.971]}
8 {return [list 0.000 0.056 0.180 0.353 0.547 0.734 0.885 0.978]}
9 {return [list 0.000 0.045 0.144 0.287 0.455 0.628 0.786 0.909 0.982]}
10 {return [list 0.000 0.036 0.118 0.237 0.382 0.538 0.690 0.824 0.926 0.986]}
}
} elseif {$inte == $inteComp && $WorP == "W"} {
switch $NoIPs {
1 {return [list 1.000]}
2 {return [list 0.250 0.750]}
3 {return [list 0.112 0.512 0.376]}
4 {return [list 0.063 0.329 0.388 0.220]}
5 {return [list 0.040 0.223 0.312 0.281 0.144]}
6 {return [list 0.028 0.160 0.243 0.260 0.208 0.101]}
7 {return [list 0.020 0.120 0.190 0.225 0.212 0.159 0.074]}
8 {return [list 0.016 0.093 0.152 0.187 0.196 0.174 0.125 0.057]}
9 {return [list 0.012 0.074 0.124 0.158 0.175 0.169 0.143 0.100 0.045]}
10 {return [list 0.010 0.060 0.102 0.134 0.153 0.157 0.145 0.120 0.082 0.037]}
}
}

# NewtonCotes integration Scheme
set inteComp "NewtonCotes"
if {$inte == $inteComp && $WorP == "P"} {
switch $NoIPs {
1 {return [list -1.00]}
2 {return [list 0.000 1.000]}
3 {return [list 0.000 0.500 1.000]}
4 {return [list 0.000 0.333 0.667 1.000]}
5 {return [list 0.000 0.250 0.500 0.750 1.000]}
6 {return [list 0.000 0.200 0.400 0.600 0.800 1.000]}
7 {return [list 0.000 0.167 0.333 0.500 0.667 0.833 1.000]}
8 {return [list 0.000 0.143 0.286 0.429 0.571 0.714 0.857 1.000]}
9 {return [list 0.000 0.125 0.250 0.375 0.500 0.625 0.750 0.875 1.000]}
10 {return [list 0.000 0.111 0.222 0.333 0.444 0.556 0.667 0.778 0.889 1.000]}
}
} elseif {$inte == $inteComp && $WorP == "W"} {
switch $NoIPs {
1 {return [list -1.00]}
2 {return [list 0.500 0.500]}
3 {return [list 0.167 0.667 0.167]}
4 {return [list 0.125 0.375 0.375 0.125]}
5 {return [list 0.078 0.356 0.133 0.356 0.078]}
6 {return [list 0.066 0.260 0.174 0.174 0.260 0.066]}
7 {return [list 0.049 0.257 0.032 0.324 0.032 0.257 0.049 ]}
8 {return [list 0.043 0.207 0.077 0.173 0.173 0.077 0.207 0.043]}
9 {return [list 0.035 0.208 -0.033 0.370 -0.160 0.370 -0.033 0.208 0.035]}
10 {return [list 0.032 0.176 0.012 0.216 0.064 0.064 0.216 0.012 0.176 0.032]}
}
}
}
Post Reply