@李东岳 李老师我想请教一个问题,最近在多项欧拉Foam里植入了一个曳力模型,编译成功了但是求解动量方程的时候就会报错,我想请问这个报错的意思是我这pow函数没有用对吗?报错如下
PIMPLE: Iteration 1
MULES: Solving for alpha.air
air fraction, min, max = 0.293333 0 1
MULES: Solving for alpha.air
air fraction, min, max = 0.293333 0 1
Constructing momentum equations
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 ? in "/lib/x86_64-linux-gnu/libm.so.6"
#4 powf64 in "/lib/x86_64-linux-gnu/libm.so.6"
#5 Foam::pow(Foam::Field<double>&, Foam::UList<double> const&, double const&) at ??:?
#6 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::pow<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::dimensioned<double> const&) at ??:?
#7 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::pow<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, double const&) at ??:?
#8 Foam::dragModels::bubbleDrag::CdRe() const at ??:?
#9 Foam::dragModels::dispersedDragModel::Ki() const at ??:?
#10 Foam::dragModels::dispersedDragModel::K() const at ??:?
#11 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::BlendedInterfacialModel<Foam::dragModel>::evaluate<double, Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > (Foam::dragModel::*)() const, Foam::word const&, Foam::dimensionSet const&, bool) const at ??:?
#12 Foam::blendedDragModel::K() const at ??:?
#13 Foam::MomentumTransferPhaseSystem<Foam::phaseSystem>::momentumTransfer() at ??:?
#14 Foam::PhaseTransferPhaseSystem<Foam::OneResistanceHeatTransferPhaseSystem<Foam::MomentumTransferPhaseSystem<Foam::phaseSystem> > >::momentumTransfer() at ??:?
#15 ? in "/home/gzy/OpenFOAM/OpenFOAM-10/platforms/linux64GccDPInt32Opt/bin/multiphaseEulerFoam"
#16 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#17 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#18 ? in "/home/gzy/OpenFOAM/OpenFOAM-10/platforms/linux64GccDPInt32Opt/bin/multiphaseEulerFoam"
Floating point exception (core dumped)
我目前的想法是在主函数里输出一下这些场,然后逐个排查下哪里出了问题,请问这些场该怎么调用呢?直接info+场名行不通,我不大清楚这样的语句要怎么写,麻烦您指导一下,非常感谢,例如
Foam::dragModels::bubbleDrag::bubbleDrag
(
const dictionary& dict,
const phaseInterface& interface,
const bool registerObject
)
:
dispersedDragModel(dict, interface, registerObject),
residualRe_("residualRe", dimless, dict)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::dragModels::bubbleDrag::~bubbleDrag()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::dragModels::bubbleDrag::CdRe() const
{
volScalarField TTT(interface_.continuous().thermo().T());:xiexie:
TTT.dimensions().reset(dimless);
const volScalarField g1(1-TTT/647);
const volScalarField g2(max(g1, residualRe_));
const volScalarField g3(pow(g2, 0.98));
volScalarField ddd(interface_.dispersed().d());
ddd.dimensions().reset(dimless);
:xiexie: