Exemple #1
0
        init.visualize('energy', savefig=True, outformat='png')

    if (rendering == True):
        # Render images with raytracer
        init.render(method='angvel', max_val=0.3, verbose=False)

### CONSOLIDATION ###

for devs in devslist:
    # New class
    cons = sphere.sim(np=init.np,
                      nw=1,
                      sid=sim_id + '-cons-devs{}'.format(devs))

    # Read last output file of initialization step
    lastf = sphere.status(sim_id + '-init')
    cons.readbin('../output/' + sim_id +
                 '-init.output{:0=5}.bin'.format(lastf),
                 verbose=False)

    # Setup consolidation experiment
    cons.consolidate(normal_stress=devs, periodic=init.periodic)

    # Set duration of simulation
    cons.initTemporal(total=1.5)

    if (consolidation == True):

        # Run sphere
        cons.run(dry=True)  # show values, don't run
        cons.run()  # run

# For each normal stress, consolidate and subsequently shear the material
for devs in devslist:

    ### CONSOLIDATION ###

    # New class
    cons = sphere.sim(
        np=init.np,
        nw=1,
        sid=sim_id +
        "-cons-devs{}".format(devs))

    # Read last output file of initialization step
    lastf = sphere.status(sim_id + "-init")
    cons.readbin(
        "../output/" +
        sim_id +
        "-init.output{:0=5}.bin".format(lastf),
        verbose=False)

    # Periodic x and y boundaries
    cons.periodicBoundariesXY()

    # Setup consolidation experiment
    cons.consolidate(normal_stress=devs)

    # Set duration of simulation
    cons.initTemporal(total=3.0, epsilon=0.07)
Exemple #3
0
    if (rendering == True):
        # Render images with raytracer
        init.render(method = "angvel", max_val = 0.3, verbose = False)


# For each normal stress, consolidate and subsequently shear the material
for N in Nlist:

    ### CONSOLIDATION ###

    # New class
    cons = sphere.sim(np = init.np, nw = 1, sid = sim_id +
                      "-cons-N{}".format(N))

    # Read last output file of initialization step
    lastf = sphere.status(sim_id + "-init")
    cons.readbin("../output/" + sim_id + "-init.output{:0=5}.bin".format(lastf), verbose=False)
    cons.setDampingNormal(0.0)

    # Periodic x and y boundaries
    cons.periodicBoundariesXY()

    # Setup consolidation experiment
    cons.consolidate(normal_stress = N)
    cons.adaptiveGrid()
    cons.checkerboardColors(nx=cons.num[0]/2, ny=cons.num[1]/2, nz=cons.num[2]/2)

    # Set duration of simulation
    cons.initTemporal(total = 4.0)

    if (consolidation == True):
Exemple #4
0
        init.visualize('energy', savefig=True, outformat='png')

    if (rendering == True):
        # Render images with raytracer
        init.render(method = 'angvel', max_val = 0.3, verbose = False)


### CONSOLIDATION ###

for devs in devslist:
    # New class
    cons = sphere.sim(np = init.np, nw = 1, sid = sim_id
            + '-cons-devs{}'.format(devs))

    # Read last output file of initialization step
    lastf = sphere.status(sim_id + '-init')
    cons.readbin('../output/' + sim_id
            + '-init.output{:0=5}.bin'.format(lastf), verbose=False)

    # Setup consolidation experiment
    cons.consolidate(deviatoric_stress = devs, periodic = init.periodic)

    # Set duration of simulation
    cons.initTemporal(total = 1.5)

    if (consolidation == True):

        # Run sphere
        cons.run(dry=True) # show values, don't run
        cons.run() # run
Exemple #5
0
if (plots == True):
    # Make a graph of energies
    init.visualize('energy')

init.writeVTKall()

if (rendering == True):
    # Render images with raytracer
    init.render(method = "angvel", max_val = 0.3, verbose = False)


# For each normal stress, consolidate and subsequently shear the material
wvel = 20.0
cons = sphere.sim(np = init.np, nw = 1, sid = sim_id + "main")
lastf = sphere.status(sim_id + "-init")
cons.readbin("../output/" + sim_id + "-init.output{:0=5}.bin".format(lastf), verbose=False)
cons.periodicBoundariesXY()
for _t in range(1000):
    # New class
    wvel = wvel * -1.0
    cons.w_vel = numpy.array([wvel])

    cons.initTemporal(total = 0.1)

    cons.run(dry = True) # show values, don't run
    cons.run() # run

    if (plots == True):
        # Make a graph of energies
        cons.visualize('energy')
Exemple #6
0
    if (rendering):
        # Render images with raytracer
        init.render(method="angvel", max_val=0.3, verbose=False)

# For each normal stress, consolidate and subsequently shear the material
for devs in devslist:

    ### CONSOLIDATION ###

    # New class
    cons = sphere.sim(np=init.np,
                      nw=1,
                      sid=sim_id + "-cons-devs{}".format(devs))

    # Read last output file of initialization step
    lastf = sphere.status(sim_id + "-init")
    cons.readbin("../output/" + sim_id +
                 "-init.output{:0=5}.bin".format(lastf),
                 verbose=False)

    # Periodic x and y boundaries
    cons.periodicBoundariesXY()

    # Setup consolidation experiment
    cons.consolidate(normal_stress=devs)

    # Set duration of simulation
    cons.initTemporal(total=3.0, epsilon=0.07)
    """
    cons.w_m[0] *= 0.001
    cons.mu_s[0] = 0.0
        init.visualize('energy')

    init.writeVTKall()


# CONSOLIDATION #

# New class
cons = sphere.sim(
    np=init.np,
    nw=1,
    sid=sim_id +
    "-cons-N={}".format(N))

# Read last output file of initialization step
lastf = sphere.status(sim_id + "-init")
cons.readbin(
    "../output/" +
    sim_id +
    "-init.output{:0=5}.bin".format(lastf),
    verbose=False)

cons.periodicBoundariesX()

# Setup consolidation experiment
cons.consolidate(normal_stress=N)
cons.w_m[0] = cons.totalMass()

# Disable all viscosities
cons.gamma_n[0] = 0.0
cons.gamma_t[0] = 0.0