Ejemplo n.º 1
0
    bree = axisym.BreeProblem([Ri, Ro], [mat], [n],
                              lambda r, t: 0.0,
                              p_int,
                              p_ext=p_ext)

    bree.step(1.0)

    print("Bree problem:")
    print("'Hoop' stress")
    print("\tModel\t\t%f" % bree.stresses[-1][0])
    print("\tAnalytic\t%f" % ((pi * Ri - po * Ro) / (Ro - Ri)))
    print("\n")

    axi = axisym.AxisymmetricProblem([Ri, Ro], [mat], [n],
                                     lambda r, t: 0.0,
                                     p_int,
                                     p_ext=p_ext)

    axi.step(1.0)

    s_inner = axi.stresses[-1][0][0]
    s_outer = axi.stresses[-1][-1][0]

    s_theta = lambda r: ((pi * Ri**2.0) / (Ro**2.0 - Ri**2.0) *
                         (1.0 + Ro**2.0 / r**2.0) - (po * Ro**2.0) /
                         (Ro**2.0 - Ri**2.0) * (1.0 + Ri**2.0 / r**2.0))
    s_radial = lambda r: (pi * Ri**2.0 / (Ro**2.0 - Ri**2.0) *
                          (1.0 - Ro**2.0 / r**2.0) - po * Ro**2.0 /
                          (Ro**2.0 - Ri**2.0) * (1.0 - Ri**2.0 / r**2.0))
    s_axial = lambda r: pi * Ri**2.0 / (Ro**2.0 - Ri**2.0) - po * Ro**2.0 / (
        Ro**2.0 - Ri**2.0)
Ejemplo n.º 2
0
                                                  Ri,
                                                  T1,
                                                  T2,
                                                  Tdot_hot,
                                                  thold,
                                                  Tdot_cold=Tdot_cold,
                                                  delay=tramp)

    def pressure(t):
        if t < tramp:
            return p / tramp * t
        else:
            return p

    amodel = axisym.AxisymmetricProblem(
        [Ri, Ri + tclad, Ro], [clad, base],
        [int(tclad / msize), int((t - tclad) / msize)], gradient, pressure)

    ts_period = np.concatenate(
        (np.linspace(0, theat,
                     num=nheat), np.linspace(theat, theat + thold, num=nhold),
         np.linspace(theat + thold, theat + thold + tcool, num=ncool)))

    ts_ramp = np.linspace(0, tramp, nramp)

    times = [ts_ramp]
    for i in range(ncycles):
        times.append(ts_period + times[-1][-1])

    times = np.concatenate(times)
Ejemplo n.º 3
0
  E = 100000.0
  nu = 0.3
  cte = 1.0e-3
  base = gen_material(E, nu, cte)

  Ro = 1750.0
  t = 50.0

  T1 = 0.0
  T2 = 100.0

  time = 100.0

  def temperature(r, t):
    return T1 + (T2-T1)/time * t

  def pressure(t):
    return 0.0
  
  times = np.linspace(0, time, 51)

  amodel = axisym.AxisymmetricProblem([Ro-t,Ro], [base], 
      [25], temperature, pressure, constrained = True)

  for t in times[1:]:
    amodel.step(t)
  
  stresses = np.array(amodel.stresses)
  print(np.mean(stresses[-1,:,0,2]))
  print(-(T2-T1) * E * cte)