CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   BuoyantFoam problem (https://www.cfd-online.com/Forums/openfoam-solving/58339-buoyantfoam-problem.html)

miquelvinya October 4, 2007 04:34

Hi all, I have made a geome
 
Hi all,

I have made a geometry that is basically a cube with an inlet of fresh air (298K) and an outlet of wasted hot air, walls at 303 K, ground at 298K and ceiling at 308K. I fix the inlet velocity as 1 m/s and gravity in environmental properties. All I want is to simulate the profile for the air between inlet and outlet.

Here there are 2 pictures of the case:
http://www.cfd-online.com/OpenFOAM_D...ges/1/5565.jpg
http://www.cfd-online.com/OpenFOAM_D...ges/1/5566.jpg

When I run the case I obtain:

#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in "/home/mvinya/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/mvinya/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted: [0xffffe420]
#3 Foam::compressible::turbulenceModels::kEpsilon::kE psilon(Foam::GeometricField<double,> const&, Foam::GeometricField<foam::vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double,> const&, Foam::basicThermo&) in "/home/mvinya/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libcompressibleTurbulenceModels.so"
#4 Foam::compressible::turbulenceModel::adddictionary ConstructorToTable<foam::compressible::turbulencem odels::kepsilon>::New(Foam::GeometricField<double, > const&, Foam::GeometricField<foam::vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double,> const&, Foam::basicThermo&) in "/home/mvinya/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libcompressibleTurbulenceModels.so"
#5 Foam::compressible::turbulenceModel::New(Foam::Geo metricField<double,> const&, Foam::GeometricField<foam::vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double,> const&, Foam::basicThermo&) in "/home/mvinya/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libcompressibleTurbulenceModels.so"
#6 main in "/home/mvinya/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/buoyantFoam"
#7 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#8 Foam::regIOobject::readIfModified() in "/home/mvinya/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/buoyantFoam"

Is there anything that I forget?

Thank you!!
Miquel

prashant24983 October 4, 2007 05:31

I believe there is something w
 
I believe there is something wrong with the internal field that you have initialised in k epsilon file... Make sure that they are not initialised to zero

miquelvinya October 4, 2007 07:24

Thanks Prashant, I tryed yo
 
Thanks Prashant,

I tryed your option because I forgot k and epsilon values for the internal field, but the problem persists with the same message...

#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in "/home/mvinya/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/mvinya/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted: [0xffffe420]
#3 Foam::compressible::turbulenceModels::kEpsilon::kE psilon(Foam::GeometricField<do uble,> const&, Foam::GeometricField<foam::vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double,> const&, Foam::basicThermo&) in "/home/mvinya/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libcompressibleTurbulenc eModels.so"
#4 Foam::compressible::turbulenceModel::adddictionary ConstructorToTable<foam::compr essible::turbulencemodels::kepsilon>::New(Foam::Ge ometricField<double,> const&, Foam::GeometricField<foam::vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double,> const&, Foam::basicThermo&) in "/home/mvinya/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libcompressibleTurbulenc eModels.so"
#5 Foam::compressible::turbulenceModel::New(Foam::Geo metricField<double,> const&, Foam::GeometricField<foam::vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double,> const&, Foam::basicThermo&) in "/home/mvinya/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libcompressibleTurbulenc eModels.so"
#6 main in "/home/mvinya/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/buoyantFoam "
#7 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#8 Foam::regIOobject::readIfModified() in "/home/mvinya/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/buoyantFoam "

Wha can I try now? Thanks in advance,
Miquel

prashant24983 October 4, 2007 08:25

Check the R file in the 0 dire
 
Check the R file in the 0 directory, just like in the buoyantFoam tutorial set the internalField likewise

dimensions [0 2 -2 0 0 0 0];
internalField uniform (0 0 0 0 0 0 0 0 0)

followed by the patches, I believe the zeroGradient patch should work.

If the problem persists I believe the problem is with the implementation of boundary conditions.

Can you post the case or mail it at prashantojha@gmail.com

miquelvinya October 5, 2007 05:13

I would specially thank to Pra
 
I would specially thank to Prashant for helping me.

I changed intitial conditions such as k, epsilon and pressure. With this there is no zerodivision problem. And then I reduced timestep to 0.05 s.

Here there are the results:
http://www.cfd-online.com/OpenFOAM_D...ges/1/5583.jpg

=)
Miquel

