Problems about the selection among "turbFoam", "rhoTurbFoam" and "buoyantFoam"
First, I shall use FOAM to simulate the steadystate singlephase natural circulation flow. (the following work will be twophase) Transient calculations are performed to obtain steadystate flow fields.
The problem is that I am wondering which standard solver I should select among "turbFoam", "rhoTurbFoam" and "buoyantFoam". For the "turbFoam", I need to add the energy conservation equation. For the "rhoTurbFoam" and "buoyantFoam", I need to set the density as a constant. And I also don't know what is the difference between "rhoTurbFoam" and "buoyantFoam". If you have some experiences on the solvers of "turbFoam", "rhoTurbFoam" and "buoyantFoam" or some experieces on solving this kind of problems. Would you please give me some comments? Any comments are appreciated. Thank you in advance. :) 
Hello Chiven,
I think in this case we should use BuoyantFoam because it also solves for thermophysical properties. My problem is also same but with some diffusion. I am trying to make ByouantSimpleFoam for water and hence I have to change it in EquationOfState part of code. I think you also have to do the same. Please report about any progress. I will do the same. JM 
Hi, JM, I am very great to know that you also do the same job as me. You are right, I also determined to use the buoyantFoam to calculate. Now I am doing the job how to change the thermo model for water. Just as you say, if I have a progress, I shall report it. Let's keep in touch and discussion.

Hi Chiven,
I think we have one easy way to do this. There is one folder liquids in /src. And there I found H2O.C and H20.H !! I am trying to use these directly instead of making lot of changes everywhere !! But I am just trying to get proper syntex to use it. Have you thought about this ? JM 
Hi, JM, the current thermo modelling was only designed for the treatment of gases, and is not well set up for liquids. Maybe the files of H2O.C and H20.H are for water steam. I have gone back my house. I can check it tomorrow when I go to the office.
This time, I am trying to do some simplifications, such as dealing with the liquid as Barotropic fluid, in which the pressure and density are supposed to satisfy a linear relation, like the solver of sonicLiquidFoam. 
Hi, JM, Good morning.
I check the files of H2O.C and H20.H, they are the thermophysical models for the liquid. I shall also try to use this files. Thanks.:) 
Hey Chiven,
Read this : http://www.cfdonline.com/Forums/ope...calmodel.html follow this and report your progress. JM 
Hi, JM, thanks. Basically, the method on that thread uses the current thermo modelling way for gas, I am not sure whether revising the codes only like this can get good results. Anyway, I shall try it and post the progress.

Hello Chevin,
I followed that but problem for me is to change basicThermo.H file where I have to give some fuction for rho and psi. Do you know relation between them for water? I tried to find some document about it but failed. When I tried to give constant values then errors flooded up. If you have any idea about solving this problem please tell, I know I am missing somehting very silly !! JM 
Hello, JM, let's find the relationship between rho and psi from the correlative codes of the sover of sonicLiquidFoam. Now, I can only be reading the codes line by line, and hope to get some ideas. In fact, I think you have done a good job on this problem.

