|
[Sponsors] |
June 29, 2018, 18:59 |
Adapt Fluent Mesh to weirOverflow tutorial
|
#1 |
Member
Join Date: Nov 2015
Posts: 38
Rep Power: 11 |
I am trying to adapt the weirOverflow tutorial case (interFoam) to a similar domain with a mesh converted from fluent. Schematic of domain is below. Case files are located here https://ufile.io/w2xaw (couldn't upload below).
When I setFields, the alpha.water looks good but the pressure field in the domain does not look good. The water depth is 0.54m (5300Pa) but the pressure upstream of the weir is 5.3e+09Pa (see image). As time progresses in the simulation, the area of high pressure shows odd results (see image). I've run checkMesh and it looks ok to me. I'm using the same boundary conditions as the weirOverflow tutorial (note that inlet_air is being modeled as a wall). If anyone has advice on how I should be troubleshooting this it would be greatly appreciated. Thanks! 0/U Code:
FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "include/initialConditions" dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { inlet_flow { type variableHeightFlowRateInletVelocity; flowRate $inletFlowRate; alpha alpha.water; value uniform (0 0 0); } outlet { type zeroGradient; } (sides|bottom|inlet_air|vent) { type noSlip; } top { type pressureInletOutletVelocity; value uniform (0 0 0); } defaultFaces { type empty; } } 0/p_rgh Code:
FoamFile { version 2.0; format ascii; class volScalarField; object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "include/initialConditions" dimensions [1 -1 -2 0 0 0 0]; internalField uniform $pressure; boundaryField { inlet_flow { type zeroGradient; } outlet { type zeroGradient; } (sides|inlet_air|bottom|vent) { type fixedFluxPressure; } top { type totalPressure; p0 uniform 0; } defaultFaces { type empty; } } 0/k Code:
FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object k; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "include/initialConditions" dimensions [0 2 -2 0 0 0 0]; internalField uniform $turbulentKE; boundaryField { inlet_flow { type fixedValue; value $internalField; } outlet { type inletOutlet; inletValue $internalField; value $internalField; } (sides|inlet_air|bottom|vent) { type kqRWallFunction; value $internalField; } top { type inletOutlet; inletValue $internalField; value $internalField; } defaultFaces { type empty; } } 0/epsilon Code:
FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object epsilon; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "include/initialConditions" dimensions [0 2 -3 0 0 0 0]; internalField uniform $turbulentEpsilon; boundaryField { inlet_flow { type fixedValue; value $internalField; } outlet { type inletOutlet; inletValue $internalField; value $internalField; } (sides|inlet_air|bottom|vent) { type epsilonWallFunction; value $internalField; } top { type inletOutlet; inletValue $internalField; value $internalField; } defaultFaces { type empty; } } 0/include/initialconditions Code:
inletFlowRate 0.007506; pressure 0; turbulentKE 4.14e-03; turbulentEpsilon 4.39e-05; constant/setFieldsDict Code:
FoamFile { version 2.0; format ascii; class dictionary; object setFieldsDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // defaultFieldValues ( volScalarFieldValue alpha.water 0 ); regions ( boxToCell { box (-100 -50 -100) (100 1.75 0.54); fieldValues ( volScalarFieldValue alpha.water 1 volVectorFieldValue U (0 0.139 0) ); } ); |
|
July 2, 2018, 12:31 |
Additional Information
|
#2 |
Member
Join Date: Nov 2015
Posts: 38
Rep Power: 11 |
Solver output is below when divergence starts. The time step decreases substantially and the residuals increase substantially. I think the issue is either initial conditions or solver settings since the pressure distribution isn't right from the start.
Solver Settings: fvSolution Code:
solvers { alpha.water { nAlphaCorr 1; nAlphaSubCycles 2; cAlpha 1; } "pcorr.*" { solver PCG; preconditioner DIC; tolerance 1e-10; relTol 0; } p_rgh { solver PCG; preconditioner DIC; tolerance 1e-07; relTol 0.05; } p_rghFinal { $p_rgh; relTol 0; } "(U|k|epsilon)" { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-8; relTol 0.1; } "(U|k|epsilon)Final" { $U; relTol 0; } } PIMPLE { momentumPredictor no; nCorrectors 2; nNonOrthogonalCorrectors 2; } relaxationFactors { equations { ".*" 0.001; } } fvScheme Code:
ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { div(rhoPhi,U) Gauss linear; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss linear; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,R) Gauss upwind; div(R) Gauss linear; div(phi,nuTilda) Gauss upwind; div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } controlDict Code:
application interFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 0.001; deltaT 0.00000001; writeControl adjustableRunTime; writeInterval 0.00001; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression uncompressed; timeFormat general; timePrecision 6; runTimeModifiable yes; adjustTimeStep on; maxCo 0.1; maxAlphaCo 0.1; maxDeltaT 1; InterFoam Output Log Code:
Courant Number mean: 0.00021083 max: 0.00416838 Interface Courant Number mean: 3.08635e-007 max: 0.00201627 deltaT = 1e-005 Time = 0.00031 PIMPLE: iteration 1 MULES: Solving for alpha.water Phase-1 volume fraction = 0.375555 Min(alpha.water) = -1.07061e-020 Max(alpha.water) = 1 MULES: Solving for alpha.water Phase-1 volume fraction = 0.375555 Min(alpha.water) = -1.83867e-020 Max(alpha.water) = 1 DICPCG: Solving for p_rgh, Initial residual = 0.912655, Final residual = 0.0452035, No Iterations 26 DICPCG: Solving for p_rgh, Initial residual = 0.353369, Final residual = 0.0155799, No Iterations 5 DICPCG: Solving for p_rgh, Initial residual = 0.0595108, Final residual = 0.0029095, No Iterations 183 time step continuity errors : sum local = 4.49741e-008, global = -2.96729e-009, cumulative = -2.96336e-009 DICPCG: Solving for p_rgh, Initial residual = 0.0752576, Final residual = 0.00334783, No Iterations 3 DICPCG: Solving for p_rgh, Initial residual = 0.00942152, Final residual = 0.00046862, No Iterations 197 DICPCG: Solving for p_rgh, Initial residual = 0.0114744, Final residual = 9.86381e-008, No Iterations 493 time step continuity errors : sum local = 2.09962e-012, global = 3.54764e-015, cumulative = -2.96336e-009 smoothSolver: Solving for epsilon, Initial residual = 3.87474e-006, Final residual = 6.30295e-015, No Iterations 1 bounding epsilon, min: -7.2867e-006 max: 1.57825 average: 0.00241215 smoothSolver: Solving for k, Initial residual = 0.396331, Final residual = 5.40972e-009, No Iterations 1 ExecutionTime = 3000.07 s ClockTime = 3000 s Courant Number mean: 0.000227262 max: 7.6682 Interface Courant Number mean: 3.222e-007 max: 0.00201458 deltaT = 1.2987e-007 Time = 0.00031013 PIMPLE: iteration 1 MULES: Solving for alpha.water Phase-1 volume fraction = 0.375555 Min(alpha.water) = -8.70959e-021 Max(alpha.water) = 1 MULES: Solving for alpha.water Phase-1 volume fraction = 0.375555 Min(alpha.water) = -8.70955e-021 Max(alpha.water) = 1 DICPCG: Solving for p_rgh, Initial residual = 0.935516, Final residual = 0.0327178, No Iterations 3 DICPCG: Solving for p_rgh, Initial residual = 0.140695, Final residual = 0.00689146, No Iterations 27 DICPCG: Solving for p_rgh, Initial residual = 0.0793937, Final residual = 0.0038461, No Iterations 4 time step continuity errors : sum local = 3.49012e-010, global = 1.10442e-010, cumulative = -2.85292e-009 DICPCG: Solving for p_rgh, Initial residual = 0.0123816, Final residual = 0.000609611, No Iterations 268 DICPCG: Solving for p_rgh, Initial residual = 0.035881, Final residual = 0.00176372, No Iterations 2 DICPCG: Solving for p_rgh, Initial residual = 0.00409689, Final residual = 9.91339e-008, No Iterations 505 time step continuity errors : sum local = 1.12217e-014, global = 1.33686e-017, cumulative = -2.85292e-009 smoothSolver: Solving for epsilon, Initial residual = 0.0563391, Final residual = 9.13358e-009, No Iterations 1 bounding epsilon, min: -1.08559e-006 max: 136.189 average: 0.00254469 smoothSolver: Solving for k, Initial residual = 0.900509, Final residual = 4.93624e-014, No Iterations 2 ExecutionTime = 3144.87 s ClockTime = 3145 s Courant Number mean: 2.92498e-006 max: 0.105088 Interface Courant Number mean: 4.18398e-009 max: 2.61563e-005 deltaT = 1.23377e-007 Time = 0.000310253 PIMPLE: iteration 1 MULES: Solving for alpha.water Phase-1 volume fraction = 0.375555 Min(alpha.water) = -8.70951e-021 Max(alpha.water) = 1 MULES: Solving for alpha.water Phase-1 volume fraction = 0.375555 Min(alpha.water) = -8.70948e-021 Max(alpha.water) = 1 DICPCG: Solving for p_rgh, Initial residual = 0.300217, Final residual = 0.0128521, No Iterations 3 DICPCG: Solving for p_rgh, Initial residual = 0.190351, Final residual = 0.00898391, No Iterations 6 DICPCG: Solving for p_rgh, Initial residual = 0.057776, Final residual = 0.00274048, No Iterations 16 time step continuity errors : sum local = 2.27229e-010, global = 7.65957e-011, cumulative = -2.77632e-009 DICPCG: Solving for p_rgh, Initial residual = 0.024309, Final residual = 0.00120291, No Iterations 75 DICPCG: Solving for p_rgh, Initial residual = 0.018486, Final residual = 0.000886656, No Iterations 4 DICPCG: Solving for p_rgh, Initial residual = 0.00270342, Final residual = 9.58717e-008, No Iterations 526 time step continuity errors : sum local = 8.67495e-015, global = -1.95992e-016, cumulative = -2.77632e-009 smoothSolver: Solving for epsilon, Initial residual = 0.385237, Final residual = 1.16356e-014, No Iterations 2 smoothSolver: Solving for k, Initial residual = 0.378831, Final residual = 2.88617e-014, No Iterations 2 ExecutionTime = 3261.03 s ClockTime = 3261 s Courant Number mean: 2.75481e-006 max: 0.100192 Interface Courant Number mean: 3.97435e-009 max: 2.48412e-005 deltaT = 1.21834e-007 Time = 0.000310375 PIMPLE: iteration 1 MULES: Solving for alpha.water Phase-1 volume fraction = 0.375555 Min(alpha.water) = -8.70945e-021 Max(alpha.water) = 1 MULES: Solving for alpha.water Phase-1 volume fraction = 0.375555 Min(alpha.water) = -8.70941e-021 Max(alpha.water) = 1 DICPCG: Solving for p_rgh, Initial residual = 0.115506, Final residual = 0.00561039, No Iterations 6 DICPCG: Solving for p_rgh, Initial residual = 0.0819975, Final residual = 0.00391359, No Iterations 30 DICPCG: Solving for p_rgh, Initial residual = 0.0538272, Final residual = 0.00260565, No Iterations 7 time step continuity errors : sum local = 1.84989e-010, global = -3.89254e-011, cumulative = -2.81525e-009 DICPCG: Solving for p_rgh, Initial residual = 0.0117506, Final residual = 0.00057926, No Iterations 210 DICPCG: Solving for p_rgh, Initial residual = 0.0291063, Final residual = 0.00117832, No Iterations 3 DICPCG: Solving for p_rgh, Initial residual = 0.00371961, Final residual = 9.81533e-008, No Iterations 505 time step continuity errors : sum local = 5.95852e-015, global = 2.10705e-016, cumulative = -2.81525e-009 smoothSolver: Solving for epsilon, Initial residual = 0.115597, Final residual = 2.95363e-015, No Iterations 2 bounding epsilon, min: -0.00168096 max: 6426.46 average: 0.00862314 smoothSolver: Solving for k, Initial residual = 0.214181, Final residual = 1.60731e-014, No Iterations 2 ExecutionTime = 3400.22 s ClockTime = 3401 s Courant Number mean: 2.71331e-006 max: 0.0987692 Interface Courant Number mean: 3.9244e-009 max: 2.45231e-005 deltaT = 1.21834e-007 Time = 0.000310497 PIMPLE: iteration 1 MULES: Solving for alpha.water Phase-1 volume fraction = 0.375555 Min(alpha.water) = -8.70938e-021 Max(alpha.water) = 1 MULES: Solving for alpha.water Phase-1 volume fraction = 0.375555 Min(alpha.water) = -8.70934e-021 Max(alpha.water) = 1 DICPCG: Solving for p_rgh, Initial residual = 0.999894, Final residual = 0.0489617, No Iterations 90 DICPCG: Solving for p_rgh, Initial residual = 0.404381, Final residual = 0.0171599, No Iterations 3 DICPCG: Solving for p_rgh, Initial residual = 0.0451485, Final residual = 0.0022563, No Iterations 152 time step continuity errors : sum local = 6.75034e-006, global = -6.6245e-007, cumulative = -6.65265e-007 DICPCG: Solving for p_rgh, Initial residual = 0.0967786, Final residual = 0.00446019, No Iterations 19 DICPCG: Solving for p_rgh, Initial residual = 0.0474411, Final residual = 0.00218411, No Iterations 15 DICPCG: Solving for p_rgh, Initial residual = 0.0130727, Final residual = 9.6677e-008, No Iterations 592 time step continuity errors : sum local = 2.94031e-010, global = -3.12122e-012, cumulative = -6.65268e-007 smoothSolver: Solving for epsilon, Initial residual = 0.996401, Final residual = 1.29923e-014, No Iterations 2 smoothSolver: Solving for k, Initial residual = 0.998144, Final residual = 4.23433e-014, No Iterations 2 ExecutionTime = 19010.9 s ClockTime = 19011 s Courant Number mean: 0.00284279 max: 761.518 Interface Courant Number mean: 1.24369e-007 max: 0.00649104 deltaT = 1.59989e-011 Time = 0.000310497 PIMPLE: iteration 1 MULES: Solving for alpha.water Phase-1 volume fraction = 0.375555 Min(alpha.water) = -8.70934e-021 Max(alpha.water) = 1 MULES: Solving for alpha.water Phase-1 volume fraction = 0.375555 Min(alpha.water) = -8.70934e-021 Max(alpha.water) = 1 DICPCG: Solving for p_rgh, Initial residual = 0.999428, Final residual = 0.0421048, No Iterations 6 DICPCG: Solving for p_rgh, Initial residual = 0.830771, Final residual = 0.0408926, No Iterations 8 DICPCG: Solving for p_rgh, Initial residual = 0.163154, Final residual = 0.00809898, No Iterations 37 time step continuity errors : sum local = 4.38999e-008, global = 1.08769e-008, cumulative = -6.54391e-007 DICPCG: Solving for p_rgh, Initial residual = 0.0919018, Final residual = 0.00402157, No Iterations 5 DICPCG: Solving for p_rgh, Initial residual = 0.0136448, Final residual = 0.000668786, No Iterations 263 DICPCG: Solving for p_rgh, Initial residual = 0.0401227, Final residual = 9.66418e-008, No Iterations 523 time step continuity errors : sum local = 8.40685e-013, global = 3.97586e-015, cumulative = -6.54391e-007 smoothSolver: Solving for epsilon, Initial residual = 0.074063, Final residual = 5.02552e-009, No Iterations 1 smoothSolver: Solving for k, Initial residual = 0.989024, Final residual = 1.15788e-013, No Iterations 2 ExecutionTime = 19159.8 s ClockTime = 19160 s Courant Number mean: 4.35561e-006 max: 0.422067 Interface Courant Number mean: 1.9948e-010 max: 1.03862e-005 deltaT = 3.7906e-012 Time = 0.000310497 PIMPLE: iteration 1 MULES: Solving for alpha.water Phase-1 volume fraction = 0.375555 Min(alpha.water) = -3.32457e-021 Max(alpha.water) = 1 MULES: Solving for alpha.water Phase-1 volume fraction = 0.375555 Min(alpha.water) = -3.32457e-021 Max(alpha.water) = 1 DICPCG: Solving for p_rgh, Initial residual = 0.396152, Final residual = 0.0152641, No Iterations 5 DICPCG: Solving for p_rgh, Initial residual = 0.0159937, Final residual = 0.000446519, No Iterations 3 DICPCG: Solving for p_rgh, Initial residual = 0.0302559, Final residual = 0.00105529, No Iterations 4 time step continuity errors : sum local = 1.34651e-008, global = 3.03593e-010, cumulative = -6.54088e-007 DICPCG: Solving for p_rgh, Initial residual = 0.0570515, Final residual = 0.00212148, No Iterations 4 DICPCG: Solving for p_rgh, Initial residual = 0.0240281, Final residual = 0.00110088, No Iterations 4 DICPCG: Solving for p_rgh, Initial residual = 0.00662114, Final residual = 9.82176e-008, No Iterations 523 time step continuity errors : sum local = 9.852e-013, global = -2.77961e-014, cumulative = -6.54088e-007 smoothSolver: Solving for epsilon, Initial residual = 0.202899, Final residual = 5.20576e-014, No Iterations 2 bounding epsilon, min: -1.65665e+009 max: 2.172e+013 average: 2.51751e+007 smoothSolver: Solving for k, Initial residual = 0.642507, Final residual = 1.90813e-013, No Iterations 2 ExecutionTime = 19270 s ClockTime = 19270 s Courant Number mean: 1.82636e-006 max: 0.105859 Interface Courant Number mean: 5.86873e-011 max: 3.21607e-006 deltaT = 3.58079e-012 Time = 0.000310497 PIMPLE: iteration 1 MULES: Solving for alpha.water Phase-1 volume fraction = 0.375555 Min(alpha.water) = -3.32457e-021 Max(alpha.water) = 1 MULES: Solving for alpha.water Phase-1 volume fraction = 0.375555 Min(alpha.water) = -3.32457e-021 Max(alpha.water) = 1 DICPCG: Solving for p_rgh, Initial residual = 0.0435812, Final residual = 0.00160835, No Iterations 4 DICPCG: Solving for p_rgh, Initial residual = 0.0282882, Final residual = 0.00123018, No Iterations 6 DICPCG: Solving for p_rgh, Initial residual = 0.00788397, Final residual = 0.000333423, No Iterations 6 time step continuity errors : sum local = 1.60892e-008, global = 3.17143e-009, cumulative = -6.50916e-007 DICPCG: Solving for p_rgh, Initial residual = 0.00368608, Final residual = 0.000172914, No Iterations 10 DICPCG: Solving for p_rgh, Initial residual = 0.00192558, Final residual = 8.69467e-005, No Iterations 13 DICPCG: Solving for p_rgh, Initial residual = 0.000746668, Final residual = 9.91777e-008, No Iterations 479 time step continuity errors : sum local = 4.98774e-012, global = -1.19261e-014, cumulative = -6.50916e-007 smoothSolver: Solving for epsilon, Initial residual = 0.000867871, Final residual = 1.01795e-010, No Iterations 1 bounding epsilon, min: -2.3916e+012 max: 2.25748e+016 average: 1.68927e+010 smoothSolver: Solving for k, Initial residual = 0.338717, Final residual = 7.33539e-014, No Iterations 2 ExecutionTime = 19369.2 s ClockTime = 19369 s Courant Number mean: 2.2556e-006 max: 0.103696 Interface Courant Number mean: 6.49336e-011 max: 3.42918e-006 deltaT = 3.45315e-012 Time = 0.000310497 PIMPLE: iteration 1 MULES: Solving for alpha.water Phase-1 volume fraction = 0.375555 Min(alpha.water) = -3.32457e-021 Max(alpha.water) = 1 MULES: Solving for alpha.water Phase-1 volume fraction = 0.375555 Min(alpha.water) = -3.32457e-021 Max(alpha.water) = 1 DICPCG: Solving for p_rgh, Initial residual = 0.010936, Final residual = 0.000446392, No Iterations 7 DICPCG: Solving for p_rgh, Initial residual = 0.0329086, Final residual = 0.00138189, No Iterations 6 DICPCG: Solving for p_rgh, Initial residual = 0.0353479, Final residual = 0.00133968, No Iterations 4 time step continuity errors : sum local = 8.08088e-009, global = -1.50972e-009, cumulative = -6.52426e-007 DICPCG: Solving for p_rgh, Initial residual = 0.0108574, Final residual = 0.000508876, No Iterations 7 DICPCG: Solving for p_rgh, Initial residual = 0.00379325, Final residual = 0.000183595, No Iterations 19 DICPCG: Solving for p_rgh, Initial residual = 0.00245808, Final residual = 9.61317e-008, No Iterations 496 time step continuity errors : sum local = 7.69392e-013, global = 1.34872e-014, cumulative = -6.52426e-007 smoothSolver: Solving for epsilon, Initial residual = 0.00149323, Final residual = 3.04695e-010, No Iterations 1 bounding epsilon, min: -4.685e+012 max: 1.18131e+017 average: 1.27301e+011 smoothSolver: Solving for k, Initial residual = 0.274693, Final residual = 5.908e-014, No Iterations 2 bounding k, min: -1934.62 max: 8.57221e+012 average: 3.76148e+007 ExecutionTime = 19471.3 s ClockTime = 19472 s Courant Number mean: 2.32787e-006 max: 0.101402 Interface Courant Number mean: 7.22356e-011 max: 3.83681e-006 deltaT = 3.40542e-012 Time = 0.000310497 |
|
July 5, 2018, 03:37 |
|
#3 |
Member
Geir Karlsen
Join Date: Nov 2013
Location: Norway
Posts: 59
Rep Power: 14 |
Sounds like you might be confusing pressure with p_rgh. Could that be the case?
This thread is nice for illustrating the difference between the two: p_rgh in OF 1.7 |
|
Tags |
interfoam, openfoam, weiroverflow |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to set periodic boundary conditions | Ganesh | FLUENT | 15 | November 18, 2020 07:09 |
Fluent tutorial mesh files | antonio.c | FLUENT | 0 | August 30, 2017 14:53 |
dynamic mesh tutorial files for fluent | hesham | ANSYS | 0 | February 2, 2016 20:51 |
dynamic mesh tutorial for fluent | hesham | FLUENT | 0 | February 2, 2016 11:43 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |