tAdded bond breaking - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
 (HTM) git clone git://src.adamsgaard.dk/sphere
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit ecfc70812628f9ac56ab817087ad15778ac88c88
 (DIR) parent 3b2d08a037d933e278e3c0caf736feb8f1e54b9b
 (HTM) Author: Anders Damsgaard <adc@geo.au.dk>
       Date:   Tue, 12 Mar 2013 21:12:46 +0100
       
       Added bond breaking
       
       Diffstat:
         M src/cohesion.cuh                    |      20 ++++++++++++++++++++
         M src/datatypes.h                     |       2 ++
         M src/file_io.cpp                     |       4 ++++
       
       3 files changed, 26 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/src/cohesion.cuh b/src/cohesion.cuh
       t@@ -191,6 +191,26 @@ __global__ void bondsLinear(
            //const Float3 t_i = t_n - t_t; //t_n - t_t;
            //const Float3 t_j = t_n + t_t;
        
       +
       +    //// Bond strength (Potyondy & Cundall 2004)
       +    // Extensions of Euler-Bernoulli beam bending theory
       +    // Max. stresses in bond periphery
       +
       +    // Tensile stress
       +    const Float sigma_max = length(f_n) / A + length(t_t) * R_bar / I;
       +
       +    // Shear stress
       +    const Float tau_max = length(f_t) / A + length(t_n) * R_bar / J;
       +
       +    // Break bond if tensile and shear stresses exceed strengths
       +    if (sigma_max >= devC_params.sigma_b || tau_max >= devC_params.tau_b) {
       +        __syncthreads();
       +        dev_bonds[idx].x = devC_params.nb0;
       +        return;
       +    }
       +
       +
       +
            //// Save values
            __syncthreads();
        
 (DIR) diff --git a/src/datatypes.h b/src/datatypes.h
       t@@ -92,6 +92,8 @@ struct Params {
            Float V_b;                  // Volume of fluid in capillary bond
            Float lambda_bar;     // Radius multiplier to parallel-bond radii
            unsigned int nb0;     // Number of inter-particle bonds at t=0
       +    Float sigma_b;        // Bond tensile strength
       +    Float tau_b;          // Bond shear strength
        };
        
        // Structure containing wall parameters
 (DIR) diff --git a/src/file_io.cpp b/src/file_io.cpp
       t@@ -208,6 +208,8 @@ void DEM::readbin(const char *target)
            // Read bond parameters
            ifs.read(as_bytes(params.lambda_bar), sizeof(params.lambda_bar));
            ifs.read(as_bytes(params.nb0), sizeof(params.nb0));
       +    ifs.read(as_bytes(params.sigma_b), sizeof(params.sigma_b));
       +    ifs.read(as_bytes(params.tau_b), sizeof(params.tau_b));
            k.bonds = new uint2[params.nb0];
            k.bonds_delta = new Float4[np];
            k.bonds_omega = new Float4[np];
       t@@ -365,6 +367,8 @@ void DEM::writebin(const char *target)
                // Write bond parameters
                ofs.write(as_bytes(params.lambda_bar), sizeof(params.lambda_bar));
                ofs.write(as_bytes(params.nb0), sizeof(params.nb0));
       +        ofs.write(as_bytes(params.sigma_b), sizeof(params.sigma_b));
       +        ofs.write(as_bytes(params.tau_b), sizeof(params.tau_b));
                for (i = 0; i<params.nb0; ++i) {
                    ofs.write(as_bytes(k.bonds[i].x), sizeof(unsigned int));
                    ofs.write(as_bytes(k.bonds[i].y), sizeof(unsigned int));