Beispiel #1
0
// L_SecondDerivs computes second order derivatives
//  N    -- ∂f/∂σ     [nsig]
//  Nb   -- ∂g/∂σ     [nsig]
//  A    -- ∂f/∂α_i   [nalp]
//  h    -- hardening [nalp]
//  Mb   -- ∂Nb/∂εe   [nsig][nsig]
//  a_i  -- ∂Nb/∂α_i  [nalp][nsig]
//  b_i  -- ∂h_i/∂εe  [nalp][nsig]
//  c_ij -- ∂h_i/∂α_j [nalp][nalp]
func (o *CamClayMod) L_SecondDerivs(N, Nb, A, h []float64, Mb, a, b, c [][]float64, σ, α []float64) (err error) {
	p, _, w := tsr.M_pqws(o.s, σ)
	M := o.CS.M(w)
	pt := o.HE.pt
	n0 := (p + pt) * (p - α[0])
	n1 := 2.0*p + pt - α[0]
	I := tsr.Im
	for i := 0; i < 3; i++ {
		Nb[i] = 3.0*o.s[i] - M*M*n1*I[i]/3.0 + 2.0*M*n0*o.n[i]
		N[i] = Nb[i]
	}
	d0 := 2.0 * M * M / 9.0
	d1 := -2.0 * M * n1 / 3.0
	d2 := 2.0 * n0
	d3 := 2.0 * M * n0
	for i := 0; i < 3; i++ {
		for j := 0; j < 3; j++ {
			Mb[i][j] = 3.0*tsr.Psd[i][j] + d0*I[i]*I[j] + d1*(I[i]*o.n[j]+o.n[i]*I[j]) + d2*o.n[i]*o.n[j] + d3*o.m[i][j]
		}
		a[0][i] = M*M*I[i]/3.0 - 2.0*M*(p+pt)*o.n[i]
		b[0][i] = o.ch * (o.HE.pa + α[0]) * M * (2.0*M*I[i]/3.0 - 2.0*n1*o.n[i])
	}
	trNb := Nb[0] + Nb[1] + Nb[2]
	A[0] = -M * M * (p + pt)
	h[0] = o.ch * (o.HE.pa + α[0]) * trNb
	c[0][0] = o.ch*trNb + o.ch*(o.HE.pa+α[0])*M*M
	return
}
Beispiel #2
0
// L_FlowHard computes model variabes for given principal values
func (o *CamClayMod) L_FlowHard(Nb, h, σ, α []float64) (f float64, err error) {
	p, q, w := tsr.M_pqws(o.s, σ)
	M := o.CS.M(w)
	pt := o.HE.pt
	n0 := (p + pt) * (p - α[0])
	n1 := 2.0*p + pt - α[0]
	I := tsr.Im
	for i := 0; i < 3; i++ {
		Nb[i] = 3.0*o.s[i] - M*M*n1*I[i]/3.0 + 2.0*M*n0*o.n[i]
	}
	trNb := Nb[0] + Nb[1] + Nb[2]
	h[0] = o.ch * (o.HE.pa + α[0]) * trNb
	f = q*q + M*M*n0
	return
}