找回密码
 注册
Simdroid-非首页
查看: 2651|回复: 36

怎么计算温度场和浓度场的耦合.请教临江仙.

[复制链接]
zhm041105 该用户已被删除
发表于 2005-9-30 15:49:10 | 显示全部楼层 |阅读模式 来自 大连理工大学
提示: 作者被禁止或删除 内容自动屏蔽
zhm041105 该用户已被删除
 楼主| 发表于 2005-9-30 17:34:37 | 显示全部楼层 来自 大连理工大学
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2005-9-30 21:56:27 | 显示全部楼层 来自 华南理工大学

Re:怎么计算温度场和浓度场的耦合.请教临江仙.

这个方程组应该不难实现。
由于第一个方程相对于第二个方程是独立的,因此可以独立求解。可以温度场模块中建立一个温度物理场求解变量T。
第二个方程主要求解浓度C,其中T为耦合变量。还好因为T不依赖于C,所以可以将▽(S▽T)作为源项处理。可以建立一个浓度扩散场,将▽(S▽T)一项适当处理后填入R一栏上。
因为S是常数,所以▽(S▽T)=S▽[sup]2[/sup]T,所以可以在温度场中设置一个Txx(即▽[sup]2[/sup]T)的耦合变量,然后在浓度扩散场的方程设置R一栏上填上S*Txx即可。

评分

1

查看全部评分

发表于 2005-10-1 01:02:02 | 显示全部楼层 来自 美国

Re:怎么计算温度场和浓度场的耦合.请教临江仙.

No, Txx can not be used for solving equations. Txx can only be called in post processing.
Read manual carefully, the flux term and the source term can only contain the dependent variables and their's first order derivatives (not the second order derivatives).
you can sove this problem in general form or just in the application mode, but you need to use the weak term to specify the divergence of T.
Cheers

============
这个方程组应该不难实现。
由于第一个方程相对于第二个方程是独立的,因此可以独立求解。可以温度场模块中建立一个温度物理场求解变量T。
第二个方程主要求解浓度C,其中T为耦合变量。还好因为T不依赖于C,所以可以将▽(S▽T)作为源项处理。可以建立一个浓度扩散场,将▽(S▽T)一项适当处理后填入R一栏上。
因为S是常数,所以▽(S▽T)=S▽2T,所以可以在温度场中设置一个Txx(即▽2T)的耦合变量,然后在浓度扩散场的方程设置R一栏上填上S*Txx即可。

评分

1

查看全部评分

zhm041105 该用户已被删除
 楼主| 发表于 2005-10-1 08:29:37 | 显示全部楼层 来自 大连理工大学
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2005-10-2 01:20:16 | 显示全部楼层 来自 广东广州

Re:怎么计算温度场和浓度场的耦合.请教临江仙.

呵呵,谢谢gatech大侠的意见。
    不过,在热传递模式中,T、Tx、Txx都是形函数变量,其中T是求解变量,而Tx、Txx在femlab内部已预定义好了,求解时也一并求出。许多femlab预定义的变量(包括Txx),不仅可以在后处理中使用,在其他物理场中都可以直接引用,这就是femlab所谓的多物理场耦合。
    至于你提到的第二点,我认为如下。因为扩散方程为:dC/dt+▽(-D▽C)=R,对比zhm041105提出的第二个方程可得R= ▽(S▽T),因此应该为二阶导数而非一阶导数。况且R一项是源项,从物理的量纲分析可以知道,R与▽(-D▽C)一项的量纲是相等的,所以R亦可以含有对坐标的二阶导数。对于这点zhm041105可以自己试作一下,若实在不行的话就将第二个方程改为参数模式,其中源项f=▽(S▽T)就可以了。这个我已经试过了,确实可以。
    当然,还有其他的方法可以解决这个问题,例如可以使用方程组,也可以使用弱解模式,正如gatech所言。
发表于 2005-10-2 04:39:59 | 显示全部楼层 来自 美国

Re:怎么计算温度场和浓度场的耦合.请教临江仙.

In the multiphysics modeling in femlab, what one can call is the dependent variable and its first derivative. e.g. T and Tx, not Txx (although you can use Txx, femlab will not report anything wrong).
Any PDE, which contains the second derivative of the coupling variable, is solvable in femlab, but this does not mean the solution is right. Last year, when i was still a femlab beginner, i also put some second derivative of the unknown in the source term. for some problems, the solutions were totally wrong ( compared with the analytical solutions)
This is why femlab manual only uses dependent variables and their first order derivative in flux term and source term.
The reasion for not using second order derivative can be better understood when you are familiar with the weak solution in femlab.
I am writing these things just to remind those who are doing what i did last year. If you guys carefully read the manual and examples in femlab, you will never see the application of second order derivative in setting up the PDEs.

