CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   volume fraction = nan (http://www.cfd-online.com/Forums/openfoam-solving/87825-volume-fraction-nan.html)

 Virtual-iCFD April 29, 2011 21:42

volume fraction = nan

The liquid phase volume fraction is too large during interDyMFoam run. What should I do?

Thanks,

Centre of mass: (3.99998969769 0.199999365532 -0.00194121622769)
Linear velocity: (-0.00807274666396 -0.000116891215473 -1.22736927321)
Angular velocity: (-50.7400957943 -350.884852997 0.162897658258)
Centre of mass: (3.99998969769 0.199999365532 -0.00194121622769)
Linear velocity: (-0.00807274666396 -0.000116891215473 -1.22736927321)
Angular velocity: (-50.7400957943 -350.884852997 0.162897658258)
GAMG: Solving for cellDisplacementx, Initial residual = 1, Final residual = 7.59907279221e-06, No Iterations 4
GAMG: Solving for cellDisplacementy, Initial residual = 1, Final residual = 7.48199156032e-06, No Iterations 4
GAMG: Solving for cellDisplacementx, Initial residual = 1, Final residual = 7.59907279221e-06, No Iterations 4
GAMG: Solving for cellDisplacementz, Initial residual = 1, Final residual = 6.28747292815e-06, No Iterations 4
GAMG: Solving for cellDisplacementy, Initial residual = 1, Final residual = 7.48199156032e-06, No Iterations 4
GAMG: Solving for cellDisplacementz, Initial residual = 1, Final residual = 6.28747292815e-06, No Iterations 4
Execution time for mesh.update() = 14.83 s
time step continuity errors : sum local = 4.34625791759e-11, global = 2.0984282934e-13, cumulative = -4.55449681311e-06
Execution time for mesh.update() = 14.84 s
time step continuity errors : sum local = 4.34625791759e-11, global = 2.0984282934e-13, cumulative = -4.55449681311e-06
GAMGPCG: Solving for pcorr, Initial residual = 1, Final residual = 7.16391976148e-06, No Iterations 8
time step continuity errors : sum local = 3.11362494258e-16, global = 5.34853518262e-18, cumulative = -4.55449681311e-06
MULES: Solving for alpha1
Liquid phase volume fraction = nan Min(alpha1) = -1.44928608738e+296 Max(alpha1) = 1.18486320879e+296
GAMGPCG: Solving for pcorr, Initial residual = 1, Final residual = 7.16391976148e-06, No Iterations 8
time step continuity errors : sum local = 3.11362494258e-16, global = 5.34853518262e-18, cumulative = -4.55449681311e-06
MULES: Solving for alpha1
MULES: Solving for alpha1
Liquid phase volume fraction = nan Min(alpha1) = -9067.86973555 Max(alpha1) = 873794.676324
Liquid phase volume fraction = nan Min(alpha1) = -1.44928608738e+296 Max(alpha1) = 1.18486320879e+296
MULES: Solving for alpha1
MULES: Solving for alpha1
Liquid phase volume fraction = nan Min(alpha1) = -21395657433.6 Max(alpha1) = 3942543.65753
Liquid phase volume fraction = nan Min(alpha1) = -9067.86973555 Max(alpha1) = 873794.676324
MULES: Solving for alpha1
Liquid phase volume fraction = nan Min(alpha1) = -21395657433.6 Max(alpha1) = 3942543.65753

 Virtual-iCFD April 30, 2011 00:01

after reducing time-step, tried both GAMG-PCG and DIC-PCG for solving pcorr and still cannot fix this. solution gives singularity when solving pcorr.

Centre of mass: (1.50001686526 0.499972308524 0.493779071806)
Linear velocity: (0.00249152243223 -0.00491296145985 -0.845915059591)
Angular velocity: (-8.1941654618 -6.9633990245 -0.737810296966)
Centre of mass: (1.50001686526 0.499972308524 0.493779071806)
Linear velocity: (0.00249152243223 -0.00491296145985 -0.845915059591)
Angular velocity: (-8.1941654618 -6.9633990245 -0.737810296966)
GAMG: Solving for cellDisplacementx, Initial residual = 1, Final residual = 3.96337485906e-06, No Iterations 6
GAMG: Solving for cellDisplacementx, Initial residual = 1, Final residual = 3.96337485906e-06, No Iterations 6
GAMG: Solving for cellDisplacementy, Initial residual = 1, Final residual = 3.72427537902e-06, No Iterations 6
GAMG: Solving for cellDisplacementy, Initial residual = 1, Final residual = 3.72427537902e-06, No Iterations 6
GAMG: Solving for cellDisplacementz, Initial residual = 1, Final residual = 8.96207859635e-06, No Iterations 6
GAMG: Solving for cellDisplacementz, Initial residual = 1, Final residual = 8.96207859635e-06, No Iterations 6
Execution time for mesh.update() = 17.76 s
time step continuity errors : sum local = 1.01648889068e-10, global = 3.98753833131e-12, cumulative = 6.73971151269e-09
Execution time for mesh.update() = 17.74 s
time step continuity errors : sum local = 1.01648889068e-10, global = 3.98753833131e-12, cumulative = 6.73971151269e-09
DICPCG: Solving for pcorr, Initial residual = 1, Final residual = 9.96719754608e-07, No Iterations 255
DICPCG: Solving for pcorr, Initial residual = 1, Final residual = 9.96719754608e-07, No Iterations 255
DICPCG: Solving for pcorr: solution singularity
DICPCG: Solving for pcorr: solution singularity
DICPCG: Solving for pcorr: solution singularity
time step continuity errors : sum local = inf, global = inf, cumulative = inf
DICPCG: Solving for pcorr: solution singularity
time step continuity errors : sum local = inf, global = inf, cumulative = inf
MULES: Solving for alpha1
MULES: Solving for alpha1
Liquid phase volume fraction = -inf Min(alpha1) = -inf Max(alpha1) = 1.83985404514e+287
Liquid phase volume fraction = -inf Min(alpha1) = -inf Max(alpha1) = 1.83985404514e+287
MULES: Solving for alpha1
MULES: Solving for alpha1
Liquid phase volume fraction = nan Min(alpha1) = -52.2330190268 Max(alpha1) = 29.9036740755
Liquid phase volume fraction = nan Min(alpha1) = -52.2330190268 Max(alpha1) = 29.9036740755
MULES: Solving for alpha1
MULES: Solving for alpha1
Liquid phase volume fraction = nan Min(alpha1) = -504.821905808 Max(alpha1) = 387.19735435
Liquid phase volume fraction = nan Min(alpha1) = -504.821905808 Max(alpha1) = 387.19735435

 Virtual-iCFD April 30, 2011 11:33

At timestep=0, it works fine but iteration blows up at next timestep. DT=0.005s. I am posting a link to the image at t=0.

http://www.cfd-online.com/Forums/mem...imestep-0.html

Thank you for any response.

 wyldckat April 30, 2011 12:01

Hi Virtual-iCFD,

I only have a very limited understanding of how interFoam and interDyMFoam work, but basically here's what could be wrong:
• Very bad cells in your mesh. Run checkMesh to verify if there are any errors.
• What values are you using in setFieldsDict? Any values outside of the interval [0,1] could lead to very crazy results.
• Are you using any of the following:
• Running in parallel;
• Using cyclic patches or symmetry planes.
• High speed mesh displacement.
• In controlDict, if you are using this options:
Code:

then you should use a value of maxCo and maxAlphaCo representative of both your mesh size, as well as the speed of both mesh and fluid displacements.
• Whether you are using adjustableRunTime or not, your deltaT should also reflect the mesh and fluid speeds involved.
The problem could also be related to which version of OpenFOAM you are using and related to which compiler you used to build that version.

Best regards,
Bruno

 Virtual-iCFD April 30, 2011 12:32

Hi Bruno, thank you for your prompt response.

After reducing deltaT from 0.005s to 0.0025s and now I checkMesh the geometry and the new mesh now has some problems. I will try to fix it and post the progress here.

Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
points: 767593
faces: 2204098
internal faces: 2137246
cells: 719444
boundary patches: 6
point zones: 0
face zones: 0
cell zones: 0

Overall number of cells of each type:
hexahedra: 701651
prisms: 3585
wedges: 0
pyramids: 0
tet wedges: 32
tetrahedra: 0
polyhedra: 14176

Checking topology...
Boundary definition OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology
sidewall 20480 20930 ok (non-closed singly connected)
inlet 4096 4225 ok (non-closed singly connected)
outlet 4096 4225 ok (non-closed singly connected)
floor 10240 10465 ok (non-closed singly connected)
ceiling 10240 10465 ok (non-closed singly connected)
floatingObject 17700 19883 ok (closed singly connected)

Checking geometry...
Overall domain bounding box (-4 -2 -3) (8 3 4)
Mesh (non-empty, non-wedge) directions (1 1 1)
Mesh (non-empty) directions (1 1 1)
Boundary openness (-7.93596913354e-16 2.25264336087e-16 1.5514796242e-15) OK.
Max cell openness = 3.04515531184e-16 OK.
Max aspect ratio = 4.39517096183 OK.
Minumum face area = 4.29684081531e-05. Maximum face area = 0.0085458594. Face area magnitudes OK.
Min volume = 1.240235887e-06. Max volume = 0.000640939455. Total volume = 418.630237694. Cell volumes OK.
Mesh non-orthogonality Max: 55.9891415978 average: 3.848649819
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 2.29577137119 OK.

Mesh OK.

Time = 0.005

Checking geometry...
Overall domain bounding box (-4 -2 -3) (8 3 4)
Mesh (non-empty, non-wedge) directions (1 1 1)
Mesh (non-empty) directions (1 1 1)
Boundary openness (-7.83532651411e-16 2.26932595494e-16 1.54953377682e-15) OK.
Max cell openness = 4.32512283352e-16 OK.
Max aspect ratio = 4.20723431263 OK.
Minumum face area = 4.2968408155e-05. Maximum face area = 0.00893658472989. Face area magnitudes OK.
Min volume = 1.22476329522e-06. Max volume = 0.000668814291826. Total volume = 418.630237804. Cell volumes OK.
Mesh non-orthogonality Max: 58.6431968444 average: 3.90508611734
Non-orthogonality check OK.
***Error in face pyramids: 3 faces are incorrectly oriented.
<<Writing 3 faces with incorrect orientation to set wrongOrientedFaces
Max skewness = 2.32252294916 OK.

Failed 1 mesh checks.

End

 akidess May 2, 2011 03:56

Your time step might still be too large. I'd aim for a maximum Courant number of 0.2 (deltaT = 1e-05 maybe? depends on your setup, which you have told us nothing about), and from there increase the time step a bit if it runs smoothly.

 Virtual-iCFD May 2, 2011 19:45

Hi Anton,

In fact, I have stopped working on this case due to its complex geometry to begin with and after several failed attempts over the last weekend. In fact, I've just started with a much simpler and different geometry mesh to see if I can get over with this issue. As you see from my log message below, now I encountered difficulty as my timestep is getting smaller and smaller. I've posted some setting for the information.

http://www.cfd-online.com/Forums/ope...-non-stop.html

I will try lower Co number at 0.2 and let you know the progress.

 Kanarya June 9, 2015 09:41

Hi,

I am using interphaseChangeFoam and I did include T field to the solver.
It is running with deltaT=1e-6 in tutorial geometry but it is running with so small time step and Courant Number (see below) in the wavy pipe geometry and after several time steps Courant Number becomes 1e+20...
i do not understand why it is running in one case and not in another one?
Code:

Courant Number mean: 1.49926e-28 max: 1.81888e-26
deltaT = 8.39642e-30
Time = 2.12243e-29

Max interFaceArea: 1.01863e-11 m2
Max Heat transfer coefficient: 951.326 W/m2/K
DILUPBiCG:  Solving for alpha1, Initial residual = 1.34882e-05, Final residual = 1.81609e-22, No Iterations 1
Max interFaceArea: 1.01863e-11 m2
Max Heat transfer coefficient: 951.326 W/m2/K
Max Condensation Rate = 0.206548 kg/m3/s Total Condensation Rate = 3.88296e-08 kg/s
Liquid phase volume fraction = 0.0001  Min(alpha1) = 0.0001  Max(alpha1) = 0.0001
PIMPLE: iteration 1
GAMG:  Solving for p_rgh, Initial residual = 5.75304e-10, Final residual = 5.75304e-10, No Iterations 0
time step continuity errors : sum local = 3.59822e-28, global = -3.59822e-28, cumulative = -1.80246e+14
GAMG:  Solving for p_rgh, Initial residual = 5.75304e-10, Final residual = 5.75304e-10, No Iterations 0
time step continuity errors : sum local = 3.59822e-28, global = -3.59822e-28, cumulative = -1.80246e+14
GAMG:  Solving for p_rgh, Initial residual = 5.75304e-10, Final residual = 5.75304e-10, No Iterations 0
time step continuity errors : sum local = 3.59822e-28, global = -3.59822e-28, cumulative = -1.80246e+14
PIMPLE: iteration 2
GAMG:  Solving for p_rgh, Initial residual = 5.75304e-10, Final residual = 5.75304e-10, No Iterations 0
time step continuity errors : sum local = 3.59822e-28, global = -3.59822e-28, cumulative = -1.80246e+14
GAMG:  Solving for p_rgh, Initial residual = 5.75304e-10, Final residual = 5.75304e-10, No Iterations 0
time step continuity errors : sum local = 3.59822e-28, global = -3.59822e-28, cumulative = -1.80246e+14
GAMGPCG:  Solving for p_rgh, Initial residual = 5.75304e-10, Final residual = 5.75304e-10, No Iterations 0
time step continuity errors : sum local = 3.59822e-28, global = -3.59822e-28, cumulative = -1.80246e+14
DILUPBiCG:  Solving for T, Initial residual = 9.24264e-06, Final residual = 1.30498e-22, No Iterations 1
ExecutionTime = 20.05 s  ClockTime = 20 s

Courant Number mean: 1.79911e-28 max: 2.18266e-26
deltaT = 1.00757e-29
Time = 3.13e-29

Max interFaceArea: 1.01863e-11 m2
Max Heat transfer coefficient: 951.326 W/m2/K
DILUPBiCG:  Solving for alpha1, Initial residual = 1.748e-05, Final residual = 2.78871e-22, No Iterations 1
Max interFaceArea: 1.01863e-11 m2
Max Heat transfer coefficient: 951.326 W/m2/K
Max Condensation Rate = 0.206548 kg/m3/s Total Condensation Rate = 3.88296e-08 kg/s
Liquid phase volume fraction = 0.0001  Min(alpha1) = 0.0001  Max(alpha1) = 0.0001
PIMPLE: iteration 1
GAMG:  Solving for p_rgh, Initial residual = 5.75304e-10, Final residual = 5.75304e-10, No Iterations 0
time step continuity errors : sum local = 4.31787e-28, global = -4.31787e-28, cumulative = -1.80246e+14
GAMG:  Solving for p_rgh, Initial residual = 5.75304e-10, Final residual = 5.75304e-10, No Iterations 0
time step continuity errors : sum local = 4.31787e-28, global = -4.31787e-28, cumulative = -1.80246e+14
GAMG:  Solving for p_rgh, Initial residual = 5.75304e-10, Final residual = 5.75304e-10, No Iterations 0
time step continuity errors : sum local = 4.31787e-28, global = -4.31787e-28, cumulative = -1.80246e+14
PIMPLE: iteration 2
GAMG:  Solving for p_rgh, Initial residual = 5.75304e-10, Final residual = 5.75304e-10, No Iterations 0
time step continuity errors : sum local = 4.31787e-28, global = -4.31787e-28, cumulative = -1.80246e+14
GAMG:  Solving for p_rgh, Initial residual = 5.75304e-10, Final residual = 5.75304e-10, No Iterations 0
time step continuity errors : sum local = 4.31787e-28, global = -4.31787e-28, cumulative = -1.80246e+14
GAMGPCG:  Solving for p_rgh, Initial residual = 5.75304e-10, Final residual = 5.75304e-10, No Iterations 0
time step continuity errors : sum local = 4.31787e-28, global = -4.31787e-28, cumulative = -1.80246e+14
DILUPBiCG:  Solving for T, Initial residual = 5.98267e-06, Final residual = 9.28524e-23, No Iterations 1
ExecutionTime = 24.43 s  ClockTime = 25 s

Courant Number mean: 2.15893e-28 max: 2.61919e-26
deltaT = 1.20908e-29
Time = 4.33909e-29

Can you help me?