miquelvinya October 5, 2007 10:51

The next step was to create a
 
The next step was to create a more complex case based in the above described. When I try to run the case the solver shows me this message:

Create time

Create mesh for time = 0


Reading environmentalProperties
Reading thermophysical properties

Selecting thermodynamics package hThermo<puremixture<consttransport<speciethermo<hc onstthermo<perfectgas>>>>>
#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in "/home/mvinya/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/mvinya/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted: [0xffffe420]
#3 Foam::hThermo<foam::puremixture<foam::consttranspo rt<foam::speciethermo<foam::hc onstthermo<foam::perfectgas> > > > >::calculate() in "/home/mvinya/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libbasicThermophysicalMo dels.so"
#4 Foam::hThermo<foam::puremixture<foam::consttranspo rt<foam::speciethermo<foam::hc onstthermo<foam::perfectgas> > > > >::hThermo(Foam::fvMesh const&) in "/home/mvinya/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libbasicThermophysicalMo dels.so"
#5 Foam::basicThermo::addfvMeshConstructorToTable<foa m::hthermo<foam::puremixture<f oam::consttransport<foam::speciethermo<foam::hcons tthermo<foam::perfectgas> > > > > >::New(Foam::fvMesh const&) in "/home/mvinya/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libbasicThermophysicalMo dels.so"
#6 Foam::basicThermo::New(Foam::fvMesh const&) in "/home/mvinya/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libbasicThermophysicalMo dels.so"
#7 main in "/home/mvinya/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/buoyantFoam "
#8 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#9 Foam::regIOobject::readIfModified() in "/home/mvinya/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/buoyantFoam "

What can I do now? Thank you!!
Miquel

prashant24983 October 6, 2007 01:18

are you trying to add aother s
 
are you trying to add aother specie in the previous case? What complexities are you talking about?

miquelvinya October 8, 2007 03:15

Hello! The geometry is more
 
Hello!

The geometry is more complex and there are surfaces up to T = 473 K. Is the buoyantFoam thermodynamic package prepared for these temperatures? Must I change the solver?

Thank you!
Miquel

girogirozakk October 12, 2007 08:37

Excuse me. I want to know w
 
Excuse me.

I want to know what type of boundary aer there?
Now , I try same-type calculation.
But , I cannot understand what type of boundary "Inlet Hole" & "Outlet Hole".

I tried "freestreem" or "atmosphere" , but cannot calc.
So , I cannot understand to set U,p ,etc..

Please teach me the setting.


Sorry,I'm not good English-speaker , my sentence is Hard to read...




Thank you!
Giro.

miquelvinya October 15, 2007 09:15

Hello, The values used for
 
Hello,

The values used for my first buoyantFoam simulation were:

INLET

- Type: inlet
- U_y = 0.1 m/s
- k = 0.1
- epsilon = 0.01
- P = 1.0E5 Pa
- T = 295 K

OUTLET

- Type: outlet
- U = 0.0 m/s
- k = 0.1
- epsilon = 0.01
- P = 1.0E5 Pa

WALLS

- Type: fixedTemperatureWallFunction
- U = 0.0 m/s
- k = 0.1
- epsilon = 0.01
- P = 1.0E5 Pa
- T = 303 K

INTERNAL FIELD

- U = 0.0 m/s
- k = 0.1
- epsilon = 0.01
- P = 1.0E5 Pa
- T = 298 K

My simulaion has 90.000 tetrahedra and I fixed dt=0.001 s.

My new simulation crashes. Probably is because wall temperaturea are above 373K.

Is air thermodynamic package prepared for properties at that temperature (hThermo...)??

If not, why my crash report shows me a sigFpe message??



Thanks for your attention,
Miquel

prashant24983 October 15, 2007 09:28

Please check your thermoPhysic
 
Please check your thermoPhysicalProperties file.

Try this for Air instead of previous form... Hope this helps.

mixture air 1 28.9 1000 2.544e+06 1.8e-05 0.7;

girogirozakk October 15, 2007 22:18

Thanks ! I could get some res
 
Thanks !
I could get some result for my calc.

Giro

miquelvinya October 16, 2007 02:28

Thanks Prashant, The case i
 