Hi, JM, how about your progress?
I meet some problems about the pressure correction equation of pd, the terminal prompt is shown as follows.  Courant Number mean: 0 max: 0.969747 Time = 0.001 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 9.72577e06, No Iterations 53 DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 8.95847e06, No Iterations 57 DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 8.13133e06, No Iterations 54 DILUPBiCG: Solving for h, Initial residual = 1, Final residual = 5.99925e06, No Iterations 1 DICPCG: Solving for pd, Initial residual = 1, Final residual = 0.0991402, No Iterations 825 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 1.01851, global = 0.34174, cumulative = 0.34174 DILUPBiCG: Solving for h, Initial residual = 0.975358, Final residual = 6.23871e06, No Iterations 361 DICPCG: Solving for pd, Initial residual = 0.937704, Final residual = 0.984838, No Iterations 1001 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 72.9818, global = 1.14219, cumulative = 1.48393 DILUPBiCG: Solving for epsilon, Initial residual = 0.999991, Final residual = 9.82964e06, No Iterations 389 bounding epsilon, min: 1.60612e+13 max: 6.10538e+13 average: 4.66634e+07 DILUPBiCG: Solving for k, Initial residual = 1, Final residual = 0.000434815, No Iterations 1001 bounding k, min: 6.05555e+22 max: 6.89218e+22 average: 1.19419e+15 ExecutionTime = 4629.38 s ClockTime = 4632 s  
Hi,
Please print values for rho also, so that it is confirmed that solver is solving for water. And these large number of iterations shows that there is some problem with meshing or boundary conditions or intial conditions. I am struggling with density. It is not solving for water. I will reoport as soon as I will able to solve for water. JM 
Hi, JM,
Please try to use this equation "rho = rho0 + psi(p  p0)" on the file of "constantRhoI.H" to calculate the density. Chiven 
Thanks Chiven,
I did it and successful, but I dont know what happened to my temperature. Now solver is not calculating temperature. Actually in my problem, other inlet has different temperature and hence it should calculate diffusion of temperature. I have added scalar transport equation for Temperature. I am checking the fault. Any suggestions are welcomed. And about your problem, as you have added previous equation, ur solver should work fine. Divergence of solution solely depends on meshing, boundary conditions and intian conditions. JM 
Hi, JM, it is so happy to know your progress.
The temperature is calculated by the files of "specieThermo.C specieThermo.H specieThermoI.H" in the directory of "/src/thermophysicalModels/specie/lnInclude". I also meet the same kind of problems, shown in follows. Now I am reading these codes line by line, and hope to get some ideas. About the large iteration number when solving pd, I think the meshing is OK, because it is good in FLUENT, and I have checked the boundary conditions and initial condition. I set the p and pd like the hotRoom example case, except the symmetryPlane condition. How do you set the p and pd in "/0" directory?  Maximum number of iterations exceeded#0 _ZN4Foam5error10printStackERNS_7OstreamE0xb447b0 in "/home/g2/e090012/OpenFOAM/OpenFOAM1.5/lib/linuxIA64GccDPOpt/libOpenFOAM.so" #1 _ZN4Foam5error5abortEv0x1011460 in "/home/g2/e090012/OpenFOAM/OpenFOAM1.5/lib/linuxIA64GccDPOpt/libOpenFOAM.so" #2 _ZN4Foam7hThermoINS_11pureMixtureINS_14constTransp ortINS_12specieThermoINS_12hConstThermoINS_11const antRhoEEEEEEEEEE9calculateEv0x158c6b0 in "/home/g2/e090012/OpenFOAM/OpenFOAM1.5/lib/linuxIA64GccDPOpt/libbasicThermophysicalModels.so" #3 _ZN4Foam7hThermoINS_11pureMixtureINS_14constTransp ortINS_12specieThermoINS_12hConstThermoINS_11const antRhoEEEEEEEEEE7correctEv0x156d590 in "/home/g2/e090012/OpenFOAM/OpenFOAM1.5/lib/linuxIA64GccDPOpt/libbasicThermophysicalModels.so" #4 main in "/home/g2/e090012/OpenFOAM/OpenFOAM1.5/applications/bin/linuxIA64GccDPOpt/buoyantFoam" #5 __libc_start_main0x745400 in "/lib/tls/libc.so.6.1" #6 _start in "/home/g2/e090012/OpenFOAM/OpenFOAM1.5/applications/bin/linuxIA64GccDPOpt/buoyantFoam" 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/g2/e090012/OpenFOAM/OpenFOAM1.5/src/thermophysicalModels/specie/lnInclude/specieThermoI.H at line 78. FOAM aborting  
Hi, for P and Pd, I am posting my whole files: P: /** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 1.5   \\ / A nd  Web: http://www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 1 2 0 0 0 0]; internalField uniform 100000; boundaryField { walls { type zeroGradient; } inlet1 { type zeroGradient; } inlet2 { type zeroGradient; } upper { type symmetryPlane; } outlet { type pressureOutlet; value $internalField; } } // ************************************************** *********************** // For pd: /** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 1.5   \\ / A nd  Web: http://www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class volScalarField; object pd; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 1 2 0 0 0 0]; internalField uniform 0; boundaryField { walls { type zeroGradient; } inlet1 { type zeroGradient; } inlet2 { type zeroGradient; } upper { type symmetryPlane; } outlet { type fixedValue; value $internalField; } } // ************************************************** *********************** // Notice the condition for outlet. for p it is pressure outlet and for pd it is fixed value !! I encountered many problems last month for setting conditions for p and pd ! Now these conditions work very well for my case. I am checking that how I am calculating temperature and discuss with you soon. let me know if this works ! JM 
Hi, JM, thank you very much.
I revise the p and pd referencing to yours. The iteration number when solving pd is still large. But before it get the same error as the former, it can run from "Time = 0.001" to "Time = 0.008". Chiven 
hello Chiven,
I tested code for test case which has small mesh elements. It worked ! But when I run code for my real case which has large mesh then it gave exactly same error as you have and at the same point, while calculating pd. smoothSolver: Solving for Ux, Initial residual = 0.197962, Final residual = 5.79259e07, No Iterations 18 smoothSolver: Solving for Uy, Initial residual = 0.199521, Final residual = 5.73765e07, No Iterations 18 smoothSolver: Solving for Uz, Initial residual = 0.358506, Final residual = 7.76545e07, No Iterations 25 DILUPBiCG: Solving for h, Initial residual = 0.188418, Final residual = 7.07046e06, No Iterations 5 Maximum number of iterations exceeded#0 Foam::error::printStack(Foam::Ostream&) in "/usr/lib/OpenFOAM1.5/lib/libOpenFOAM.so" #1 Foam::error::abort() in "/usr/lib/OpenFOAM1.5/lib/libOpenFOAM.so" #2 Foam::hThermo<Foam::pureMixture<Foam::constTranspo rt<Foam::specieThermo<Foam::hConstThermo<Foam::con stantRho> > > > >::calculate() in "/home/users/jagmohan//OpenFOAM/jagmohan1.5/lib/libbasicThermophysicalModelsTEST.so" #3 Foam::hThermo<Foam::pureMixture<Foam::constTranspo rt<Foam::specieThermo<Foam::hConstThermo<Foam::con stantRho> > > > >::correct() in "/home/users/jagmohan//OpenFOAM/jagmohan1.5/lib/libbasicThermophysicalModelsTEST.so" #4 main in "/home/users/jagmohan//OpenFOAM/jagmohan1.5/applications/bin/buoyantLiquidTransportFoam" #5 __libc_start_main in "/lib/libc.so.6" #6 _start in "/home/users/jagmohan//OpenFOAM/jagmohan1.5/applications/bin/buoyantLiquidTransportFoam" From function specieThermo<thermo>::T(scalar f, scalar T0, scalar (specieThermo<thermo>::*F)(const scalar) const, scalar (specieThermo<thermo>::*dFdT)(constscalar) const) const in file /usr/lib/OpenFOAM1.5/src/thermophysicalModels/specie/lnInclude/specieThermoI.H at line 78. FOAM aborting I will try every new thing now for its boundary conditions etc. If you find any way to fix this error then please post. I will do the same. JM 
Hi, JM, please try to change the tolerance of pd and pdFinal from 1e6 to 1e5.
For my case, I also change deltaT to small enough to ensure the courant number less than 0.5. But for your steadystate case, maybe it is not necessary to take care of the courant number. Now, I can calculate it though the iteration number is still large.  Courant Number mean: 0.021429 max: 0.484874 Time = 0.008 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCG: Solving for Ux, Initial residual = 0.104507, Final residual = 7.96564e06, No Iterations 4 DILUPBiCG: Solving for Uy, Initial residual = 0.0797719, Final residual = 4.58109e06, No Iterations 3 DILUPBiCG: Solving for Uz, Initial residual = 0.0593765, Final residual = 7.29692e06, No Iterations 3 DILUPBiCG: Solving for h, Initial residual = 0.00258881, Final residual = 2.84125e06, No Iterations 2 DICPCG: Solving for pd, Initial residual = 0.0118964, Final residual = 0.000934946, No Iterations 2 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 1.29271e05, global = 1.31534e08, cumulative = 0.000149418 DILUPBiCG: Solving for h, Initial residual = 0.00209946, Final residual = 7.78419e06, No Iterations 2 DICPCG: Solving for pd, Initial residual = 0.00259561, Final residual = 9.88338e06, No Iterations 509 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 4.51602e06, global = 4.10277e06, cumulative = 0.000153521 DILUPBiCG: Solving for epsilon, Initial residual = 0.0380446, Final residual = 3.86299e06, No Iterations 3 bounding epsilon, min: 0.948196 max: 309.973 average: 6.00859 DILUPBiCG: Solving for k, Initial residual = 0.0387516, Final residual = 9.04187e06, No Iterations 3 ExecutionTime = 10597.6 s ClockTime = 10602 s  Chiven 
Hi, JM, how about your progress.
I solve the large iteration number problem for solving pd through revising the pRef value to 101325.0. Now I also come to the problem of the specieThermoI.H. Because this class are for the thermodynamics, I think the boundary conditions are not the key point at this time. Maybe we can consider how to use the H2O class as you mentioned before. But I am not sure about it. Chiven 
All times are GMT 4. The time now is 09:10. 