Giter Club home page Giter Club logo

weldform's Introduction

WeldForm

WeldForm SPH is a CPU based Smooth Particle Hydrodynamics solver applied to high deformation model metal forming and processes.

Tutorials: https://www.youtube.com/@WeldForm.Dynamics

Windows Binaries: https://sourceforge.net/projects/weldform/files/ GPU Version is under development here

Has been adapted to work on both Linux and Windows system (both on MinGW and MSVC compilers).

alt text

alt text

alt text

Is hevaily based on:

  1. PersianSPH - Maziar Gholami Korzani and Sergio Galindo Torres
  2. Kirk Fraser Thesis and works on SPH model of FSW

Features

Has been exclusively adapted to solid mechaincs, and it includes:

  • Mechanic Solver
  • Thermal Solver
  • Coupled ThermoMechanical Solver (in progress)
  • Contact formulation (in progress)
  • Adaptive search only in case of plastic strain threshold (in progress)
  • Parallel Reduction Sums by standard thread locking or with Nishimura table.

Building Instructions

We're going to need 4 libraries: 1 - BLITZ++ --- VERSION 0.9!!! (NOT Current/Last version) https://github.com/luchete80/blitz-0.9-cmake.git 2 - HDF5 3 - GSL https://github.com/ampl/gsl/tags 4 - LAPACK (Not necesary by now)

For each library compile and install in PKG dir, with -DCMAKE_INSTALL_PREFIX=$PKG/libxxx

GCC Config (Working on Linux and MinGW):

  • 1 - Download precompiled libraries here:

  • 2 - Write or use an existing example

  • 3 - Set environmental vars:

    set SPH=D:/Luciano/Numerico/WeldForm

    set PKG=D:/Luciano/Numerico/Libs

  • 4 - Create an empty dir and execute cmake (WeldFormDir)

VISUAL STUDIO CONFIG

CompactNSearch and CuNSearch must be separated (either they are in conflict)

  1. For blitz se debe copiar el archivo que hay en Blitz-VS.NET.zip al binario path%binario\blitz\ms
  2. GSL: Obtained from here:
  3. The files for visual studio are located in :

