|
[Sponsors] |
Temperature convergence problem with nonsmooth thermal conductivity |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 6, 2017, 18:10 |
Temperature convergence problem with nonsmooth thermal conductivity
|
#1 |
New Member
Join Date: Jan 2017
Posts: 7
Rep Power: 9 |
Hi all,
I am trying to run a problem where thermal conductivity is a non-smooth function of temperature, where the non-smoothness results from dealing with a phase change material. I am having trouble getting the temperature equation of the solver to converge under certain conditions and would be curious if anyone has any thoughts as to what may be going wrong. In my model, the conductivity is a linear function of temperature. For regions yet to be melted, the conductivity is k1(T) = a*T + b. Once a region has been melted, the conductivity becomes k2 = kfactor*k1(T), even if it re-solidifies. kfactor is between 10 and 100 for problems I want to run. This creates regions in the mesh where cells located next to each other can have similar temperatures but have a jump in conductivity between 10x and 100x. When I set kfactor to 1, my case runs smoothly with no convergence issues. If I modify my code to ignore the melted/unmelted distinction and let conductivity k = k2(T), I get the same (good) behavior as when I use kfactor = 1. This leads me to believe that I don’t have a bug in the implementation of the conductivity function and that the non-smooth jump in conductivity between cells may be the culprit. Below I include my solver setting files, as well as the last few lines of the OpenFoam equation residual output which includes the initial temperature equation blow-up and subsequent simulation crash. I’d be grateful if anyone has any ideas on how to resolve the issue of the temperature equation blowing up for kfactor > 10. I’m hopeful that tweaking some solver settings could iron out the convergence issues – I’ve made some blind attempts so far, but no luck. Any thoughts are appreciated! Thank you! fvSchemes: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 3.0.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { default Gauss upwind; div(phi,U) Gauss upwind; div((phi*interpolate(cp)),T) Gauss upwind; } laplacianSchemes { default none; //Gauss linear corrected; laplacian((lambda|rho),T) Gauss linear uncorrected; //corrected laplacian(nu,U) Gauss linear uncorrected; // corrected laplacian((1|A(U)),p_rgh) Gauss linear uncorrected; // corrected } interpolationSchemes { default linear; } snGradSchemes { default uncorrected; //corrected; } fluxRequired { default no; p_rgh; } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 3.0.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { p_rgh { solver GAMG; smoother GaussSeidel; tolerance 1e-8; relTol 0.01; } p_rghFinal { $p_rgh; relTol 0; } T { solver PBiCG; preconditioner DILU; tolerance 1e-7; relTol 0.1; } TFinal { solver PBiCG; preconditioner DILU; tolerance 1e-9; relTol 0; } U { solver PBiCG; preconditioner DILU; tolerance 1e-6; relTol 0.1; } UFinal { $U; relTol 0; } } PIMPLE { momentumPredictor yes; //yes; nOuterCorrectors 1; //1; nCorrectors 1; nNonOrthogonalCorrectors 0; pRefCell 0; pRefValue 0; } // ************************************************************************* // Code:
... ... ... Courant Number mean: 0.0006917597 max: 0.27723292 deltaT = 9.9667774e-07 PIMPLE: iteration 1 DILUPBiCG: Solving for Ux, Initial residual = 0.0047223043, Final residual = 2.1859185e-07, No Iterations 2 DILUPBiCG: Solving for Uy, Initial residual = 0.0048172404, Final residual = 2.3390652e-07, No Iterations 2 DILUPBiCG: Solving for Uz, Initial residual = 0.0041326105, Final residual = 1.7710191e-09, No Iterations 3 DILUPBiCG: Solving for T, Initial residual = 0.00060871525, Final residual = 9.7934538e-10, No Iterations 4 GAMG: Solving for p_rgh, Initial residual = 0.067143822, Final residual = 8.550094e-09, No Iterations 13 time step continuity errors : sum local = 3.4964727e-13, global = 9.497921e-14, cumulative = 4.9549033e-11 ExecutionTime = 284.84 s ClockTime = 287 s Time = 0.000703654485 Interpolating laser coordinate Interpolating laser coordinate Vx = 100 Vy = 0 Vmag = 100 Courant Number mean: 0.00069140376 max: 0.27616178 deltaT = 9.9667774e-07 PIMPLE: iteration 1 DILUPBiCG: Solving for Ux, Initial residual = 0.0043974518, Final residual = 4.3794962e-07, No Iterations 2 DILUPBiCG: Solving for Uy, Initial residual = 0.0044430772, Final residual = 3.5340057e-07, No Iterations 2 DILUPBiCG: Solving for Uz, Initial residual = 0.0047550922, Final residual = 1.9589747e-09, No Iterations 3 DILUPBiCG: Solving for T, Initial residual = 0.00061698156, Final residual = 93345.397, No Iterations 1001 GAMG: Solving for p_rgh, Initial residual = 0.99749556, Final residual = 6.74928e-09, No Iterations 21 time step continuity errors : sum local = 5.4155474e-11, global = 6.3819725e-14, cumulative = 4.9612853e-11 ExecutionTime = 291.17 s ClockTime = 293 s Time = 0.0007046511628 Interpolating laser coordinate Interpolating laser coordinate Vx = 100 Vy = 0 Vmag = 100 Courant Number mean: 0.00073293333 max: 2.4614658 deltaT = 4.0444894e-07 PIMPLE: iteration 1 DILUPBiCG: Solving for Ux, Initial residual = 0.99996533, Final residual = 4.1997867e-08, No Iterations 3 DILUPBiCG: Solving for Uy, Initial residual = 0.99996593, Final residual = 7.471817e-07, No Iterations 3 DILUPBiCG: Solving for Uz, Initial residual = 0.84149551, Final residual = 4.3093462e-09, No Iterations 3 DILUPBiCG: Solving for T, Initial residual = 1, Final residual = 5.326721e-10, No Iterations 11 GAMG: Solving for p_rgh, Initial residual = 1, Final residual = 8.2242381e-09, No Iterations 41 time step continuity errors : sum local = 3187537.2, global = -3187537.1, cumulative = -3187537.1 ExecutionTime = 291.84 s ClockTime = 294 s Time = 0.0007050556117 Interpolating laser coordinate Interpolating laser coordinate Vx = 100 Vy = 0 Vmag = 100 Courant Number mean: 5.0625884e+08 max: 2.3247589e+12 deltaT = 1.7397457e-19 PIMPLE: iteration 1 DILUPBiCG: Solving for Ux, Initial residual = 0.002170343, Final residual = 1.3269969e-08, No Iterations 2 DILUPBiCG: Solving for Uy, Initial residual = 0.004592665, Final residual = 2.2649814e-07, No Iterations 2 DILUPBiCG: Solving for Uz, Initial residual = 0.011799993, Final residual = 4.0934735e-10, No Iterations 3 DILUPBiCG: Solving for T, Initial residual = 1, Final residual = 4.219571e-10, No Iterations 4 GAMG: Solving for p_rgh, Initial residual = 1, Final residual = 6.0997958e-09, No Iterations 28 time step continuity errors : sum local = 2.5050765e+21, global = -2.5050765e+21, cumulative = -2.5050765e+21 ExecutionTime = 292.35 s ClockTime = 294 s Time = 0.0007050556117 Interpolating laser coordinate Interpolating laser coordinate Vx = 79.769059 Vy = 0 Vmag = 79.769059 Courant Number mean: 4.0417955e+23 max: 1.9357799e+27 deltaT = 8.9873118e-47 PIMPLE: iteration 1 DILUPBiCG: Solving for Ux, Initial residual = 0.00087760067, Final residual = 5.1400685e-08, No Iterations 2 DILUPBiCG: Solving for Uy, Initial residual = 0.0011133698, Final residual = 9.93714e-09, No Iterations 2 DILUPBiCG: Solving for Uz, Initial residual = 0.013898725, Final residual = 2.1458128e-08, No Iterations 3 [5] #0 [9] [4] #0 Foam::error::printStack(Foam::Ostream&)[8] #0 Foam::error::printStack(Foam::Ostream&)Foam::error::printStack(Foam::Ostream&)#0 Foam::error::printStack(Foam::Ostream&)-------------------------------------------------------------------------- An MPI process has executed an operation involving a call to the "fork()" system call to create a child process. Open MPI is currently operating in a condition that could result in memory corruption or other system errors; your MPI job may hang, crash, or produce silent data corruption. The use of fork() (or system() or other calls that create child processes) is strongly discouraged. ... ... ... |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[openSmoke] libOpenSMOKE | Tobi | OpenFOAM Community Contributions | 562 | January 25, 2023 09:21 |
Setting the height of the stream in the free channel | kevinmccartin | CFX | 12 | October 13, 2022 21:43 |
Problem in setting Boundary Condition | Madhatter92 | CFX | 12 | January 12, 2016 04:39 |
Indoor Air Temperature distribution - convergence problem | Shogan | FLUENT | 4 | May 8, 2014 02:07 |
The unit of thermal conductivity when adding temperature equation to icoFoam? | mxylondon | OpenFOAM | 2 | February 26, 2013 05:26 |