循环热传递【翻译】

翻译自:CFD-online

帖子地址:http://www.cfd-online.com/Forums/openfoam-/108735-cyclic-heat-transfer.html

dvcauwe

亲爱的Foamer们:

我现在正在忙于估算不同管道几何的传热特性和压降、我想通过对一个短管的模拟来做这件事情并且应用循环流动边界获得充分发展的流场。

为了这个目的,我使用求解温度方程的一个改进channelFoam求解器。然而,我不知道如何让温度循环。迄今为止,我使用在壁面施加常热量的fixedGradient边界,同时缩放各处的温度为了让质量加权平均温度等于入口的温度。这样的方法获取充分发展的质量特性是否正确?

在文献当中,我看见前人使用无量纲温度和能量源项但是我将其应用到求解器上毫无线索...显然地,这个问题的基础文献是由Patankar1977)撰写的。"在管内充分发展的流场和传热在通过截面时呈现出循环周期性变化。"但是我现在暂时无法解决这个。

我知道这个问题以前被讨论过但是未被完全解决因此我非常感谢你能够提供任何线索。

祝好

David

dvcauwe

我注意到Fluent通过用(Twall-Tbulk,out)/(Twall-Tbulk,in)测量"出口"温度特性的方式处理这个问题。这个量对于恒温壁面估算对流换热系数非常有用。附件是我打算完成的一个柱子的模拟。

我现在的问题是如何将其运用到OpenFOAM当中?我已经尝试使用groovyBC将出口的温度值赋给入口但是我认为更进一步的迭代温度方程让这个一团糟。

0/T文件下的边界条件如下:

boundaryField

{

wall

{

type fixedValue;

value    uniform 350;

}

periodic_half0

{

type groovyBC;

patchType    cyclic;

valueExpression "350-(350-TCyc)*0.995"; //0.5% increase of temperature predicted

variables "TCyc{periodic_half1}=T;";

}

periodic_half1

{

type cyclic;

}

}

谁能给我一些线索我哪里做错了或者是否存在更简单的方法将一个边界赋给另一个边界?jumpCyclic是很有意思的但是迄今为止,我还没有发现一个算例演示它怎么运行...

祝好

David

附件:

mra-cfd

David你好

你是否解决了使用fixedGradient边界在壁面施加循环温度的问题?是否有办法像FLUENT一样设置"上游来流整体温度"?

感谢

Mohammadreza

dvcauwe

Quote:

Originally Posted by mra-cfd 

Hi David,

Have you solved the problem of cyclic temperature with fixedGradient at walls? Is there a way to set the "upstream bulk temperature" like FLUENT?

Thanks,
Mohammadreza