References

  • [PersianSPH] (https://github.com/mghkorzani/persiansph)
  • Kirk Fraser, ROBUST AND EFFICIENT MESHFREE SOLID THERMO-MECHANICS SIMULATION OF FRICTION STIR WELDING
  • Daisuke Nishiura , Hide Sakaguchi. Parallel-vector algorithms for particle simulations on shared-memory multiprocessors. Journal of Computational Physics 230 (2011) 1923–1938

weldform's People

Contributors

luchete80 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

weldform's Issues

Replace GSL with Eigen??

The only place in where GSL is used is in External/matvec.h


/** Eigenvalues of symmetric matrix. NOTE: This function changes the matrix M. */
inline void Eig (Mat_t & M, Vec_t & L, Mat_t * Q=NULL, bool Qtrans=false)
{
    // calculate
    size_t nrow = num_rows (M);
    size_t ncol = num_cols (M);
    if (nrow!=ncol) throw new Fatal("Eig: Matrix (%zdx%zd) must be square", nrow,ncol);

    // eigenvalues
    L.change_dim (nrow);
    gsl_vector eval = {nrow, 1, L.data, NULL, 0}; // size, stride, data, block, owner

    // solve
    gsl_matrix_view m = gsl_matrix_view_array (M.data, nrow, nrow);
    if (Q==NULL)
    {
        gsl_eigen_symm_workspace * w = gsl_eigen_symm_alloc (nrow);
        gsl_eigen_symm (&m.matrix, &eval, w);
        gsl_eigen_symm_free (w);
    }
    else
    {
        Q->change_dim (nrow, nrow);
        gsl_eigen_symmv_workspace * w = gsl_eigen_symmv_alloc (nrow);
        if (Qtrans)
        {
            gsl_matrix_view q = gsl_matrix_view_array (Q->data, nrow, nrow);
            gsl_eigen_symmv (&m.matrix, &eval, &q.matrix, w);
        }
        else
        {
            gsl_matrix * q = gsl_matrix_alloc (nrow, nrow);
            gsl_eigen_symmv (&m.matrix, &eval, q, w);
            for (size_t j=0; j<ncol; ++j)
            {
                gsl_vector_view evec_j = gsl_matrix_column (q, j);
                for (size_t i=0; i<nrow; ++i) (*Q)(i,j) = gsl_vector_get (&evec_j.vector, i);
            }
            gsl_matrix_free (q);
        }
        gsl_eigen_symmv_free (w);
    }
}

VERIFICATION CASE - HEAT TRANSFER IN A SOLID BLOCK

VERIFICATION CASE - HEAT TRANSFER IN A SOLID BLOCK
In order to verify the heat conduction with convection boundary conditions, a simulation model is built in
LS-DYNA® with Finite elements and in SPHriction-3D with SPH elements. The block is initially at 20°C,
and the left end is heated with a convection boundary condition. The same parameters are used in both
models. The coefficient of convection is set to 100.0 W/m2K and the external temperature is set at 500°C.
The specific heat capacity and thermal conductivity of the solid are set to 1.0 J/kgK and 3000.0 W/mK.
The simulation runs for 10.0 seconds. A graphical comparison of the results is provided in Figure 9-1.
We can see that the temperature contours and the relative magnitude of the temperature is essentially
the same in LS-DYNA® and SPHriction-3D.
Let’s take a closer look at how the temperature varies at three discrete points in the solid throughout the
simulation. We will investigate at x = 0, x = 1/2L and x = L. The results are shown in Figure 9-2, we can
see that the values obtained from SPHriction-3D agree excellently with the values obtained from LSDYNA®

image

VERIFICATION CASE - ELASTIC-PLASTIC TENSILE TEST

VERIFICATION CASE - ELASTIC-PLASTIC TENSILE TEST
A tensile test of a cylindrical specimen will be used to evaluate the elastic-plastic algorithms in the SPH
code. A baseline case is setup and run in LS-DYNA® using finite elements, the geometry and properties
of the steel cylinder are shown in Figure 9-9.

image

HDF5 write error (POSIBLY NEW VARIABLES INVOLVED!)

HDF5-DIAG: Error detected in HDF5 (1.12.0) thread 0:
#000: D:\Luciano\Numerico\Libs\hdf5-1.12.0\src\H5Dio.c line 314 in H5Dwrite(): can't write data
major: Dataset
minor: Write failed
#1: D:\Luciano\Numerico\Libs\hdf5-1.12.0\src\H5VLcallback.c line 2186 in H5VL_dataset_write(): dataset write failed
major: Virtual Object Layer
minor: Write failed
#2: D:\Luciano\Numerico\Libs\hdf5-1.12.0\src\H5VLcallback.c line 2152 in H5VL__dataset_write(): dataset write failed
major: Virtual Object Layer
minor: Write failed
#3: D:\Luciano\Numerico\Libs\hdf5-1.12.0\src\H5VLnative_dataset.c line 207 in H5VL__native_dataset_write(): can't write data
major: Dataset
minor: Write failed
#4: D:\Luciano\Numerico\Libs\hdf5-1.12.0\src\H5Dio.c line 781 in H5D__write(): can't write data
major: Dataset
minor: Write failed

CellNo division by zero in AddBoxLength

<0.0, 0.0, 0.0>
1
Hello
<0.0, 0.0, 0.0>
Hola

--------------Generating particles by AddBoxLength with defined length of particles-----------
Particle Number
5280

--------------Solving---------------------------------------------------------------
<0.0, 0.0, 0.0>
self.CellNo[0] 0
Traceback (most recent call last):
File "plate-yield.py", line 70, in
dom.Solve(1000.0,timestep,0.001,"test06",999)
File "D:\Luciano\Numerico\WeldForm\python\Domain.py", line 536, in Solve
self.CellInitiate()
File "D:\Luciano\Numerico\WeldForm\python\Domain.py", line 413, in CellInitiate
CellSize = Vec3_t ((self.TRPR(0)-self.BLPF(0))/self.CellNo[0],(self.TRPR(1)-self.BLPF(1))/self.CellNo[1],0.0)
ZeroDivisionError: float division by zero

Thermal Solver: values out of range

--------------Solving---------------------------------------------------------------
Max allowable time step using CFL = 0.000285044 S
User Time Step = 0.000228035 S

Initial Condition has been generated

�[1;31mFatal: Array::operator[] (write) Subscript==45035952 (size==6859) is out of range.�[0m

max dTdt not change besides expression

Max dTdt: 720
Max dTdt: 720
Max dTdt: 720
Max dTdt: 720
Max dTdt: 720
Max dTdt: 720
Max dTdt: 720
Max dTdt: 720
Max dTdt: 720
Max dTdt: 720
Max dTdt: 720
Max dTdt: 720
Max dTdt: 720
Max dTdt: 720
Max dTdt: 720
Max dTdt: 720
Max dTdt: 720
Max dTdt: 720
Max dTdt: 720
Max dTdt: 720
Max dTdt: 720
Max dTdt: 720
Max dTdt: 720
Max dTdt: 720
Max dTdt: 720

in Thermal.cpp has been change d this:

		double m = mj/dj * 4. * ( P1->k_T * P2->k_T) / (P1->k_T + P2->k_T) * ( P1->T - P2->T) * dot( xij , GK*xij )/ (norm(xij)*norm(xij));

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.