fvOptions(rho, Yi)与scalarSemiImplicitSource
-
reactingFoam中加个甲烷的质量源项,如下:
scalarTracer //name { type scalarSemiImplicitSource; active true; selectionMode cellZone; // all, cellSet, points, cellZone cellZone f0; scalarSemiImplicitSourceCoeffs { volumeMode absolute; // absolute <quantity>; specific <quantity>/m^3 injectionRateSuSp { CH4 (14.8e-6 0); //kg/s 1e-6 almost perfect } } }
这样是在f0加了14.8e-6 kg/s的甲烷吗?我试算的一个算例表明似乎是的。
但是组分方程中的变量是质量分数Yi,而不是质量浓度kg/m^3,应该是利用了当地的混合气体的密度。能否从fvOptions(rho, Yi)实现代码的角度解释一下?
另外 any comments are welcome!
-
另外通过fvOptions的方式注入的气体如何指定其温度?
-
这样是在f0加了14.8e-6 kg/s的甲烷吗?我试算的一个算例表明似乎是的。
如果你想每个网格单元附加12.8e-6的甲烷,是的。因为你用的是绝对形式。不过在方程中应该是kg/(m^3 s)。
组分方程中的变量是质量分数Yi,而不是质量浓度kg/s,
参考:
template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator() ( const volScalarField& rho, GeometricField<Type, fvPatchField, volMesh>& field ) { return this->operator()(rho, field, field.name()); } const dimensionSet ds ( rho.dimensions()*field.dimensions()/dimTime*dimVolume ); ··· 在fvOptions中已经把单位转换为kg/s了
-
多谢。有个小问题,我与实验对照过计算结果,absolute应该是加在整个zone上的,不是每个网格单元。
-
@Wayne 在 fvOptions(rho, Yi)与scalarSemiImplicitSource 中说:
absolute应该是加在整个zone上的,不是每个网格单元。
10个网格,
injectionRateSuSp { CH4 (1 0); //kg/s 1e-6 almost perfect }
就是所有10个网格总共是1,而不是每个网格是1,整体是10?
-
参考fvOptions 之 semiImplicitSource
。absolute是加在整个Set上的。如下
// Set volume information V_ = 0.0; forAll(cells_, i) { V_ += mesh_.V()[cells_[i]]; } reduce(V_, sumOp<scalar>()); Info<< indent << "- selected " << returnReduce(cells_.size(), sumOp<label>()) << " cell(s) with volume " << V_ << endl;
另外,
fvOptions(rho, he)
中的rho
可能实际上没有使用,如下:template<class Type> void Foam::fv::SemiImplicitSource<Type>::addSup ( const volScalarField& rho, fvMatrix<Type>& eqn, const label fieldi ) { if (debug) { Info<< "SemiImplicitSource<" << pTraits<Type>::typeName << ">::addSup for source " << name_ << endl; } return this->addSup(eqn, fieldi); //又调用了不带rho的addSup函数 } -
前辈,您好,在这个设置区域的浓度方面这个fvoptions与setfields的用法上,fvoptions能实现随时间的变化,其他还要什么呢。
2016年4月17日 09:04
8/10
2019年11月2日 11:32