Thanks Prashant,

The case is correctly running.

Regards,
Miquel

ep4 November 6, 2008 06:17

Hi, i'm trying to use the s
 
Hi,

i'm trying to use the solver buoyantFoam for natural convection and having some difficulties: temperatures increasing untill the simulation crashes.

I would like to make a simple test. I have a flat plate case wich gives satisfying results with turbFoam. I would like to reproduce these results with buoyantFoam, setting g= (0 0 0) in the envireonnemental properties (no buoyancy effects) and using constant temperature boundaries, equal to the initial intern field (no heat transfer phenomenons). However, it doesn't work. I have also tried with adiabatic boundaries. For each case, i obtain after several time steps temperature of order of 10000000 K !!

It makes me think to stability problems. Using the Euler or backwrd time schemes which are implicit (User Guide U-112), i don't understand, with my theoritical knowledge of CFD, why i encounter problems of stability.
I have similar problems with buoyantSimpleFoam.

Could someone say me what i'm doing wrong?

Thank you

Eric

prashant24983 November 6, 2008 06:49

Use "fixedFluxBuoyantPressure"
 
Use "fixedFluxBuoyantPressure" for the flat plate boundary at "p". I think the problem is in getting the boundary conditions right. Can you paste your "p" boundary condition here?

ep4 November 7, 2008 03:07

Hi everybody, i have change
 
Hi everybody,

i have changed the intern initial velocity field by (10 0 0) in place of (0 0 0). It is more stable, i mean, the really high temperatures appear later...

Any idea to help me?

Thank you

prashant24983 November 7, 2008 03:58

Hello Pattyn, I have reali
 
Hello Pattyn,

I have realized that the code for buoyantFoam and buoyantSimpleFoam has changed considerably from version 1.4.1 to 1.5. Even though, I am not very clear about the declaration of pd and p in version 1.5, I can help you with some basics based on how I understand the buoyantFoam from version 1.4.1.

pd is dynamic pressure. In the simple form is 0.5*rho*V^2. In your declaration of pd you provide a '0' value to fluid coming in and going out. Which I must say is not right. For inlet and outlet provide a zeroGradient boundary condition.

Also make sure that you are not providing a fixedValue boundary condition for inlet and outlet patches in 'T'

Most times your solution may blow up because of the courant number.Check the courant number as your iterations progresses.

I have few questions, What is Up? is it wall? if its not then your pd should look something like this.

internalField uniform 0;

boundaryField
{
WallDown
{
type fixedFluxBuoyantPressure;
value uniform 0;
}

Inlet
{
type zeroGradient;
}

Outlet
{
type zeroGradient;
}

Up
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}

prashant24983 November 7, 2008 04:12

If your boundary conditions ar
 
If your boundary conditions are not right, this leads to wrong calculation of the pEqn which eventually results in irrational p values, and irrational velocities.. so your maximum courant number eventually will make you worry!

prashant24983 November 7, 2008 07:33

Hello Eric, Its really dif
 
Hello Eric,

Its really difficult to say what might be the exact trouble!

If you are using turbulence do you observe bounding errors? Just switch off turbulence and see if the error remains.

If possible send your case to me prashantojha@gmail.com

Though, I can look at it only tomorrow.

Regards,

ep4 November 7, 2008 08:03

Thank you for your help. I'm g
 
Thank you for your help. I'm going to search a solution this afternoon and if it doesn't work i will send the case to you.

I have the impression that the problem could come from the T file given that the case runs well with turbFoam.

It appears me logical tu use a fixed temperature at the inlet and the plate, a zeroGradient condition at the boundary Up (infront of the plate).
And i'm wondering if it would be possible no to impose anything at the Outlet. It is not logical for me to impose a temperature or a gradient at this boundary.

Any comments?

Thank you

ep4 November 7, 2008 09:24

Just a precision: imposing no
 
Just a precision: imposing no boundary condition for temperature at the Outlet would mean for me to use a "calculated" condition.
When trying to use it, i receive the following error:

Starting time loop

Courant Number mean: 0.00606061 max: 0.133333
Time = 0.0005

diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 1.13964e-06, No Iterations 3
DILUPBiCG: Solving for Uz, Initial residual = 0.999969, Final residual = 2.03988e-07, No Iterations 4



gradientInternalCoeffs cannot be called for a calculatedFvPatchField
on patch Outlet of field h in file "/net/ric_home/ep4/OpenFOAM/eric-1.5/run/Flatplate_no_buoyant_unstaedy/0/h"
You are probably trying to solve for a field with a default boundary condition.

From function calculatedFvPatchField<type>::gradientInternalCoef fs() const
in file fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C at line 187.

FOAM exiting

prashant24983 November 7, 2008 10:13

Hello Eric, Quoting from y
 
Hello Eric,

Quoting from your post:

"It appears me logical tu use a fixed temperature at the inlet and the plate, a zeroGradient condition at the boundary Up (infront of the plate)."

Thats right, I take back my words. I misread your earlier post and had a completely different case in my mind while replying.

Well, I am retiring for the day but I would like you to check the following boundary conditions.

p:

internalField uniform 100000;

boundaryField
{
WallDown
{
type calculated;
value uniform 100000;
}

Inlet
{
type zeroGradient
}

Outlet
{
type zeroGradient;
}

Up
{
type zeroGradient;
}
}

// ************************************************** *********************** //

pd:

dimensions [1 -1 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
WallDown
{
type fixedFluxBuoyantPressure;
value uniform 0;
}

Inlet
{
type fixedValue;
value uniform 50;
}

Outlet
{
type fixedValue;
value uniform 0;
}

Up
{
type fixedValue;
value uniform 0;
}
frontAndBack
{
type empty;
}
}

// ************************************************** *********************** //


T:

dimensions [0 0 0 1 0 0 0];

internalField uniform 300;

boundaryField
{
WallDown
{
type fixedValue;
value uniform 300;
}

Inlet
{
type fixedValue;
value uniform 300;
}

Outlet
{
type zeroGradient;
}

Up
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}

// ************************************************** *********************** //


U:

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
WallDown
{
type fixedValue;
value uniform (0 0 0);
}

Inlet
{
type fixedValue;
value uniform (10 0 0);
}

Outlet
{
type zeroGradient;
}
Up
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}

// ************************************************** *********************** //

ep4 November 7, 2008 10:33

You were right, setting turbul
 
You were right, setting turbulence off and the simulation is ok. However, i don't know what i should do in order to use the kEpsilon model. Change my initial values for k and epsilon? I had followed the example in tutorial (User guide U-41).

Is it possible that the initial values of epsilon and k influences my results (it can diverge!) even if i have set teubulence off??

Thanks

Eric

prashant24983 November 8, 2008 00:39

It seems that the discretizati
 
It seems that the discretization needs tuning, if you keep on getting the bounding error for k and epsilon the solution may blow up.

Just try tightening your tolerances.

Regards,

lynx November 13, 2008 13:34

Hello Foamers, i also have
 
Hello Foamers,

i also have a problem with the buoyantFoam solver. I want to simulate a Cell with 1.1mmx10mm in x-y direction and 2D.

For testing i let the Fluid "air" in the "thermophysicalProperties"-File (simply copied the hotRoom example), but now i want to change to a liquid. Do i have to change the "thermoType"? Because i read in the Openfoam website something about liquids and so on. And in which combination can i use the keywords out from the UserGuide?

test case with "air":
hThermo<puremixture<consttransport<speciethermo<hc onstthermo<perfectgas>>>>>

The problem is, when i change the vaules for W, c_p, eta and Pr to the liquids (n_moles [1] and H_f [o] not changed) the velocities don't fit the experiment results. But is is of course different to the "air"-result.

Do i have to set the H_f value? Do i need it only when i want to "melt ice to water"?

thank you in advance

greets http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

ep4 November 14, 2008 05:52

Hi, I'm considering a heate
 
Hi,

I'm considering a heated channel flow.
On the plate, where the velocity is zero, the value of pd is different of zero while i thought pd was the dynamic pressure... Actually, i have a variation along x (direction of the flow) which makes me think to a rho g h quantity but i have set g=0 in the environnemental properties.

I have the similar problem with the p quantity of turbFoam, which is the kinematic pressure (User guide U-22). If p= rho V^2/2, for the same case but without heat, p should be 0 on the wall. However, i have the same value as pd for the heated case.

Could someone help me to understand what are these variables exactly?

Thank you

Eric


All times are GMT -4. The time now is 01:02.