CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Problems about the selection among "turbFoam", "rhoTurbFoam" and "buoyantFoam"

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 25, 2009, 21:46
Default Problems about the selection among "turbFoam", "rhoTurbFoam" and "buoyantFoam"
  #1
Senior Member
 
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 16
chiven is on a distinguished road
First, I shall use FOAM to simulate the steady-state single-phase natural circulation flow. (the following work will be two-phase) Transient calculations are performed to obtain steady-state 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.

Last edited by chiven; June 9, 2009 at 05:20.
chiven is offline   Reply With Quote

Old   June 3, 2009, 09:43
Default
  #2
Member
 
Jagmohan Meena
Join Date: May 2009
Posts: 30
Rep Power: 16
jmmeena is on a distinguished road
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
jmmeena is offline   Reply With Quote

Old   June 3, 2009, 09:58
Default
  #3
Senior Member
 
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 16
chiven is on a distinguished road
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.
chiven is offline   Reply With Quote

Old   June 3, 2009, 10:24
Default
  #4
Member
 
Jagmohan Meena
Join Date: May 2009
Posts: 30
Rep Power: 16
jmmeena is on a distinguished road
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
jmmeena is offline   Reply With Quote

Old   June 3, 2009, 10:52
Default
  #5
Senior Member
 
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 16
chiven is on a distinguished road
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.

Last edited by chiven; June 3, 2009 at 20:29.
chiven is offline   Reply With Quote

Old   June 3, 2009, 20:35
Default
  #6
Senior Member
 
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 16
chiven is on a distinguished road
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.

Last edited by chiven; June 3, 2009 at 21:52.
chiven is offline   Reply With Quote

Old   June 4, 2009, 13:46
Default
  #7
Member
 
Jagmohan Meena
Join Date: May 2009
Posts: 30
Rep Power: 16
jmmeena is on a distinguished road
Hey Chiven,

Read this :

http://www.cfd-online.com/Forums/ope...cal-model.html

follow this and report your progress.

JM
jmmeena is offline   Reply With Quote

Old   June 5, 2009, 03:39
Default
  #8
Senior Member
 
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 16
chiven is on a distinguished road
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.
chiven is offline   Reply With Quote

Old   June 5, 2009, 07:11
Default
  #9
Member
 
Jagmohan Meena
Join Date: May 2009
Posts: 30
Rep Power: 16
jmmeena is on a distinguished road
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
jmmeena is offline   Reply With Quote

Old   June 5, 2009, 07:56
Default
  #10
Senior Member
 
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 16
chiven is on a distinguished road
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.
chiven is offline   Reply With Quote

Old   June 8, 2009, 09:51
Default
  #11
Senior Member
 
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 16
chiven is on a distinguished road
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.72577e-06, No Iterations 53
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 8.95847e-06, No Iterations 57
DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 8.13133e-06, No Iterations 54
DILUPBiCG: Solving for h, Initial residual = 1, Final residual = 5.99925e-06, 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.23871e-06, 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.82964e-06, 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

-----------------------------------------------------------------------------------------------
chiven is offline   Reply With Quote

Old   June 8, 2009, 10:14
Default
  #12
Member
 
Jagmohan Meena
Join Date: May 2009
Posts: 30
Rep Power: 16
jmmeena is on a distinguished road
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
jmmeena is offline   Reply With Quote

Old   June 8, 2009, 20:24
Default
  #13
Senior Member
 
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 16
chiven is on a distinguished road
Hi, JM,
Please try to use this equation "rho = rho0 + psi(p - p0)" on the file of "constantRhoI.H" to calculate the density.

Chiven
chiven is offline   Reply With Quote

Old   June 9, 2009, 04:26
Default
  #14
Member
 
Jagmohan Meena
Join Date: May 2009
Posts: 30
Rep Power: 16
jmmeena is on a distinguished road
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
jmmeena is offline   Reply With Quote

Old   June 9, 2009, 05:14
Default
  #15
Senior Member
 
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 16
chiven is on a distinguished road
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_7OstreamE-0xb447b0
in "/home/g2/e090012/OpenFOAM/OpenFOAM-1.5/lib/linuxIA64GccDPOpt/libOpenFOAM.so"
#1 _ZN4Foam5error5abortEv-0x1011460
in "/home/g2/e090012/OpenFOAM/OpenFOAM-1.5/lib/linuxIA64GccDPOpt/libOpenFOAM.so"
#2 _ZN4Foam7hThermoINS_11pureMixtureINS_14constTransp ortINS_12specieThermoINS_12hConstThermoINS_11const antRhoEEEEEEEEEE9calculateEv-0x158c6b0
in "/home/g2/e090012/OpenFOAM/OpenFOAM-1.5/lib/linuxIA64GccDPOpt/libbasicThermophysicalModels.so"
#3 _ZN4Foam7hThermoINS_11pureMixtureINS_14constTransp ortINS_12specieThermoINS_12hConstThermoINS_11const antRhoEEEEEEEEEE7correctEv-0x156d590
in "/home/g2/e090012/OpenFOAM/OpenFOAM-1.5/lib/linuxIA64GccDPOpt/libbasicThermophysicalModels.so"
#4 main in "/home/g2/e090012/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxIA64GccDPOpt/buoyantFoam"
#5 __libc_start_main-0x745400
in "/lib/tls/libc.so.6.1"
#6 _start in "/home/g2/e090012/OpenFOAM/OpenFOAM-1.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/OpenFOAM-1.5/src/thermophysicalModels/specie/lnInclude/specieThermoI.H at line 78.
FOAM aborting
-------------------------------------------------------------------------------------------
chiven is offline   Reply With Quote

Old   June 9, 2009, 05:32
Default
  #16
Member
 
Jagmohan Meena
Join Date: May 2009
Posts: 30
Rep Power: 16
jmmeena is on a distinguished road
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
jmmeena is offline   Reply With Quote

Old   June 9, 2009, 10:53
Default
  #17
Senior Member
 
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 16
chiven is on a distinguished road
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
chiven is offline   Reply With Quote

Old   June 9, 2009, 11:01
Default
  #18
Member
 
Jagmohan Meena
Join Date: May 2009
Posts: 30
Rep Power: 16
jmmeena is on a distinguished road
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.79259e-07, No Iterations 18
smoothSolver: Solving for Uy, Initial residual = 0.199521, Final residual = 5.73765e-07, No Iterations 18
smoothSolver: Solving for Uz, Initial residual = 0.358506, Final residual = 7.76545e-07, No Iterations 25
DILUPBiCG: Solving for h, Initial residual = 0.188418, Final residual = 7.07046e-06, No Iterations 5


Maximum number of iterations exceeded#0 Foam::error:rintStack(Foam::Ostream&) in "/usr/lib/OpenFOAM-1.5/lib/libOpenFOAM.so"
#1 Foam::error::abort() in "/usr/lib/OpenFOAM-1.5/lib/libOpenFOAM.so"
#2 Foam::hThermo<Foam:ureMixture<Foam::constTranspo rt<Foam::specieThermo<Foam::hConstThermo<Foam::con stantRho> > > > >::calculate() in "/home/users/jagmohan//OpenFOAM/jagmohan-1.5/lib/libbasicThermophysicalModelsTEST.so"
#3 Foam::hThermo<Foam:ureMixture<Foam::constTranspo rt<Foam::specieThermo<Foam::hConstThermo<Foam::con stantRho> > > > >::correct() in "/home/users/jagmohan//OpenFOAM/jagmohan-1.5/lib/libbasicThermophysicalModelsTEST.so"
#4 main in "/home/users/jagmohan//OpenFOAM/jagmohan-1.5/applications/bin/buoyantLiquidTransportFoam"
#5 __libc_start_main in "/lib/libc.so.6"
#6 _start in "/home/users/jagmohan//OpenFOAM/jagmohan-1.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/OpenFOAM-1.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

Last edited by jmmeena; June 9, 2009 at 15:24. Reason: Worked only for test case !
jmmeena is offline   Reply With Quote

Old   June 9, 2009, 23:10
Default
  #19
Senior Member
 
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 16
chiven is on a distinguished road
Hi, JM, please try to change the tolerance of pd and pdFinal from 1e-6 to 1e-5.
For my case, I also change deltaT to small enough to ensure the courant number less than 0.5. But for your steady-state 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.96564e-06, No Iterations 4
DILUPBiCG: Solving for Uy, Initial residual = 0.0797719, Final residual = 4.58109e-06, No Iterations 3
DILUPBiCG: Solving for Uz, Initial residual = 0.0593765, Final residual = 7.29692e-06, No Iterations 3
DILUPBiCG: Solving for h, Initial residual = 0.00258881, Final residual = 2.84125e-06, 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.29271e-05, global = -1.31534e-08, cumulative = 0.000149418
DILUPBiCG: Solving for h, Initial residual = 0.00209946, Final residual = 7.78419e-06, No Iterations 2
DICPCG: Solving for pd, Initial residual = 0.00259561, Final residual = 9.88338e-06, No Iterations 509
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 4.51602e-06, global = 4.10277e-06, cumulative = 0.000153521
DILUPBiCG: Solving for epsilon, Initial residual = 0.0380446, Final residual = 3.86299e-06, 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.04187e-06, No Iterations 3
ExecutionTime = 10597.6 s ClockTime = 10602 s
---------------------------------------------------------------------------------------------------

Chiven
chiven is offline   Reply With Quote

Old   June 16, 2009, 01:51
Default
  #20
Senior Member
 
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 16
chiven is on a distinguished road
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
chiven is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run time Selection Mechanism - Some help required to understand jaswi OpenFOAM Programming & Development 3 October 29, 2015 14:42
Needed Benchmark Problems for FSI Mechstud Main CFD Forum 4 July 26, 2011 13:13
Help required to solve Hydraulic related problems aero CFX 0 October 30, 2006 12:00
Some problems with Star CD Micha Siemens 0 August 6, 2003 14:55
unstructured grid sreekanth Main CFD Forum 1 August 6, 2001 16:09


All times are GMT -4. The time now is 10:07.