请教在OF8中用multiphaseEulerFoam求解器时,依时边界条件为什么会报错?
-
本算例采用的是气液两相流,想要给空气相加一个速度边界条件,而水相不加这个边界条件,下面给出的这个边界条件是空气相的,是依时的边界条件,按照网站上相似的做法编了以下,但是始终出现如下错误。请各位老师同学有时间帮忙解答一下,非常感谢!
下面是边界条件:afInlet { type codedFixedValue; value $internalField; redirectType ramp; name sinewave; code #{ #include <math.h> scalar t = this->db().time().value(); fvPatchField<vector> u ( patch().lookupPatchField<volVectorField,vector>("U.air") ); u[t] = vector(0,0,2*3.1416*10/1000/0.77*1*sin(2*3.1416*1*t)); (*this) == u; #};
下面是报错的内容:
--> FOAM FATAL ERROR: request for volVectorField U from objectRegistry region0 failed available objects of type volVectorField are 8 ( HbyA.air U.air U.water U.air_0 KdUByA.air U.water_0 KdUByA.water HbyA.water ) From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>] in file /home/dyfluid/OpenFOAM/OpenFOAM-8/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 211. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const in "/home/dyfluid/OpenFOAM/OpenFOAM-8/platforms/linux64GccDPInt32Opt/bin/multiphaseEulerFoam" #3 Foam::totalPressureFvPatchScalarField::updateCoeffs() at ??:? #4 Foam::fvMatrix<double>::fvMatrix(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) in "/home/dyfluid/OpenFOAM/OpenFOAM-8/platforms/linux64GccDPInt32Opt/bin/multiphaseEulerFoam" #5 ? in "/home/dyfluid/OpenFOAM/OpenFOAM-8/platforms/linux64GccDPInt32Opt/bin/multiphaseEulerFoam" #6 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #7 ? in "/home/dyfluid/OpenFOAM/OpenFOAM-8/platforms/linux64GccDPInt32Opt/bin/multiphaseEulerFoam" Aborted (core dumped)