评分

1

查看全部评分

发表于 2005-10-2 13:36:05 | 显示全部楼层 来自 安徽合肥

Re:怎么计算温度场和浓度场的耦合.请教临江仙.

太精辟啦。
发表于 2005-10-3 10:52:31 | 显示全部楼层 来自 广东广州

Re:怎么计算温度场和浓度场的耦合.请教临江仙.

多谢gatech的宝贵意见,其经验是十分值得借鉴的。
以下提出我的看法:
对于变量的二阶导数不能出现在源项(source term)上这个问题,或许你是正确的,但我持有保留意见。因为至少在某些特殊例子上并非如此,例如zhm041105 提出的这个例子。在这个例子中,虽然是一个耦合场问题,但却只是一个单向的场耦合。即温度场的变化影响浓度场,但浓度场的变化不会影响温度场,这从方程组上可以明显看出。因此,求解第一个方程(即温度场方程)是相对独立的,其求解结果不受第二个方程影响。这样,求解出来的三个变量(T、Tx、Txx),对于第二个方程而言,都只不过是常数(场)。我们完全可以将此常数写入第二个方程的源项中,就这个方面看来,无论写入T或Tx或Txx,其数学意义都是一样的,即第二个方程都可以求解的,只是求解结果不同而已。
发表于 2005-10-3 11:31:36 | 显示全部楼层 来自 美国

Re:怎么计算温度场和浓度场的耦合.请教临江仙.

I totally agree with your opinion that the second PDE is indendent of the first one. If i write codes to compute these two PDEs, my method will be the same as you present here.
But Femlab solves all the equations at the same time (unless you use the solve for function). For this problem, femlab can not know which is indendent of which.
The reasion for not using second derivative in the source term is that femlab internally only applys the "integration by part" on the divergence term, i.e. on the flux, not on the source term. If the second derivative can be used in the source term, there is no need to apply the "integration by part" on the divergence term: consequently, there will be no Finite Element Method.
using the second derivative on the source term will undermine the foundation of FEM, for more informtion, please read guide.pdf (theoretical background-deriving the weak form).
Of course, you can get solution if you use second derivative in the source term, but even if you get the soluion, what you get is not the real solution of finite element method.
----BTW---
the non-FEM solution can also be obtained in most cases when people use user-defined functions in femlab, whichi i will address  if time permits in the near future.
cheers
zhm041105 该用户已被删除
 楼主| 发表于 2005-10-3 15:35:54 | 显示全部楼层 来自 大连理工大学
提示: 作者被禁止或删除 内容自动屏蔽
zhm041105 该用户已被删除
 楼主| 发表于 2005-10-3 21:43:59 | 显示全部楼层 来自 大连理工大学
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2005-10-4 15:59:17 | 显示全部楼层 来自 广东广州

Re:怎么计算温度场和浓度场的耦合.请教临江仙.

多谢gatech的宝贵意见,无论如何它都是非常值得我参考的。
然而我想先生或许将问题过于复杂化了,一个问题,如果能从最简单的方法解决便是好。也许软件未如我们想象的那么糟糕,例如对于这个问题,无论这两个方程是同时求解还是先后求解,第一个方程都应该能够得到正确的解,这是因为第二个方程的解不会对第一个方程产生任何影响。既然如此,那么第二个方程就很可能也得到正确的解,因为第一个方程的解对于它来说只不过是常数而已。当然,这只是我的推测,但实际情况是否如此,还是需要去验证。但无论我们采用的是何种方法,其结果都是必须验证的。既然先生对我的方法提出疑问,而楼主亦多次请求,我就将我的做法贴出来好了。当然我不是说我的做法正确,这只是提供一个参考,若有错误之处还请指正。
最后我想,先生应该是精通femalb的用法,因此能提出一些深思熟虑的想法,这当然是好事,然而对于我等出入门之辈,要实现如此复杂的做法又是谈何容易?但若能使用另一较为简便的做法,而结果亦能满足要求的话,岂不更是一桩好事?
以下是我的求解方法:
既然原方程的各项系数皆为常数,而楼主没有指明各系数的值的话,我就将其都置为1好了,因此原方程组变为(图1):

本帖子中包含更多资源

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

×

评分

1

查看全部评分

