动态接触角的问题
- 
							
							
							
							
							
							
动态接触角的边界条件需要给定一些参数,如下: walls { type dynamicAlphaContactAngle; theta0 45; thetaA 60; thetaR 30; uTheta 0.01; limit gradient; value uniform 0; }这其中thetaA是前进角,thetaR是后退角,theta0是平衡角,这些都知道,但是都要怎么给具体的值呢?他们之前有什么关系呢?还有uTheta查的是velocity scale,具体是什么意思? 
 请告诉我一下这些参数的具体物理意义,以及怎么设定具体的值。
- 
							
							
							
							
@桎梏 没事,我找到了相关的资料了,在研究,有问题再交流。 分享如下: (1) 这里面是Edin Berberovic 编写的code: (2) 这篇文章附件的code,作者对Edin Berberovic 编写的code进行了更新,适用于新版本的openFoam: https://www.sciencedirect.com/science/article/pii/S2352711016300309 code 地址: 
 https://github.com/MahdiNabil/CFD-PC/tree/master/interThermalPhaseFoam/Libraries
- 
							
							
							
							
@桎梏 @东岳 
 https://github.com/MahdiNabil/CFD-PC/tree/master/interThermalPhaseFoam/Libraries 里面的code 是基于OpenFOAM 2.4.0 的,在OpenFOAM v7 or OpenFOAM v1912 编译的时候,首先要删去 Allwmake.sh 里的 libso。然后编译还是会报如下的错误: dynamicKistlerAlphaContactAngle/dynamicKistlerAlphaContactAngleFvPatchScalarField.C: In member function ‘virtual Foam::tmp<Foam::Field<double> > Foam::dynamicKistlerAlphaContactAngleFvPatchScalarField::theta(const fvPatchVectorField&, const fvsPatchVectorField&) const’: dynamicKistlerAlphaContactAngle/dynamicKistlerAlphaContactAngleFvPatchScalarField.C:148:38: error: ‘const class Foam::dynamicKistlerAlphaContactAngleFvPatchScalarField’ has no member named ‘dimensionedInternalField’ 148 | << " of field " << this->dimensionedInternalField().name() | ^~~~~~~~~~~~~~~~~~~~~~~~ dynamicKistlerAlphaContactAngle/dynamicKistlerAlphaContactAngleFvPatchScalarField.C:149:37: error: ‘const class Foam::dynamicKistlerAlphaContactAngleFvPatchScalarField’ has no member named ‘dimensionedInternalField’ 149 | << " in file " << this->dimensionedInternalField().objectPath() | ^~~~~~~~~~~~~~~~~~~~~~~~ dynamicKistlerAlphaContactAngle/dynamicKistlerAlphaContactAngleFvPatchScalarField.C: In member function ‘virtual void Foam::dynamicKistlerAlphaContactAngleFvPatchScalarField::write(Foam::Ostream&) const’: dynamicKistlerAlphaContactAngle/dynamicKistlerAlphaContactAngleFvPatchScalarField.C:242:27: error: no matching function for call to ‘writeEntry(const char [6], Foam::Ostream&)’ 242 | writeEntry("value", os); | ^应该是版本不兼容引起的吧,请问如何修改,以使其和新版本的openFOAM兼容呢? 相同的问题参见: 
 https://bugs.openfoam.org/view.php?id=3098#bugnotes
 和
 https://www.cfd-online.com/Forums/openfoam-programming-development/168136-new-solver-two-phase-flows-phase-change-heat-transfer-2.html
 目前还没人回答。