在这个帖子中解释了一点细节。(帖子链接:http://www.cfd-online.com/Forums/openfoam/88165-streamwise-periodic-heat-trasnfer.html)基本上是通过添加额外的源项到你的方程中去抵偿平常的热量的损失/增加,从而实现温度场的周期。

在定截面的算例中这个方法很容易实现,否者你需要先计算λ(导热系数),确保通过Patankar文章中提出方法的检查。

祝好

David

hrvig

Quote:

Originally Posted by dvcauwe 

In this thread it's explained in a bit more detail. Basically you add an additional source term to your equations to compensate for the heat loss/gain that would normally occur in order to make your temperature field periodic.

In the case of a constant cross-section this is very easily implemented, otherwise you need to solve for lambda first. Make sure to check out the paper by Patankar about this.

Best regards,
David

大家好

你是否达成了Patankar提出的增加源项或者整体温度与来流温度相匹配?

如果你成功了,我很想进一步了解。

祝好

Jakob

dvcauwe

你好,Jakob

事实上,我从来没有正确解决过λ的问题,但是我大多数的算例是旋转且常截面因此我可以使用一个固定的热流通量边界。对于充分发展的流场来说,意味着你可以为了热流通量计算线性温度梯度γ并且将真实的温度场分为线性梯度和周期场两部分:T = Tper + gamma*x。将这个表达式带入温度方程可以得到一个满足右手法则的能量汇表达式-Ux*gamma。在OpenFOAM想要表达包含传热在内的周期计算就强制你无论如何都要编写自己的求解器。

这个解决方案比你导出寻找边界条件简单多了。

祝好

David

hrvig

Quote:

Originally Posted by dvcauwe 

Hello Jakob,

In fact I never really managed to get the solving for lambda right, but most of my cases have a rotating but constant cross-section so I could just use a fixed heat flux BC. For a fully developed flow that means that you can calculate the linear temperature gradient gamma [K/m] for that heat flux and split the real temperature field into this linear gradient and a periodic field: T = Tper + gamma*x. Substituting this term into the temperature equation gives you an energy sink term -Ux*gamma on the right hand side. As in OpenFOAM performing periodic calculations including heat transfer will force you to write your own solver anyway, this solution is much easier than fiddling around with boundary conditions 

Best regards,
David

非常感谢你有用的反馈信息。

你是否在入口和出口使用了这样的循环边界,像在旧版本OpenFOAM中的channelFoam求解器?

到目前为止,我都使用的将温度看作一个负标量的pimpleFoam求解器。我的几何是一个简单的具有常直径的弯管。

祝好

Jakob

hrvig

我又来了

现在我实现了你建议的源项表达式。我开始认为此法可行并且我得到了循环温度的特征。

唯一的问题是我损失能量。我应该如何设置边界?

这是我求解器温度部分的概况:

Quote:

fvScalarMatrix TEqn
(
fvm::ddt(T)
+ fvm::div(phi, T)
+ U.component(vector::X)*gamma
- fvm::laplacian(DT, T)
);

TEqn.solve();

我在入口和出口使用循环边界并且通过fvOptions保证质量守恒。

祝好

Jakob

hrvig

好的,标记一下

上面的方程是正确的

当我们求解循环部分的时候,导入边界的值不是问题。后来线性温度梯度能被添加从而获得了正确场。

当物性参数和热力参数被假设为与温度无关的时候,我们不再关心绝对温度。

如果谁遇见常热流量的相同问题,请告诉我,我很乐意帮助。

dvcauwe

Quote:

Originally Posted by hrvig 

Okay, nailed it..

The above equation is correct.
The values imposed at the boundaries do not matter as we are only solving for the periodic part. Afterwards the linear temperature gradient can be added and the correct field obtained. As the transport and thermodynamic properties are assumed to be independent of temperature, we are not interested in absolute temperatures.

If anyone faces the same problem for constant heat flux, please let me know and I will be more than happy to help out :-)

正是,一旦你得到了你的周期温度场,剩下的唯一问题就是无量纲温度T+ = (Twall-T)/Ttau

至于你的前一个问题,是的,是很正常的,当你想收集统计数据时,离散误差可能会干扰你。由于离散误差等原因整体温度可以稍微模拟。你也可以避免这个问题通过显式强制整体温度等于确定的值或者(我认为更好)像你处理你的动量源项一样动态调整gamma(γ)。

David_010

你好,Jakob

我想要对管道做相似的事情,在管壁上周期性的插入元素和常热流量。你是否有办法解决它?

我曾经想要像你一样添加源项到温度方程里面,对应的温度梯度在一段时期内沿管轴线呈周期。然后迭代直到gradientT*cp*massFlow的值与壁面产生的热流量相等。在channelFoam求解器中对压力梯度和速度采用了类似的方式。不确定这个方法是否好。

祝好

David

hrvig

我将对进口和出口创建一个高质量的网格以精确匹配。我最终采用blockMesh代替snappyMesh尽管它在创建网格的时候常常花费更多一点时间。

正如dvcauwe建议的那样,你将会使用整体平均为来保证整个模拟,因此我建议你显式地指定整体温度为某值或在模拟中调整gamma值。

祝好

Jakob

hcl734

你能上传你的求解器吗?

我正在尝试修改buoyantBoussinesqSimpleFoam求解器

我尝试在求解器中如下定义gamma标量:

Code:

{

alphat = turbulence->nut()/Prt;

alphat.correctBoundaryConditions();

 

volScalarField alphaEff("alphaEff", turbulence->nu()/Pr + alphat);

 

fvScalarMatrix TEqn

(

fvm::ddt(T)

+ fvm::div(phi, T)

+ U.component(vector::X)*0.0078

- fvm::laplacian(alphaEff, T)

==

fvOptions(T)

);

 

TEqn.relax();

 

 

fvOptions.constrain(TEqn);

 

TEqn.solve();

 

fvOptions.correct(T);

 

rhok = 1.0 - beta*(T - TRef);

}

它能通过编译但是当我尝试运行求解器时,会出现一个量纲警告

只使用gamma不能编译,我猜我一定在其他什么地方定义了gamma但是我不知道在哪里,因为我对OF编程非常菜。

hcl734

好的,我自己解决了

只需要在readtransportProperties.h头文件中增加一个gamma的接口

posted @ 2016-07-14 21:40  硫酸亚铜  阅读(666)  评论(0编辑  收藏  举报