|
[Sponsors] |
February 15, 2013, 13:04 |
buoyantPimpleFoam - Water convection problem
|
#1 |
Member
Davide D.
Join Date: Oct 2012
Location: Birmingham (UK)
Posts: 44
Rep Power: 13 |
Hi everyone,
I am trying to simulate convection into a water-filled horizontal cylinder. One end is kept at a higher temperature than the other boundaries. The solver gives the following error: Code:
--> FOAM FATAL ERROR: Maximum number of iterations exceeded From function specieThermo<Thermo>::T(scalar f, scalar T0, scalar (specieThermo<Thermo>::*F)(const scalar) const, scalar (specieThermo<Thermo>::*dFdT)(const scalar) const) const in file /home/opencfd/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/specie/lnInclude/specieThermoI.H at line 69. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #1 Foam::error::abort() in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #2 Foam::specieThermo<Foam::hPolynomialThermo<Foam::icoPolynomial<8>, 8> >::T(double, double, double (Foam::specieThermo<Foam::hPolynomialThermo<Foam::icoPolynomial<8>, 8> >::*)(double) const, double (Foam::specieThermo<Foam::hPolynomialThermo<Foam::icoPolynomial<8>, 8> >::*)(double) const, double (Foam::specieThermo<Foam::hPolynomialThermo<Foam::icoPolynomial<8>, 8> >::*)(double) const) const in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #3 Foam::hRhoThermo<Foam::pureMixture<Foam::polynomialTransport<Foam::specieThermo<Foam::hPolynomialThermo<Foam::icoPolynomial<8>, 8> >, 8> > >::calculate() in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #4 Foam::hRhoThermo<Foam::pureMixture<Foam::polynomialTransport<Foam::specieThermo<Foam::hPolynomialThermo<Foam::icoPolynomial<8>, 8> >, 8> > >::correct() in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #5 in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/buoyantPimpleFoam" #6 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #7 in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/buoyantPimpleFoam" Aborted (core dumped) Code:
thermoType hRhoThermo<pureMixture<icoPoly8ThermoPhysics>>; pRef 100000; mixture { specie { nMoles 1; molWeight 1; } equationOfState { rhoCoeffs<8> ( 1000 0 0 0 0 0 0 0); } thermodynamics { Hf 0; Sf 0; CpCoeffs<8> ( 4186 0 0 0 0 0 0 0); } transport { Pr 7.01; muCoeffs<8> ( 1.002e-3 0 0 0 0 0 0 0); kappaCoeffs<8> ( 0.596 0 0 0 0 0 0 0); } } Thank you in advance. |
|
February 18, 2013, 05:17 |
|
#2 |
Senior Member
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 17 |
hello,
You didn't give your BC for T (you should), but my gess is you've got a 0 value somewhere for T. regards, olivier |
|
February 18, 2013, 06:18 |
|
#3 |
Member
Davide D.
Join Date: Oct 2012
Location: Birmingham (UK)
Posts: 44
Rep Power: 13 |
Hello,
Thank you for your answer. The boundary conditions for T are: Code:
dimensions [0 0 0 1 0 0 0]; internalField uniform 293; boundaryField { pipeWall { type fixedValue; value uniform 288.15; // 15 degC } inlet { type fixedValue; value uniform 390; } outlet { type zeroGradient; } } Code:
dimensions [0 0 0 1 0 0 0]; internalField uniform 293; boundaryField { pipeWall { type fixedValue; value uniform 390; // value uniform 288.15; // 15 degC } inlet { type fixedValue; value uniform 390; // value uniform 307.75; // 34.6 degC } outlet { type fixedValue; value uniform 390; // type zeroGradient; } } |
|
February 19, 2013, 04:58 |
|
#4 |
Senior Member
|
Hi,
I guess your fixed temperature outlet is giving you the error. Please change this back to zeroGradient and all will be fine. At the moment you are forcing the flow to advect heat upstream, which won't happen. Regards, Tom |
|
February 19, 2013, 05:45 |
|
#5 |
Member
Davide D.
Join Date: Oct 2012
Location: Birmingham (UK)
Posts: 44
Rep Power: 13 |
Hi tomf,
I tried, But I still incur in the same error |
|
February 19, 2013, 07:25 |
|
#6 |
Senior Member
|
These boundary conditions for T should work fine if you have only outflow at the outlet and inflow at the inlet.
Other reasons that may give problems: - Mesh - settings in fvSchemes, fvSolution, - boundary conditions for pressure, velocity, turbulence. Please check those, or share them, maybe someone can help. Regards, Tom |
|
February 19, 2013, 11:35 |
|
#7 |
Member
Davide D.
Join Date: Oct 2012
Location: Birmingham (UK)
Posts: 44
Rep Power: 13 |
I have run this trial version. It should reproduce am equilibrium state, but it returns the same error:
p Code:
dimensions [1 -1 -2 0 0 0 0]; internalField uniform 1e5; boundaryField { pipeWall { type fixedValue; value uniform 1e5; } inlet { type fixedValue; value uniform 1e5; } outlet{ type fixedValue; value uniform 1e5; } } Code:
internalField uniform 390; boundaryField { pipeWall { type fixedValue; value uniform 390; } inlet { type fixedValue; value uniform 390; } outlet { value uniform 390; } } Code:
dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { pipeWall { type fixedValue; value uniform (0 0 0); } inlet { type fixedValue; value uniform (0 0 0); } outlet { type fixedValue; value uniform (0 0 0); } } Code:
ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { default none; div(phi,U) Gauss linear; div(phi,h) Gauss linear; div(phi,k) Gauss linear; div(phi,epsilon) Gauss linear; div(phi,R) Gauss linear; div(phi,K) Gauss linear; div(R) Gauss linear; div((muEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { default none; laplacian(muEff,U) Gauss linear corrected; laplacian((rho*(1|A(U))),p_rgh) Gauss linear corrected; laplacian(alphaEff,h) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected; laplacian(DepsilonEff,epsilon) Gauss linear corrected; laplacian(DREff,R) Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } fluxRequired { default no; p_rgh; } Code:
solvers { "rho.*" { solver PCG; preconditioner DIC; tolerance 0; relTol 0; } p_rgh { solver PCG; preconditioner DIC; tolerance 1e-8; relTol 0.01; } p_rghFinal { $p_rgh; relTol 0; } "(U|h|k|epsilon|R)" { solver PBiCG; preconditioner DILU; tolerance 1e-6; relTol 0.1; } "(U|h|k|epsilon|R)Final" { $U; relTol 0; } } PIMPLE { momentumPredictor yes; nOuterCorrectors 1; nCorrectors 2; nNonOrthogonalCorrectors 0; } Code:
thermoType hRhoThermo<pureMixture<icoPoly8ThermoPhysics>>; pRef 100000; mixture { specie { nMoles 1; // not used since pureMixture and not ideal gas molWeight 1; // idem } equationOfState // rho(T) { rhoCoeffs<8> ( 1000 0 0 0 0 0 0 0); // coef a + bT+cT²+... } thermodynamics { Hf 0; Sf 0; CpCoeffs<8> ( 4186 0 0 0 0 0 0 0); // Cp(T) } transport { Pr 7.01; muCoeffs<8> // viscosity(T) ( 1.002e-3 0 0 0 0 0 0 0); kappaCoeffs<8> //conductivity(T) ( 0.596 0 0 0 0 0 0 0); } } |
|
February 20, 2013, 04:18 |
|
#8 |
Senior Member
|
Ok, this is just what I think may be the problem. You have an analytically valid solution, basically you have just a stagnant tube of water. However numerically there are small differences, you are now trying to solve for them, but with all the boundary conditions fixed, the solver can not handle this. You have over constrained the problem numerically. This means the solver is trying very hard to find a valid solution, but it can not, returning an error. Furthermore you have the linear scheme on all variables, which is not very robust and would require a very high quality mesh. I would suggest to have:
U,T: fixedValue at the inlet, zeroGradient at the outlet, walls: fixedValue p: zeroGradient at inlet and walls, fixedValue at outlet If it starts at least one iteration and still fails, change your fvSchemes with bounded schemes. If you do not have flow, there will be no solution, except the trivial one you already set up. Good luck, Tom |
|
February 20, 2013, 08:57 |
|
#9 |
Member
Davide D.
Join Date: Oct 2012
Location: Birmingham (UK)
Posts: 44
Rep Power: 13 |
Thank you for your answer, now it doesn't give the error message anymore.
However, I don't understand the solution's behavior. I slightly changed the boundary condition: T=390 also for the wall, and I oriented the g field in order to have the pipe placed in vertical position, with outlet on the top and inlet on the bottom. I set endTime to 2000 s. I was expecting to see a progressive heating from the walls towards the centre, and also some convective flows, but I achieved only a partial heating limited to a thin layer next to walls, and no convective motion. |
|
February 20, 2013, 09:14 |
|
#10 |
Senior Member
|
Well with a Prandtl number of 7 I would expect the thermal boundary layer to be even smaller than the velocity boundary layer. Obviously this all relates to the dimensions (Reynolds number) of your pipe flow. If the diameter of your pipe is a lot larger than the boundary layer, than you should see the result you have. If the diameter is small, you would get the result you expect.
|
|
February 20, 2013, 13:33 |
|
#11 |
Member
Davide D.
Join Date: Oct 2012
Location: Birmingham (UK)
Posts: 44
Rep Power: 13 |
Thank you for your answer.
I took the Prandtl number value from the Prandtl number value for water at room temperature. I removed the line that gives the Prandtl number value in thermophysicalProperties and the simulation runs without problem; the thermal boundary layer becomes a little thicker. Seems more feasible |
|
March 5, 2013, 10:19 |
|
#12 |
Member
Davide D.
Join Date: Oct 2012
Location: Birmingham (UK)
Posts: 44
Rep Power: 13 |
I tried to set up constantGradient boundary condition, but it crashes. The new T file is:
Code:
dimensions [0 0 0 1 0 0 0]; internalField uniform 278.15; // 5 degC boundaryField { pipeWall { type fixedGradient; gradient uniform -206218; // Cast iron } inlet { type fixedValue; value uniform 283.15; // 10 degC } outlet { type zeroGradient; } } Code:
--> FOAM FATAL ERROR: Maximum number of iterations exceeded From function specieThermo<Thermo>::T(scalar f, scalar T0, scalar (specieThermo<Thermo>::*F)(const scalar) const, scalar (specieThermo<Thermo>::*dFdT)(const scalar) const) const in file /home/opencfd/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/specie/lnInclude/specieThermoI.H at line 69. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #1 Foam::error::abort() in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #2 Foam::specieThermo<Foam::hPolynomialThermo<Foam::icoPolynomial<8>, 8> >::T(double, double, double (Foam::specieThermo<Foam::hPolynomialThermo<Foam::icoPolynomial<8>, 8> >::*)(double) const, double (Foam::specieThermo<Foam::hPolynomialThermo<Foam::icoPolynomial<8>, 8> >::*)(double) const, double (Foam::specieThermo<Foam::hPolynomialThermo<Foam::icoPolynomial<8>, 8> >::*)(double) const) const in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #3 Foam::hRhoThermo<Foam::pureMixture<Foam::polynomialTransport<Foam::specieThermo<Foam::hPolynomialThermo<Foam::icoPolynomial<8>, 8> >, 8> > >::calculate() in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #4 Foam::hRhoThermo<Foam::pureMixture<Foam::polynomialTransport<Foam::specieThermo<Foam::hPolynomialThermo<Foam::icoPolynomial<8>, 8> >, 8> > >::hRhoThermo(Foam::fvMesh const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #5 Foam::basicRhoThermo::addfvMeshConstructorToTable<Foam::hRhoThermo<Foam::pureMixture<Foam::polynomialTransport<Foam::specieThermo<Foam::hPolynomialThermo<Foam::icoPolynomial<8>, 8> >, 8> > > >::New(Foam::fvMesh const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #6 Foam::basicRhoThermo::New(Foam::fvMesh const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #7 in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/buoyantPimpleFoam" #8 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #9 in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/buoyantPimpleFoam" Aborted (core dumped) |
|
March 7, 2013, 06:23 |
|
#13 |
Member
Davide D.
Join Date: Oct 2012
Location: Birmingham (UK)
Posts: 44
Rep Power: 13 |
Further information: before crashing, temperature near the borders exceeds initial data temperatures
|
|
March 8, 2013, 04:08 |
|
#14 | |
Senior Member
|
Hi,
Are you absolutely sure, this is the correct gradient? Quote:
|
||
March 8, 2013, 05:33 |
|
#15 |
Member
Davide D.
Join Date: Oct 2012
Location: Birmingham (UK)
Posts: 44
Rep Power: 13 |
Hi tomf,
The problem is that temperature inside the pipe drops very quickly, i.e. about 5 degrees in 5 mm. That is why the gradient is so large. By the way, I also tried wallHeatTransfer BC: Code:
type wallHeatTransfer; Tinf uniform 258.15; alphaWall uniform 0.4; Code:
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #1 Foam::sigSegv::sigHandler(int) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #2 in "/lib/x86_64-linux-gnu/libc.so.6" #3 Foam::wallHeatTransferFvPatchScalarField::updateCoeffs() in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #4 Foam::mixedFvPatchField<double>::evaluate(Foam::UPstream::commsTypes) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #5 Foam::wallHeatTransferFvPatchScalarField::wallHeatTransferFvPatchScalarField(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #6 Foam::fvPatchField<double>::adddictionaryConstructorToTable<Foam::wallHeatTransferFvPatchScalarField>::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #7 Foam::fvPatchField<double>::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/buoyantPimpleFoam" #8 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::GeometricBoundaryField(Foam::fvBoundaryMesh const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/buoyantPimpleFoam" #9 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::readField(Foam::dictionary const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/buoyantPimpleFoam" #10 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::readField(Foam::Istream&) in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/buoyantPimpleFoam" #11 at basicThermo.C:0 #12 Foam::basicThermo::basicThermo(Foam::fvMesh const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #13 Foam::basicRhoThermo::basicRhoThermo(Foam::fvMesh const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #14 Foam::hRhoThermo<Foam::pureMixture<Foam::polynomialTransport<Foam::specieThermo<Foam::hPolynomialThermo<Foam::icoPolynomial<8>, 8> >, 8> > >::hRhoThermo(Foam::fvMesh const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #15 Foam::basicRhoThermo::addfvMeshConstructorToTable<Foam::hRhoThermo<Foam::pureMixture<Foam::polynomialTransport<Foam::specieThermo<Foam::hPolynomialThermo<Foam::icoPolynomial<8>, 8> >, 8> > > >::New(Foam::fvMesh const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #16 Foam::basicRhoThermo::New(Foam::fvMesh const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so" #17 in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/buoyantPimpleFoam" #18 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #19 in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/buoyantPimpleFoam" Segmentation fault (core dumped) |
|
March 8, 2013, 07:39 |
|
#16 |
Senior Member
|
I have the feeling the gradient may be too large. Did you try with a smaller gradient? If that works, than maybe you can ramp up the gradient in order to get past the initial phase.
I have not tried the wallHeatTransfer BC myself, so I can not comment on that one. Regards, Tom |
|
October 1, 2015, 07:41 |
|
#17 |
New Member
Join Date: Sep 2015
Posts: 2
Rep Power: 0 |
Colleagues,
I posted a new thread regarding BuoyantPimpleFoam here: http://www.cfd-online.com/Forums/ope...tml#post565964 Can any of you take a look at it and offer some advice? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Natural Convection heat transfer problem | srinivasa | FLUENT | 21 | November 11, 2016 06:08 |
Getting the pressure waves in Fluent for a water hammer problem | teopetre | FLUENT | 2 | August 6, 2013 19:24 |
Numerical oscillations in CFX with water boiling problem. | michujo | CFX | 4 | December 16, 2011 09:00 |
Natural Convection Problem | Eduardo | FLUENT | 0 | October 21, 2006 14:04 |
Mixed Convection Problem | Leo | FLUENT | 4 | April 15, 2002 07:28 |