3.1.9.16.1. Pressure Dependent Multi Yield 02 Example 1
Solid-fluid fully coupled (u-p) plane-strain 9-4 noded element: saturated soil element with pressure dependent material, subjected to 1D sinusoidal base shaking.
The model is a single 9_4_QuadUP element, 2.5 m wide and 2 m high: the 4 corner nodes have 2 displacements and the pore pressure, and the 5 other nodes 2 displacements only. The base is fixed, the pore pressure is zero at the top (drained surface), and the nodes at the same height are tied. Gravity is applied first, with the material elastic and then plastic (updateMaterialStage), and then a sinusoidal base acceleration of period 1 s and amplitude 2 m/s2 is applied for 10 s, followed by 15 s of free vibration. SI units (m, s, kN, ton).
# Written by Jinchi Lu and Zhaohui Yang (May 2004)
wipe
set matOpt 1 ;# 1 = pressure depend;
;# 2 = pressure independ;
set fmass 1 ;# fluid mass density
set smass 2.0 ;# saturated soil mass density
set G 9.0e4
set B 2.2e5
set bulk 2.2e6 ;#fluid-solid combined bulk modulus
set vperm 5.e-6 ;#vertical permeability (m/s)
set hperm [expr $vperm] ;#horizontal permeability (m/s)
set accGravity 9.81 ;#acceleration of gravity
set vperm [expr $vperm/$accGravity/$fmass] ;#actual value used in computation
set hperm [expr $hperm/$accGravity/$fmass] ;#actual value used in computation
set loadBias 0.0 ;# Static shear load, in percentage
;# of gravity load (=sin(inclination angle))
set accMul 2. ;# acc. multiplier
set period 1.0 ;# Period for applied Sine wave
set deltaT 0.01 ;# time step for analysis
set numSteps 2500 ;# number of time steps
set gamma 0.6 ;# Newmark integration parameter
set massProportionalDamping 0. ;
set InitStiffnessProportionalDamping 0.002;
#############################################################
# BUILD MODEL
#create the ModelBuilder
model basic -ndm 2 -ndf 3
node 1 0 0
node 2 2.5 0
node 3 2.5 2
node 4 0 2
fix 1 1 1 0
fix 2 1 1 0
fix 3 0 0 1
fix 4 0 0 1
equalDOF 3 4 1 2
model basic -ndm 2 -ndf 2
node 5 1.25 0.
node 6 2.5 1
node 7 1.25 2
node 8 0 1
node 9 1.25 1
fix 5 1 1
equalDOF 3 7 1 2
equalDOF 6 8 1 2
equalDOF 6 9 1 2
set gravY [expr -$accGravity] ;#calc. gravity
set gravX [expr -$gravY*$loadBias]
# define material and properties
switch $matOpt {
1 {
nDMaterial PressureDependMultiYield02 1 2 1.8 $G $B 32 .1 80 0.5\
26. 0.067 0.23 0.06 0.27
}
2 {
nDMaterial PressureIndependMultiYield 2 2 1.8 4.e4 2.e5 40 .1
}
}
# ele# thick maTag bulk mDensity perm1 perm2 gravity
element 9_4_QuadUP 1 1 2 3 4 5 6 7 8 9 1.0 $matOpt $bulk $fmass $hperm $vperm $gravX $gravY
#set material to elastic for gravity loading
updateMaterialStage -material $matOpt -stage 0
#recorder for nodal variables along the vertical center line.
set SnodeList {}
for {set i 0} {$i < 9} {incr i 1} {
lappend SnodeList [expr $i+1]
}
set FnodeList {}
for {set i 0} {$i < 4} {incr i 1} {
lappend FnodeList [expr $i+1]
}
#############################################################
# GRAVITY APPLICATION (elastic behavior)
# create the SOE, ConstraintHandler, Integrator, Algorithm and Numberer
numberer RCM
system ProfileSPD
test NormDispIncr 1.0e-8 30 0
algorithm KrylovNewton
constraints Penalty 1.e18 1.e18
set nw 1.5
set nw2 [expr pow($nw+0.5, 2)/4]
integrator Newmark $nw $nw2
analysis Transient
analyze 10 5e3
updateMaterialStage -material $matOpt -stage 1
analyze 100 1.e0
# rezero time
wipeAnalysis
setTime 0.0
#############################################################
# NOW APPLY LOADING SEQUENCE AND ANALYZE (plastic)
# base input motion
pattern UniformExcitation 1 1 -accel "Sine 0. 10. $period -factor $accMul"
eval "recorder Node -file disp -time -node $SnodeList -dof 1 2 -dT $deltaT disp"
eval "recorder Node -file pwp -time -node $FnodeList -dof 3 -dT $deltaT vel"
eval "recorder Node -file acc -time -node $SnodeList -dof 1 2 -dT $deltaT accel"
recorder Element -ele 1 -time -file stress1 -dT $deltaT material 1 stress
recorder Element -ele 1 -time -file strain1 -dT $deltaT material 1 strain
recorder Element -ele 1 -time -file stress5 -dT $deltaT material 5 stress
recorder Element -ele 1 -time -file strain5 -dT $deltaT material 5 strain
recorder Element -ele 1 -time -file stress9 -dT $deltaT material 9 stress
recorder Element -ele 1 -time -file strain9 -dT $deltaT material 9 strain
constraints Penalty 1.e18 1.e18
test NormDispIncr 1.e-4 25 0
numberer RCM
algorithm KrylovNewton
system ProfileSPD
integrator Newmark $gamma [expr pow($gamma+0.5, 2)/4]
rayleigh $massProportionalDamping 0.0 $InitStiffnessProportionalDamping 0.0
analysis VariableTransient
set startT [clock seconds]
analyze $numSteps $deltaT [expr $deltaT/100] $deltaT 15
set endT [clock seconds]
puts "Execution time: [expr $endT-$startT] seconds."
wipe ;# flush output stream
# Written by Jinchi Lu and Zhaohui Yang (May 2004); Python version of the Tcl example
# single 9-4 noded u-p element (9_4_QuadUP) with pressure dependent material,
# subjected to 1D sinusoidal base shaking
import openseespy.opensees as ops
ops.wipe()
matOpt = 1 # 1 = pressure depend; 2 = pressure independ
fmass = 1.0 # fluid mass density
smass = 2.0 # saturated soil mass density
G = 9.0e4
B = 2.2e5
bulk = 2.2e6 # fluid-solid combined bulk modulus
vperm = 5.e-6 # vertical permeability (m/s)
hperm = vperm # horizontal permeability (m/s)
accGravity = 9.81 # acceleration of gravity
vperm = vperm / accGravity / fmass # actual value used in computation
hperm = hperm / accGravity / fmass # actual value used in computation
loadBias = 0.0 # static shear load, in percentage of gravity load (= sin(inclination angle))
accMul = 2.0 # acc. multiplier
period = 1.0 # period for applied sine wave
deltaT = 0.01 # time step for analysis
numSteps = 2500 # number of time steps
gamma = 0.6 # Newmark integration parameter
massProportionalDamping = 0.0
InitStiffnessProportionalDamping = 0.002
# BUILD MODEL
# corner nodes: 2 displacements and the pore pressure
ops.model('basic', '-ndm', 2, '-ndf', 3)
ops.node(1, 0.0, 0.0)
ops.node(2, 2.5, 0.0)
ops.node(3, 2.5, 2.0)
ops.node(4, 0.0, 2.0)
ops.fix(1, 1, 1, 0)
ops.fix(2, 1, 1, 0)
ops.fix(3, 0, 0, 1)
ops.fix(4, 0, 0, 1)
ops.equalDOF(3, 4, 1, 2)
# mid-side and center nodes: 2 displacements only
ops.model('basic', '-ndm', 2, '-ndf', 2)
ops.node(5, 1.25, 0.0)
ops.node(6, 2.5, 1.0)
ops.node(7, 1.25, 2.0)
ops.node(8, 0.0, 1.0)
ops.node(9, 1.25, 1.0)
ops.fix(5, 1, 1)
ops.equalDOF(3, 7, 1, 2)
ops.equalDOF(6, 8, 1, 2)
ops.equalDOF(6, 9, 1, 2)
gravY = -accGravity # calc. gravity
gravX = -gravY * loadBias
# define material and properties
if matOpt == 1:
ops.nDMaterial('PressureDependMultiYield02', 1, 2, 1.8, G, B, 32, 0.1, 80, 0.5,
26.0, 0.067, 0.23, 0.06, 0.27)
elif matOpt == 2:
ops.nDMaterial('PressureIndependMultiYield', 2, 2, 1.8, 4.e4, 2.e5, 40, 0.1)
# ele, nodes, thick, matTag, bulk, mDensity, perm1, perm2, gravity
ops.element('9_4_QuadUP', 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1.0, matOpt, bulk, fmass, hperm, vperm, gravX, gravY)
# set material to elastic for gravity loading
ops.updateMaterialStage('-material', matOpt, '-stage', 0)
# nodes for the recorders
SnodeList = list(range(1, 10))
FnodeList = list(range(1, 5))
# GRAVITY APPLICATION (elastic behavior)
ops.numberer('RCM')
ops.system('ProfileSPD')
ops.test('NormDispIncr', 1.0e-8, 30, 0)
ops.algorithm('KrylovNewton')
ops.constraints('Penalty', 1.e18, 1.e18)
nw = 1.5
ops.integrator('Newmark', nw, (nw + 0.5)**2 / 4)
ops.analysis('Transient')
ops.analyze(10, 5.e3)
ops.updateMaterialStage('-material', matOpt, '-stage', 1)
ops.analyze(100, 1.0)
# rezero time
ops.wipeAnalysis()
ops.setTime(0.0)
# NOW APPLY LOADING SEQUENCE AND ANALYZE (plastic)
# base input motion
ops.timeSeries('Sine', 1, 0.0, 10.0, period, '-factor', accMul)
ops.pattern('UniformExcitation', 1, 1, '-accel', 1)
ops.recorder('Node', '-file', 'disp', '-time', '-node', *SnodeList, '-dof', 1, 2, '-dT', deltaT, 'disp')
ops.recorder('Node', '-file', 'pwp', '-time', '-node', *FnodeList, '-dof', 3, '-dT', deltaT, 'vel')
ops.recorder('Node', '-file', 'acc', '-time', '-node', *SnodeList, '-dof', 1, 2, '-dT', deltaT, 'accel')
for ip in (1, 5, 9):
ops.recorder('Element', '-ele', 1, '-time', '-file', f'stress{ip}', '-dT', deltaT, 'material', ip, 'stress')
ops.recorder('Element', '-ele', 1, '-time', '-file', f'strain{ip}', '-dT', deltaT, 'material', ip, 'strain')
ops.constraints('Penalty', 1.e18, 1.e18)
ops.test('NormDispIncr', 1.e-4, 25, 0)
ops.numberer('RCM')
ops.algorithm('KrylovNewton')
ops.system('ProfileSPD')
ops.integrator('Newmark', gamma, (gamma + 0.5)**2 / 4)
ops.rayleigh(massProportionalDamping, 0.0, InitStiffnessProportionalDamping, 0.0)
ops.analysis('VariableTransient')
ops.analyze(numSteps, deltaT, deltaT / 100, deltaT, 15)
ops.wipe() # flush output stream
clear all;
a1=load('acc');
d1=load('disp');
p1=load('pwp');
s1=load('stress1');
e1=load('strain1');
s5=load('stress5');
e5=load('strain5');
s9=load('stress9');
e9=load('strain9');
fs=[0.5, 0.2, 4, 6];
fs2=[0.5, 0.2, 4, 3];
accMul = 2;
%integration point 1 p-q
po=(s1(:,2)+s1(:,3)+s1(:,4))/3;
for i=1:size(s1,1)
qo(i)=(s1(i,2)-s1(i,3))^2 + (s1(i,3)-s1(i,4))^2 +(s1(i,2)-s1(i,4))^2 + 6.0* s1(i,5)^2;
qo(i)=sign(s1(i,5))*1/3.0*qo(i)^0.5;
end
figure(1); close 1; figure(1);
%integration point 1 stress-strain
subplot(2,1,1), plot(e1(:,4),s1(:,5),'r');
title ('shear stress \tau_x_y VS. shear strain \epsilon_x_y at integration point 1');
xLabel('Shear strain \epsilon_x_y');
yLabel('Shear stress \tau_x_y (kPa)');
subplot(2,1,2), plot(-po,qo,'r');
title ('confinement p VS. deviatoric stress q at integration point 1');
xLabel('confinement p (kPa)');
yLabel('q (kPa)');
set(gcf,'paperposition',fs);
saveas(gcf,'SS_PQ_p1','jpg');
%integration point 5 p-q
po=(s5(:,2)+s5(:,3)+s5(:,4))/3;
for i=1:size(s5,1)
qo(i)=(s5(i,2)-s5(i,3))^2 + (s5(i,3)-s5(i,4))^2 +(s5(i,2)-s5(i,4))^2 + 6.0* s5(i,5)^2;
qo(i)=sign(s5(i,5))*1/3.0*qo(i)^0.5;
end
figure(5); close 5; figure(5);
%integration point 5 stress-strain
subplot(2,1,1), plot(e5(:,4),s5(:,5),'r');
title ('shear stress \tau_x_y VS. shear strain \epsilon_x_y at integration point 5');
xLabel('Shear strain \epsilon_x_y');
yLabel('Shear stress \tau_x_y (kPa)');
subplot(2,1,2), plot(-po,qo,'r');
title ('confinement p VS. deviatoric stress q at integration point 5');
xLabel('confinement p (kPa)');
yLabel('q (kPa)');
set(gcf,'paperposition',fs);
saveas(gcf,'SS_PQ_p5','jpg');
%integration point 9 p-q
po=(s9(:,2)+s9(:,3)+s9(:,4))/3;
for i=1:size(s1,1)
qo(i)=(s9(i,2)-s9(i,3))^2 + (s9(i,3)-s9(i,4))^2 +(s9(i,2)-s9(i,4))^2 + 6.0* s9(i,5)^2;
qo(i)=sign(s9(i,5))*1/3.0*qo(i)^0.5;
end
figure(6); close 6; figure(6);
%integration point 9 stress-strain
subplot(2,1,1), plot(e9(:,4),s9(:,5),'r');
title ('shear stress \tau_x_y VS. shear strain \epsilon_x_y at integration point 9');
xLabel('Shear strain \epsilon_x_y');
yLabel('Shear stress \tau_x_y (kPa)');
subplot(2,1,2), plot(-po,qo,'r');
title ('confinement p VS. deviatoric stress q at integration point 9');
xLabel('confinement p (kPa)');
yLabel('q (kPa)');
set(gcf,'paperposition',fs);
saveas(gcf,'SS_PQ_p9','jpg');
figure(2); close 2; figure(2);
%node 3 displacement relative to node 1
plot(d1(:,1),d1(:,6));
title ('Lateral displacement at element top');
xLabel('Time (s)');
yLabel('Displacement (m)');
set(gcf,'paperposition',fs2);
saveas(gcf,'Disp','jpg');
s=accMul*sin(0:pi/50:20*pi);
s=[s';zeros(3000,1)];
s1=interp1(0:0.01:40,s,a1(:,1));
figure(3); close 3; figure(3);
%node acceleration
a = plot(a1(:,1),s1+a1(:,6),'r');
title ('Lateral acceleration at element top');
xLabel('Time (s)');
yLabel('Acceleration (m/s^2)');
set(gcf,'paperposition',fs2);
saveas(gcf,'Acc','jpg');
figure(4); close 4; figure(4);
a=plot(p1(:,1),p1(:,2));
title ('Pore pressure at base');
xLabel('Time (s)');
yLabel('Pore pressure (kPa)');
set(gcf,'paperposition',fs2);
saveas(gcf,'EPWP','jpg');
Note
With matOpt 2 the PressureIndependMultiYield material is used instead. In the wiki version of the script the element always used material 1, so this option failed; the element now uses material $matOpt.
Results
Fig. 3.1.9.9 Lateral displacement at the element top
Fig. 3.1.9.10 Integration point 1: shear stress vs. shear strain, and confinement p vs. deviatoric stress q
Fig. 3.1.9.11 Integration point 5: shear stress vs. shear strain, and confinement p vs. deviatoric stress q
Fig. 3.1.9.12 Integration point 9: shear stress vs. shear strain, and confinement p vs. deviatoric stress q
Fig. 3.1.9.13 Excess pore pressure
Fig. 3.1.9.14 Lateral acceleration at the element top
Example by Jinchi Lu and Zhaohui Yang, UC San Diego, from the OpenSees wiki.