COMSOL进行拓扑优化时遇到的问题及解决方案

一、变量未定义:CFLCMP
通过全局搜索我们可以发现,在层流的方程视图中用CFLCMP来定义CFL数。这么看来CFL数是内置变量。
查阅用户手册我们会找到以下描述。
If the automatic expression for CFLloc is set to the built-in variable CFLCMP, then the
automatic setting suggests a PID regulator for the pseudo time step in the default
solver. The PID regulator starts with a small CFL number and increases CFLloc as the
solution comes closer to convergence.

CFLCMP明明是内置变量,只要勾选伪时间步进就会自动添加。
但是我们在优化求解器的分离项中可以查看到伪时间步进已经被激活,赋值处于自动状态。

继续查阅comsol的讨论我们发现已经有人遇到了相似的问题。他给出了一个不怎么靠谱的解决方案:
I found that ‘comp1.spf.locCFL’ is the pseudo time defined in Laminar flow. By default, in laminar flow-advanced setting, the box for ‘use pseudo time stepping for stationary equation form’ is checked, and CFL number expression is given automatically. However, it seems my CFL number wasn’t given automatically. So I just tick off the ‘use pseudo time stepping for stationary equation form’, then, it runs well.

However, I still don’t know why stationary study can run well while optimization can not previously.
删除求解器配置然后重新获取初始值求解,亲测无效。
在评论中有人给出了更高级的方案可惜我看不懂。
Open the .java, for example with eclipse. Search the line in which the study step is defined for the third solver

model.sol(“sol1”).feature(“st3”).set(“studystep”, “stat2”);

change it to

model.sol(“sol1”).feature(“st3”).set(“studystep”, “stat”);

Now the first step get´s simulated several times. Changes in the boundary conditions are not possible, but it fit´s at least for my case. save the .java file, when the automatic builder is activated, a .class file will be generated in the folder “bin”.

Open the .class file with comsol. With no further changes, the simulation starts automatically, so the opening process could last pretty long.

Would be nice to hear from some with more knowledge about comsol than me, why this work-around works, while taking stat2 as study step causes errors. I checked every line of the Java code, both steps were completly identical.

或许我们可以手动设置CFLCMP,在层流高级选项中将伪时间步进下的赋值改为手动但是CFLloc的值保持默认。再次求解时,相同的错误不再出现。
二、广义源项的物理意义
在二维流体传热物理场中添加域热源,其中广义源项的单位是W/m^3。一般用来近似广泛分布的化学反应,流固热耦合的拓扑优化。
Select the General source (default) or Heat rate button to define Qs.
• For General source enter a value or expression for Qs as a heat source per volume.
• For Heat rate define the heat rate Ps. In this case Qs = Ps ⁄ V where V equal to the
volume of the layer selection.

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值