Giter VIP home page Giter VIP logo

mpm-ngf's People

Contributors

haeriamin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mpm-ngf's Issues

How to visualize the result?

I run the code successfully, thanks for your opening the code. It generated some .bgeo files in output/mpm/excav/frames/
I can import those files to the geometry view of Houdini, but can not produce some video or figure shown as the demo. Could you give some tutorial about that?
Thanks.

Cannot expand the size of nonlocal model in "excav_bucket.py"

Hi @haeriamin ,
Thanks for publishing this code.
I try to expand the size of nonlocal model named "cube_smooth" in excav_bucket.py.For example,I change "scale" from 1 to 5.
But the Ubuntu terminal will give an error of ''particle out of box or near boundary. Ignored.".
I tried to modify "mpm.cpp" and recompile it, but it has no effect.
Can you tell me how to solve this problem? I look forward to your reply.

equivalent plastic shear strain rate distribution of demo "silo.py"

Hi @haeriamin,
I have some questions about the distribution of plastic strain rate.

I run the demo of "silo.py", and got comparable results as shown in paper (Fig. 18).
But the distribution of the equivalent plastic strain rate seems somewhat problematic. It's more like the distribution of the fluidity, not the equivalent plastic strain rate. Or is there something wrong with me?
Showing my results at 1 sec (frame 120) as follows, the first result shows the fluidity and the second result shows the equivalent plastic strain rate.
26669b5ff0a4c0051c35ee1cbb9f04b
a0c19f6ddfd0c30812328e34388ad22

I am very interested in the distribution of plastic strain rate using the NGF model for granular material, however, the distribution of plastic rate seems so... unreasonable, also in other simulation examples, such as excavation. But the other physical quantities seemed to be fine, such as velocity profiles and interaction forces.
Do you have any opinion or comment on it? Any guide will be greatly appreciated.

Build failed and installation failed

It is very appreciated for your opening the code. I am going to work with the code.

I run the install.sh script, but got the following error message.

make[2]: *** [CMakeFiles/taichi_core.dir/build.make:141: CMakeFiles/taichi_core.dir/include/taichi/dynamics/rigid_body.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/taichi_core.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
Error: Build failed.
Error: installation failed.

I think maybe there are some problems about the taichi legacy, which was written in the install.sh as follows,

wget https://raw.githubusercontent.com/yuanming-hu/taichi/legacy/install.py
python3 install.py

but not very sure.

How can I solve these errors? Could you give me some idea?

Thanks a lot!

Cannot expand the size of nonlocal model in "excav_bucket.py"

Hi @haeriamin ,
Thanks for publishing this code.
I try to expand the size of nonlocal model named "cube_smooth" in excav_bucket.py.For example,I change "scale" from 1 to 5.
But the Ubuntu terminal will give an error of ''particle out of box or near boundary. Ignored.".
I tried to modify "mpm.cpp" and recompile it, but it has no effect.
Can you tell me how to solve this problem? I look forward to your reply.

Compiling errors

Hi @haeriamin, I like your work and thanks making it publicly available.

I was trying to compile Taichi MPM with your modifications, but I'm getting the following error in rigid_body.cpp:

error: called object type 'int' is not a function or function pointer this->inv_inertia = inversed(id(inertia));

and in rigid_body.h:

error: called object type 'int' is not a function or function pointer inversed(id(inertia).template cast<float64>()).template cast<real>();

I was able to install the original Taichi MPM with no problems.

Note: I had to change your install.sh script to get the Taichi legacy branch compiled (yuanming-hu/taichi_mpm#31). Also, I'm currently on Ubuntu 20.04 (I've tried setting up a virtual box with Ubuntu 18 and 16, but I still get some kind of compiler error).

Missing Modified Rigid Body Class from Main Taichi Engine

Hi @haeriamin ,
Thanks for publishing the code.
I try to compile your source code,
but it seems that you not only modify the MPM projects, but also the main Taichi Projects (mainly in rigid body class).
I think it is necessary also to upload the modified class from Taichi, to make the code working for other collaborators.

Here are some missing parts:

/MPM-NGF-master/taichi/projects/mpm/src/transfer.cpp: In function ‘taichi::float32 taichi::extract_float32(const __m128&, int)’: /MPM-NGF-master/taichi/projects/mpm/src/transfer.cpp:40:45: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] return reinterpret_cast<float32 *>(&ret)[0]; ^ /MPM-NGF-master/taichi/projects/mpm/src/transfer.cpp: In lambda function: /MPM-NGF-master/taichi/projects/mpm/src/transfer.cpp:477:20: error: ‘struct taichi::RigidBody<3>’ has no member named ‘rigid_force_tmp’ r->rigid_force_tmp += force_tmp; ^~~~~~~~~~~~~~~ /MPM-NGF-master/taichi/projects/mpm/src/transfer.cpp:478:20: error: ‘struct taichi::RigidBody<3>’ has no member named ‘rigid_torque_tmp’ r->rigid_torque_tmp += cross(delta_x * grid_pos[node_id] - r->position, force_tmp); ^~~~~~~~~~~~~~~~ /MPM-NGF-master/taichi/projects/mpm/src/transfer.cpp: In member function ‘void taichi::MPM<dim>::rasterize_optimized(taichi::real) [with int dim = 3; taichi::real = float]’: /MPM-NGF-master/taichi/projects/mpm/src/transfer.cpp:668:8: error: ‘struct taichi::RigidBody<3>’ has no member named ‘rigid_force’ r->rigid_force = r->rigid_force_tmp; ^~~~~~~~~~~ /MPM-NGF-master/taichi/projects/mpm/src/transfer.cpp:668:25: error: ‘struct taichi::RigidBody<3>’ has no member named ‘rigid_force_tmp’ r->rigid_force = r->rigid_force_tmp; ^~~~~~~~~~~~~~~ /MPM-NGF-master/taichi/projects/mpm/src/transfer.cpp:669:8: error: ‘struct taichi::RigidBody<3>’ has no member named ‘rigid_torque’; did you mean ‘apply_torque’? r->rigid_torque = r->rigid_torque_tmp; ^~~~~~~~~~~~ apply_torque /MPM-NGF-master/taichi/projects/mpm/src/transfer.cpp:669:26: error: ‘struct taichi::RigidBody<3>’ has no member named ‘rigid_torque_tmp’ r->rigid_torque = r->rigid_torque_tmp; ^~~~~~~~~~~~~~~~ /MPM-NGF-master/taichi/projects/mpm/src/transfer.cpp:670:8: error: ‘struct taichi::RigidBody<3>’ has no member named ‘rigid_force_tmp’ r->rigid_force_tmp = Vector(0.0_f); ^~~~~~~~~~~~~~~ /MPM-NGF-master/taichi/projects/mpm/src/transfer.cpp:671:8: error: ‘struct taichi::RigidBody<3>’ has no member named ‘rigid_torque_tmp’ r->rigid_torque_tmp = Vector(0.0_f); ^~~~~~~~~~~~~~~~ /MPM-NGF-master/taichi/projects/mpm/src/mpm_rigid_body.cpp: In instantiation of ‘void taichi::MPM<dim>::advect_rigid_bodies(taichi::real) [with int dim = 2; taichi::real = float]’: /MPM-NGF-master/taichi/projects/mpm/src/mpm_rigid_body.cpp:418:50: required from here /MPM-NGF-master/taichi/projects/mpm/src/mpm_rigid_body.cpp:304:5: error: no matching function for call to ‘taichi::RigidBody<2>::advance(taichi::real&, taichi::real&, int&)’ rigid.advance(this->current_t, dt, free_axis_in_position); // added ^~~~~ In file included from /MPM-NGF-master/taichi/projects/mpm/src/articulation.h:8:0, from /MPM-NGF-master/taichi/projects/mpm/src/mpm.h:28, from /MPM-NGF-master/taichi/projects/mpm/src/mpm_rigid_body.cpp:8: /MPM-NGF-master/taichi/include/taichi/dynamics/rigid_body.h:164:8: note: candidate: void taichi::RigidBody<dim>::advance(taichi::real, taichi::real) [with int dim = 2; taichi::real = float] void advance(real t, real dt) { ^~~~~~~ /MPM-NGF-master/taichi/include/taichi/dynamics/rigid_body.h:164:8: note: candidate expects 2 arguments, 3 provided /MPM-NGF-master/taichi/projects/mpm/src/mpm_rigid_body.cpp: In instantiation of ‘void taichi::MPM<dim>::advect_rigid_bodies(taichi::real) [with int dim = 3; taichi::real = float]’: /MPM-NGF-master/taichi/projects/mpm/src/mpm_rigid_body.cpp:419:50: required from here /MPM-NGF-master/taichi/projects/mpm/src/mpm_rigid_body.cpp:304:5: error: no matching function for call to ‘taichi::RigidBody<3>::advance(taichi::real&, taichi::real&, int&)’ rigid.advance(this->current_t, dt, free_axis_in_position); // added ^~~~~ In file included from /MPM-NGF-master/taichi/projects/mpm/src/articulation.h:8:0, from /MPM-NGF-master/taichi/projects/mpm/src/mpm.h:28, from /MPM-NGF-master/taichi/projects/mpm/src/mpm_rigid_body.cpp:8: /MPM-NGF-master/taichi/include/taichi/dynamics/rigid_body.h:164:8: note: candidate: void taichi::RigidBody<dim>::advance(taichi::real, taichi::real) [with int dim = 3; taichi::real = float] void advance(real t, real dt) { ^~~~~~~ /MPM-NGF-master/taichi/include/taichi/dynamics/rigid_body.h:164:8: note: candidate expects 2 arguments, 3 provided /MPM-NGF-master/taichi/projects/mpm/src/visualize.cpp: In instantiation of ‘taichi::MPM<dim>::write_rigid_body(const taichi::RigidBody<dim>*, const string&) const::<lambda(const auto:55&)> [with auto:55 = taichi::STATIC_IF::identity; int dim = 3]’: /MPM-NGF-master/taichi/include/taichi/common/meta.h:91:6: required from ‘void taichi::STATIC_IF::statement<false>::else_(const F&) [with F = taichi::MPM<dim>::write_rigid_body(const taichi::RigidBody<dim>*, const string&) const [with int dim = 3; std::__cxx11::string = std::__cxx11::basic_string<char>]::<lambda(const auto:55&)>]’ /MPM-NGF-master/taichi/projects/mpm/src/visualize.cpp:136:3: required from ‘void taichi::MPM<dim>::write_rigid_body(const taichi::RigidBody<dim>*, const string&) const [with int dim = 3; std::__cxx11::string = std::__cxx11::basic_string<char>]’ /MPM-NGF-master/taichi/projects/mpm/src/visualize.cpp:251:70: required from here /MPM-NGF-master/taichi/projects/mpm/src/visualize.cpp:190:27: error: ‘const struct taichi::RigidBody<3>’ has no member named ‘rigid_force’ Vector force = rigid->rigid_force; ~~~~~~~^~~~~~~~~~~ /MPM-NGF-master/taichi/projects/mpm/src/visualize.cpp:191:28: error: ‘const struct taichi::RigidBody<3>’ has no member named ‘rigid_torque’; did you mean ‘apply_torque’? Vector torque = rigid->rigid_torque; ~~~~~~~^~~~~~~~~~~~ apply_torque projects/mpm/CMakeFiles/taichi_mpm.dir/build.make:224: recipe for target 'projects/mpm/CMakeFiles/taichi_mpm.dir/src/transfer.cpp.o' failed make[2]: *** [projects/mpm/CMakeFiles/taichi_mpm.dir/src/transfer.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... projects/mpm/CMakeFiles/taichi_mpm.dir/build.make:237: recipe for target 'projects/mpm/CMakeFiles/taichi_mpm.dir/src/visualize.cpp.o' failed make[2]: *** [projects/mpm/CMakeFiles/taichi_mpm.dir/src/visualize.cpp.o] Error 1 In file included from /MPM-NGF-master/taichi/projects/mpm/src/mpm_rigid_body.cpp:8:0: /MPM-NGF-master/taichi/projects/mpm/src/mpm.h:219:8: error: ‘void taichi::MPM<dim>::parallel_for_each_particle(const T&) [with T = taichi::MPM<dim>::advect_rigid_bodies(taichi::real) [with int dim = 2; taichi::real = float]::<lambda(taichi::MPM<2>::Particle&)>; int dim = 2]’, declared using local type ‘const taichi::MPM<dim>::advect_rigid_bodies(taichi::real) [with int dim = 2; taichi::real = float]::<lambda(taichi::MPM<2>::Particle&)>’, is used but never defined [-fpermissive] void parallel_for_each_particle(const T &target) { ^~~~~~~~~~~~~~~~~~~~~~~~~~ /MPM-NGF-master/taichi/projects/mpm/src/mpm.h:219:8: error: ‘void taichi::MPM<dim>::parallel_for_each_particle(const T&) [with T = taichi::MPM<dim>::advect_rigid_bodies(taichi::real) [with int dim = 3; taichi::real = float]::<lambda(taichi::MPM<3>::Particle&)>; int dim = 3]’, declared using local type ‘const taichi::MPM<dim>::advect_rigid_bodies(taichi::real) [with int dim = 3; taichi::real = float]::<lambda(taichi::MPM<3>::Particle&)>’, is used but never defined [-fpermissive] projects/mpm/CMakeFiles/taichi_mpm.dir/build.make:172: recipe for target 'projects/mpm/CMakeFiles/taichi_mpm.dir/src/mpm_rigid_body.cpp.o' failed make[2]: *** [projects/mpm/CMakeFiles/taichi_mpm.dir/src/mpm_rigid_body.cpp.o] Error 1 CMakeFiles/Makefile2:182: recipe for target 'projects/mpm/CMakeFiles/taichi_mpm.dir/all' failed make[1]: *** [projects/mpm/CMakeFiles/taichi_mpm.dir/all] Error 2 Makefile:148: recipe for target 'all' failed make: *** [all] Error 2 Error: Build failed.

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.