CFDEM中添加新的曳力模型

整体的思想与在OpenFOAM中添加新的曳力模型是一致的。

1.在 $CFDEM_SRC_DIR/lagrangian/cfdemParticle/subModels/forceModel/ 路径中创建 myDragForce 文件夹,再在文件夹中创建 myDragForce.C 和 myDragForce.H 两个文件,这两个文件可以直接从其他相似的曳力模型文件中复制过来,再进行相应的修改。

2.对 $CFDEM_SRC_DIR/lagrangian/cfdemParticle/Make/files 文件进行修改,添加 一行$(forceModels)/myDragForce/myDragForce.C 。

3.在 $CFDEM_SRC_DIR/lagrangian/cfdemParticle/ 路径中,执行 wmake ,等待编译完成即可。

参考链接:Possible to re-compile only modified files in CFDEM? | CFDEM®project

POSSIBLE TO RE-COMPILE ONLY MODIFIED FILES IN CFDEM?

 
Submitted by Evan.J on Tue, 03/06/2018 - 19:17

I am modifying some models in CFDEM, and after every change I have to recompile using cfdemCompCFDEMsrc which can take several minutes, and this makes the process of developing a new model very slow.

Is there any way to recompile only the files that have been modified?

I'm a newcomer to this type of programming, so please keep that in mind when answering. Any info or ideas would be helpful!

Thanks,

Evan

medvedeg | Wed, 03/07/2018 - 12:29

HALLO EVAN,

Hallo Evan,
it is of course possible. You must go in src/lagrangian/cfdemParticle folder and type "wmake" in order to compile lagrangian library (all drag force , void fraction models, etc). Only changed files (since last compilation) will be recompiled. The same is possible for each solver separately. For example, if you go in applications/solvers/cfdemSolverPiso and type "wmake", only cfdemSolverPiso will be compiled. Note that you should first compile lagrangian library before solver compilation.

Alexander Podlozhnyuk

 这里Alexander的意思很明显,在src/lagrangian/cfdemParticle路径下键入“wmake”,只有修改过的文件才会被编译,之前已经编译好的并且没有修改过的文件,则不会被编译。

posted @ 2023-05-14 09:36  希望先生  阅读(223)  评论(0编辑  收藏  举报