# OmegaWallfunction aborts the simulation

 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 5, 2023, 04:30 OmegaWallfunction aborts the simulation #1 Member   Song Young-ik Join Date: Apr 2022 Posts: 41 Rep Power: 3 Hi, I was running supersonic low density rhoCentralfoam, and OmegaWallfunction is the issue. Code: ```deltaT = 2.7189e-06 Mean and max Courant Numbers = 0.0123847 0.299623 Time = 0.000279491s diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for rhoUx, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for rhoUy, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for rhoUz, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for Ux, Initial residual = 3.72807e-06, Final residual = 2.91052e-12, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 3.12201e-06, Final residual = 2.73137e-12, No Iterations 2 smoothSolver: Solving for Uz, Initial residual = 5.5749e-07, Final residual = 2.66052e-14, No Iterations 2 diagonal: Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for h, Initial residual = 2.84879e-06, Final residual = 8.95647e-13, No Iterations 2 smoothSolver: Solving for omega, Initial residual = 7.28461e-06, Final residual = 1.55561e-10, No Iterations 4 bounding omega, min: -204008 max: 3.24453e+07 average: 851.415 smoothSolver: Solving for k, Initial residual = 3.38077e-05, Final residual = 6.45858e-10, No Iterations 4 bounding k, min: -1.35013 max: 98.5162 average: 0.262368 ExecutionTime = 2.61207 s ClockTime = 3 s deltaT = 2.7189e-06 Mean and max Courant Numbers = 0.0123847 0.300663 Time = 0.00028221s diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for rhoUx, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for rhoUy, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for rhoUz, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for Ux, Initial residual = 1.8978e-06, Final residual = 1.03226e-11, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 5.36398e-06, Final residual = 3.41083e-11, No Iterations 2 smoothSolver: Solving for Uz, Initial residual = 5.5739e-07, Final residual = 1.8233e-13, No Iterations 2 diagonal: Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for h, Initial residual = 1.45929e-07, Final residual = 1.1513e-11, No Iterations 2 [8] #0 Foam::error::printStack(Foam::Ostream&) at ??:?[8] #1 Foam::sigFpe::sigHandler(int) at ??:? [8] #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" [8] #3 ? in "/lib/x86_64-linux-gnu/libm.so.6" [8] #4 Foam::omegaWallFunctionFvPatchScalarField::calculate(Foam::momentumTransportModel const&, Foam::List const&, Foam::fvPatch const&, Foam::Field&, Foam::Field&) at ??:? [8] #5 Foam::omegaWallFunctionFvPatchScalarField::calculateTurbulenceFields(Foam::momentumTransportModel const&, Foam::Field&, Foam::Field&) at ??:? [8] #6 Foam::omegaWallFunctionFvPatchScalarField::updateCoeffs() at ??:? [8] #7 Foam::GeometricBoundaryField::updateCoeffs() at ??:? [8] #8 Foam::kOmegaSST >, Foam::compressibleMomentumTransportModel>::correct() at ??:? [8] #9 ? in "/opt/openfoam10/platforms/linux64GccDPInt32Opt/bin/rhoCentralFoam" [8] #10 ? in "/lib/x86_64-linux-gnu/libc.so.6" [8] #11 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" [8] #12 ? in "/opt/openfoam10/platforms/linux64GccDPInt32Opt/bin/rhoCentralFoam"``` As you can see, probelm occurs at omegawallfunction, and I searched into code where problem might happen Code: ```void omegaWallFunctionFvPatchScalarField::calculate ( const turbulenceModel& turbModel, const List& cornerWeights, const fvPatch& patch, scalarField& G, scalarField& omega ) { const label patchi = patch.index(); const scalarField& y = turbModel.y()[patchi]; const scalar Cmu25 = pow025(Cmu_); const tmp tk = turbModel.k(); const volScalarField& k = tk(); const tmp tnuw = turbModel.nu(patchi); const scalarField& nuw = tnuw(); const tmp tnutw = turbModel.nut(patchi); const scalarField& nutw = tnutw(); const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi]; const scalarField magGradUw(mag(Uw.snGrad())); // Set omega and G forAll(nutw, facei) { label celli = patch.faceCells()[facei]; scalar w = cornerWeights[facei]; scalar omegaVis = 6.0*nuw[facei]/(beta1_*sqr(y[facei])); scalar omegaLog = sqrt(k[celli])/(Cmu25*kappa_*y[facei]); omega[celli] += w*sqrt(sqr(omegaVis) + sqr(omegaLog)); G[celli] += w *(nutw[facei] + nuw[facei]) *magGradUw[facei] *Cmu25*sqrt(k[celli]) /(kappa_*y[facei]); } }``` If it is divide by zero problem, since others are all coefficient, y[facei] must be problem. But I don't think y will become zero, and if it was problem, it should have crashed with simulations I've done with different configuration (lower speed, higher density) What would be the problem?? I am trying to fix this problem for months, but nobody neither helped nor commented to my questions. Please help me, or at least tell me where or whom I can ask for hint

 June 8, 2023, 00:46 #2 Member   Song Young-ik Join Date: Apr 2022 Posts: 41 Rep Power: 3 I couldn't find solution to this Maybe B.C was too extreme, so I just finished by excluding this case and only deal with ones that have lower velocity and higher density

 Tags omega, omegawallfunction, rans, rhocentralfoam, supersonic