- 
							
							
							
							
@东岳 
 东岳老师,我把代码中的dimensionedInternalField() 替换成了volScalarField::Internal(),但还是报错 ‘Foam::volScalarField’ “is not a base of Foam::dynamicKistlerAlphaContactAngleFvPatchScalarField’。”代码替换: // << " of field " << this->dimensionedInternalField().name() // << " in file " << this->dimensionedInternalField().objectPath() << " of field " << this->volScalarField::Internal().name() << " in file " << this->volScalarField::Internal().objectPath()编译报错: error: ‘Foam::volScalarField’ {aka ‘Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>’} is not a base of ‘const Foam::dynamicKistlerAlphaContactAngleFvPatchScalarField’ 153 | << " of field " << this->volScalarField::Internal().name() | ^~~~~~~~这个错误是因为基类缺少了啥或者少声明了什么变量么? 
 新手入门,求老师指点一二,十分感谢! 如有需要我可以附上源文件。附详细代码块如下: // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // tmp<scalarField> dynamicKistlerAlphaContactAngleFvPatchScalarField::theta ( const fvPatchVectorField& Up, const fvsPatchVectorField& nHat ) const { //eb - Lookup and return the patchField of dynamic viscosity of mixture // and surface tension if((muName_ != "muEffKistler") || (sigmaName_ != "sigmaKistler")) { FatalErrorIn ( "dynamicKistlerAlphaContactAngleFvPatchScalarField" ) << " muEffKistler or sigma set inconsitently, muEffKistler = " << muName_ << ", sigmaKistler = " << sigmaName_ << '.' << nl << " Set both muEffKistler and sigmaKistler according to the " << "definition of dynamicKistlerAlphaContactAngle" << "\n on patch " << this->patch().name() // << " of field " << this->dimensionedInternalField().name() // << " in file " << this->dimensionedInternalField().objectPath() << " of field " << this->volScalarField::Internal().name() << " in file " << this->volScalarField::Internal().objectPath() << exit(FatalError); }详细报错: dynamicKistlerAlphaContactAngle/dynamicKistlerAlphaContactAngleFvPatchScalarField.C: In member function ‘virtual Foam::tmp<Foam::Field<double> > Foam::dynamicKistlerAlphaContactAngleFvPatchScalarField::theta(const fvPatchVectorField&, const fvsPatchVectorField&) const’: dynamicKistlerAlphaContactAngle/dynamicKistlerAlphaContactAngleFvPatchScalarField.C:153:54: error: ‘Foam::volScalarField’ {aka ‘Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>’} is not a base of ‘const Foam::dynamicKistlerAlphaContactAngleFvPatchScalarField’ 153 | << " of field " << this->volScalarField::Internal().name() | ^~~~~~~~ dynamicKistlerAlphaContactAngle/dynamicKistlerAlphaContactAngleFvPatchScalarField.C:154:53: error: ‘Foam::volScalarField’ {aka ‘Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>’} is not a base of ‘const Foam::dynamicKistlerAlphaContactAngleFvPatchScalarField’ 154 | << " in file " << this->volScalarField::Internal().objectPath() | ^~~~~~~~ dynamicKistlerAlphaContactAngle/dynamicKistlerAlphaContactAngleFvPatchScalarField.C: In member function ‘virtual void Foam::dynamicKistlerAlphaContactAngleFvPatchScalarField::write(Foam::Ostream&) const’: dynamicKistlerAlphaContactAngle/dynamicKistlerAlphaContactAngleFvPatchScalarField.C:249:27: error: no matching function for call to ‘writeEntry(const char [6], Foam::Ostream&)’ 249 | writeEntry("value", os);
- 
							
							
							
							
FatalErrorIn ( "dynamicKistlerAlphaContactAngleFvPatchScalarField" ) << " muEffKistler or sigma set inconsitently, muEffKistler = " << muName_ << ", sigmaKistler = " << sigmaName_ << '.' << nl << " Set both muEffKistler and sigmaKistler according to the " << "definition of dynamicKistlerAlphaContactAngle" << "\n on patch " << this->patch().name() // << " of field " << this->dimensionedInternalField().name() // << " in file " << this->dimensionedInternalField().objectPath() << " of field " << this->volScalarField::Internal().name() << " in file " << this->volScalarField::Internal().objectPath() << exit(FatalError);直接删掉 
- 
							
							
							
							
							
							
@Peng 你好啊,我也在用kistler动态接触角模型,参考的Edin的代码以及MahdiNabil的代码,我的求解器以及lib都编译通过了,但是在运算case的时候报错了,我想请问你遇到这个问题了吗?我用的版本是of4x *] --> FOAM FATAL ERROR: request for volScalarField muEffKistler from objectRegistry region0 failed available objects of type volScalarField are * ( * interfaceProperties:K * alpha.water * p_rgh * nu * nu1 * nu2 * alpha.air )
- 
							
							
							
							
@xinxinzhou1995 我没有用这个版本额,我用的高版本的还是有问题,你的问题解决了吗? 
 
			



