- **OpenFOAM**
(*http://www.cfd-online.com/Forums/openfoam/*)

- - **pipe flow with heat transfer**
(*http://www.cfd-online.com/Forums/openfoam/70891-pipe-flow-heat-transfer.html*)

pipe flow with heat transferHi all,
I recently started using OpenFoam so please apologize if I my question are trivial. But I am stucked right now with my case. I try to simulated heat transfer from a constant wall temperature or temperature profile to a fluid (air) flow in a pipe. The Reynoldsnumber is about 60. My case is 2D and axis-symmetric. I made the structured mesh in Gambit and translated it with fluentMeshToFoam into an OpenFoam mesh. What I have done so far: In the first place I tried to solve it without turbulence model using SimpleFoam with turbulence model "laminar" but I saw a huge dependency of my boundary layer growth or velocity on the symmetry axis of my mesh (same result in fluent). Second step was using a turbulence model (komegaSST) within SimpleFoam which yields to more realistic results. Currently I want to add heat transfer from the wall to the fluid with buoyantSimpleRadiationFoam with k-epsilon turbulence model equivalent to the tutorial case. Unlike the tutorial case hotRoom, I have an inlet and outlet BC. The problem I have it calculates negative density after a few time steps (delta t = 0.01s). My best guess is, that my BC and Initial Conditions are messed up but I don't see the mistake. I would appreciate if anybody can give me a hint where to start looking for the error. I added the error message, as well as my BC and IC files. The error message is as follows: Starting time loop Time = 0.01 DILUPBiCG: Solving for Ux, Initial residual = 0.999999, Final residual = 0.00620787, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 0.0069703, No Iterations 1 DILUPBiCG: Solving for h, Initial residual = 1, Final residual = 0.0277813, No Iterations 1 GAMG: Solving for p, Initial residual = 1, Final residual = 0.00965327, No Iterations 69 time step continuity errors : sum local = 4.55106e-05, global = -8.73226e-06, cumulative = -8.73226e-06 rho max/min : 0.69517 0.391125 DILUPBiCG: Solving for epsilon, Initial residual = 0.558883, Final residual = 0.0006318, No Iterations 1 DILUPBiCG: Solving for k, Initial residual = 1, Final residual = 0.00294338, No Iterations 1 ExecutionTime = 0.73 s ClockTime = 1 s Time = 0.02 DILUPBiCG: Solving for Ux, Initial residual = 0.445276, Final residual = 0.000707, No Iterations 2 DILUPBiCG: Solving for Uy, Initial residual = 0.0121541, Final residual = 0.000203211, No Iterations 1 DILUPBiCG: Solving for h, Initial residual = 0.0186012, Final residual = 0.000122994, No Iterations 1 GAMG: Solving for p, Initial residual = 0.95453, Final residual = 0.00787701, No Iterations 85 time step continuity errors : sum local = 2.59707e-05, global = -5.01278e-06, cumulative = -1.3745e-05 rho max/min : 0.695114 -227.645 DILUPBiCG: Solving for epsilon, Initial residual = 0.991925, Final residual = 0.0052452, No Iterations 1 DILUPBiCG: Solving for k, Initial residual = 0.999986, Final residual = 0.00224127, No Iterations 3 ExecutionTime = 1.2 s ClockTime = 1 s Time = 0.03 DILUPBiCG: Solving for Ux, Initial residual = 0.941892, Final residual = 0.0675285, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0.0012009, Final residual = 4.10287e-05, No Iterations 1 DILUPBiCG: Solving for h, Initial residual = 7.18965e-06, Final residual = 7.18965e-06, No Iterations 0 GAMG: Solving for p, Initial residual = 0.0799496, Final residual = 0.194671, No Iterations 1000 time step continuity errors : sum local = 2.45316, global = -0.59745, cumulative = -0.597464 rho max/min : 576.072 -3.91344e+12 DILUPBiCG: Solving for epsilon, Initial residual = 0.116192, Final residual = 0.00391972, No Iterations 1 bounding epsilon, min: -7615.77 max: 2366.98 average: -3.64714 DILUPBiCG: Solving for k, Initial residual = 0.0973264, Final residual = 0.0027766, No Iterations 2 bounding k, min: -2.65967e+08 max: 1.58173e+09 average: 120258 ExecutionTime = 5.51 s ClockTime = 6 s Time = 0.04 DILUPBiCG: Solving for Ux, Initial residual = 0.348629, Final residual = 0.00986564, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0.337128, Final residual = 0.00389718, No Iterations 1 DILUPBiCG: Solving for h, Initial residual = 1.21621e-05, Final residual = 9.17565e-07, No Iterations 1 #0 Foam::error::printStack(Foam::Ostream&) in "/home/fhampp/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so" #1 Foam::sigFpe::sigFpeHandler(int) in "/home/fhampp/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so" #2 ?? in "/lib/libc.so.6" #3 Foam::GAMGSolver::scalingFactor(Foam::Field<double >&, Foam::Field<double> const&, Foam::Field<double> const&, Foam::Field<double> const&) const in "/home/fhampp/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so" #4 Foam::GAMGSolver::scalingFactor(Foam::Field<double >&, Foam::lduMatrix const&, Foam::Field<double>&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const in "/home/fhampp/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so" #5 Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMa trix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const in "/home/fhampp/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so" #6 Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/home/fhampp/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so" #7 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/home/fhampp/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libfiniteVolume.so" #8 main in "/home/fhampp/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/buoyantSimpleRadiationFoam" #9 __libc_start_main in "/lib/libc.so.6" #10 _start at /usr/src/packages/BUILD/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:116 Floating point exception The radiation model is fvDOM with following coefficientsfvDOMCoeffs { nPhi 3; // azimuthal angles in PI/2 on X-Y.(from Y to X) nTheta 5; // polar angles in PI (from Z to X-Y plane) convergence 1e-3; // convergence criteria for radiation iteration maxIter 10; // maximum number of iterations } turbulence Model is k-epsilon model with following coefficientskEpsilonCoeffs { Cmu Cmu [ 0 0 0 0 0 0 0 ] 0.09; C1 C1 [ 0 0 0 0 0 0 0 ] 1.44; C2 C2 [ 0 0 0 0 0 0 0 ] 1.92; alphaEps alphaEps [ 0 0 0 0 0 0 0 ] 0.76923; } I just copied the thermophysical properties from the tutorial casethermoType hPsiThermo<pureMixture<constTransport<specieThermo <hConstThermo<perfectGas>>>>>; mixture air 1 28.9 1000 0 1.8e-05 0.7; pRef 1.0e5; Here my BC and IC:UinternalField uniform (0 -0.1 0); boundaryField { inlet { type fixedValue; value uniform (0 -0.1 0); } outflow { type zeroGradient; } wall { type fixedValue; value uniform (0 0 0); } symmetry { type symmetryPlane; } frontAndBackPlanes { type empty; } } pinternalField uniform 1.0e5; boundaryField { inlet { type zeroGradient; } outflow { type fixedValue; value uniform 1.0e5; } wall { type zeroGradient; } symmetry { type symmetryPlane; } frontAndBackPlanes { type empty; } } TinternalField uniform 500.0; boundaryField { inlet { type fixedValue; value uniform 500.0; } outflow { type zeroGradient; } wall { type fixedValue; value uniform 800.0; } symmetry { type symmetryPlane; } frontAndBackPlanes { type empty; } } kinternalField uniform 1.38e-4; boundaryField { inlet { type fixedValue; value uniform 1.38e-4; } outflow { type zeroGradient; } wall { type compressible::kqRWallFunction; value uniform 0; } symmetry { type symmetryPlane; } frontAndBackPlanes { type empty; } } epsiloninternalField uniform 1.90e-4; boundaryField { inlet { type fixedValue; value uniform 1.90e-4; } outflow { type zeroGradient; } wall { type compressible::epsilonWallFunction; Cmu 0.09; kappa 0.41; E 9.8; value uniform 0; } symmetry { type symmetryPlane; } frontAndBackPlanes { type empty; } } alphatinternalField uniform 0; boundaryField { inlet { type fixedValue; value uniform 0.0; } outflow { type fixedValue; value uniform 0.0; } wall { type compressible::alphatWallFunction; Prt 0.85; value uniform 0; } symmetry { type symmetryPlane; } frontAndBackPlanes { type empty; } } IDefaultinternalField uniform 0; boundaryField { inlet { type fixedValue; value uniform 0.0; } outflow { type fixedValue; value uniform 0.0; } wall { type greyDiffusiveRadiation; T T; emissivity 0.5; value uniform 0; } symmetry { type symmetryPlane; } frontAndBackPlanes { type empty; } } GinternalField uniform 0; boundaryField { inlet { type fixedValue; value uniform 0.0; } outflow { type fixedValue; value uniform 0.0; } wall { type MarshakRadiation; T T; emissivity 1; value uniform 0; } symmetry { type symmetryPlane; } frontAndBackPlanes { type empty; } } mutinternalField uniform 0; boundaryField { inlet { type zeroGradient; } outflow { type zeroGradient; } wall { type compressible::mutWallFunction; Cmu 0.09; kappa 0.41; E 9.8; value uniform 0; } symmetry { type symmetryPlane; } frontAndBackPlanes { type empty; } } Thanks a lot for your help I appreciate it. If you need any further details about the case please let me know and I will post them. Best regards, Fabian |

Hi Fabian,
I don't know the answer for your negative density problem. But I think because of the low Reynolds-number (indeed the Machnumber should be < 0.2) should your case be incompressible, density changes should only be there because of temperature changes. So why don't solving the problem with a boussinesq-solver... You solved the problem without heat-transfer incompressible, too. In a first step I would set the wall-temperature everywhere to the temperature of the flow and set the gravity to zero. The solution should be the same as using simpleFoam. In the next step change the wall-temperature...and set the right gravity... Regards Thomas |

Hi Thomas,
Thank you very much for your help. I am using buoyantBoussinesqPisoFoam now and it works fine. Now I only have to implement a radiation model into this solver. So we will see how it goes... Thanks again and best regards, Fabian |

All times are GMT -4. The time now is 23:46. |