3.1.9.16.3. Pressure Dependent Multi Yield 02 Example 3
Solid-fluid fully coupled (u-p) 20-8 noded brick element: saturated soil element with pressure dependent material, subjected to 1D sinusoidal base shaking.
The model is a single 20_8_BrickUP element, a 1 m cube: the 8 corner nodes have 3 displacements and the pore pressure, and the 12 mid-edge nodes 3 displacements only. The base is fixed, the pore pressure is zero at the top (drained surface), the displacements in the y direction are fixed (a 2D-like column), 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).
# single 20_8_BrickUP element with pressure dependent material.
# subjected to 1D sinusoidal base shaking
# Written by Jinchi Lu (May 2004)
set matOpt 1 ;# 1 = pressure depend;
;# 2 = pressure independ;
wipe
set friction 31. ;#friction angle
set phaseTransform 26. ;#phase transformation angle
set G1 9.e4 ;
set B1 22.e4 ;
set gamma 0.600 ;# Newmark integration parameter
set dT 0.01 ;# time step for analysis, does not have to be the same as accDt.
set numSteps 2500 ;# number of time steps
set rhoS 1.80 ;# saturated mass density
set rhoF 1.00 ;# fluid mass density
set Bfluid 2.2e6 ;# fluid bulk modulus
set fluid1 1 ;# fluid material tag
set solid1 10 ;# solid material tag
set perm 1.e-5 ;#permeability (m/s)
set accGravity 9.81 ;#acceleration of gravity
set perm [expr $perm/$accGravity/$rhoF] ;# actual value used in computation
set accMul 2 ;# acceleration multiplier
set pi 3.1415926535 ;
set inclination 0;
set massProportionalDamping 0.0 ;
set InitStiffnessProportionalDamping 0.003;
set gravityX [expr $accGravity*sin($inclination/180.0*$pi)] ;# gravity acceleration in X direction
set gravityY 0.0 ;# gravity acceleration in Y direction
set gravityZ [expr -$accGravity*cos($inclination/180.0*$pi)] ;# gravity acceleration in Z direction
set ndm 3 ;# space dimension
model BasicBuilder -ndm 3 -ndf 4
node 1 0.00000 0.0000 0.00000
node 2 1.00000 0.0000 0.00000
node 3 1.00000 1.0000 0.00000
node 4 0.00000 1.0000 0.00000
node 5 0.00000 0.0000 1.00000
node 6 1.00000 0.0000 1.00000
node 7 1.00000 1.0000 1.00000
node 8 0.00000 1.0000 1.00000
fix 1 1 1 1 0
fix 2 1 1 1 0
fix 3 1 1 1 0
fix 4 1 1 1 0
fix 5 0 1 0 1
fix 6 0 1 0 1
fix 7 0 1 0 1
fix 8 0 1 0 1
model BasicBuilder -ndm 3 -ndf 3
node 9 0.50000 0.0000 0.00000
node 10 1.00000 0.5000 0.00000
node 11 0.50000 1.0000 0.00000
node 12 0.00000 0.5000 0.00000
node 13 0.50000 0.0000 1.00000
node 14 1.00000 0.5000 1.00000
node 15 0.50000 1.0000 1.00000
node 16 0.00000 0.5000 1.00000
node 17 0.00000 0.0000 0.50000
node 18 1.00000 0.0000 0.50000
node 19 1.00000 1.0000 0.50000
node 20 0.00000 1.0000 0.50000
fix 9 1 1 1
fix 10 1 1 1
fix 11 1 1 1
fix 12 1 1 1
fix 13 0 1 0
fix 14 0 1 0
fix 15 0 1 0
fix 16 0 1 0
fix 17 0 1 0
fix 18 0 1 0
fix 19 0 1 0
fix 20 0 1 0
# equalDOF
# tied nodes around
equalDOF 5 6 1 3
equalDOF 5 7 1 3
equalDOF 5 8 1 3
equalDOF 5 13 1 3
equalDOF 5 14 1 3
equalDOF 5 15 1 3
equalDOF 5 16 1 3
equalDOF 17 18 1 3
equalDOF 17 19 1 3
equalDOF 17 20 1 3
# define material and properties
switch $matOpt {
1 {
nDMaterial PressureDependMultiYield02 1 3 $rhoS $G1 $B1 $friction .1 80 0.5\
$phaseTransform 0.067 0.23 0.06 0.27
}
2 {
nDMaterial PressureIndependMultiYield 2 3 1.8 4.e4 2.e5 40 .1
}
}
element 20_8_BrickUP 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 $matOpt $Bfluid $rhoF $perm $perm $perm $gravityX $gravityY $gravityZ
#recorder for nodal variables along the vertical center line.
set SnodeList {}
for {set i 0} {$i < 20} {incr i 1} {
lappend SnodeList [expr $i+1]
}
set FnodeList {}
for {set i 0} {$i < 8} {incr i 1} {
lappend FnodeList [expr $i+1]
}
# GRAVITY APPLICATION (elastic behavior)
numberer Plain
system ProfileSPD
test NormDispIncr 1.0e-8 20 1
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 5.e3
# switch the material to plastic
updateMaterialStage -material $matOpt -stage 1
analyze 10 1.e1
setTime 0.0 ;# reset time, otherwise reference time is not zero for time history analysis
wipeAnalysis
eval "recorder Node -file disp -time -node $SnodeList -dof 1 2 3 -dT $dT disp"
eval "recorder Node -file pwp -time -node $FnodeList -dof 4 -dT $dT vel"
eval "recorder Node -file acc -time -node $SnodeList -dof 1 2 3 -dT $dT accel"
recorder Element -ele 1 -time -file stress1 -dT $dT material 1 stress
recorder Element -ele 1 -time -file strain1 -dT $dT material 1 strain
recorder Element -ele 1 -time -file stress5 -dT $dT material 5 stress
recorder Element -ele 1 -time -file strain5 -dT $dT material 5 strain
recorder Element -ele 1 -time -file stress17 -dT $dT material 17 stress
recorder Element -ele 1 -time -file strain17 -dT $dT material 17 strain
############# create dynamic time history analysis ##################
pattern UniformExcitation 1 1 -accel "Sine 0 10 1 -factor $accMul"
rayleigh $massProportionalDamping 0.0 $InitStiffnessProportionalDamping 0.0
integrator Newmark $gamma [expr pow($gamma+0.5, 2)/4]
constraints Penalty 1.e18 1.e18 ;# can't combine with test NormUnbalance
test NormDispIncr 1.0e-3 25 0 ;# can't combine with constraints Lagrange
#algorithm Newton ;# tengent is updated at each iteration
algorithm KrylovNewton ;# step not each iteration
system ProfileSPD ;# Use sparse solver. Next numberer is better to be Plain.
numberer Plain ;# method to map between between equation numbers of DOFs
analysis VariableTransient ;# splitting time step requires VariableTransient
############# perform the Analysis and record time used #############
set startT [clock seconds]
analyze $numSteps $dT [expr $dT/64] $dT 15
set endT [clock seconds]
puts "Execution time: [expr $endT-$startT] seconds."
# single 20_8_BrickUP element with pressure dependent material.
# subjected to 1D sinusoidal base shaking
# Written by Jinchi Lu (May 2004); Python version of the Tcl example
import math
import openseespy.opensees as ops
matOpt = 1 # 1 = pressure depend; 2 = pressure independ
ops.wipe()
friction = 31.0 # friction angle
phaseTransform = 26.0 # phase transformation angle
G1 = 9.e4
B1 = 22.e4
gamma = 0.600 # Newmark integration parameter
dT = 0.01 # time step for analysis
numSteps = 2500 # number of time steps
rhoS = 1.80 # saturated mass density
rhoF = 1.00 # fluid mass density
Bfluid = 2.2e6 # fluid bulk modulus
perm = 1.e-5 # permeability (m/s)
accGravity = 9.81 # acceleration of gravity
perm = perm / accGravity / rhoF # actual value used in computation
accMul = 2.0 # acceleration multiplier
inclination = 0.0
massProportionalDamping = 0.0
InitStiffnessProportionalDamping = 0.003
gravityX = accGravity * math.sin(math.radians(inclination)) # gravity acceleration in X direction
gravityY = 0.0 # gravity acceleration in Y direction
gravityZ = -accGravity * math.cos(math.radians(inclination)) # gravity acceleration in Z direction
# corner nodes: 3 displacements and the pore pressure
ops.model('basic', '-ndm', 3, '-ndf', 4)
ops.node(1, 0.0, 0.0, 0.0)
ops.node(2, 1.0, 0.0, 0.0)
ops.node(3, 1.0, 1.0, 0.0)
ops.node(4, 0.0, 1.0, 0.0)
ops.node(5, 0.0, 0.0, 1.0)
ops.node(6, 1.0, 0.0, 1.0)
ops.node(7, 1.0, 1.0, 1.0)
ops.node(8, 0.0, 1.0, 1.0)
for nd in (1, 2, 3, 4): # base corner nodes
ops.fix(nd, 1, 1, 1, 0)
for nd in (5, 6, 7, 8): # top corner nodes
ops.fix(nd, 0, 1, 0, 1)
# mid-edge nodes: 3 displacements only
ops.model('basic', '-ndm', 3, '-ndf', 3)
ops.node(9, 0.5, 0.0, 0.0)
ops.node(10, 1.0, 0.5, 0.0)
ops.node(11, 0.5, 1.0, 0.0)
ops.node(12, 0.0, 0.5, 0.0)
ops.node(13, 0.5, 0.0, 1.0)
ops.node(14, 1.0, 0.5, 1.0)
ops.node(15, 0.5, 1.0, 1.0)
ops.node(16, 0.0, 0.5, 1.0)
ops.node(17, 0.0, 0.0, 0.5)
ops.node(18, 1.0, 0.0, 0.5)
ops.node(19, 1.0, 1.0, 0.5)
ops.node(20, 0.0, 1.0, 0.5)
for nd in (9, 10, 11, 12): # base mid-edge nodes
ops.fix(nd, 1, 1, 1)
for nd in range(13, 21): # other mid-edge nodes
ops.fix(nd, 0, 1, 0)
# tied nodes around
for nd in (6, 7, 8, 13, 14, 15, 16):
ops.equalDOF(5, nd, 1, 3)
for nd in (18, 19, 20):
ops.equalDOF(17, nd, 1, 3)
# define material and properties
if matOpt == 1:
ops.nDMaterial('PressureDependMultiYield02', 1, 3, rhoS, G1, B1, friction, 0.1, 80, 0.5,
phaseTransform, 0.067, 0.23, 0.06, 0.27)
elif matOpt == 2:
ops.nDMaterial('PressureIndependMultiYield', 2, 3, 1.8, 4.e4, 2.e5, 40, 0.1)
ops.element('20_8_BrickUP', 1, *range(1, 21), matOpt, Bfluid, rhoF, perm, perm, perm, gravityX, gravityY, gravityZ)
# nodes for the recorders
SnodeList = list(range(1, 21))
FnodeList = list(range(1, 9))
# GRAVITY APPLICATION (elastic behavior)
ops.numberer('Plain')
ops.system('ProfileSPD')
ops.test('NormDispIncr', 1.0e-8, 20, 1)
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)
# switch the material to plastic
ops.updateMaterialStage('-material', matOpt, '-stage', 1)
ops.analyze(10, 10.0)
ops.setTime(0.0) # reset time, otherwise reference time is not zero for time history analysis
ops.wipeAnalysis()
ops.recorder('Node', '-file', 'disp', '-time', '-node', *SnodeList, '-dof', 1, 2, 3, '-dT', dT, 'disp')
ops.recorder('Node', '-file', 'pwp', '-time', '-node', *FnodeList, '-dof', 4, '-dT', dT, 'vel')
ops.recorder('Node', '-file', 'acc', '-time', '-node', *SnodeList, '-dof', 1, 2, 3, '-dT', dT, 'accel')
for ip in (1, 5, 17):
ops.recorder('Element', '-ele', 1, '-time', '-file', f'stress{ip}', '-dT', dT, 'material', ip, 'stress')
ops.recorder('Element', '-ele', 1, '-time', '-file', f'strain{ip}', '-dT', dT, 'material', ip, 'strain')
# create dynamic time history analysis
ops.timeSeries('Sine', 1, 0.0, 10.0, 1.0, '-factor', accMul)
ops.pattern('UniformExcitation', 1, 1, '-accel', 1)
ops.rayleigh(massProportionalDamping, 0.0, InitStiffnessProportionalDamping, 0.0)
ops.integrator('Newmark', gamma, (gamma + 0.5)**2 / 4)
ops.constraints('Penalty', 1.e18, 1.e18)
ops.test('NormDispIncr', 1.0e-3, 25, 0)
ops.algorithm('KrylovNewton')
ops.system('ProfileSPD')
ops.numberer('Plain')
ops.analysis('VariableTransient')
# perform the analysis
ops.analyze(numSteps, dT, dT / 64, dT, 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('stress17');
e9=load('strain17');
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 +s1(i,6)^2+s1(i,7)^2) ;
qo(i)=sign(s1(i,7))*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(:,7),s1(:,7),'r');
title ('shear stress \tau_x_z VS. shear strain \epsilon_x_z at integration point 1');
xLabel('Shear strain \epsilon_x_z');
yLabel('Shear stress \tau_x_z (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 + s5(i,6)^2 + s5(i,7)^2);
qo(i)=sign(s5(i,7))*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(:,7),s5(:,7),'r');
title ('shear stress \tau_x_z VS. shear strain \epsilon_x_z at integration point 5');
xLabel('Shear strain \epsilon_x_z');
yLabel('Shear stress \tau_x_z (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 + s9(i,6)^2 + s9(i,7)^2);
qo(i)=sign(s9(i,7))*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(:,7),s9(:,7),'r');
title ('shear stress \tau_x_z VS. shear strain \epsilon_x_z at integration point 17');
xLabel('Shear strain \epsilon_x_z');
yLabel('Shear stress \tau_x_z (kPa)');
subplot(2,1,2), plot(-po,qo,'r');
title ('confinement p VS. deviatoric stress q at integration point 17');
xLabel('confinement p (kPa)');
yLabel('q (kPa)');
set(gcf,'paperposition',fs);
saveas(gcf,'SS_PQ_p17','jpg');
figure(2); close 2; figure(2);
%node 3 displacement relative to node 1
plot(d1(:,1),d1(:,14));
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(:,14),'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.
Results
Fig. 3.1.9.21 Lateral displacement at the element top
Fig. 3.1.9.22 Integration point 1: shear stress vs. shear strain, and confinement p vs. deviatoric stress q
Fig. 3.1.9.23 Integration point 5: shear stress vs. shear strain, and confinement p vs. deviatoric stress q
Fig. 3.1.9.24 Integration point 17: shear stress vs. shear strain, and confinement p vs. deviatoric stress q
Fig. 3.1.9.25 Excess pore pressure
Fig. 3.1.9.26 Lateral acceleration at the element top
Example by Jinchi Lu and Zhaohui Yang, UC San Diego, from the OpenSees wiki.