小白求助——floatingobject算例浮块突然失去浮体性质
-
@李东岳 感谢李老师回复,我零文件下的pointdisplacement代码如下,水中物体的边界类型我一开始设置为calculated,就出现了上面的报错提示,报错后我设置为了固定数值fixedvalue,就可以运行了,但与此带来的就是水中物体失去浮体性质。
dimensions [0 1 0 0 0 0 0]; internalField uniform (0 0 0); boundaryField { stationaryWalls { type fixedValue; value uniform (0 0 0); } atmosphere { type fixedValue; value uniform (0 0 0); } floatingObject { type calculated; value uniform (0 0 0); } Object { type oscillatingDisplacement; omega 6.28; amplitude (0 0 0.5); value uniform (0 0 0); } }
-
myLinearSpring.C 无法编译。
想把它整的能编译就比较麻烦了, 这不是 C++ 而是 makefile 的知识。本来就一个 makefile 的话也不算特别麻烦。 OpenFOAM 自己封装了个 wmake,把 makefile 分放到 Make 文件夹里的 file 和 option 了。
依赖的源文件和库都在那里写着。myLinearSpring.C.dep 就是编译源文件依赖的文件。要么是 myLinearSpring.C 的位置不对,要么是编译路径没配置对。
参考这个,不过这个是 makefile 不是 wmake