| 查看: 645 | 回复: 2 | ||
[求助]
UDF
|
|
请教一下大家,就是想输入一个x轴上的加速度随时间变化的曲线,用书上的程序计算不了,用我的程序能计算但结果不对,请问一下是为啥 /*******************************************************************/ /* UDF for specifying an x-momentum source term in a spatially */ /* dependent porous media */ /*******************************************************************/ #include "udf.h" #define C2 100.0 DEFINE_SOURCE(xmom_source, c, t, dS, eqn) { real x[ND_ND]; real con, source; C_CENTROID(x, c, t); con = C2*0.5*C_R(c, t)*x[1]; source = -con*fabs(C_U(c, t))*C_U(c, t); dS[eqn] = -2.*con*fabs(C_U(c, t)); return source; } 计算时就会出现这种情况 ============================================================================== Node 0: Process 8516: Received signal SIGSEGV. ============================================================================== ============================================================================== Node 1: Process 8972: Received signal SIGSEGV. ============================================================================== ============================================================================== Node 2: Process 8036: Received signal SIGSEGV. ============================================================================== ============================================================================== Node 4: Process 1380: Received signal SIGSEGV. ============================================================================== ============================================================================== Node 5: Process 7764: Received signal SIGSEGV. ============================================================================== ============================================================================== Node 6: Process 9360: Received signal SIGSEGV. ============================================================================== ============================================================================== Node 3: Process 7944: Received signal SIGSEGV. ============================================================================== MPI Application rank 0 exited before MPI_Finalize() with status 2 The fl process could not be started. 这是我自己的代码,能计算但感觉没起到什么效果 /****************************************************************** The acceleration in the x-axis direction changes with time *******************************************************************/ #include "udf.h" #define g 9.8 DEFINE_SOURCE(accelaration_source, c, t, dS, eqn) { real x[ND_ND]; real source; real a = RP_Get_Real ("CURRENT_TIME" ); source = -0.125*CURRENT_TIME*g+0.5*g; source=x[0]; dS[eqn] = 0.0; return source; } |
» 猜你喜欢
什么是人一生最重要的?
已经有6人回复
为什么中国大学工科教授们水了那么多所谓的顶会顶刊,但还是做不出宇树机器人?
已经有11人回复
网上报道青年教师午睡中猝死、熬夜猝死的越来越多,主要哪些原因引起的?
已经有9人回复
【博士招生】太原理工大学2026化工博士
已经有5人回复
280求调剂
已经有3人回复
面上可以超过30页吧?
已经有11人回复
版面费该交吗
已经有15人回复
体制内长辈说体制内绝大部分一辈子在底层,如同你们一样大部分普通教师忙且收入低
已经有18人回复
MoonLee777
新虫 (正式写手)
- 应助: 3 (幼儿园)
- 金币: 2274.6
- 红花: 17
- 帖子: 839
- 在线: 78小时
- 虫号: 5947368
- 注册: 2017-03-12
- 性别: GG
- 专业: 流体力学
2楼2018-04-04 20:53:48
|
Node 0: Process 4632: Received signal SIGSEGV. ================================================== ============================ ================================================== ============================ Node 1: Process 4996: Received signal SIGSEGV. ================================================== ============================ ================================================== ============================ Node 2: Process 1220: Received signal SIGSEGV. ================================================== ============================ ================================================== ============================ Node 3: Process 1340: Received signal SIGSEGV. The f1 process could not be started. 试过单核计算也没有用,请问您还知道其他解决办法吗? |
3楼2019-07-30 10:22:14













回复此楼