Ishii-Zuber drag model in twoPhaseEulerFoam
Hello,
I like to implement the Ishii-Zuber drag model for sparsely distributed fluid particles [1], as used in the CFX implementation [2]. I'm using OpenFoam-2.3.0. Code:
Foam::tmp<Foam::volScalarField>Foam::dragModels::IshiiZuberExtended::CdRe() const The value for CdCap is actually just 8/3 but I didn't know how to create a volScalarField from the scalar value. I get no compiling errors. But my simulation breaks at the first iteration with a floating point error and the following error message: Code:
#0 Foam::error::printStack(Foam::Ostream&) at ??:? thanks hester [1] Ishii, M. and Zuber, N., “Drag Coefficient and Relative Velocity in Bubbly, Droplet or Particulate Flows”, AIChE J., 25, 843-855, 1979. [2] http://www.arc.vt.edu/ansys_help/cfx_thry/i1304903.html, Eq. (5-51)-(5-53) |
If you take a close look at the stack-trace you will see that the function Foam::divide was involved in throwing the FPE.
You divide by pair.Re() during your calculation of the drag coefficient. Most probably, the initial value of pair.Re() evaluates to zero for your initial conditions. That is why you find code like this max(pair_.Re(), residualRe_) in some of the drag models. |
Thank you for your answer. I saw terms like max(pair_.Re(), residualRe_) in different drag models but I never understood why it was used. I will try it in my drag model. Maybe it works.
|
update
Hello Gerhard,
I changed my implementation using residual values for Re and Eo, as suggested. It works now. This is what it looks like: Code:
Foam::dragModels::IshiiZuberExtended::IshiiZuberExtended hester |
All times are GMT -4. The time now is 04:00. |