chrono学习(一)

我想用chrono进行沙土的仿真,首先学习demo_GPU_ballCosim.cpp,这个例子仿真了一些沙土的沉降过程。

首先,运行编辑完成的文件demo_GPU_ballCosim:

bash 复制代码
(base) eowyn@eowyn-MS-7D20:~/build_chrono/bin$ ./demo_GPU_ballCosim 

运行完得到一些数据,存放在DEMO_OUTPUT/GPU/ballCosim/checkpoint.dat中:

bash 复制代码
Reading parameters: ../data/gpu/ballCosim.json
--- Parsing JSON ---
params.sphere_radius 1.000000
params.sphere_density 1.000000
...
params.step_size 0.000050
--------------------
Now run_mode == FRICTIONLESS, this run is particle settling phase.
After it is done, you will have a settled bed of granular material.
A checkpoint file will be generated in the output directory to store this state.
Next, edit the JSON file, change 'run_mode' from 0 (FRICTIONLESS) to 1 (ONE_STEP),
then run this demo again to proceed with the ball drop part of this demo.

622476 particles sampled!
Output frame 1 of 100
Output frame 2 of 100
Output frame 3 of 100
...
Output frame 101 of 100
Writing checkpoint data to file "DEMO_OUTPUT/GPU/ballCosim/checkpoint.dat"

然后,根据运行文件中的提示,将/build_chrono/data/gpu/ballCosim.json文件中的'run_mode'变量从frictionless改成one_step. 然后,重新运行demo_GPU_ballCosim,将会展示沉降后的沙土。

bash 复制代码
(base) eowyn@eowyn-MS-7D20:~/build_chrono/bin$ ./demo_GPU_ballCosim 
Reading parameters: ../data/gpu/ballCosim.json
--- Parsing JSON ---
params.sphere_radius 1.000000
params.sphere_density 1.000000
...
params.step_size 0.000050
--------------------
Reading checkpoint data from file "DEMO_OUTPUT/GPU/ballCosim/checkpoint.dat"...
1 meshes
Version: 3.3.0
NVIDIA Corporation : NVIDIA GeForce RTX 3060/PCIe/SSE2 (3.3.0 NVIDIA 470.199.02)
GLSL: 3.30 NVIDIA via Cg compiler
Initialize Viewer : GL_INVALID_ENUM
Output at    50 FPS
Rendering at 2000 FPS
Output frame 1 of 100
Output frame 2 of 100
...
Output frame 10 of 100
Time: 67.6678 seconds
相关推荐
沫璃染墨15 小时前
《从零入门Linux系统篇(五十一):线程篇·四——pthread线程库详解:从线程创建到终止与分离》
linux·运维·服务器·开发语言·c++·系统架构·线程
shada16 小时前
CMake指定 MSVC 工具集与 Windows SDK
c++·windows
垆边人似月.16 小时前
华为机考题:矩阵中的最长递增路径
c语言·c++
A7bert77716 小时前
【SAM3部署至AGX Orin】环境配置→模型部署→问题记录
c++·人工智能·深度学习·ubuntu
longlongzihan16 小时前
LeetCode 56合并区间:排序与贪心
c++·算法·leetcode
程序员老陆16 小时前
C++ 继承方式:公有、保护、私有,到底在控制什么
开发语言·c++
坤坤子吖16 小时前
C++11——Lambda、function、bind 与可调用对象
c++·笔记·学习
白杨尚青17 小时前
C++入门篇(十一):string(中)——容量与增删改查:一篇吃透所有常用接口(万字详解)
java·开发语言·c++
朔北之忘 Clancy17 小时前
2024 CSP-J 第二轮真题解析
c++·算法·青少年编程·noip·csp·信奥赛·noi
Lazionr17 小时前
set和map的使用——从基础接口到实际应用
c++