找回密码
 注册
查看: 2897|回复: 1

怎么定义这个方程:Uxx-a^2Ut+A*exp(-a*x)=0

[复制链接]
发表于 2011-11-15 22:04:21 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
先在CFD on line上发的帖,直接粘过来了:
hello every one, i need your help now.
i'm tring to solve this PDE:Uxx-a^2Ut+A*exp(-a*x)=0 with openFoam,

after copying the solver "laplacianFoam"to my own directory and changing it to myLaplacianFoam, i add two lines in the "main" function in the myLaplacianFoam.c like this:

     volVectorField centers = T.mesh().C();
     volScalarField x = (centers&vector(1,0,0));

then define the equation :

         -fvm::ddt(sqr(a),T) - fvm::laplacian(T) == -A*exp(-a*x);

the parameters A and a  are defined in creatFiled.H and in transportProperties dictionary file within the case directory.

when i try to use this solver,   the error echoed :

Argument of trancendental function not dimensionless

how could i deal with this  problem?
shoul i make the argument in the exp() function dimensioniess or define the A*exp(-a*x) as a volScalarField "f" in createFiled.H,and give "f" the original and boundary value in the case directory when i need to run the solver?

by the way ,if i want to utilize openFoam to solve some typical PDEs,where can i find the reference source?

thanks for your attention.
 楼主| 发表于 2011-11-16 10:40:41 | 显示全部楼层
不能沉阿。。。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表