发表于 2005-10-4 16:01:50 | 显示全部楼层 来自 广东广州

Re:怎么计算温度场和浓度场的耦合.请教临江仙.

首先求解第一个方程,初步预览其结果如何。从参数模块(PDE coefficient form—time depedent analysis)建立一个物理场(即温度场),其求解变量名改为T。
然后作一条(0,100)的直线,方程和边界的设置取默认。然后网格化(maximum element size scaling factor设为0.1),求解,可得到T的结果。当然我感兴趣的是Txx的结果,我选择t=0.2时刻(以后都选这个时刻),然后将Txx的结果画出如图2:

本帖子中包含更多资源

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

×
发表于 2005-10-4 16:05:02 | 显示全部楼层 来自 广东广州

Re:怎么计算温度场和浓度场的耦合.请教临江仙.

到目前为止我只建立了一个非常简单的方程,而且方程和边界条件的设置都取默认值,因此有理由相信其求解结果(Txx)是正确的。 图2十分重要,因为它是验证下一步结果是否正确的依据。

跟着引入第二个方程,同样从参数模块(PDE coefficient form—time depedent analysis)建立一个物理场(即浓度场),其求解变量名改为C。
对于浓度场,其边界条件都设为Neumann边界,方程的源项改为Txx,其他都取默认。之后就可以求解方程组了。
最后我们验证方程2的结果是否正确,首先验证边界条件,使用Data display可以显示出Cx在两端点的值如下:
Value: -6.717471e-11, Expression: Cx, Position: (0)
Value: 6.704681e-11, Expression: Cx, Position: (100)
可以看出两端点的Cx值都为0,可认为边界条件满足。
然后看变量C的解是否满足方程2,即验证∂C/∂t-∂[sup]2[/sup]C/∂x[sup]2[/sup]是否等于∂[sup]2[/sup]T/∂x[sup]2[/sup],因此作出Ct-Cxx的图形如图3:

本帖子中包含更多资源

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

×
发表于 2005-10-4 16:06:11 | 显示全部楼层 来自 广东广州

Re:怎么计算温度场和浓度场的耦合.请教临江仙.

可以看出图3与图2几乎一样。即说明Ct-Cxx(即∂C/∂t-∂[sup]2[/sup]C/∂x[sup]2[/sup])与Txx(∂[sup]2[/sup]T/∂x[sup]2[/sup])不会有大的差别(在靠近边界处误差会较大一些,减小网格可以减少误差)。
由此看来,求解结果是可以接受的。
发表于 2005-10-4 16:07:45 | 显示全部楼层 来自 广东广州

Re:怎么计算温度场和浓度场的耦合.请教临江仙.

最后附上文件,以供各位指正。

本帖子中包含更多资源

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

×
发表于 2005-10-4 16:12:36 | 显示全部楼层 来自 广东广州

Re:怎么计算温度场和浓度场的耦合.请教临江仙.

若影响不能忽略,首先要在温度场方程中加入浓度场的物理变量,然后在femlab的温度物理场的方程设置相应项中填入便是。
Txx当然也是时间的函数。
zhm041105 wrote:
事实上,我的问题里有浓度场对温度场的影响,其影响很小,就给忽略了.在不能忽略的情况下,怎么办呢?
发表于 2005-10-5 06:25:19 | 显示全部楼层 来自 美国

Re:怎么计算温度场和浓度场的耦合.请教临江仙.

This is my last reply to this post. Let's look at the PDEs you have provided.
For the first PDE, the analytical solution is T=t if zero flux boundaies and zero initial condition are used. So for your problem, we can get Txx=0 (very interesting result).
Now insert Txx into the second PDE, we get C=0 (this is the analytical solution of the second PDE if zero flux and zero initial condition are used).
So we can see you did nothing but just to put Txx=0 into the second PDE. If one solve the first PDE in femlab, Txx will be about 10^(-13), which is too small to be important. Of course, your conclusion is within expectation because Txx is only something like rand noise contribution.
As i said in my previous reply, in SOME cases, using second derivative in the source term will result in tragedy. I am not saying all the cases.
Just feel free to use whatever you like, i have explained clearly why second derivatives can not be used in the source  term and the flux term. If someone likes to use them, dont claim the solutions are finite element solutions.
zhm041105 该用户已被删除
 楼主| 发表于 2005-10-6 11:22:17 | 显示全部楼层 来自 大连理工大学
提示: 作者被禁止或删除 内容自动屏蔽
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-4-28 20:03 , Processed in 0.084355 second(s), 20 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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